function _Z(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F_(Object(n),!0).forEach(function(r){it(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function A0(e){return A0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A0(e)}function or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sr(e,t,n){return t&&B_(e.prototype,t),n&&B_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MN(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$7(e,t)}function E5(e){return E5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E5(e)}function $7(e,t){return $7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$7(e,t)}function AZ(e,t){if(e==null)return{};var n,r,i=function(s,a){if(s==null)return{};var c,u,d={},f=Object.keys(s);for(u=0;u<f.length;u++)c=f[u],a.indexOf(c)>=0||(d[c]=s[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $Z(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function IN(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=E5(e);if(t){var i=E5(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $Z(this,n)}}function Os(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,s,a=[],c=!0,u=!1;try{for(i=i.call(n);!(c=(o=i.next()).done)&&(a.push(o.value),!r||a.length!==r);c=!0);}catch(d){u=!0,s=d}finally{try{c||i.return==null||i.return()}finally{if(u)throw s}}return a}}(e,t)||sS(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function T5(e){return function(t){if(Array.isArray(t))return D7(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||sS(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sS(e,t){if(e){if(typeof e=="string")return D7(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)?D7(e,t):void 0}}function D7(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}function ka(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=sS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return s=c.done,c},e:function(c){a=!0,o=c},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}var wd={DEBUG:!1,LIB_VERSION:"1.105.4"},DZ=Array.isArray,LN=Object.prototype,NN=LN.hasOwnProperty,Lm=LN.toString,Tr=DZ||function(e){return Lm.call(e)==="[object Array]"},H_=function(e){return Lm.call(e)==="[object Uint8Array]"},Zo=function(e){return typeof e=="function"},zc=function(e){return e===Object(e)&&!Tr(e)},Ht=function(e){return e===void 0},Co=function(e){return Lm.call(e)=="[object String]"},fi=function(e){return e===null},Ms=function(e){return Lm.call(e)=="[object Number]"},O7=function(e){return Lm.call(e)==="[object Boolean]"},he=typeof window<"u"?window:void 0,_a=typeof globalThis<"u"?globalThis:he,FN=Array.prototype,z_=FN.forEach,U_=FN.indexOf,V_=_a==null?void 0:_a.navigator,yt=_a==null?void 0:_a.document,fc=_a==null?void 0:_a.location,P7=_a==null?void 0:_a.fetch,j_=_a==null?void 0:_a.XMLHttpRequest,lr=V_==null?void 0:V_.userAgent,pi=he!=null?he:{},W_="[PostHog.js]",je={_log:function(e){if(he&&(wd.DEBUG||pi.POSTHOG_DEBUG)&&!Ht(he.console)&&he.console){for(var t=("__rrweb_original__"in he.console[e])?he.console[e].__rrweb_original__:he.console[e],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.apply(void 0,[W_].concat(r))}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];je._log.apply(je,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];je._log.apply(je,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];je._log.apply(je,["error"].concat(t))},critical:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[W_].concat(n))},uninitializedWarning:function(e){je.error("You must initialize PostHog before calling ".concat(e))}},aS={},k5=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function cf(e,t,n){if(Tr(e)){if(z_&&e.forEach===z_)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===aS)return}}}function En(e,t,n){if(!fi(e)&&!Ht(e)){if(Tr(e))return cf(e,t,n);for(var r in e)if(NN.call(e,r)&&t.call(n,e[r],r)===aS)return}}var Kr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return cf(n,function(i){for(var o in i)i[o]!==void 0&&(e[o]=i[o])}),e};function un(e,t){return e.indexOf(t)!==-1}function b4(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var BN=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},q_=function(e){try{return e()}catch{return}},HN=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){je.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),je.critical(i)}}},R7=function(e){var t={};return En(e,function(n,r){Co(n)&&n.length>0&&(t[r]=n)}),t},OZ=["$performance_raw"];function PZ(e,t){return n=e,r=function(o,s){return s&&OZ.indexOf(s)>-1?o:Co(o)&&!fi(t)?o.slice(0,t):o},i=new Set,function o(s,a){return s!==Object(s)?r?r(s,a):s:i.has(s)?void 0:(i.add(s),Tr(s)?(c=[],cf(s,function(u){c.push(o(u))})):(c={},En(s,function(u,d){i.has(u)||(c[d]=o(u,d))})),c);var c}(n);var n,r,i}function lS(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",d=[];if(!e)return e;e=RZ(e);do t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,d[c++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i);while(a<e.length);switch(u=d.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}var RZ=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
`).replace(/\r/g,`
`)).length,i=0;i<r;i++){var s=e.charCodeAt(i),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),fi(a)||(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},Bp=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var s="on"+n,a=t[s];t[s]=function(c,u,d){return function(f){if(f=f||e(he==null?void 0:he.event)){var h,p=!0;Zo(d)&&(h=d(f));var m=u.call(c,f);return h!==!1&&m!==!1||(p=!1),p}}}(t,r,a)}else je.error("No valid element provided to register_event")}}();function Hp(e,t){var n=function(){if(!yt)return t("document not found");var r=yt.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(s){return t(void 0,s)},r.onerror=function(s){return t(s)};var i,o=yt.querySelectorAll("body > script");o.length>0?(i=o[0].parentNode)===null||i===void 0||i.insertBefore(r,o[0]):yt.body.appendChild(r)};yt!=null&&yt.body?n():yt==null||yt.addEventListener("DOMContentLoaded",n)}function cS(e){return e?k5(e).split(/\s+/):[]}function _5(e){var t="";switch(A0(e.className)){case"string":t=e.className;break;case"object":t=("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return cS(t)}function A5(e){var t="";return x4(e)&&!jN(e)&&e.childNodes&&e.childNodes.length&&En(e.childNodes,function(n){UN(n)&&n.textContent&&(t+=k5(n.textContent).split(/(\s+)/).filter(P1).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),k5(t)}function zN(e){return!!e&&e.nodeType===1}function cd(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function UN(e){return!!e&&e.nodeType===3}function VN(e){return!!e&&e.nodeType===11}var M7=["a","button","form","input","select","textarea","label"];function MZ(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!he||!e||cd(e,"html")||!zN(e))return!1;if(n!=null&&n.url_allowlist){var r=he.location.href,i=n.url_allowlist;if(i&&!i.some(function(p){return r.match(p)}))return!1}if(n!=null&&n.dom_event_allowlist){var o=n.dom_event_allowlist;if(o&&!o.some(function(p){return t.type===p}))return!1}for(var s=!1,a=[e],c=!0,u=e;u.parentNode&&!cd(u,"body");)if(VN(u.parentNode))a.push(u.parentNode.host),u=u.parentNode.host;else{if(!(c=u.parentNode||!1))break;if(M7.indexOf(c.tagName.toLowerCase())>-1)s=!0;else{var d=he.getComputedStyle(c);d&&d.getPropertyValue("cursor")==="pointer"&&(s=!0)}a.push(c),u=c}if(!function(p,m){var v=m==null?void 0:m.element_allowlist;if(Ht(v))return!0;var b,x=ka(p);try{var C=function(){var S=b.value;if(v.some(function(T){return S.tagName.toLowerCase()===T}))return{v:!0}};for(x.s();!(b=x.n()).done;){var w=C();if(A0(w)==="object")return w.v}}catch(S){x.e(S)}finally{x.f()}return!1}(a,n)||!function(p,m){var v=m==null?void 0:m.css_selector_allowlist;if(Ht(v))return!0;var b,x=ka(p);try{var C=function(){var S=b.value;if(v.some(function(T){return S.matches(T)}))return{v:!0}};for(x.s();!(b=x.n()).done;){var w=C();if(A0(w)==="object")return w.v}}catch(S){x.e(S)}finally{x.f()}return!1}(a,n))return!1;var f=he.getComputedStyle(e);if(f&&f.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return t.type==="submit";case"input":case"select":case"textarea":return t.type==="change"||t.type==="click";default:return s?t.type==="click":t.type==="click"&&(M7.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function x4(e){for(var t=e;t.parentNode&&!cd(t,"body");t=t.parentNode){var n=_5(t);if(un(n,"ph-sensitive")||un(n,"ph-no-capture"))return!1}if(un(_5(e),"ph-include"))return!0;var r=e.type||"";if(Co(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!(Co(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function jN(e){return!!(cd(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||cd(e,"select")||cd(e,"textarea")||e.getAttribute("contenteditable")==="true")}function P1(e){return!(fi(e)||Ht(e)||Co(e)&&(e=k5(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))}function K_(e){var t=A5(e);return P1(t="".concat(t," ").concat(WN(e)).trim())?t:""}function WN(e){var t="";return e&&e.childNodes&&e.childNodes.length&&En(e.childNodes,function(n){var r;if(n&&((r=n.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{var i=A5(n);t="".concat(t," ").concat(i).trim(),n.childNodes&&n.childNodes.length&&(t="".concat(t," ").concat(WN(n)).trim())}catch(o){je.error(o)}}),t}function IZ(e){return function(t){var n=t.map(function(r){var i,o,s="";if(r.tag_name&&(s+=r.tag_name),r.attr_class){r.attr_class.sort();var a,c=ka(r.attr_class);try{for(c.s();!(a=c.n()).done;){var u=a.value;s+=".".concat(u.replace(/"/g,""))}}catch(h){c.e(h)}finally{c.f()}}var d=St(St(St(St({},r.text?{text:r.text}:{}),{},{"nth-child":(i=r.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(o=r.nth_of_type)!==null&&o!==void 0?o:0},r.href?{href:r.href}:{}),r.attr_id?{attr_id:r.attr_id}:{}),r.attributes),f={};return b4(d).sort(function(h,p){var m=Os(h,1)[0],v=Os(p,1)[0];return m.localeCompare(v)}).forEach(function(h){var p=Os(h,2),m=p[0],v=p[1];return f[G_(m.toString())]=G_(v.toString())}),s+=":",s+=b4(d).map(function(h){var p=Os(h,2),m=p[0],v=p[1];return"".concat(m,'="').concat(v,'"')}).join("")});return n.join(";")}(function(t){return t.map(function(n){var r,i,o={text:(r=n.$el_text)===null||r===void 0?void 0:r.slice(0,400),tag_name:n.tag_name,href:(i=n.attr__href)===null||i===void 0?void 0:i.slice(0,2048),attr_class:LZ(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return b4(n).filter(function(s){return Os(s,1)[0].indexOf("attr__")===0}).forEach(function(s){var a=Os(s,2),c=a[0],u=a[1];return o.attributes[c]=u}),o})}(e))}function G_(e){return e.replace(/"|\\"/g,'\\"')}function LZ(e){var t=e.attr__class;return t?Tr(t)?t:cS(t):void 0}var NZ=function(){function e(t){or(this,e),this.clicks=[],this.enabled=t}return sr(e,[{key:"isRageClick",value:function(t,n,r){if(!this.enabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}]),e}(),qN="$people_distinct_id",C4="__alias",kp="__timers",Y_="$autocapture_disabled_server_side",I7="$session_recording_enabled_server_side",Q_="$console_log_recording_enabled_server_side",X_="$session_recording_recorder_version_server_side",Z_="$session_recording_network_payload_capture",$5="$sesid",w4="$session_is_sampled",R1="$enabled_feature_flags",L7="$early_access_features",M1="$stored_person_properties",hc="$stored_group_properties",N7="$surveys",D5="$flag_call_reported",F7="$user_state",B7="$posthog_quota_limited",H7="$client_session_props",FZ=[qN,C4,"__cmpns",kp,I7,$5,R1,F7,B7,L7,hc,M1,N7,D5,H7];function F9(e,t){return t.length>e?t.slice(0,e)+"...":t}var Sc={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(e){var t,n=fi(this._isDisabledServerSide)?!((t=e.persistence)===null||t===void 0||!t.props[Y_]):this._isDisabledServerSide,r=!!e.config.autocapture;this._isAutocaptureEnabled=r&&!n},_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!zN(t));return t},_getAugmentPropertiesFromElement:function(e){if(!x4(e))return{};var t={};return En(e.attributes,function(n){if(n.name.indexOf("data-ph-capture-attribute")===0){var r=n.name.replace("data-ph-capture-attribute-",""),i=n.value;r&&i&&P1(i)&&(t[r]=i)}}),t},_getPropertiesFromElement:function(e,t,n){var r,i=e.tagName.toLowerCase(),o={tag_name:i};M7.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?o.$el_text=F9(1024,K_(e)):o.$el_text=F9(1024,A5(e)));var s=_5(e);s.length>0&&(o.classes=s.filter(function(f){return f!==""}));var a=(r=this.config)===null||r===void 0?void 0:r.element_attribute_ignorelist;En(e.attributes,function(f){var h;if((!jN(e)||["name","id","class"].indexOf(f.name)!==-1)&&(a==null||!a.includes(f.name))&&!t&&P1(f.value)&&(h=f.name,!Co(h)||h.substring(0,10)!=="_ngcontent"&&h.substring(0,7)!=="_nghost")){var p=f.value;f.name==="class"&&(p=cS(p).join(" ")),o["attr__"+f.name]=F9(1024,p)}});for(var c=1,u=1,d=e;d=this._previousElementSibling(d);)c++,d.tagName===e.tagName&&u++;return o.nth_child=c,o.nth_of_type=u,o},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return En(yt==null?void 0:yt.querySelectorAll(e.css_selector),function(n){var r;["input","select"].indexOf(n.tagName.toLowerCase())>-1?r=n.value:n.textContent&&(r=n.textContent),P1(r)&&t.push(r)}),t.join(", ")},_getCustomProperties:function(e){var t=this,n={};return En(this._customProperties,function(r){En(r.event_selectors,function(i){En(yt==null?void 0:yt.querySelectorAll(i),function(o){un(e,o)&&x4(o)&&(n[r.name]=t._extractCustomPropertyValue(r))})})}),n},_getEventTarget:function(e){return Ht(e.target)?e.srcElement||null:(t=e.target)!==null&&t!==void 0&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t},_captureEvent:function(e,t){var n,r=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",o=this._getEventTarget(e);if(UN(o)&&(o=o.parentNode||null),i==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&(n=this.rageclicks)!==null&&n!==void 0&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,t,"$rageclick"),o&&MZ(o,e,this.config)){for(var s,a,c=[o],u=o;u.parentNode&&!cd(u,"body");)VN(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,f=[],h={},p=!1;if(En(c,function(v){var b=x4(v);v.tagName.toLowerCase()==="a"&&(d=v.getAttribute("href"),d=b&&P1(d)&&d),un(_5(v),"ph-no-capture")&&(p=!0),f.push(r._getPropertiesFromElement(v,t.config.mask_all_element_attributes,t.config.mask_all_text));var x=r._getAugmentPropertiesFromElement(v);Kr(h,x)}),t.config.mask_all_text||(o.tagName.toLowerCase()==="a"||o.tagName.toLowerCase()==="button"?f[0].$el_text=K_(o):f[0].$el_text=A5(o)),d&&(f[0].attr__href=d),p)return!1;var m=Kr(this._getDefaultProperties(e.type),t.elementsChainAsString?{$elements_chain:IZ(f)}:{$elements:f},(s=f[0])!==null&&s!==void 0&&s.$el_text?{$el_text:(a=f[0])===null||a===void 0?void 0:a.$el_text}:{},this._getCustomProperties(c),h);return t.capture(i,m),!0}},_navigate:function(e){he&&(he.location.href=e)},_addDomEventHandlers:function(e){var t=this;if(he&&yt){var n=function(r){r=r||(he==null?void 0:he.event),t._captureEvent(r,e)};Bp(yt,"submit",n,!1,!0),Bp(yt,"change",n,!1,!0),Bp(yt,"click",n,!1,!0)}},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;O7(e.__autocapture)||(this.config=e.__autocapture),(t=this.config)!==null&&t!==void 0&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(n){return new RegExp(n)})),this.rageclicks=new NZ(e.config.rageclick)},afterDecideResponse:function(e,t){var n=t.config.token;this._initializedTokens.indexOf(n)>-1?je.info('autocapture already initialized for token "'+n+'"'):(t.persistence&&t.persistence.register(it({},Y_,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this._setIsAutocaptureEnabled(t),this._initializedTokens.push(n),e&&e.config&&e.config.enable_collect_everything&&this._isAutocaptureEnabled?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,n){if(!e)return!0;t=Ht(t)?10:t,n=Ht(n)?10:n;for(var r=0,i=0;i<e.length;i++)r+=e.charCodeAt(i);return r%t<n},isBrowserSupported:function(){return Zo(yt==null?void 0:yt.querySelectorAll)}};(function(e){for(var t in e)Zo(e[t])&&(e[t]=e[t].bind(e))})(Sc),function(e){for(var t in e)Zo(e[t])&&(e[t]=HN(e[t]))}(Sc);var B9="$active_feature_flags",Mg="$override_feature_flags",J_="$feature_flag_payloads",eA=function(e){var t,n={},r=ka(b4(e||{}));try{for(r.s();!(t=r.n()).done;){var i=Os(t.value,2),o=i[0],s=i[1];s&&(n[o]=s)}}catch(a){r.e(a)}finally{r.f()}return n},BZ=function(){function e(t){or(this,e),this.instance=t,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return sr(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var t=this.instance.get_property(R1),n=this.instance.get_property(Mg);if(!n)return t||{};for(var r=Kr({},t),i=Object.keys(n),o=0;o<i.length;o++)n[i[o]]===!1?delete r[i[o]]:r[i[o]]=n[i[o]];return this._override_warning||(je.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._override_warning=!0),r}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(J_)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(t){this.$anon_distinct_id=t}},{key:"setReloadingPaused",value:function(t){this.reloadFeatureFlagsInAction=t}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var t=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!t.reloadFeatureFlagsInAction&&t.reloadFeatureFlagsQueued&&(t.reloadFeatureFlagsQueued=!1,t._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var t=this;if(!this.instance.config.advanced_disable_feature_flags){this.setReloadingPaused(!0);var n=this.instance.config.token,r=this.instance.get_property(M1),i=this.instance.get_property(hc),o=lS(JSON.stringify({token:n,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:r,group_properties:i,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.requestRouter.endpointFor("decide","/decide/?v=3"),{data:o},{method:"POST"},this.instance._prepare_callback(function(s){t.$anon_distinct_id=void 0,t.receivedFeatureFlags(s),t.setReloadingPaused(!1),t._startReloadTimer()}))}}},{key:"getFeatureFlag",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var r,i=this.getFlagVariants()[t],o="".concat(i),s=this.instance.get_property(D5)||{};return(n.send_event||!("send_event"in n))&&(!(t in s)||!s[t].includes(o))&&(Tr(s[t])?s[t].push(o):s[t]=[o],(r=this.instance.persistence)===null||r===void 0||r.register(it({},D5,s)),this.instance.capture("$feature_flag_called",{$feature_flag:t,$feature_flag_response:i})),i}je.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(t){return this.getFlagPayloads()[t]}},{key:"isFeatureEnabled",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(t,n);je.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers.push(t)}},{key:"removeFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(n){return n!==t})}},{key:"receivedFeatureFlags",value:function(t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads();(function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=i.featureFlags,u=i.featureFlagPayloads;if(c)if(Tr(c)){var d,f={};if(c)for(var h=0;h<c.length;h++)f[c[h]]=!0;o&&o.register((it(d={},B9,c),it(d,R1,f),d))}else{var p,m=c,v=u;i.errorsWhileComputingFlags&&(m=St(St({},s),m),v=St(St({},a),v)),o&&o.register((it(p={},B9,Object.keys(eA(m))),it(p,R1,m||{}),it(p,J_,v||{}),p))}})(t,this.instance.persistence,n,r),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(t){if(!this.instance.__loaded||!this.instance.persistence)return je.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,t===!1)this.instance.persistence.unregister(Mg);else if(Tr(t)){for(var n={},r=0;r<t.length;r++)n[t[r]]=!0;this.instance.persistence.register(it({},Mg,n))}else this.instance.persistence.register(it({},Mg,t))}},{key:"onFeatureFlags",value:function(t){var n=this;if(this.addFeatureFlagsHandler(t),this.instance.decideEndpointWasHit){var r=this._prepareFeatureFlagsForCallbacks(),i=r.flags,o=r.flagVariants;t(i,o)}return function(){return n.removeFeatureFlagsHandler(t)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,n){var r,i,o=it({},"$feature_enrollment/".concat(t),n);this.instance.capture("$feature_enrollment_update",{$feature_flag:t,$feature_enrollment:n,$set:o}),this.setPersonPropertiesForFlags(o,!1);var s=St(St({},this.getFlagVariants()),{},it({},t,n));(r=this.instance.persistence)===null||r===void 0||r.register((it(i={},B9,Object.keys(eA(s))),it(i,R1,s),i)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(L7);if(i&&!r)return t(i);this.instance._send_request(this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),{},{method:"GET"},function(o){var s,a=o.earlyAccessFeatures;return(s=n.instance.persistence)===null||s===void 0||s.register(it({},L7,a)),t(a)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter(function(r){return n[r]}),flagVariants:Object.keys(n).filter(function(r){return n[r]}).reduce(function(r,i){return r[i]=n[i],r},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach(function(i){return i(n,r)})}},{key:"setPersonPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(M1)||{};this.instance.register(it({},M1,St(St({},r),t))),n&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(M1)}},{key:"setGroupPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(hc)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(function(i){r[i]=St(St({},r[i]),t[i]),delete t[i]}),this.instance.register(it({},hc,St(St({},r),t))),n&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(t){if(t){var n=this.instance.get_property(hc)||{};this.instance.register(it({},hc,St(St({},n),{},it({},t,{}))))}else this.instance.unregister(hc)}}]),e}();Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ms(e)&&isFinite(e)&&Math.floor(e)===e});var tA="0123456789abcdef",HZ=function(){function e(t){if(or(this,e),this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}return sr(e,[{key:"toString",value:function(){for(var t="",n=0;n<this.bytes.length;n++)t=t+tA.charAt(this.bytes[n]>>>4)+tA.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}},{key:"clone",value:function(){return new e(this.bytes.slice(0))}},{key:"equals",value:function(t){return this.compareTo(t)===0}},{key:"compareTo",value:function(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}],[{key:"fromFieldsV7",value:function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=t/Math.pow(2,40),o[1]=t/Math.pow(2,32),o[2]=t/Math.pow(2,24),o[3]=t/Math.pow(2,16),o[4]=t/Math.pow(2,8),o[5]=t,o[6]=112|n>>>8,o[7]=n,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)}}]),e}(),zZ=function(){function e(){or(this,e),it(this,"timestamp",0),it(this,"counter",0),it(this,"random",new UZ)}return sr(e,[{key:"generate",value:function(){var t=this.generateOrAbort();if(Ht(t)){this.timestamp=0;var n=this.generateOrAbort();if(Ht(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}},{key:"generateOrAbort",value:function(){var t=Date.now();if(t>this.timestamp)this.timestamp=t,this.resetCounter();else{if(!(t+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return HZ.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),e}(),KN=function(e){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};he&&!Ht(he.crypto)&&crypto.getRandomValues&&(KN=function(e){return crypto.getRandomValues(e)});var nA,UZ=function(){function e(){or(this,e),it(this,"buffer",new Uint32Array(8)),it(this,"cursor",1/0)}return sr(e,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(KN(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),e}(),Qu=function(){return VZ().toString()},VZ=function(){return(nA||(nA=new zZ)).generate()},jZ="Thu, 01 Jan 1970 00:00:00 GMT",Qh="",WZ=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function qZ(e,t){if(t){var n=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yt;if(Qh)return Qh;if(!o||["localhost","127.0.0.1"].includes(i))return"";for(var s=i.split("."),a=Math.min(s.length,8),c="dmn_chk_"+Qu(),u=new RegExp("(^|;)\\s*"+c+"=1");!Qh&&a--;){var d=s.slice(a).join("."),f=c+"=1;domain=."+d;o.cookie=f,u.test(o.cookie)&&(o.cookie=f+";expires="+jZ,Qh=d)}return Qh}(e);if(!n){var r=function(i){var o=i.match(WZ);return o?o[0]:""}(e);r!==n&&je.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var ba={is_supported:function(){return!!yt},error:function(e){je.error("cookieStore error: "+e)},get:function(e){if(yt){try{for(var t=e+"=",n=yt.cookie.split(";").filter(function(o){return o.length}),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},parse:function(e){var t;try{t=JSON.parse(ba.get(e))||{}}catch{}return t},set:function(e,t,n,r,i){if(yt)try{var o="",s="",a=qZ(yt.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+24*n*60*60*1e3),o="; expires="+c.toUTCString()}i&&(s="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return u.length>3686.4&&je.warn("cookieStore warning: large cookie, len="+u.length),yt.cookie=u,u}catch{return}},remove:function(e,t){try{ba.set(e,"",-1,t)}catch{return}}},H9=null,pr={is_supported:function(){if(!fi(H9))return H9;var e=!0;if(Ht(he))e=!1;else try{var t="__mplssupport__";pr.set(t,"xyz"),pr.get(t)!=='"xyz"'&&(e=!1),pr.remove(t)}catch{e=!1}return e||je.error("localStorage unsupported; falling back to cookie store"),H9=e,e},error:function(e){je.error("localStorage error: "+e)},get:function(e){try{return he==null?void 0:he.localStorage.getItem(e)}catch(t){pr.error(t)}return null},parse:function(e){try{return JSON.parse(pr.get(e))||{}}catch{}return null},set:function(e,t){try{he==null||he.localStorage.setItem(e,JSON.stringify(t))}catch(n){pr.error(n)}},remove:function(e){try{he==null||he.localStorage.removeItem(e)}catch(t){pr.error(t)}}},KZ=["distinct_id",$5,w4],_p=St(St({},pr),{},{parse:function(e){try{var t={};try{t=ba.parse(e)||{}}catch{}var n=Kr(t,JSON.parse(pr.get(e)||"{}"));return pr.set(e,n),n}catch{}return null},set:function(e,t,n,r,i){try{pr.set(e,t);var o={};KZ.forEach(function(s){t[s]&&(o[s]=t[s])}),Object.keys(o).length&&ba.set(e,o,n,r,i)}catch(s){pr.error(s)}},remove:function(e,t){try{he==null||he.localStorage.removeItem(e),ba.remove(e,t)}catch(n){pr.error(n)}}}),Ig={},GZ={is_supported:function(){return!0},error:function(e){je.error("memoryStorage error: "+e)},get:function(e){return Ig[e]||null},parse:function(e){return Ig[e]||null},set:function(e,t){Ig[e]=t},remove:function(e){delete Ig[e]}},$u=null,Yr={is_supported:function(){if(!fi($u))return $u;if($u=!0,Ht(he))$u=!1;else try{var e="__support__";Yr.set(e,"xyz"),Yr.get(e)!=='"xyz"'&&($u=!1),Yr.remove(e)}catch{$u=!1}return $u},error:function(e){je.error("sessionStorage error: ",e)},get:function(e){try{return he==null?void 0:he.sessionStorage.getItem(e)}catch(t){Yr.error(t)}return null},parse:function(e){try{return JSON.parse(Yr.get(e))||null}catch{}return null},set:function(e,t){try{he==null||he.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){Yr.error(n)}},remove:function(e){try{he==null||he.sessionStorage.removeItem(e)}catch(t){Yr.error(t)}}},YZ=["localhost","127.0.0.1"],S4=!(!j_||!("withCredentials"in new j_))||!!P7,GN=function(e){var t=yt==null?void 0:yt.createElement("a");return Ht(t)?null:(t.href=e,t)},QZ=function(e,t){return!!function(n){try{new RegExp(n)}catch{return!1}return!0}(t)&&new RegExp(t).test(e)},rA=function(e,t){for(var n,r=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<r.length;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!Tr(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch{je.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},O5=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},wr={campaignParams:function(e){var t=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gbraid","wbraid","fbclid","msclkid"].concat(e||[]),n={};return En(t,function(r){var i=yt?rA(yt.URL,r):"";i.length&&(n[r]=i)}),n},searchEngine:function(){var e=yt==null?void 0:yt.referrer;return e?e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var e=wr.searchEngine(),t=e!="yahoo"?"q":"p",n={};if(!fi(e)){n.$search_engine=e;var r=yt?rA(yt.referrer,t):"";r.length&&(n.ph_keyword=r)}return n},browser:function(e,t,n){return t=t||"",n||un(e," OPR/")?un(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":un(e,"IEMobile")||un(e,"WPDesktop")?"Internet Explorer Mobile":un(e,"SamsungBrowser/")?"Samsung Internet":un(e,"Edge")||un(e,"Edg/")?"Microsoft Edge":un(e,"FBIOS")?"Facebook Mobile":un(e,"Chrome")?"Chrome":un(e,"CriOS")?"Chrome iOS":un(e,"UCWEB")||un(e,"UCBrowser")?"UC Browser":un(e,"FxiOS")?"Firefox iOS":un(t,"Apple")||function(r){return un(r,"Safari")&&!un(r,"Chrome")&&!un(r,"Android")}(e)?un(e,"Mobile")?"Mobile Safari":"Safari":un(e,"Android")?"Android Mobile":un(e,"Konqueror")||un(e,"konqueror")?"Konqueror":un(e,"Firefox")?"Firefox":un(e,"MSIE")||un(e,"Trident/")?"Internet Explorer":un(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":[/rv:(\d+(\.\d+)?)/],"Microsoft Edge":[/Edge?\/(\d+(\.\d+)?)/],Chrome:[/Chrome\/(\d+(\.\d+)?)/],"Chrome iOS":[/CriOS\/(\d+(\.\d+)?)/],"UC Browser":[/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/],Safari:[/Version\/(\d+(\.\d+)?)/],"Mobile Safari":[/Version\/(\d+(\.\d+)?)/],Opera:[/(Opera|OPR)\/(\d+(\.\d+)?)/],Firefox:[/Firefox\/(\d+(\.\d+)?)/],"Firefox iOS":[/FxiOS\/(\d+(\.\d+)?)/],Konqueror:[/Konqueror[:/]?(\d+(\.\d+)?)/i],BlackBerry:[/BlackBerry (\d+(\.\d+)?)/,/Version\/(\d+(\.\d+)?)/],"Android Mobile":[/android\s(\d+(\.\d+)?)/],"Samsung Internet":[/SamsungBrowser\/(\d+(\.\d+)?)/],"Internet Explorer":[/(rv:|MSIE )(\d+(\.\d+)?)/],Mozilla:[/rv:(\d+(\.\d+)?)/]}[wr.browser(e,t,n)];if(Ht(r))return null;for(var i=0;i<r.length;i++){var o=r[i],s=e.match(o);if(s)return parseFloat(s[s.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){if(/Windows/i.test(e)){if(/Phone/.test(e)||/WPDesktop/.test(e))return{os_name:"Windows Phone",os_version:""};var t=/Windows NT ([0-9.]+)/i.exec(e);return t&&t[1]?{os_name:"Windows",os_version:t[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(e)){var n=/OS (\d+)_(\d+)_?(\d+)?/i.exec(e);return n&&n[1]?{os_name:"iOS",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(e)){var r=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(e);return r&&r[1]?{os_name:"Android",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(e))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(e)){var i=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(e);return i&&i[1]?{os_name:"Mac OS X",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(e)?{os_name:"Linux",os_version:""}:/CrOS/.test(e)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return t==="iPad"||t==="Android Tablet"?"Tablet":t?"Mobile":"Desktop"},referrer:function(){return(yt==null?void 0:yt.referrer)||"$direct"},referringDomain:function(){var e;return yt!=null&&yt.referrer&&((e=GN(yt.referrer))===null||e===void 0?void 0:e.host)||"$direct"},properties:function(){if(!lr)return{};var e=wr.os(lr),t=e.os_name,n=e.os_version;return Kr(R7({$os:t,$os_version:n,$browser:wr.browser(lr,navigator.vendor,pi.opera),$device:wr.device(lr),$device_type:wr.deviceType(lr)}),{$current_url:fc==null?void 0:fc.href,$host:fc==null?void 0:fc.host,$pathname:fc==null?void 0:fc.pathname,$raw_user_agent:lr.length>1e3?lr.substring(0,997)+"...":lr,$browser_version:wr.browserVersion(lr,navigator.vendor,pi.opera),$browser_language:wr.browserLanguage(),$screen_height:he==null?void 0:he.screen.height,$screen_width:he==null?void 0:he.screen.width,$viewport_height:he==null?void 0:he.innerHeight,$viewport_width:he==null?void 0:he.innerWidth,$lib:"web",$lib_version:wd.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:BN()/1e3})},people_properties:function(){if(!lr)return{};var e=wr.os(lr),t=e.os_name,n=e.os_version;return Kr(R7({$os:t,$os_version:n,$browser:wr.browser(lr,navigator.vendor,pi.opera)}),{$browser_version:wr.browserVersion(lr,navigator.vendor,pi.opera)})}},XZ=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],iA=function(){function e(t){or(this,e);var n="";t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=t.custom_campaign_params||[],t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+n+"_posthog",XZ.indexOf(t.persistence.toLowerCase())===-1&&(je.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var r=t.persistence.toLowerCase();r==="localstorage"&&pr.is_supported()?this.storage=pr:r==="localstorage+cookie"&&_p.is_supported()?this.storage=_p:r==="sessionstorage"&&Yr.is_supported()?this.storage=Yr:r==="memory"?this.storage=GZ:r==="cookie"?this.storage=ba:_p.is_supported()?this.storage=_p:this.storage=ba,this.load(),this.update_config(t),this.save()}return sr(e,[{key:"properties",value:function(){var t={};return En(this.props,function(n,r){if(r===R1&&zc(n))for(var i=Object.keys(n),o=0;o<i.length;o++)t["$feature/".concat(i[o])]=n[i[o]];else a=r,c=!1,(fi(s=FZ)?c:U_&&s.indexOf===U_?s.indexOf(a)!=-1:(En(s,function(u){if(c||(c=u===a))return aS}),c))||(t[r]=n);var s,a,c}),t}},{key:"load",value:function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=Kr({},t))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(t,n,r){var i=this;if(zc(t)){Ht(n)&&(n="None"),this.expire_days=Ht(r)?this.default_expiry:r;var o=!1;if(En(t,function(s,a){i.props.hasOwnProperty(a)&&i.props[a]!==n||(i.props[a]=s,o=!0)}),o)return this.save(),!0}return!1}},{key:"register",value:function(t,n){var r=this;if(zc(t)){this.expire_days=Ht(n)?this.default_expiry:n;var i=!1;if(En(t,function(o,s){t.hasOwnProperty(s)&&r.props[s]!==o&&(r.props[s]=o,i=!0)}),i)return this.save(),!0}return!1}},{key:"unregister",value:function(t){t in this.props&&(delete this.props[t],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(wr.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(wr.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||wr.referrer(),$referring_domain:this.props.$referring_domain||wr.referringDomain()})}},{key:"get_referrer_info",value:function(){return R7({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(t){return En(this.props,function(n,r){r in t||(t[r]=n)}),t}},{key:"update_config",value:function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)}},{key:"set_disabled",value:function(t){this.disabled=t,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(t){t!==this.secure&&(this.secure=t,this.remove(),this.save())}},{key:"set_event_timer",value:function(t,n){var r=this.props[kp]||{};r[t]=n,this.props[kp]=r,this.save()}},{key:"remove_event_timer",value:function(t){var n=(this.props[kp]||{})[t];return Ht(n)||(delete this.props[kp][t],this.save()),n}},{key:"get_user_state",value:function(){return this.props[F7]||"anonymous"}},{key:"set_user_state",value:function(t){this.props[F7]=t,this.save()}},{key:"get_quota_limits",value:function(){return this.props[B7]||{}}},{key:"set_quota_limits",value:function(t){this.props[B7]=t,this.save()}}]),e}(),oA=2,ZZ=4,JZ=sr(function e(t){var n,r,i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};or(this,e),it(this,"bucketSize",100),it(this,"refillRate",10),it(this,"mutationBuckets",{}),it(this,"loggedTracker",{}),it(this,"refillBuckets",function(){Object.keys(i.mutationBuckets).forEach(function(s){i.mutationBuckets[s]=i.mutationBuckets[s]+i.refillRate,i.mutationBuckets[s]>=i.bucketSize&&delete i.mutationBuckets[s]})}),it(this,"getNodeOrRelevantParent",function(s){var a=i.rrweb.mirror.getNode(s);if((a==null?void 0:a.nodeName)!=="svg"&&a instanceof Element){var c=a.closest("svg");if(c)return[i.rrweb.mirror.getId(c),c]}return[s,a]}),it(this,"numberOfChanges",function(s){var a,c,u,d,f,h,p,m;return((a=(c=s.removes)===null||c===void 0?void 0:c.length)!==null&&a!==void 0?a:0)+((u=(d=s.attributes)===null||d===void 0?void 0:d.length)!==null&&u!==void 0?u:0)+((f=(h=s.texts)===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0)+((p=(m=s.adds)===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0)}),it(this,"throttleMutations",function(s){if(s.type!==3||s.data.source!==0)return s;var a=s.data,c=i.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(d){var f,h,p,m=Os(i.getNodeOrRelevantParent(d.id),2),v=m[0],b=m[1];return i.mutationBuckets[v]===0?!1:(i.mutationBuckets[v]=(f=i.mutationBuckets[v])!==null&&f!==void 0?f:i.bucketSize,i.mutationBuckets[v]=Math.max(i.mutationBuckets[v]-1,0),i.mutationBuckets[v]===0&&(i.loggedTracker[v]||(i.loggedTracker[v]=!0,(h=(p=i.options).onBlockedNode)===null||h===void 0||h.call(p,v,b))),d)}));var u=i.numberOfChanges(a);return u!==0||c===u?s:void 0}),this.rrweb=t,this.options=o,this.refillRate=(n=this.options.refillRate)!==null&&n!==void 0?n:this.refillRate,this.bucketSize=(r=this.options.bucketSize)!==null&&r!==void 0?r:this.bucketSize,setInterval(function(){i.refillBuckets()},1e3)}),z7=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(z7||{}),eJ={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(e){return e},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6},tJ=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],nJ=["/s/","/e/","/i/vo/e/"];function sA(e,t,n,r){var i=t==null?void 0:t["content-length"];return Ht(i)?"[SessionReplay] no content-length header for ".concat(r,", cannot determine payload size"):i&&parseInt(i)>n?"[SessionReplay] ".concat(r," body too large to record"):e}var rJ=function(e,t){var n,r,i,o=e.session_recording,s=o.recordHeaders!==!1&&t.recordHeaders,a=o.recordBody!==!1&&t.recordBody,c=o.recordPerformance!==!1&&t.recordPerformance,u=(n=o,i=Math.min(1e6,(r=n.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),function(h){return h!=null&&h.requestBody&&(h.requestBody=sA(h.requestBody,h.requestHeaders,i,"Request")),h!=null&&h.responseBody&&(h.responseBody=sA(h.responseBody,h.responseHeaders,i,"Response")),h}),d=function(h){return u(function(v){var b=GN(v.name);if(!(b&&b.pathname&&nJ.includes(b.pathname)))return v}((p=h,Object.keys((m=p.requestHeaders)!==null&&m!==void 0?m:{}).forEach(function(v){var b;tJ.includes(v.toLowerCase())&&((b=p.requestHeaders)===null||b===void 0||delete b[v])}),p)));var p,m},f=Zo(e.session_recording.maskNetworkRequestFn);return f&&Zo(e.session_recording.maskCapturedNetworkRequestFn)&&je.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),f&&(e.session_recording.maskCapturedNetworkRequestFn=function(h){var p=e.session_recording.maskNetworkRequestFn({url:h.name});return St(St({},h),{},{name:p==null?void 0:p.url})}),o.maskRequestFn=Zo(e.session_recording.maskCapturedNetworkRequestFn)?function(h){var p,m,v,b=d(h);return b&&(p=(m=(v=e.session_recording).maskCapturedNetworkRequestFn)===null||m===void 0?void 0:m.call(v,b))!==null&&p!==void 0?p:void 0}:void 0,o.maskRequestFn||(o.maskRequestFn=d),St(St(St({},eJ),o),{},{recordHeaders:s,recordBody:a,recordPerformance:c,recordInitialRequests:c})},iJ="__ph_opt_in_out_";function oJ(e,t){XN(!0,e,t)}function sJ(e,t){XN(!1,e,t)}function aJ(e,t){return QN(e,t)==="1"}function YN(e,t){return!!function(n){if(n&&n.respectDnt){var r=n&&n.window||he,i=r==null?void 0:r.navigator,o=!1;return En([i==null?void 0:i.doNotTrack,i.msDoNotTrack,r.doNotTrack],function(s){un([!0,1,"1","yes"],s)&&(o=!0)}),o}return!1}(t)||QN(e,t)==="0"}function lJ(e,t){uS(t=t||{}).remove(dS(e,t),!!t.crossSubdomainCookie)}function uS(e){return(e=e||{}).persistenceType==="localStorage"?pr:e.persistenceType==="localStorage+cookie"?_p:ba}function dS(e,t){return((t=t||{}).persistencePrefix||iJ)+e}function QN(e,t){return uS(t).get(dS(e,t))}function XN(e,t,n){Co(t)&&t.length?(uS(n=n||{}).set(dS(t,n),e?1:0,Ms(n.cookieExpiration)?n.cookieExpiration:null,n.crossSubdomainCookie,n.secureCookie),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties||{},{send_instantly:!0})):je.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function U7(e){var t=!1;try{var n=e.config.token,r=e.config.respect_dnt,i=e.config.opt_out_capturing_persistence_type,o=e.config.opt_out_capturing_cookie_prefix||void 0,s=e.config.window;n&&(t=YN(n,{respectDnt:r,persistenceType:i,persistencePrefix:o,window:s}))}catch(a){je.error("Unexpected error when checking capturing opt-out status: "+a)}return t}var ea,ZN=3e5,aA=ZN;(function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(ea||(ea={}));var cJ=[ea.MouseMove,ea.MouseInteraction,ea.Scroll,ea.ViewportResize,ea.Input,ea.TouchMove,ea.MediaInteraction,ea.Drag],lA=function(e){return{rrwebMethod:e,enqueuedAt:Date.now(),attempt:1}},uJ=function(){function e(t){var n=this;if(or(this,e),it(this,"queuedRRWebEvents",[]),it(this,"isIdle",!1),it(this,"_linkedFlagSeen",!1),it(this,"_lastActivityTimestamp",Date.now()),it(this,"windowId",null),it(this,"sessionId",null),it(this,"_linkedFlag",null),it(this,"_sampleRate",null),it(this,"_minimumDuration",null),it(this,"_recordCanvas",!1),it(this,"_canvasFps",null),it(this,"_canvasQuality",null),it(this,"_forceAllowLocalhostNetworkCapture",!1),this.instance=t,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,he==null||he.addEventListener("beforeunload",function(){n._flushBuffer()}),he==null||he.addEventListener("offline",function(){n._tryAddCustomEvent("browser offline",{})}),he==null||he.addEventListener("online",function(){n._tryAddCustomEvent("browser online",{})}),!this.instance.sessionManager)throw je.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");this.buffer=this.clearBuffer()}return sr(e,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw je.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){return Ms(this._sampleRate)?this.instance.get_property(w4):null}},{key:"sessionDuration",get:function(){var t,n,r=(t=this.buffer)===null||t===void 0?void 0:t.data[((n=this.buffer)===null||n===void 0?void 0:n.data.length)-1],i=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return r?r.timestamp-i:null}},{key:"isRecordingEnabled",get:function(){var t=!!this.instance.get_property(I7),n=!this.instance.config.disable_session_recording;return he&&t&&n}},{key:"isConsoleLogCaptureEnabled",get:function(){var t=!!this.instance.get_property(Q_),n=this.instance.config.enable_recording_console_log;return n!=null?n:t}},{key:"recordingVersion",get:function(){var t,n=this.instance.get_property(X_);return((t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recorderVersion)||n||"v1"}},{key:"networkPayloadCapture",get:function(){var t,n,r=this.instance.get_property(Z_),i={recordHeaders:(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recordHeaders,recordBody:(n=this.instance.config.session_recording)===null||n===void 0?void 0:n.recordBody},o=(i==null?void 0:i.recordHeaders)||(r==null?void 0:r.recordHeaders),s=(i==null?void 0:i.recordBody)||(r==null?void 0:r.recordBody),a=this.instance.config.capture_performance||(r==null?void 0:r.capturePerformance);return o||s||a?{recordHeaders:o,recordBody:s,recordPerformance:a}:void 0}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?Co(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":O7(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"disabled":"buffering"}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled?(this.startCaptureAndTrySendingQueuedSnapshots(),je.info("[SessionRecording] started")):(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,je.info("[SessionRecording] stopped"))}},{key:"makeSamplingDecision",value:function(t){var n,r=this.sessionId!==t;if(Ms(this._sampleRate)){var i,o=this.isSampled;r||!O7(o)?i=Math.random()<this._sampleRate:i=o,i||je.warn("[SessionSampling] Sample rate (".concat(this._sampleRate,") has determined that this sessionId (").concat(t,") will not be sent to the server.")),(n=this.instance.persistence)===null||n===void 0||n.register(it({},w4,i))}else{var s;(s=this.instance.persistence)===null||s===void 0||s.register(it({},w4,null))}}},{key:"afterDecideResponse",value:function(t){var n,r,i,o,s,a,c,u,d,f,h,p=this;this.instance.persistence&&this.instance.persistence.register((it(h={},I7,!!t.sessionRecording),it(h,Q_,(u=t.sessionRecording)===null||u===void 0?void 0:u.consoleLogRecordingEnabled),it(h,X_,(d=t.sessionRecording)===null||d===void 0?void 0:d.recorderVersion),it(h,Z_,St({capturePerformance:t.capturePerformance},(f=t.sessionRecording)===null||f===void 0?void 0:f.networkPayloadCapture)),h));var m=(n=t.sessionRecording)===null||n===void 0?void 0:n.sampleRate;this._sampleRate=Ht(m)||fi(m)?null:parseFloat(m);var v=(r=t.sessionRecording)===null||r===void 0?void 0:r.minimumDurationMilliseconds;this._minimumDuration=Ht(v)?null:v;var b=(i=t.sessionRecording)===null||i===void 0?void 0:i.recordCanvas;this._recordCanvas=!Ht(b)&&!fi(b)&&b;var x=(o=t.sessionRecording)===null||o===void 0?void 0:o.canvasFps;this._canvasFps=Ht(x)?null:x;var C,w=(s=t.sessionRecording)===null||s===void 0?void 0:s.canvasQuality;if(this._canvasQuality=Ht(w)||fi(w)?null:parseFloat(w),this._linkedFlag=((a=t.sessionRecording)===null||a===void 0?void 0:a.linkedFlag)||null,(c=t.sessionRecording)!==null&&c!==void 0&&c.endpoint&&(this._endpoint=(C=t.sessionRecording)===null||C===void 0?void 0:C.endpoint),Ms(this._sampleRate)&&this.sessionManager.onSessionId(function(T){p.makeSamplingDecision(T)}),Co(this._linkedFlag)){var S=this._linkedFlag;this.instance.onFeatureFlags(function(T){p._linkedFlagSeen=T.includes(S)})}this.receivedDecide=!0,this.startRecordingIfEnabled()}},{key:"log",value:function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(n=this.instance.sessionRecording)===null||n===void 0||n.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:r,trace:[],payload:[JSON.stringify(t)]}},timestamp:BN()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var t=this;if(!Ht(Object.assign)&&!(this._captureStarted||this.instance.config.disable_session_recording||U7(this.instance))){this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId();var n=this.recordingVersion==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.recordingVersion?Hp(this.instance.requestRouter.endpointFor("assets","/static/".concat(n,"?v=").concat(wd.LIB_VERSION)),function(r){if(r)return je.error("Could not load ".concat(n),r);t._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(t){var n;return t.type===3&&cJ.indexOf((n=t.data)===null||n===void 0?void 0:n.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(t){var n=this._isInteractiveEvent(t);n||this.isIdle||t.timestamp-this._lastActivityTimestamp>aA&&(this.isIdle=!0,this._tryAddCustomEvent("sessionIdle",{reason:"user inactivity",timeSinceLastActive:t.timestamp-this._lastActivityTimestamp,threshold:aA}));var r=!1;if(n&&(this._lastActivityTimestamp=t.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)),!this.isIdle){var i=this.sessionManager.checkAndGetSessionAndWindowId(!n,t.timestamp),o=i.windowId,s=i.sessionId,a=this.sessionId!==s,c=this.windowId!==o;this.windowId=o,this.sessionId=s,(r||[oA,ZZ].indexOf(t.type)===-1&&(c||a))&&this._tryTakeFullSnapshot()}}},{key:"_tryRRWebMethod",value:function(t){try{return t.rrwebMethod(),!0}catch(n){return je.warn("[Session-Recording] could not emit queued rrweb event.",n),this.queuedRRWebEvents.length<10&&this.queuedRRWebEvents.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt++,rrwebMethod:t.rrwebMethod}),!1}}},{key:"_tryAddCustomEvent",value:function(t,n){var r=this;return this._tryRRWebMethod(lA(function(){return r.rrwebRecord.addCustomEvent(t,n)}))}},{key:"_tryTakeFullSnapshot",value:function(){var t=this;return this._tryRRWebMethod(lA(function(){return t.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){var t,n=this,r={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};this.rrwebRecord=he.rrweb?he.rrweb.record:he.rrwebRecord;for(var i=this.instance.config.session_recording,o=0,s=Object.entries(i||{});o<s.length;o++){var a=Os(s[o],2),c=a[0],u=a[1];c in r&&(r[c]=u)}if(!this._recordCanvas||fi(this._canvasFps)||fi(this._canvasQuality)||(r.recordCanvas=!0,r.sampling={canvas:this._canvasFps},r.dataURLOptions={type:"image/webp",quality:this._canvasQuality}),this.rrwebRecord){this.mutationRateLimiter=(t=this.mutationRateLimiter)!==null&&t!==void 0?t:new JZ(this.rrwebRecord,{onBlockedNode:function(f,h){var p="Too many mutations on node '".concat(f,"'. Rate limiting. This could be due to SVG animations or something similar");je.info(p,{node:h}),n.log("[PostHog Recorder] "+p,"warn")}}),this._scheduleFullSnapshot();var d=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(St({emit:function(f){n.onRRwebEmit(f)},plugins:d},r)),this.instance._addCaptureHook(function(f){try{if(f==="$pageview"){var h=he?n._maskUrl(he.location.href):"";if(!h)return;n._tryAddCustomEvent("$pageview",{href:h})}}catch(p){je.error("Could not add $pageview to rrweb session",p)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:r,activePlugins:d.map(function(f){return f==null?void 0:f.name})})}else je.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_scheduleFullSnapshot",value:function(){var t=this;this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this._fullSnapshotTimer=setInterval(function(){t._tryTakeFullSnapshot()},ZN)}},{key:"_gatherRRWebPlugins",value:function(){var t=[];return pi.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled&&t.push(pi.rrwebConsoleRecord.getRecordConsolePlugin()),this.networkPayloadCapture&&Zo(pi.getRecordNetworkPlugin)&&(!YZ.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?t.push(pi.getRecordNetworkPlugin(rJ(this.instance.config,this.networkPayloadCapture))):je.info("[SessionReplay-NetworkCapture] not started because we are on localhost.")),t}},{key:"onRRwebEmit",value:function(t){if(this._processQueuedEvents(),t&&zc(t)){if(t.type===z7.Meta){var n=this._maskUrl(t.data.href);if(!n)return;t.data.href=n}t.type===z7.FullSnapshot&&this._scheduleFullSnapshot();var r=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(t):t;if(r){var i=function(a){var c=a;if(c&&zc(c)&&c.type===6&&zc(c.data)&&c.data.plugin==="rrweb/console@1"){c.data.payload.payload.length>10&&(c.data.payload.payload=c.data.payload.payload.slice(0,10),c.data.payload.payload.push("...[truncated]"));for(var u=[],d=0;d<c.data.payload.payload.length;d++)c.data.payload.payload[d]&&c.data.payload.payload[d].length>2e3?u.push(c.data.payload.payload[d].slice(0,2e3)+"...[truncated]"):u.push(c.data.payload.payload[d]);return c.data.payload.payload=u,a}return a}(r),o=JSON.stringify(i).length;if(this._updateWindowAndSessionIds(i),!this.isIdle){var s={$snapshot_bytes:o,$snapshot_data:i,$session_id:this.sessionId,$window_id:this.windowId};this.status!=="disabled"?this._captureSnapshotBuffered(s):this.clearBuffer()}}}}},{key:"_processQueuedEvents",value:function(){var t=this;if(this.queuedRRWebEvents.length){var n=T5(this.queuedRRWebEvents);this.queuedRRWebEvents=[],n.forEach(function(r){Date.now()-r.enqueuedAt>2e3?t._tryAddCustomEvent("rrwebQueueTimeout",{enqueuedAt:r.enqueuedAt,attempt:r.attempt,queueLength:n.length}):t._tryRRWebMethod(r)&&t._tryAddCustomEvent("rrwebQueueSuccess",{enqueuedAt:r.enqueuedAt,attempt:r.attempt,queueLength:n.length})})}}},{key:"_maskUrl",value:function(t){var n=this.instance.config.session_recording;if(n.maskNetworkRequestFn){var r,i={url:t};return(r=i=n.maskNetworkRequestFn(i))===null||r===void 0?void 0:r.url}return t}},{key:"clearBuffer",value:function(){return this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_flushBuffer",value:function(){var t=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var n=this._minimumDuration,r=this.sessionDuration,i=Ms(r)&&r>=0,o=Ms(n)&&i&&r<n;return this.status==="buffering"||o?(this.flushBufferTimer=setTimeout(function(){t._flushBuffer()},2e3),this.buffer||this.clearBuffer()):this.buffer&&this.buffer.data.length!==0?(this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer()):this.buffer||this.clearBuffer()}},{key:"_captureSnapshotBuffered",value:function(t){var n,r=this,i=2+(((n=this.buffer)===null||n===void 0?void 0:n.data.length)||0);(!this.buffer||this.buffer.size+t.$snapshot_bytes+i>943718.4||this.buffer.sessionId&&this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),fi(this.buffer.sessionId)&&!fi(this.sessionId)&&(this.buffer.sessionId=this.sessionId,this.buffer.windowId=this.windowId),this.buffer.size+=t.$snapshot_bytes,this.buffer.data.push(t.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){r._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(t){this.instance.capture("$snapshot",t,{method:"POST",_url:this.instance.requestRouter.endpointFor("capture_recordings",this._endpoint),_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:t.$snapshot_data.type===oA}})}}]),e}(),dJ=function(){function e(t){or(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return sr(e,[{key:"call",value:function(){var t=this,n=lS(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(M1),group_properties:this.instance.get_property(hc),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0}));this.instance._send_request(this.instance.requestRouter.endpointFor("decide","/decide/?v=3"),{data:n,verbose:!0},{method:"POST"},function(r){return t.parseDecideResponse(r)})}},{key:"parseDecideResponse",value:function(t){var n,r=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),(t==null?void 0:t.status)!==0){if(!yt||!yt.body)return je.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){r.parseDecideResponse(t)},500);this.instance.toolbar.afterDecideResponse(t),(n=this.instance.sessionRecording)===null||n===void 0||n.afterDecideResponse(t),Sc.afterDecideResponse(t,this.instance),this.instance._afterDecideResponse(t),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(t);var i=he==null?void 0:he.extendPostHogWithSurveys;t.surveys&&!i&&Hp(this.instance.requestRouter.endpointFor("assets","/static/surveys.js"),function(u){if(u)return je.error("Could not load surveys script",u);he.extendPostHogWithSurveys(r.instance)});var o=he==null?void 0:he.extendPostHogWithExceptionAutoCapture;if(t.autocaptureExceptions&&t.autocaptureExceptions&&Ht(o)&&Hp(this.instance.requestRouter.endpointFor("assets","/static/exception-autocapture.js"),function(u){if(u)return je.error("Could not load exception autocapture script",u);he.extendPostHogWithExceptionAutocapture(r.instance,t)}),t.siteApps)if(this.instance.config.opt_in_site_apps){var s,a=ka(t.siteApps);try{var c=function(){var u=s.value,d=u.id,f=u.url,h=r.instance.requestRouter.endpointFor("assets",f);pi["__$$ph_site_app_".concat(d)]=r.instance,Hp(h,function(p){p&&je.error("Error while initializing PostHog app with config id ".concat(d),p)})};for(a.s();!(s=a.n()).done;)c()}catch(u){a.e(u)}finally{a.f()}}else t.siteApps.length>0&&je.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else je.error("Failed to fetch feature flags from PostHog.")}}]),e}(),fJ=["source"],hJ=he!=null&&he.location?O5(he.location.hash,"__posthog")||O5(location.hash,"state"):null,pJ=function(){function e(t){or(this,e),this.instance=t}return sr(e,[{key:"afterDecideResponse",value:function(t){var n=t.toolbarParams||t.editorParams||(t.toolbarVersion?{toolbarVersion:t.toolbarVersion}:{});t.isAuthenticated&&n.toolbarVersion&&n.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(St({},n))}},{key:"maybeLoadToolbar",value:function(){var t,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!he||!yt)return!1;r=(t=r)!==null&&t!==void 0?t:he.location,o=(n=o)!==null&&n!==void 0?n:he.history;try{if(!i){try{he.localStorage.setItem("test","test"),he.localStorage.removeItem("test")}catch{return!1}i=he==null?void 0:he.localStorage}var s,a=hJ||O5(r.hash,"__posthog")||O5(r.hash,"state"),c=a?q_(function(){return JSON.parse(atob(decodeURIComponent(a)))})||q_(function(){return JSON.parse(decodeURIComponent(a))}):null;return c&&c.action==="ph_authorize"?((s=c).source="url",s&&Object.keys(s).length>0&&(c.desiredHash?r.hash=c.desiredHash:o?o.replaceState("",yt.title,r.pathname+r.search):r.hash="")):((s=JSON.parse(i.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}},{key:"loadToolbar",value:function(t){var n=this;if(!he||pi._postHogToolbarLoaded)return!1;pi._postHogToolbarLoaded=!0;var r=3e5,i=Math.floor(Date.now()/r)*r,o=this.instance.requestRouter.endpointFor("assets","/static/toolbar.js?t=".concat(i)),s=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=St(St({token:this.instance.config.token},t),{},{apiURL:this.instance.requestRouter.endpointFor("api")},s?{instrument:!1}:{});a.source;var c=AZ(a,fJ);return he.localStorage.setItem("_postHogToolbarParams",JSON.stringify(c)),Hp(o,function(u){u?je.error("Failed to load toolbar",u):(pi.ph_load_toolbar||pi.ph_load_editor)(a,n.instance)}),Bp(he,"turbolinks:load",function(){pi._postHogToolbarLoaded=!1,n.loadToolbar(a)}),!0}},{key:"_loadEditor",value:function(t){return this.loadToolbar(t)}},{key:"maybeLoadEditor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(t,n,r)}}]),e}(),JN=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;or(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return sr(e,[{key:"setPollInterval",value:function(t){this._pollInterval=t,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),e}(),mJ=function(e){MN(n,JN);var t=IN(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return or(this,n),(i=t.call(this,o)).handlePollRequest=r,i}return sr(n,[{key:"enqueue",value:function(r,i,o){this._event_queue.push({url:r,data:i,options:o}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var r=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(r._event_queue.length>0){var i=r.formatQueue(),o=function(a){var c=i[a],u=c.url,d=c.data,f=c.options;En(d,function(h,p){d[p].offset=Math.abs(d[p].timestamp-r.getTime()),delete d[p].timestamp}),r.handlePollRequest(u,d,f)};for(var s in i)o(s);r._event_queue.length=0,r._empty_queue_count=0}else r._empty_queue_count++;r._empty_queue_count>4&&(r.isPolling=!1,r._empty_queue_count=0),r.isPolling&&r.poll()},this._pollInterval)}},{key:"unload",value:function(){var r=this;clearTimeout(this._poller);var i=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var o=Object.values(i);[].concat(T5(o.filter(function(s){return s.url.indexOf("/e")===0})),T5(o.filter(function(s){return s.url.indexOf("/e")!==0}))).map(function(s){var a=s.url,c=s.data,u=s.options;r.handlePollRequest(a,c,St(St({},u),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var r={};return En(this._event_queue,function(i){var o=i.url,s=i.data,a=i.options,c=(a?a._batchKey:null)||o;Ht(r[c])&&(r[c]={data:[],url:o,options:a}),a&&r[c].options&&r[c].options._metrics&&!r[c].options._metrics.rrweb_full_snapshot&&(r[c].options._metrics.rrweb_full_snapshot=a._metrics.rrweb_full_snapshot),r[c].data.push(s)}),r}}]),n}(),wo=Uint8Array,Oi=Uint16Array,Af=Uint32Array,fS=new wo([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),hS=new wo([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cA=new wo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),eF=function(e,t){for(var n=new Oi(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Af(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},tF=eF(fS,2),gJ=tF[0],V7=tF[1];gJ[28]=258,V7[258]=28;for(var uA=eF(hS,0)[1],j7=new Oi(32768),Un=0;Un<32768;++Un){var Du=(43690&Un)>>>1|(21845&Un)<<1;Du=(61680&(Du=(52428&Du)>>>2|(13107&Du)<<2))>>>4|(3855&Du)<<4,j7[Un]=((65280&Du)>>>8|(255&Du)<<8)>>>1}var zp=function(e,t,n){for(var r=e.length,i=0,o=new Oi(t);i<r;++i)++o[e[i]-1];var s,a=new Oi(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Oi(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],d=t-e[i],f=a[e[i]-1]++<<d,h=f|(1<<d)-1;f<=h;++f)s[j7[f]>>>c]=u}else for(s=new Oi(r),i=0;i<r;++i)s[i]=j7[a[e[i]-1]++]>>>15-e[i];return s},Sd=new wo(288);for(Un=0;Un<144;++Un)Sd[Un]=8;for(Un=144;Un<256;++Un)Sd[Un]=9;for(Un=256;Un<280;++Un)Sd[Un]=7;for(Un=280;Un<288;++Un)Sd[Un]=8;var P5=new wo(32);for(Un=0;Un<32;++Un)P5[Un]=5;var Wu,vJ=zp(Sd,9,0),yJ=zp(P5,5,0),nF=function(e){return(e/8>>0)+(7&e&&1)},rF=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Oi?Oi:e instanceof Af?Af:wo)(n-t);return r.set(e.subarray(t,n)),r},Za=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Xh=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},z9=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new wo(0),0];if(i==1){var s=new wo(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(T,E){return T.f-E.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],u=0,d=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};d!=i-1;)a=n[n[u].f<n[f].f?u++:f++],c=n[u!=d&&n[u].f<n[f].f?u++:f++],n[d++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var p=new Oi(h+1),m=bJ(n[d-1],p,0);if(m>t){r=0;var v=0,b=m-t,x=1<<b;for(o.sort(function(T,E){return p[E.s]-p[T.s]||T.f-E.f});r<i;++r){var C=o[r].s;if(!(p[C]>t))break;v+=x-(1<<m-p[C]),p[C]=t}for(v>>>=b;v>0;){var w=o[r].s;p[w]<t?v-=1<<t-p[w]++-1:++r}for(;r>=0&&v;--r){var S=o[r].s;p[S]==t&&(--p[S],++v)}m=t}return[new wo(p),m]},bJ=function e(t,n,r){return t.s==-1?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},dA=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Oi(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},Zh=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},E4=function(e,t,n){var r=n.length,i=nF(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},fA=function(e,t,n,r,i,o,s,a,c,u,d){Za(t,d++,n),++i[256];for(var f=z9(i,15),h=f[0],p=f[1],m=z9(o,15),v=m[0],b=m[1],x=dA(h),C=x[0],w=x[1],S=dA(v),T=S[0],E=S[1],k=new Oi(19),_=0;_<C.length;++_)k[31&C[_]]++;for(_=0;_<T.length;++_)k[31&T[_]]++;for(var O=z9(k,7),D=O[0],L=O[1],N=19;N>4&&!D[cA[N-1]];--N);var j,G,X,re,oe=u+5<<3,U=Zh(i,Sd)+Zh(o,P5)+s,H=Zh(i,h)+Zh(o,v)+s+14+3*N+Zh(k,D)+(2*k[16]+3*k[17]+7*k[18]);if(oe<=U&&oe<=H)return E4(t,d,e.subarray(c,c+u));if(Za(t,d,1+(H<U)),d+=2,H<U){j=zp(h,p,0),G=h,X=zp(v,b,0),re=v;var R=zp(D,L,0);for(Za(t,d,w-257),Za(t,d+5,E-1),Za(t,d+10,N-4),d+=14,_=0;_<N;++_)Za(t,d+3*_,D[cA[_]]);d+=3*N;for(var se=[C,T],ee=0;ee<2;++ee){var I=se[ee];for(_=0;_<I.length;++_){var me=31&I[_];Za(t,d,R[me]),d+=D[me],me>15&&(Za(t,d,I[_]>>>5&127),d+=I[_]>>>12)}}}else j=vJ,G=Sd,X=yJ,re=P5;for(_=0;_<a;++_)if(r[_]>255){me=r[_]>>>18&31,Xh(t,d,j[me+257]),d+=G[me+257],me>7&&(Za(t,d,r[_]>>>23&31),d+=fS[me]);var Se=31&r[_];Xh(t,d,X[Se]),d+=re[Se],Se>3&&(Xh(t,d,r[_]>>>5&8191),d+=hS[Se])}else Xh(t,d,j[r[_]]),d+=G[r[_]];return Xh(t,d,j[256]),d+G[256]},xJ=new Af([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),CJ=new wo(0),wJ=function(){for(var e=new Af(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),SJ=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=wJ[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},EJ=function(e,t,n,r,i){return function(o,s,a,c,u,d){var f=o.length,h=new wo(c+f+5*(1+Math.floor(f/7e3))+u),p=h.subarray(c,h.length-u),m=0;if(!s||f<8)for(var v=0;v<=f;v+=65535){var b=v+65535;b<f?m=E4(p,m,o.subarray(v,b)):(p[v]=d,m=E4(p,m,o.subarray(v,f)))}else{for(var x=xJ[s-1],C=x>>>13,w=8191&x,S=(1<<a)-1,T=new Oi(32768),E=new Oi(S+1),k=Math.ceil(a/3),_=2*k,O=function(rt){return(o[rt]^o[rt+1]<<k^o[rt+2]<<_)&S},D=new Af(25e3),L=new Oi(288),N=new Oi(32),j=0,G=0,X=(v=0,0),re=0,oe=0;v<f;++v){var U=O(v),H=32767&v,R=E[U];if(T[H]=R,E[U]=H,re<=v){var se=f-v;if((j>7e3||X>24576)&&se>423){m=fA(o,p,0,D,L,N,G,X,oe,v-oe,m),X=j=G=0,oe=v;for(var ee=0;ee<286;++ee)L[ee]=0;for(ee=0;ee<30;++ee)N[ee]=0}var I=2,me=0,Se=w,pe=H-R&32767;if(se>2&&U==O(v-pe))for(var ye=Math.min(C,se)-1,_e=Math.min(32767,v),$e=Math.min(258,se);pe<=_e&&--Se&&H!=R;){if(o[v+I]==o[v+I-pe]){for(var J=0;J<$e&&o[v+J]==o[v+J-pe];++J);if(J>I){if(I=J,me=pe,J>ye)break;var fe=Math.min(pe,J-2),we=0;for(ee=0;ee<fe;++ee){var Le=v-pe+ee+32768&32767,He=Le-T[Le]+32768&32767;He>we&&(we=He,R=Le)}}}pe+=(H=R)-(R=T[H])+32768&32767}if(me){D[X++]=268435456|V7[I]<<18|uA[me];var Ge=31&V7[I],Pe=31&uA[me];G+=fS[Ge]+hS[Pe],++L[257+Ge],++N[Pe],re=v+I,++j}else D[X++]=o[v],++L[o[v]]}}m=fA(o,p,d,D,L,N,G,X,oe,v-oe,m),d||(m=E4(p,m,CJ))}return rF(h,0,c+nF(m)+u)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},W7=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},TJ=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&W7(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},kJ=function(e){return 10+(e.filename&&e.filename.length+1||0)};function _J(e,t){t===void 0&&(t={});var n=SJ(),r=e.length;n.p(e);var i=EJ(e,t,kJ(t),8),o=i.length;return TJ(i,t),W7(i,o-8,n.d()),W7(i,o-4,r),i}function AJ(e,t){var n=e.length;if(!t&&typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var r=new wo(e.length+(e.length>>>1)),i=0,o=function(u){r[i++]=u},s=0;s<n;++s){if(i+5>r.length){var a=new wo(i+8+(n-s<<1));a.set(r),r=a}var c=e.charCodeAt(s);c<128||t?o(c):c<2048?(o(192|c>>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++s))>>>18),o(128|c>>>12&63),o(128|c>>>6&63),o(128|63&c)):(o(224|c>>>12),o(128|c>>>6&63),o(128|63&c))}return rF(r,0,i)}(function(e){e.GZipJS="gzip-js",e.Base64="base64"})(Wu||(Wu={}));var pS=function(e,t,n){var r=t||{};r.ip=n.ip?1:0,r._=new Date().getTime().toString(),r.ver=wd.LIB_VERSION;var i=e.split("?");if(i.length>1){var o,s=ka(i[1].split("&"));try{for(s.s();!(o=s.n()).done;){var a=o.value.split("=")[0];Ht(r[a])||delete r[a]}}catch(u){s.e(u)}finally{s.f()}}var c=e.indexOf("?")>-1?"&":"?";return e+c+function(u){var d,f,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",p=[];return En(u,function(m,v){Ht(m)||Ht(v)||v==="undefined"||(d=encodeURIComponent(m.toString()),f=encodeURIComponent(v),p[p.length]=f+"="+d)}),p.join(h)}(r)},ry=function e(t,n){if(n.blob&&t.buffer)return new Blob([H_(t)?t:t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return n.method!=="POST"?null:(i=Tr(t)||H_(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(i+="&compression="+t.compression),i);var i},iF=function(e){if(P7&&e.options.transport==="fetch"){var t,n=ry(e.data,e.options),r=new Headers;En(r,function(o,s){r.append(s,o)}),e.options.method!=="POST"||e.options.blob||r.append("Content-Type","application/x-www-form-urlencoded");var i=e.url;return Ms(e.retriesPerformedSoFar)&&e.retriesPerformedSoFar>0&&(i=pS(i,{retry_count:e.retriesPerformedSoFar},{})),void P7(i,{method:((t=e.options)===null||t===void 0?void 0:t.method)||"GET",headers:r,keepalive:e.options.method==="POST",body:n}).then(function(o){var s=o.status;return o.text().then(function(a){var c,u;if((c=e.onResponse)===null||c===void 0||c.call(e,{statusCode:s,responseText:a}),s!==200)Zo(e.onError)&&e.onError({statusCode:s,responseText:a}),(s<400||s>500)&&e.retryQueue.enqueue(St(St({},e),{},{headers:r,retriesPerformedSoFar:(e.retriesPerformedSoFar||0)+1})),(u=e.callback)===null||u===void 0||u.call(e,{status:0});else try{var d;(d=e.callback)===null||d===void 0||d.call(e,JSON.parse(a))}catch(f){je.error(f)}})}).catch(function(o){var s;je.error(o),(s=e.callback)===null||s===void 0||s.call(e,{status:0})})}return $J(e)},$J=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,o=e.callback,s=e.retriesPerformedSoFar,a=e.retryQueue,c=e.onError,u=e.timeout,d=u===void 0?6e4:u,f=e.onResponse;Ms(s)&&s>0&&(t=pS(t,{retry_count:s},{}));var h=new XMLHttpRequest;h.open(i.method||"GET",t,!0);var p=ry(n,i);En(r,function(m,v){h.setRequestHeader(v,m)}),i.method!=="POST"||i.blob||h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.timeout=d,h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4){var m={statusCode:h.status,responseText:h.responseText};if(f==null||f(m),h.status===200){if(o){var v;try{v=JSON.parse(h.responseText)}catch(b){return void je.error(b)}o(v)}}else Zo(c)&&c(m),(h.status<400||h.status>500)&&a.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(s||0)+1,callback:o}),o==null||o({status:0})}},h.send(p)},I1,DJ=function(e){MN(n,JN);var t=IN(n);function n(r,i){var o;return or(this,n),(o=t.call(this)).isPolling=!1,o.queue=[],o.areWeOnline=!0,o.onRequestError=r,o.rateLimiter=i,!Ht(he)&&"onLine"in he.navigator&&(o.areWeOnline=he.navigator.onLine,he.addEventListener("online",function(){o._handleWeAreNowOnline()}),he.addEventListener("offline",function(){o.areWeOnline=!1})),o}return sr(n,[{key:"enqueue",value:function(r){var i=r.retriesPerformedSoFar||0;if(!(i>=10)){var o=function(c){var u=3e3*Math.pow(2,c),d=u/2,f=Math.min(18e5,u),h=(Math.random()-.5)*(f-d);return Math.ceil(f+h)}(i),s=new Date(Date.now()+o);this.queue.push({retryAt:s,requestData:r});var a="Enqueued failed request for retry in ".concat(o);navigator.onLine||(a+=" (Browser is offline)"),je.warn(a),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var r=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){r.areWeOnline&&r.queue.length>0&&r.flush(),r.poll()},this._pollInterval)}},{key:"flush",value:function(){var r=new Date(Date.now()),i=this.queue.filter(function(c){return c.retryAt<r});if(i.length>0){this.queue=this.queue.filter(function(c){return c.retryAt>=r});var o,s=ka(i);try{for(s.s();!(o=s.n()).done;){var a=o.value.requestData;this._executeXhrRequest(a)}}catch(c){s.e(c)}finally{s.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var r,i=ka(this.queue);try{for(i.s();!(r=i.n()).done;){var o=r.value.requestData,s=o.url,a=o.data,c=o.options;if(this.rateLimiter.isRateLimited(c._batchKey))je.warn("[RetryQueue] is quota limited. Dropping request.");else try{he==null||he.navigator.sendBeacon(s,ry(a,St(St({},c),{},{sendBeacon:!0})))}catch(u){je.error(u)}}}catch(u){i.e(u)}finally{i.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(r){var i=r.url,o=r.data,s=r.options,a=r.headers,c=r.callback,u=r.retriesPerformedSoFar;this.rateLimiter.isRateLimited(s._batchKey)||iF({url:i,data:o||{},options:s||{},headers:a||{},retriesPerformedSoFar:u||0,callback:c,retryQueue:this,onError:this.onRequestError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}(),Lg=1800,OJ=function(){function e(t,n,r,i){or(this,e),it(this,"_sessionIdChangedHandlers",[]),this.config=t,this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=r||Qu,this._windowIdGenerator=i||Qu;var o=t.persistence_name||t.token,s=t.session_idle_timeout_seconds||Lg;if(Ms(s)?s>Lg?je.warn("session_idle_timeout_seconds cannot be  greater than 30 minutes. Using 30 minutes instead."):s<60&&je.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(je.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),s=Lg),this._sessionTimeoutMs=1e3*Math.min(Math.max(s,60),Lg),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){var a=Yr.parse(this._window_id_storage_key),c=Yr.parse(this._primary_window_exists_storage_key);a&&!c?this._windowId=a:Yr.remove(this._window_id_storage_key),Yr.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return sr(e,[{key:"onSessionId",value:function(t){var n=this;return Ht(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(t),this._sessionId&&t(this._sessionId,this._windowId),function(){n._sessionIdChangedHandlers=n._sessionIdChangedHandlers.filter(function(r){return r!==t})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Yr.is_supported()}},{key:"_setWindowId",value:function(t){t!==this._windowId&&(this._windowId=t,this._canUseSessionStorage()&&Yr.set(this._window_id_storage_key,t))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Yr.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(t,n,r){t===this._sessionId&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this._sessionId=t,this.persistence.register(it({},$5,[n,t,r])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var t=this.persistence.props[$5];return Tr(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var t=this;he==null||he.addEventListener("beforeunload",function(){t._canUseSessionStorage()&&Yr.remove(t._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),r=Os(this._getSessionId(),3),i=r[0],o=r[1],s=r[2],a=this._getWindowId(),c=s&&s>0&&Math.abs(n-s)>864e5,u=!1,d=!o,f=!t&&Math.abs(n-i)>this._sessionTimeoutMs;d||f||c?(o=this._sessionIdGenerator(),a=this._windowIdGenerator(),je.info("[SessionId] new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:d,activityTimeout:f,sessionPastMaximumLength:c}}),s=n,u=!0):a||(a=this._windowIdGenerator(),u=!0);var h=i===0||!t||c?n:i,p=s===0?new Date().getTime():s;return this._setWindowId(a),this._setSessionId(o,h,p),u&&this._sessionIdChangedHandlers.forEach(function(m){return m(o,a)}),{sessionId:o,windowId:a,sessionStartTimestamp:p}}}]),e}();(function(e){e.US="us",e.EU="eu",e.CUSTOM="custom"})(I1||(I1={}));var PJ=function(){function e(t){or(this,e),this.instance=t}return sr(e,[{key:"apiHost",get:function(){return this.instance.config.api_host.replace(/\/$/,"")}},{key:"uiHost",get:function(){var t;return(t=this.instance.config.ui_host)===null||t===void 0?void 0:t.replace(/\/$/,"")}},{key:"region",get:function(){switch(this.apiHost){case"https://app.posthog.com":case"https://us.posthog.com":return I1.US;case"https://eu.posthog.com":return I1.EU;default:return I1.CUSTOM}}},{key:"endpointFor",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(n&&(n=n[0]==="/"?n:"/".concat(n)),t==="ui")return(this.uiHost||this.apiHost)+n;if(!this.instance.config.__preview_ingestion_endpoints||this.region===I1.CUSTOM)return this.apiHost+n;var r="i.posthog.com"+n;switch(t){case"capture_events":return"https://".concat(this.region,"-c.").concat(r);case"capture_recordings":return"https://".concat(this.region,"-s.").concat(r);case"decide":return"https://".concat(this.region,"-d.").concat(r);case"assets":return"https://".concat(this.region,"-assets.").concat(r);case"api":return"https://".concat(this.region,"-api.").concat(r)}}}]),e}(),RJ=sr(function e(t,n,r,i){or(this,e),this.name="posthog-js",this.setupOnce=function(o){o(function(s){var a,c,u,d,f;if(s.level!=="error"||!t.__loaded)return s;s.tags||(s.tags={});var h=t.requestRouter.endpointFor("ui","/person/"+t.get_distinct_id());s.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(s.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var p=((a=s.exception)===null||a===void 0?void 0:a.values)||[],m={$exception_message:(c=p[0])===null||c===void 0?void 0:c.value,$exception_type:(u=p[0])===null||u===void 0?void 0:u.type,$exception_personURL:h,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:(d=p[0])===null||d===void 0?void 0:d.value,$sentry_exception_type:(f=p[0])===null||f===void 0?void 0:f.type,$sentry_tags:s.tags};return n&&r&&(m.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+s.event_id),t.capture("$exception",m),s})}}),MJ=function(){function e(t){var n=this;or(this,e),it(this,"_hasSeenPageView",!1),it(this,"_updateScrollData",function(){var r,i,o,s;n._pageViewData||(n._pageViewData=n._createPageViewData());var a=n._pageViewData,c=n._scrollY(),u=n._scrollHeight(),d=n._contentY(),f=n._contentHeight();a.lastScrollY=c,a.maxScrollY=Math.max(c,(r=a.maxScrollY)!==null&&r!==void 0?r:0),a.maxScrollHeight=Math.max(u,(i=a.maxScrollHeight)!==null&&i!==void 0?i:0),a.lastContentY=d,a.maxContentY=Math.max(d,(o=a.maxContentY)!==null&&o!==void 0?o:0),a.maxContentHeight=Math.max(f,(s=a.maxContentHeight)!==null&&s!==void 0?s:0)}),this._instance=t}return sr(e,[{key:"_createPageViewData",value:function(){var t;return{pathname:(t=he==null?void 0:he.location.pathname)!==null&&t!==void 0?t:""}}},{key:"doPageView",value:function(){var t,n;return this._hasSeenPageView?(n=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,n=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),St({$prev_pageview_pathname:(t=n)===null||t===void 0?void 0:t.pathname},this._calculatePrevPageScrollProperties(n))}},{key:"doPageLeave",value:function(){var t=this._pageViewData;return St({$prev_pageview_pathname:t==null?void 0:t.pathname},this._calculatePrevPageScrollProperties(t))}},{key:"_calculatePrevPageScrollProperties",value:function(t){if(!t||t.maxScrollHeight==null||t.lastScrollY==null||t.maxScrollY==null||t.maxContentHeight==null||t.lastContentY==null||t.maxContentY==null)return{};var n=t.maxScrollHeight,r=t.lastScrollY,i=t.maxScrollY,o=t.maxContentHeight,s=t.lastContentY,a=t.maxContentY;return n=Math.ceil(n),r=Math.ceil(r),i=Math.ceil(i),o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),{$prev_pageview_last_scroll:r,$prev_pageview_last_scroll_percentage:n<=1?1:Ng(r/n,0,1),$prev_pageview_max_scroll:i,$prev_pageview_max_scroll_percentage:n<=1?1:Ng(i/n,0,1),$prev_pageview_last_content:s,$prev_pageview_last_content_percentage:o<=1?1:Ng(s/o,0,1),$prev_pageview_max_content:a,$prev_pageview_max_content_percentage:o<=1?1:Ng(a/o,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){he==null||he.addEventListener("scroll",this._updateScrollData,!0),he==null||he.addEventListener("scrollend",this._updateScrollData,!0),he==null||he.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){he==null||he.removeEventListener("scroll",this._updateScrollData),he==null||he.removeEventListener("scrollend",this._updateScrollData),he==null||he.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollElement",value:function(){if(!this._instance.config.scroll_root_selector)return he==null?void 0:he.document.documentElement;var t,n=ka(Tr(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=he==null?void 0:he.document.querySelector(r);if(i)return i}}catch(o){n.e(o)}finally{n.f()}}},{key:"_scrollHeight",value:function(){var t=this._scrollElement();return t?Math.max(0,t.scrollHeight-t.clientHeight):0}},{key:"_scrollY",value:function(){if(this._instance.config.scroll_root_selector){var t=this._scrollElement();return t&&t.scrollTop||0}return he&&(he.scrollY||he.pageYOffset||he.document.documentElement.scrollTop)||0}},{key:"_contentHeight",value:function(){var t=this._scrollElement();return(t==null?void 0:t.scrollHeight)||0}},{key:"_contentY",value:function(){var t=this._scrollElement(),n=(t==null?void 0:t.clientHeight)||0;return this._scrollY()+n}}]),e}();function Ng(e,t,n){return Math.max(t,Math.min(e,n))}var $0,mS,Gr,IJ={icontains:function(e){return!!he&&he.location.href.toLowerCase().indexOf(e.toLowerCase())>-1},regex:function(e){return!!he&&QZ(he.location.href,e)},exact:function(e){return(he==null?void 0:he.location.href)===e}},LJ=function(){function e(t){or(this,e),this.instance=t}return sr(e,[{key:"getSurveys",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(N7);if(i&&!r)return t(i);this.instance._send_request(this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),{},{method:"GET"},function(o){var s,a=o.surveys||[];return(s=n.instance.persistence)===null||s===void 0||s.register(it({},N7,a)),t(a)})}},{key:"getActiveMatchingSurveys",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(i){var o=i.filter(function(s){return!(!s.start_date||s.end_date)}).filter(function(s){var a,c,u,d;if(!s.conditions)return!0;var f=(a=s.conditions)===null||a===void 0||!a.url||IJ[(c=(u=s.conditions)===null||u===void 0?void 0:u.urlMatchType)!==null&&c!==void 0?c:"icontains"](s.conditions.url),h=(d=s.conditions)===null||d===void 0||!d.selector||(yt==null?void 0:yt.querySelector(s.conditions.selector));return f&&h}).filter(function(s){if(!s.linked_flag_key&&!s.targeting_flag_key)return!0;var a=!s.linked_flag_key||n.instance.featureFlags.isFeatureEnabled(s.linked_flag_key),c=!s.targeting_flag_key||n.instance.featureFlags.isFeatureEnabled(s.targeting_flag_key);return a&&c});return t(o)},r)}}]),e}(),NJ=function(){function e(){var t=this;or(this,e),it(this,"limits",{}),it(this,"checkForLimiting",function(n){var r=n.responseText;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach(function(i){je.info("[RateLimiter] ".concat(i||"events"," is quota limited.")),t.limits[i]=new Date().getTime()+6e4})}catch(i){return void je.warn('[RateLimiter] could not rate limit - continuing. Error: "'.concat(i==null?void 0:i.message,'"'),{text:r})}})}return sr(e,[{key:"isRateLimited",value:function(t){var n=this.limits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}]),e}(),FJ=function(){return St({initialPathName:(fc==null?void 0:fc.pathname)||"",referringDomain:wr.referringDomain()},wr.campaignParams())},BJ=function(){function e(t,n,r){var i=this;or(this,e),it(this,"_onSessionIdCallback",function(o){var s=i._getStoredProps();if(!s||s.sessionId!==o){var a={sessionId:o,props:i._sessionSourceParamGenerator()};i._persistence.register(it({},H7,a))}}),this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||FJ,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return sr(e,[{key:"_getStoredProps",value:function(){return this._persistence.props[H7]}},{key:"getSessionProps",value:function(){var t,n=(t=this._getStoredProps())===null||t===void 0?void 0:t.props;return n?{$client_session_initial_referring_host:n.referringDomain,$client_session_initial_pathname:n.initialPathName,$client_session_initial_utm_source:n.utm_source,$client_session_initial_utm_campaign:n.utm_campaign,$client_session_initial_utm_medium:n.utm_medium,$client_session_initial_utm_content:n.utm_content,$client_session_initial_utm_term:n.utm_term}:{}}}]),e}(),HJ=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"],hA=function(e,t){if(!e)return!1;var n=e.toLowerCase();return HJ.concat(t||[]).some(function(r){var i=r.toLowerCase();return n.includes?n.includes(i):n.indexOf(i)!==-1})};(function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"})($0||($0={}));var q7=function(){},Fg={},Wi="posthog",oF=!S4&&(lr==null?void 0:lr.indexOf("MSIE"))===-1&&(lr==null?void 0:lr.indexOf("Mozilla"))===-1,pA=function(){var e,t,n;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(t=yt==null?void 0:yt.location,n=t==null?void 0:t.hostname,!!Co(n)&&n.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"localStorage+cookie",persistence_name:"",cookie_name:"",loaded:q7,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(he==null||(e=he.location)===null||e===void 0?void 0:e.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,on_request_error:function(r){var i="Bad HTTP status: "+r.statusCode+" "+r.responseText;je.error(i)},get_device_id:function(r){return r},_onCapture:q7,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},K7=function(e,t,n,r){var i,o=n!==Wi&&Gr?n?Gr[n]:void 0:Gr,s={initComplete:!1,syncCode:!1},a=function(c){return function(u){s[c]||(s[c]=!0,s.initComplete&&s.syncCode&&(r==null||r(u)))}};if(o&&mS===$0.INIT_MODULE)i=o;else{if(o&&!Tr(o))return void je.error("You have already initialized "+n);i=new gS}return i._init(e,t,n,a("initComplete")),i.toolbar.maybeLoadToolbar(),i.sessionRecording=new uJ(i),i.sessionRecording.startRecordingIfEnabled(),i.config.disable_scroll_properties||i.pageViewManager.startMeasuringScrollPosition(),i.__autocapture=i.config.autocapture,Sc._setIsAutocaptureEnabled(i),Sc._isAutocaptureEnabled&&(i.__autocapture=i.config.autocapture,Sc.enabledForProject(i.config.token,100,100)?Sc.isBrowserSupported()?Sc.init(i):(i.__autocapture=!1,je.info("Disabling Automatic Event Collection because this browser is not supported")):(i.__autocapture=!1,je.info("Not in active bucket: disabling Automatic Event Collection."))),wd.DEBUG=wd.DEBUG||i.config.debug,!Ht(o)&&Tr(o)&&(i._execute_array.call(i.people,o.people),i._execute_array(o)),a("syncCode")(i),i},zJ=function(){function e(){or(this,e),it(this,"__forceAllowLocalhost",!1)}return sr(e,[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(t){je.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}]),e}(),gS=function(){function e(){var t=this;or(this,e),it(this,"webPerformance",new zJ),this.config=pA(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=RJ,this.segmentIntegration=function(){return function(n){Promise&&Promise.resolve||je.warn("This browser does not have Promise support, and can not use the segment integration");var r=function(i,o){i.event.userId||i.event.anonymousId===n.get_distinct_id()||n.reset(),i.event.userId&&i.event.userId!==n.get_distinct_id()&&(n.register({distinct_id:i.event.userId}),n.reloadFeatureFlags());var s=n._calculate_event_properties(o,i.event.properties);return i.event.properties=Object.assign({},s,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(i){return r(i,i.event.event)},page:function(i){return r(i,"$pageview")},identify:function(i){return r(i,"$identify")},screen:function(i){return r(i,"$screen")}}}(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.analyticsDefaultEndpoint="/e/",this.elementsChainAsString=!1,this.featureFlags=new BZ(this),this.toolbar=new pJ(this),this.pageViewManager=new MJ(this),this.surveys=new LJ(this),this.rateLimiter=new NJ,this.requestRouter=new PJ(this),this.people={set:function(n,r,i){var o=Co(n)?it({},n,r):n;t.setPersonProperties(o),i==null||i({})},set_once:function(n,r,i){var o=Co(n)?it({},n,r):n;t.setPersonProperties(void 0,o),i==null||i({})}}}return sr(e,[{key:"init",value:function(t,n,r){if(Ht(r))je.critical("You must name your new library: init(token, config, name)");else{if(r!==Wi){var i=K7(t,n,r,function(o){Gr[r]=o,o._loaded()});return Gr[r]=i,i}je.critical("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(t){var n,r,i,o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,c=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var u,d={segmentRegister:!1,syncCode:!1},f=function(T){return function(){d[T]||(d[T]=!0,d.segmentRegister&&d.syncCode&&(c==null||c(o)))}};if(s.request_headers=s.request_headers||s.xhr_headers,this.set_config(Kr({},pA(),s,{name:a,token:t,callback_fn:(a===Wi?a:Wi+"."+a)+"._jsc"})),this._jsc=function(){},(he!=null&&(n=he.rrweb)!==null&&n!==void 0&&n.record||he!=null&&he.rrwebRecord)&&(this.__loaded_recorder_version=he==null||(u=he.rrweb)===null||u===void 0?void 0:u.version),this.persistence=new iA(this.config),this._requestQueue=new mJ(this._handle_queued_event.bind(this)),this._retryQueue=new DJ(this.config.on_request_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new OJ(this.config,this.persistence),this.sessionPropsManager=new BJ(this.sessionManager,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new iA(St(St({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(f("segmentRegister"))):f("segmentRegister")(),((r=s.bootstrap)===null||r===void 0?void 0:r.distinctID)!==void 0){var h,p,m=this.config.get_device_id(Qu()),v=(h=s.bootstrap)!==null&&h!==void 0&&h.isIdentifiedID?m:s.bootstrap.distinctID;this.persistence.set_user_state((p=s.bootstrap)!==null&&p!==void 0&&p.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:v})}if(this._hasBootstrappedFeatureFlags()){var b,x,C=Object.keys(((b=s.bootstrap)===null||b===void 0?void 0:b.featureFlags)||{}).filter(function(T){var E,k;return!((E=s.bootstrap)===null||E===void 0||(k=E.featureFlags)===null||k===void 0||!k[T])}).reduce(function(T,E){var k,_;return T[E]=((k=s.bootstrap)===null||k===void 0||(_=k.featureFlags)===null||_===void 0?void 0:_[E])||!1,T},{}),w=Object.keys(((x=s.bootstrap)===null||x===void 0?void 0:x.featureFlagPayloads)||{}).filter(function(T){return C[T]}).reduce(function(T,E){var k,_,O,D;return(k=s.bootstrap)!==null&&k!==void 0&&(_=k.featureFlagPayloads)!==null&&_!==void 0&&_[E]&&(T[E]=(O=s.bootstrap)===null||O===void 0||(D=O.featureFlagPayloads)===null||D===void 0?void 0:D[E]),T},{});this.featureFlags.receivedFeatureFlags({featureFlags:C,featureFlagPayloads:w})}if(!this.get_distinct_id()){var S=this.config.get_device_id(Qu());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_user_state("anonymous")}he==null||(i=he.addEventListener)===null||i===void 0||i.call(he,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),f("syncCode")()}},{key:"_afterDecideResponse",value:function(t){var n;if(this.compression={},t.supportedCompression&&!this.config.disable_compression){var r,i={},o=ka(t.supportedCompression);try{for(o.s();!(r=o.n()).done;)i[r.value]=!0}catch(s){o.e(s)}finally{o.f()}this.compression=i}(n=t.analytics)!==null&&n!==void 0&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),t.elementsChainAsString&&(this.elementsChainAsString=t.elementsChainAsString),t.__preview_ingestion_endpoints&&(this.config.__preview_ingestion_endpoints=t.__preview_ingestion_endpoints)}},{key:"_loaded",value:function(){var t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(n){je.critical("`loaded` function failed",n)}this._start_queue_if_opted_in(),this.config.capture_pageview&&yt&&this.capture("$pageview",{title:yt.title},{send_instantly:!0}),t||(new dJ(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var t;this.has_opted_out_capturing()||this.config.request_batching&&((t=this._requestQueue)===null||t===void 0||t.poll())}},{key:"_dom_loaded",value:function(){var t=this;this.has_opted_out_capturing()||cf(this.__request_queue,function(n){t._send_request.apply(t,T5(n))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(t,n){if(Ht(t))return null;if(S4)return function(s){t(s,n)};var r=this._jsc,i=""+Math.floor(1e8*Math.random()),o=this.config.callback_fn+"["+i+"]";return r[i]=function(s){delete r[i],t(s,n)},o}},{key:"_handle_unload",value:function(){var t,n;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(t=this._requestQueue)===null||t===void 0||t.unload(),(n=this._retryQueue)===null||n===void 0||n.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(t,n,r){var i=JSON.stringify(n);this.__compress_and_send_json_request(t,i,r||Fg,q7)}},{key:"__compress_and_send_json_request",value:function(t,n,r,i){var o=function(u,d,f){return u===Wu.GZipJS?[_J(AJ(d),{mtime:0}),St(St({},f),{},{blob:!0,urlQueryArgs:{compression:Wu.GZipJS}})]:[{data:lS(d)},f]}(this.compression[Wu.GZipJS]?Wu.GZipJS:Wu.Base64,n,r),s=Os(o,2),a=s[0],c=s[1];this._send_request(t,a,c,i)}},{key:"_send_request",value:function(t,n,r,i){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(r._batchKey))if(oF)this.__request_queue.push([t,n,r,i]);else{var o={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};r=Kr(o,r||{}),S4||(r.method="GET");var s=he&&"sendBeacon"in he.navigator&&r.transport==="sendBeacon";if(t=pS(t,r.urlQueryArgs||{},{ip:this.config.ip}),s)try{he==null||he.navigator.sendBeacon(t,ry(n,St(St({},r),{},{sendBeacon:!0})))}catch{}else if(S4||!yt)try{iF({url:t,data:n,headers:this.config.request_headers,options:r,callback:i,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onError:this.config.on_request_error,onResponse:this.rateLimiter.checkForLimiting})}catch(d){je.error(d)}else{var a,c=yt.createElement("script");c.type="text/javascript",c.async=!0,c.defer=!0,c.src=t;var u=yt.getElementsByTagName("script")[0];(a=u.parentNode)===null||a===void 0||a.insertBefore(c,u)}}}},{key:"_execute_array",value:function(t){var n,r=this,i=[],o=[],s=[];cf(t,function(c){c&&(n=c[0],Tr(n)?s.push(c):Zo(c)?c.call(r):Tr(c)&&n==="alias"?i.push(c):Tr(c)&&n.indexOf("capture")!==-1&&Zo(r[n])?s.push(c):o.push(c))});var a=function(c,u){cf(c,function(d){if(Tr(d[0])){var f=u;En(d,function(h){f=f[h[0]].apply(f,h.slice(1))})}else this[d[0]].apply(this,d.slice(1))},u)};a(i,this),a(o,this),a(s,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var t,n;return((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)===null||n===void 0?void 0:n.featureFlags).length>0||!1}},{key:"push",value:function(t){this._execute_array([t])}},{key:"capture",value:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fg;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return je.uninitializedWarning("posthog.capture");if(!U7(this)){var o=(i=i||Fg).transport;if(o&&(i.transport=o),!Ht(t)&&Co(t)){if(!lr||this.config.opt_out_useragent_filter||!hA(lr,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:Qu(),event:t,properties:this._calculate_event_properties(t,n||{})};t==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=PZ(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date;var a=St(St({},s.properties.$set),s.$set);(function(f){if(zc(f)){for(var h in f)if(NN.call(f,h))return!1;return!0}return!1})(a)||this.setPersonPropertiesForFlags(a),je.info("send",s);var c=JSON.stringify(s),u=(r=i._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("capture_events",this.analyticsDefaultEndpoint),d=i!==Fg;return!this.config.request_batching||d&&!i._batchKey||i.send_instantly?this.__compress_and_send_json_request(u,c,i):this._requestQueue.enqueue(u,s,i),this._invokeCaptureHooks(t,s),s}}else je.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(t){this.__captureHooks.push(t)}},{key:"_invokeCaptureHooks",value:function(t,n){this.config._onCapture(t,n),En(this.__captureHooks,function(r){return r(t)})}},{key:"_calculate_event_properties",value:function(t,n){if(!this.persistence||!this.sessionPersistence)return n;var r=this.persistence.remove_event_timer(t),i=St({},n);if(i.token=this.config.token,t==="$snapshot"){var o=St(St({},this.persistence.properties()),this.sessionPersistence.properties());return i.distinct_id=o.distinct_id,i}var s=wr.properties();if(this.sessionManager){var a=this.sessionManager.checkAndGetSessionAndWindowId(),c=a.sessionId,u=a.windowId;i.$session_id=c,i.$window_id=u}if(this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(t==="$pageview"||t==="$pageleave"||t==="$autocapture")){var d=this.sessionPropsManager.getSessionProps();i=Kr(i,d)}if(!this.config.disable_scroll_properties){var f={};t==="$pageview"?f=this.pageViewManager.doPageView():t==="$pageleave"&&(f=this.pageViewManager.doPageLeave()),i=Kr(i,f)}if(t==="$pageview"&&yt&&(i.title=yt.title),t==="$performance_event"){var h=this.persistence.properties();return i.distinct_id=h.distinct_id,i.$current_url=s.$current_url,i}if(!Ht(r)){var p=new Date().getTime()-r;i.$duration=parseFloat((p/1e3).toFixed(3))}lr&&this.config.opt_out_useragent_filter&&(i.$browser_type=hA(lr,this.config.custom_blocked_useragents)?"bot":"browser"),i=Kr({},wr.properties(),this.persistence.properties(),this.sessionPersistence.properties(),i);var m=this.config.property_blacklist;Tr(m)?En(m,function(b){delete i[b]}):je.error("Invalid value for property_blacklist config: "+m);var v=this.config.sanitize_properties;return v&&(i=v(i,t)),i}},{key:"register",value:function(t,n){var r;(r=this.persistence)===null||r===void 0||r.register(t,n)}},{key:"register_once",value:function(t,n,r){var i;(i=this.persistence)===null||i===void 0||i.register_once(t,n,r)}},{key:"register_for_session",value:function(t){var n;(n=this.sessionPersistence)===null||n===void 0||n.register(t)}},{key:"unregister",value:function(t){var n;(n=this.persistence)===null||n===void 0||n.unregister(t)}},{key:"unregister_for_session",value:function(t){var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(t)}},{key:"_register_single",value:function(t,n){this.register(it({},t,n))}},{key:"getFeatureFlag",value:function(t,n){return this.featureFlags.getFeatureFlag(t,n)}},{key:"getFeatureFlagPayload",value:function(t){var n=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(n)}catch{return n}}},{key:"isFeatureEnabled",value:function(t,n){return this.featureFlags.isFeatureEnabled(t,n)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n)}},{key:"getEarlyAccessFeatures",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(t,n)}},{key:"onFeatureFlags",value:function(t){return this.featureFlags.onFeatureFlags(t)}},{key:"onSessionId",value:function(t){var n,r;return(n=(r=this.sessionManager)===null||r===void 0?void 0:r.onSessionId(t))!==null&&n!==void 0?n:function(){}}},{key:"getSurveys",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(t,n)}},{key:"getActiveMatchingSurveys",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(t,n)}},{key:"identify",value:function(t,n,r){if(!this.__loaded||!this.persistence)return je.uninitializedWarning("posthog.identify");if(Ms(t)&&(t=t.toString(),je.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))je.critical('The string "'.concat(t,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'));else{var i=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var o=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}t!==i&&t!==this.get_property(C4)&&(this.unregister(C4),this.register({distinct_id:t}));var s=this.persistence.get_user_state()==="anonymous";t!==i&&s?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(n||{},!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),t!==i&&(this.reloadFeatureFlags(),this.unregister(D5))}else je.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(t,n){(t||n)&&(this.setPersonPropertiesForFlags(t||{}),this.capture("$set",{$set:t||{},$set_once:n||{}}))}},{key:"group",value:function(t,n,r){if(t&&n){var i=this.getGroups();i[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:St(St({},i),{},it({},t,n))}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags(it({},t,r))),i[t]===n||r||this.reloadFeatureFlags()}else je.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(t,n)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(t,n)}},{key:"resetGroupPropertiesForFlags",value:function(t){this.featureFlags.resetGroupPropertiesForFlags(t)}},{key:"reset",value:function(t){var n,r,i,o;if(!this.__loaded)return je.uninitializedWarning("posthog.reset");var s=this.get_property("$device_id");(n=this.persistence)===null||n===void 0||n.clear(),(r=this.sessionPersistence)===null||r===void 0||r.clear(),(i=this.persistence)===null||i===void 0||i.set_user_state("anonymous"),(o=this.sessionManager)===null||o===void 0||o.resetSessionId();var a=this.config.get_device_id(Qu());this.register_once({distinct_id:a,$device_id:t?a:s},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var t,n;return(t=(n=this.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}},{key:"get_session_replay_url",value:function(t){if(!this.sessionManager)return"";var n=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.sessionId,i=n.sessionStartTimestamp,o=this.requestRouter.endpointFor("ui","/replay/"+r);if(t!=null&&t.withTimestamp&&i){var s,a=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!i)return o;var c=Math.max(Math.floor((new Date().getTime()-i)/1e3)-a,0);o+="?t=".concat(c)}return o}},{key:"alias",value:function(t,n){return t===this.get_property(qN)?(je.critical("Attempting to create alias for existing People user - aborting."),-2):(Ht(n)&&(n=this.get_distinct_id()),t!==n?(this._register_single(C4,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(je.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1))}},{key:"set_config",value:function(t){var n,r,i=St({},this.config);if(zc(t)&&(Kr(this.config,t),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(n=this.persistence)===null||n===void 0||n.update_config(this.config),(r=this.sessionPersistence)===null||r===void 0||r.update_config(this.config),pr.is_supported()&&pr.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(wd.DEBUG=!0),this.sessionRecording&&!Ht(t.disable_session_recording))){var o=i.disable_session_recording!==t.disable_session_recording,s=!U7(this)&&!t.disable_session_recording&&!this.sessionRecording.started;(o||s)&&(t.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled())}}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var t;return!((t=this.sessionRecording)===null||t===void 0||!t.started)}},{key:"loadToolbar",value:function(t){return this.toolbar.loadToolbar(t)}},{key:"get_property",value:function(t){var n;return(n=this.persistence)===null||n===void 0?void 0:n.props[t]}},{key:"getSessionProperty",value:function(t){var n;return(n=this.sessionPersistence)===null||n===void 0?void 0:n.props[t]}},{key:"toString",value:function(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:Wi;return n!==Wi&&(n=Wi+"."+n),n}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&pr.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!ba.get("ph_optout")||(ba.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(t){var n,r,i,o,s;if(t&&t.clear_persistence)i=!0;else{if(!t||!t.enable_persistence)return;i=!1}this.config.disable_persistence||((n=this.persistence)===null||n===void 0?void 0:n.disabled)===i||(o=this.persistence)===null||o===void 0||o.set_disabled(i),this.config.disable_persistence||((r=this.sessionPersistence)===null||r===void 0?void 0:r.disabled)===i||(s=this.sessionPersistence)===null||s===void 0||s.set_disabled(i)}},{key:"_gdpr_call_func",value:function(t,n){return n=Kr({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},n||{}),pr.is_supported()||n.persistence_type!=="localStorage"||(n.persistence_type="cookie"),t(this.config.token,{capture:n.capture,captureEventName:n.capture_event_name,captureProperties:n.capture_properties,persistenceType:n.persistence_type,persistencePrefix:n.cookie_prefix,cookieExpiration:n.cookie_expiration,crossSubdomainCookie:n.cross_subdomain_cookie,secureCookie:n.secure_cookie})}},{key:"opt_in_capturing",value:function(t){t=Kr({enable_persistence:!0},t||{}),this._gdpr_call_func(oJ,t),this._gdpr_update_persistence(t)}},{key:"opt_out_capturing",value:function(t){var n=Kr({clear_persistence:!0},t||{});this._gdpr_call_func(sJ,n),this._gdpr_update_persistence(n)}},{key:"has_opted_in_capturing",value:function(t){return this._gdpr_call_func(aJ,t)}},{key:"has_opted_out_capturing",value:function(t){return this._gdpr_call_func(YN,t)}},{key:"clear_opt_in_out_capturing",value:function(t){var n=Kr({enable_persistence:!0},t!=null?t:{});this._gdpr_call_func(lJ,n),this._gdpr_update_persistence(n)}},{key:"debug",value:function(t){t===!1?(he==null||he.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(he==null||he.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),e}();(function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=HN(e.prototype[t[n]])})(gS,["identify"]);var mA,gA,lc={},UJ=function(){Gr.init=function(e,t,n){if(n)return Gr[n]||(Gr[n]=lc[n]=K7(e||"",t||{},n,function(i){Gr[n]=lc[n]=i,i._loaded()})),Gr[n];var r=Gr;return lc[Wi]?r=lc[Wi]:e&&(r=K7(e,t||{},Wi,function(i){lc[Wi]=i,i._loaded()}),lc[Wi]=r),Gr=r,mS===$0.INIT_SNIPPET&&(pi[Wi]=Gr),En(lc,function(i,o){o!==Wi&&(Gr[o]=i)}),r}};(function(e){e.Popover="popover",e.API="api",e.Widget="widget"})(mA||(mA={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(gA||(gA={}));var Up=(mS=$0.INIT_MODULE,Gr=new gS,UJ(),Gr.init(),function(){function e(){e.done||(e.done=!0,oF=!1,En(lc,function(t){t._dom_loaded()}))}yt!=null&&yt.addEventListener&&(yt.readyState==="complete"?e():yt.addEventListener("DOMContentLoaded",e,!1)),he&&Bp(he,"load",e,!0)}(),Gr),VJ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y={exports:{}},Zt={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fm=Symbol.for("react.element"),jJ=Symbol.for("react.portal"),WJ=Symbol.for("react.fragment"),qJ=Symbol.for("react.strict_mode"),KJ=Symbol.for("react.profiler"),GJ=Symbol.for("react.provider"),YJ=Symbol.for("react.context"),QJ=Symbol.for("react.forward_ref"),XJ=Symbol.for("react.suspense"),ZJ=Symbol.for("react.memo"),JJ=Symbol.for("react.lazy"),vA=Symbol.iterator;function eee(e){return e===null||typeof e!="object"?null:(e=vA&&e[vA]||e["@@iterator"],typeof e=="function"?e:null)}var sF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aF=Object.assign,lF={};function ah(e,t,n){this.props=e,this.context=t,this.refs=lF,this.updater=n||sF}ah.prototype.isReactComponent={};ah.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ah.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cF(){}cF.prototype=ah.prototype;function vS(e,t,n){this.props=e,this.context=t,this.refs=lF,this.updater=n||sF}var yS=vS.prototype=new cF;yS.constructor=vS;aF(yS,ah.prototype);yS.isPureReactComponent=!0;var yA=Array.isArray,uF=Object.prototype.hasOwnProperty,bS={current:null},dF={key:!0,ref:!0,__self:!0,__source:!0};function fF(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)uF.call(t,r)&&!dF.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Fm,type:e,key:o,ref:s,props:i,_owner:bS.current}}function tee(e,t){return{$$typeof:Fm,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xS(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm}function nee(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var bA=/\/+/g;function U9(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nee(""+e.key):t.toString(36)}function T4(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Fm:case jJ:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+U9(s,0):r,yA(i)?(n="",e!=null&&(n=e.replace(bA,"$&/")+"/"),T4(i,t,n,"",function(u){return u})):i!=null&&(xS(i)&&(i=tee(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(bA,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",yA(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+U9(o,a);s+=T4(o,t,n,c,i)}else if(c=eee(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+U9(o,a++),s+=T4(o,t,n,c,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Bg(e,t,n){if(e==null)return e;var r=[],i=0;return T4(e,r,"","",function(o){return t.call(n,o,i++)}),r}function ree(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fi={current:null},k4={transition:null},iee={ReactCurrentDispatcher:Fi,ReactCurrentBatchConfig:k4,ReactCurrentOwner:bS};Zt.Children={map:Bg,forEach:function(e,t,n){Bg(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Bg(e,function(){t++}),t},toArray:function(e){return Bg(e,function(t){return t})||[]},only:function(e){if(!xS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Zt.Component=ah;Zt.Fragment=WJ;Zt.Profiler=KJ;Zt.PureComponent=vS;Zt.StrictMode=qJ;Zt.Suspense=XJ;Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iee;Zt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=aF({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=bS.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)uF.call(t,c)&&!dF.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Fm,type:e.type,key:i,ref:o,props:r,_owner:s}};Zt.createContext=function(e){return e={$$typeof:YJ,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:GJ,_context:e},e.Consumer=e};Zt.createElement=fF;Zt.createFactory=function(e){var t=fF.bind(null,e);return t.type=e,t};Zt.createRef=function(){return{current:null}};Zt.forwardRef=function(e){return{$$typeof:QJ,render:e}};Zt.isValidElement=xS;Zt.lazy=function(e){return{$$typeof:JJ,_payload:{_status:-1,_result:e},_init:ree}};Zt.memo=function(e,t){return{$$typeof:ZJ,type:e,compare:t===void 0?null:t}};Zt.startTransition=function(e){var t=k4.transition;k4.transition={};try{e()}finally{k4.transition=t}};Zt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Zt.useCallback=function(e,t){return Fi.current.useCallback(e,t)};Zt.useContext=function(e){return Fi.current.useContext(e)};Zt.useDebugValue=function(){};Zt.useDeferredValue=function(e){return Fi.current.useDeferredValue(e)};Zt.useEffect=function(e,t){return Fi.current.useEffect(e,t)};Zt.useId=function(){return Fi.current.useId()};Zt.useImperativeHandle=function(e,t,n){return Fi.current.useImperativeHandle(e,t,n)};Zt.useInsertionEffect=function(e,t){return Fi.current.useInsertionEffect(e,t)};Zt.useLayoutEffect=function(e,t){return Fi.current.useLayoutEffect(e,t)};Zt.useMemo=function(e,t){return Fi.current.useMemo(e,t)};Zt.useReducer=function(e,t,n){return Fi.current.useReducer(e,t,n)};Zt.useRef=function(e){return Fi.current.useRef(e)};Zt.useState=function(e){return Fi.current.useState(e)};Zt.useSyncExternalStore=function(e,t,n){return Fi.current.useSyncExternalStore(e,t,n)};Zt.useTransition=function(){return Fi.current.useTransition()};Zt.version="18.2.0";(function(e){e.exports=Zt})(y);const Ae=Nm(y.exports),D0=_Z({__proto__:null,default:Ae},[y.exports]);var iy={exports:{}},oy={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var oee=y.exports,see=Symbol.for("react.element"),aee=Symbol.for("react.fragment"),lee=Object.prototype.hasOwnProperty,cee=oee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uee={key:!0,ref:!0,__self:!0,__source:!0};function hF(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)lee.call(t,r)&&!uee.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:see,type:e,key:o,ref:s,props:i,_owner:cee.current}}oy.Fragment=aee;oy.jsx=hF;oy.jsxs=hF;(function(e){e.exports=oy})(iy);const z=iy.exports.Fragment,l=iy.exports.jsx,g=iy.exports.jsxs;var dee=y.exports.createContext({client:Up});function fee(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,o=y.exports.useMemo(function(){return n&&r&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&i&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(r&&(Up.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),Up.init(r,i)),Up)},[n,r]);return l(dee.Provider,{value:{client:o},children:t})}var G7={},Lr={exports:{}},Oo={},pF={exports:{}},mF={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(U,H){var R=U.length;U.push(H);e:for(;0<R;){var se=R-1>>>1,ee=U[se];if(0<i(ee,H))U[se]=H,U[R]=ee,R=se;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var H=U[0],R=U.pop();if(R!==H){U[0]=R;e:for(var se=0,ee=U.length,I=ee>>>1;se<I;){var me=2*(se+1)-1,Se=U[me],pe=me+1,ye=U[pe];if(0>i(Se,R))pe<ee&&0>i(ye,Se)?(U[se]=ye,U[pe]=R,se=pe):(U[se]=Se,U[me]=R,se=me);else if(pe<ee&&0>i(ye,R))U[se]=ye,U[pe]=R,se=pe;else break e}}return H}function i(U,H){var R=U.sortIndex-H.sortIndex;return R!==0?R:U.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],d=1,f=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(U){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=U)r(u),H.sortIndex=H.expirationTime,t(c,H);else break;H=n(u)}}function S(U){if(v=!1,w(U),!m)if(n(c)!==null)m=!0,re(T);else{var H=n(u);H!==null&&oe(S,H.startTime-U)}}function T(U,H){m=!1,v&&(v=!1,x(_),_=-1),p=!0;var R=h;try{for(w(H),f=n(c);f!==null&&(!(f.expirationTime>H)||U&&!L());){var se=f.callback;if(typeof se=="function"){f.callback=null,h=f.priorityLevel;var ee=se(f.expirationTime<=H);H=e.unstable_now(),typeof ee=="function"?f.callback=ee:f===n(c)&&r(c),w(H)}else r(c);f=n(c)}if(f!==null)var I=!0;else{var me=n(u);me!==null&&oe(S,me.startTime-H),I=!1}return I}finally{f=null,h=R,p=!1}}var E=!1,k=null,_=-1,O=5,D=-1;function L(){return!(e.unstable_now()-D<O)}function N(){if(k!==null){var U=e.unstable_now();D=U;var H=!0;try{H=k(!0,U)}finally{H?j():(E=!1,k=null)}}else E=!1}var j;if(typeof C=="function")j=function(){C(N)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,X=G.port2;G.port1.onmessage=N,j=function(){X.postMessage(null)}}else j=function(){b(N,0)};function re(U){k=U,E||(E=!0,j())}function oe(U,H){_=b(function(){U(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,re(T))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(U){switch(h){case 1:case 2:case 3:var H=3;break;default:H=h}var R=h;h=H;try{return U()}finally{h=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var R=h;h=U;try{return H()}finally{h=R}},e.unstable_scheduleCallback=function(U,H,R){var se=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?se+R:se):R=se,U){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=R+ee,U={id:d++,callback:H,priorityLevel:U,startTime:R,expirationTime:ee,sortIndex:-1},R>se?(U.sortIndex=R,t(u,U),n(c)===null&&U===n(u)&&(v?(x(_),_=-1):v=!0,oe(S,R-se))):(U.sortIndex=ee,t(c,U),m||p||(m=!0,re(T))),U},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(U){var H=h;return function(){var R=h;h=H;try{return U.apply(this,arguments)}finally{h=R}}}})(mF);(function(e){e.exports=mF})(pF);/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gF=y.exports,_o=pF.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var vF=new Set,O0={};function Hd(e,t){$f(e,t),$f(e+"Capture",t)}function $f(e,t){for(O0[e]=t,e=0;e<t.length;e++)vF.add(t[e])}var Cl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y7=Object.prototype.hasOwnProperty,hee=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xA={},CA={};function pee(e){return Y7.call(CA,e)?!0:Y7.call(xA,e)?!1:hee.test(e)?CA[e]=!0:(xA[e]=!0,!1)}function mee(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gee(e,t,n,r){if(t===null||typeof t>"u"||mee(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bi(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ni={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ni[e]=new Bi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ni[t]=new Bi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ni[e]=new Bi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ni[e]=new Bi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ni[e]=new Bi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ni[e]=new Bi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ni[e]=new Bi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ni[e]=new Bi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ni[e]=new Bi(e,5,!1,e.toLowerCase(),null,!1,!1)});var CS=/[\-:]([a-z])/g;function wS(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(CS,wS);ni[t]=new Bi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(CS,wS);ni[t]=new Bi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(CS,wS);ni[t]=new Bi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ni[e]=new Bi(e,1,!1,e.toLowerCase(),null,!1,!1)});ni.xlinkHref=new Bi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ni[e]=new Bi(e,1,!1,e.toLowerCase(),null,!0,!0)});function SS(e,t,n,r){var i=ni.hasOwnProperty(t)?ni[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gee(t,n,i,r)&&(n=null),r||i===null?pee(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Hl=gF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hg=Symbol.for("react.element"),L1=Symbol.for("react.portal"),N1=Symbol.for("react.fragment"),ES=Symbol.for("react.strict_mode"),Q7=Symbol.for("react.profiler"),yF=Symbol.for("react.provider"),bF=Symbol.for("react.context"),TS=Symbol.for("react.forward_ref"),X7=Symbol.for("react.suspense"),Z7=Symbol.for("react.suspense_list"),kS=Symbol.for("react.memo"),pc=Symbol.for("react.lazy"),xF=Symbol.for("react.offscreen"),wA=Symbol.iterator;function Jh(e){return e===null||typeof e!="object"?null:(e=wA&&e[wA]||e["@@iterator"],typeof e=="function"?e:null)}var Zn=Object.assign,V9;function Ap(e){if(V9===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V9=t&&t[1]||""}return`
`+V9+e}var j9=!1;function W9(e,t){if(!e||j9)return"";j9=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var c=`
`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{j9=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ap(e):""}function vee(e){switch(e.tag){case 5:return Ap(e.type);case 16:return Ap("Lazy");case 13:return Ap("Suspense");case 19:return Ap("SuspenseList");case 0:case 2:case 15:return e=W9(e.type,!1),e;case 11:return e=W9(e.type.render,!1),e;case 1:return e=W9(e.type,!0),e;default:return""}}function J7(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N1:return"Fragment";case L1:return"Portal";case Q7:return"Profiler";case ES:return"StrictMode";case X7:return"Suspense";case Z7:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bF:return(e.displayName||"Context")+".Consumer";case yF:return(e._context.displayName||"Context")+".Provider";case TS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kS:return t=e.displayName||null,t!==null?t:J7(e.type)||"Memo";case pc:t=e._payload,e=e._init;try{return J7(e(t))}catch{}}return null}function yee(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J7(t);case 8:return t===ES?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ru(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CF(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bee(e){var t=CF(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zg(e){e._valueTracker||(e._valueTracker=bee(e))}function wF(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=CF(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function R5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ex(e,t){var n=t.checked;return Zn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function SA(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ru(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function SF(e,t){t=t.checked,t!=null&&SS(e,"checked",t,!1)}function tx(e,t){SF(e,t);var n=ru(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nx(e,t.type,n):t.hasOwnProperty("defaultValue")&&nx(e,t.type,ru(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function EA(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function nx(e,t,n){(t!=="number"||R5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $p=Array.isArray;function uf(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ru(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function rx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Re(91));return Zn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function TA(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Re(92));if($p(n)){if(1<n.length)throw Error(Re(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ru(n)}}function EF(e,t){var n=ru(t.value),r=ru(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function kA(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function TF(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ix(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?TF(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ug,kF=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ug=Ug||document.createElement("div"),Ug.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ug.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function P0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xee=["Webkit","ms","Moz","O"];Object.keys(Vp).forEach(function(e){xee.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vp[t]=Vp[e]})});function _F(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vp.hasOwnProperty(e)&&Vp[e]?(""+t).trim():t+"px"}function AF(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_F(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Cee=Zn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ox(e,t){if(t){if(Cee[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function sx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ax=null;function _S(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lx=null,df=null,ff=null;function _A(e){if(e=zm(e)){if(typeof lx!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=uy(t),lx(e.stateNode,e.type,t))}}function $F(e){df?ff?ff.push(e):ff=[e]:df=e}function DF(){if(df){var e=df,t=ff;if(ff=df=null,_A(e),t)for(e=0;e<t.length;e++)_A(t[e])}}function OF(e,t){return e(t)}function PF(){}var q9=!1;function RF(e,t,n){if(q9)return e(t,n);q9=!0;try{return OF(e,t,n)}finally{q9=!1,(df!==null||ff!==null)&&(PF(),DF())}}function R0(e,t){var n=e.stateNode;if(n===null)return null;var r=uy(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Re(231,t,typeof n));return n}var cx=!1;if(Cl)try{var ep={};Object.defineProperty(ep,"passive",{get:function(){cx=!0}}),window.addEventListener("test",ep,ep),window.removeEventListener("test",ep,ep)}catch{cx=!1}function wee(e,t,n,r,i,o,s,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var jp=!1,M5=null,I5=!1,ux=null,See={onError:function(e){jp=!0,M5=e}};function Eee(e,t,n,r,i,o,s,a,c){jp=!1,M5=null,wee.apply(See,arguments)}function Tee(e,t,n,r,i,o,s,a,c){if(Eee.apply(this,arguments),jp){if(jp){var u=M5;jp=!1,M5=null}else throw Error(Re(198));I5||(I5=!0,ux=u)}}function zd(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function MF(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function AA(e){if(zd(e)!==e)throw Error(Re(188))}function kee(e){var t=e.alternate;if(!t){if(t=zd(e),t===null)throw Error(Re(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return AA(i),e;if(o===r)return AA(i),t;o=o.sibling}throw Error(Re(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(Re(189))}}if(n.alternate!==r)throw Error(Re(190))}if(n.tag!==3)throw Error(Re(188));return n.stateNode.current===n?e:t}function IF(e){return e=kee(e),e!==null?LF(e):null}function LF(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=LF(e);if(t!==null)return t;e=e.sibling}return null}var NF=_o.unstable_scheduleCallback,$A=_o.unstable_cancelCallback,_ee=_o.unstable_shouldYield,Aee=_o.unstable_requestPaint,cr=_o.unstable_now,$ee=_o.unstable_getCurrentPriorityLevel,AS=_o.unstable_ImmediatePriority,FF=_o.unstable_UserBlockingPriority,L5=_o.unstable_NormalPriority,Dee=_o.unstable_LowPriority,BF=_o.unstable_IdlePriority,sy=null,xa=null;function Oee(e){if(xa&&typeof xa.onCommitFiberRoot=="function")try{xa.onCommitFiberRoot(sy,e,void 0,(e.current.flags&128)===128)}catch{}}var Bs=Math.clz32?Math.clz32:Mee,Pee=Math.log,Ree=Math.LN2;function Mee(e){return e>>>=0,e===0?32:31-(Pee(e)/Ree|0)|0}var Vg=64,jg=4194304;function Dp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function N5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Dp(a):(o&=s,o!==0&&(r=Dp(o)))}else s=n&~i,s!==0?r=Dp(s):o!==0&&(r=Dp(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Bs(t),i=1<<n,r|=e[n],t&=~i;return r}function Iee(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lee(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Bs(o),a=1<<s,c=i[s];c===-1?((a&n)===0||(a&r)!==0)&&(i[s]=Iee(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function dx(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function HF(){var e=Vg;return Vg<<=1,(Vg&4194240)===0&&(Vg=64),e}function K9(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bs(t),e[t]=n}function Nee(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Bs(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function $S(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bs(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var gn=0;function zF(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var UF,DS,VF,jF,WF,fx=!1,Wg=[],Uc=null,Vc=null,jc=null,M0=new Map,I0=new Map,Ec=[],Fee="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function DA(e,t){switch(e){case"focusin":case"focusout":Uc=null;break;case"dragenter":case"dragleave":Vc=null;break;case"mouseover":case"mouseout":jc=null;break;case"pointerover":case"pointerout":M0.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":I0.delete(t.pointerId)}}function tp(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=zm(t),t!==null&&DS(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Bee(e,t,n,r,i){switch(t){case"focusin":return Uc=tp(Uc,e,t,n,r,i),!0;case"dragenter":return Vc=tp(Vc,e,t,n,r,i),!0;case"mouseover":return jc=tp(jc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return M0.set(o,tp(M0.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,I0.set(o,tp(I0.get(o)||null,e,t,n,r,i)),!0}return!1}function qF(e){var t=Xu(e.target);if(t!==null){var n=zd(t);if(n!==null){if(t=n.tag,t===13){if(t=MF(n),t!==null){e.blockedOn=t,WF(e.priority,function(){VF(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _4(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ax=r,n.target.dispatchEvent(r),ax=null}else return t=zm(n),t!==null&&DS(t),e.blockedOn=n,!1;t.shift()}return!0}function OA(e,t,n){_4(e)&&n.delete(t)}function Hee(){fx=!1,Uc!==null&&_4(Uc)&&(Uc=null),Vc!==null&&_4(Vc)&&(Vc=null),jc!==null&&_4(jc)&&(jc=null),M0.forEach(OA),I0.forEach(OA)}function np(e,t){e.blockedOn===t&&(e.blockedOn=null,fx||(fx=!0,_o.unstable_scheduleCallback(_o.unstable_NormalPriority,Hee)))}function L0(e){function t(i){return np(i,e)}if(0<Wg.length){np(Wg[0],e);for(var n=1;n<Wg.length;n++){var r=Wg[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Uc!==null&&np(Uc,e),Vc!==null&&np(Vc,e),jc!==null&&np(jc,e),M0.forEach(t),I0.forEach(t),n=0;n<Ec.length;n++)r=Ec[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ec.length&&(n=Ec[0],n.blockedOn===null);)qF(n),n.blockedOn===null&&Ec.shift()}var hf=Hl.ReactCurrentBatchConfig,F5=!0;function zee(e,t,n,r){var i=gn,o=hf.transition;hf.transition=null;try{gn=1,OS(e,t,n,r)}finally{gn=i,hf.transition=o}}function Uee(e,t,n,r){var i=gn,o=hf.transition;hf.transition=null;try{gn=4,OS(e,t,n,r)}finally{gn=i,hf.transition=o}}function OS(e,t,n,r){if(F5){var i=hx(e,t,n,r);if(i===null)r8(e,t,r,B5,n),DA(e,r);else if(Bee(i,e,t,n,r))r.stopPropagation();else if(DA(e,r),t&4&&-1<Fee.indexOf(e)){for(;i!==null;){var o=zm(i);if(o!==null&&UF(o),o=hx(e,t,n,r),o===null&&r8(e,t,r,B5,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else r8(e,t,r,null,n)}}var B5=null;function hx(e,t,n,r){if(B5=null,e=_S(r),e=Xu(e),e!==null)if(t=zd(e),t===null)e=null;else if(n=t.tag,n===13){if(e=MF(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return B5=e,null}function KF(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($ee()){case AS:return 1;case FF:return 4;case L5:case Dee:return 16;case BF:return 536870912;default:return 16}default:return 16}}var $c=null,PS=null,A4=null;function GF(){if(A4)return A4;var e,t=PS,n=t.length,r,i="value"in $c?$c.value:$c.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return A4=i.slice(e,1<r?1-r:void 0)}function $4(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qg(){return!0}function PA(){return!1}function Po(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?qg:PA,this.isPropagationStopped=PA,this}return Zn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qg)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qg)},persist:function(){},isPersistent:qg}),t}var lh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},RS=Po(lh),Hm=Zn({},lh,{view:0,detail:0}),Vee=Po(Hm),G9,Y9,rp,ay=Zn({},Hm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:MS,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rp&&(rp&&e.type==="mousemove"?(G9=e.screenX-rp.screenX,Y9=e.screenY-rp.screenY):Y9=G9=0,rp=e),G9)},movementY:function(e){return"movementY"in e?e.movementY:Y9}}),RA=Po(ay),jee=Zn({},ay,{dataTransfer:0}),Wee=Po(jee),qee=Zn({},Hm,{relatedTarget:0}),Q9=Po(qee),Kee=Zn({},lh,{animationName:0,elapsedTime:0,pseudoElement:0}),Gee=Po(Kee),Yee=Zn({},lh,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qee=Po(Yee),Xee=Zn({},lh,{data:0}),MA=Po(Xee),Zee={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jee={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ete={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tte(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ete[e])?!!t[e]:!1}function MS(){return tte}var nte=Zn({},Hm,{key:function(e){if(e.key){var t=Zee[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$4(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jee[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:MS,charCode:function(e){return e.type==="keypress"?$4(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$4(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rte=Po(nte),ite=Zn({},ay,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IA=Po(ite),ote=Zn({},Hm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:MS}),ste=Po(ote),ate=Zn({},lh,{propertyName:0,elapsedTime:0,pseudoElement:0}),lte=Po(ate),cte=Zn({},ay,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ute=Po(cte),dte=[9,13,27,32],IS=Cl&&"CompositionEvent"in window,Wp=null;Cl&&"documentMode"in document&&(Wp=document.documentMode);var fte=Cl&&"TextEvent"in window&&!Wp,YF=Cl&&(!IS||Wp&&8<Wp&&11>=Wp),LA=String.fromCharCode(32),NA=!1;function QF(e,t){switch(e){case"keyup":return dte.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XF(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var F1=!1;function hte(e,t){switch(e){case"compositionend":return XF(t);case"keypress":return t.which!==32?null:(NA=!0,LA);case"textInput":return e=t.data,e===LA&&NA?null:e;default:return null}}function pte(e,t){if(F1)return e==="compositionend"||!IS&&QF(e,t)?(e=GF(),A4=PS=$c=null,F1=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return YF&&t.locale!=="ko"?null:t.data;default:return null}}var mte={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function FA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mte[e.type]:t==="textarea"}function ZF(e,t,n,r){$F(r),t=H5(t,"onChange"),0<t.length&&(n=new RS("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qp=null,N0=null;function gte(e){cB(e,0)}function ly(e){var t=z1(e);if(wF(t))return e}function vte(e,t){if(e==="change")return t}var JF=!1;if(Cl){var X9;if(Cl){var Z9="oninput"in document;if(!Z9){var BA=document.createElement("div");BA.setAttribute("oninput","return;"),Z9=typeof BA.oninput=="function"}X9=Z9}else X9=!1;JF=X9&&(!document.documentMode||9<document.documentMode)}function HA(){qp&&(qp.detachEvent("onpropertychange",eB),N0=qp=null)}function eB(e){if(e.propertyName==="value"&&ly(N0)){var t=[];ZF(t,N0,e,_S(e)),RF(gte,t)}}function yte(e,t,n){e==="focusin"?(HA(),qp=t,N0=n,qp.attachEvent("onpropertychange",eB)):e==="focusout"&&HA()}function bte(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ly(N0)}function xte(e,t){if(e==="click")return ly(t)}function Cte(e,t){if(e==="input"||e==="change")return ly(t)}function wte(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var js=typeof Object.is=="function"?Object.is:wte;function F0(e,t){if(js(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Y7.call(t,i)||!js(e[i],t[i]))return!1}return!0}function zA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function UA(e,t){var n=zA(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zA(n)}}function tB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nB(){for(var e=window,t=R5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=R5(e.document)}return t}function LS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ste(e){var t=nB(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tB(n.ownerDocument.documentElement,n)){if(r!==null&&LS(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=UA(n,o);var s=UA(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ete=Cl&&"documentMode"in document&&11>=document.documentMode,B1=null,px=null,Kp=null,mx=!1;function VA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mx||B1==null||B1!==R5(r)||(r=B1,"selectionStart"in r&&LS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kp&&F0(Kp,r)||(Kp=r,r=H5(px,"onSelect"),0<r.length&&(t=new RS("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=B1)))}function Kg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var H1={animationend:Kg("Animation","AnimationEnd"),animationiteration:Kg("Animation","AnimationIteration"),animationstart:Kg("Animation","AnimationStart"),transitionend:Kg("Transition","TransitionEnd")},J9={},rB={};Cl&&(rB=document.createElement("div").style,"AnimationEvent"in window||(delete H1.animationend.animation,delete H1.animationiteration.animation,delete H1.animationstart.animation),"TransitionEvent"in window||delete H1.transitionend.transition);function cy(e){if(J9[e])return J9[e];if(!H1[e])return e;var t=H1[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rB)return J9[e]=t[n];return e}var iB=cy("animationend"),oB=cy("animationiteration"),sB=cy("animationstart"),aB=cy("transitionend"),lB=new Map,jA="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mu(e,t){lB.set(e,t),Hd(t,[e])}for(var e8=0;e8<jA.length;e8++){var t8=jA[e8],Tte=t8.toLowerCase(),kte=t8[0].toUpperCase()+t8.slice(1);mu(Tte,"on"+kte)}mu(iB,"onAnimationEnd");mu(oB,"onAnimationIteration");mu(sB,"onAnimationStart");mu("dblclick","onDoubleClick");mu("focusin","onFocus");mu("focusout","onBlur");mu(aB,"onTransitionEnd");$f("onMouseEnter",["mouseout","mouseover"]);$f("onMouseLeave",["mouseout","mouseover"]);$f("onPointerEnter",["pointerout","pointerover"]);$f("onPointerLeave",["pointerout","pointerover"]);Hd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Op="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_te=new Set("cancel close invalid load scroll toggle".split(" ").concat(Op));function WA(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Tee(r,t,void 0,e),e.currentTarget=null}function cB(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;WA(i,a,u),o=c}else for(s=0;s<r.length;s++){if(a=r[s],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;WA(i,a,u),o=c}}}if(I5)throw e=ux,I5=!1,ux=null,e}function Hn(e,t){var n=t[xx];n===void 0&&(n=t[xx]=new Set);var r=e+"__bubble";n.has(r)||(uB(t,e,2,!1),n.add(r))}function n8(e,t,n){var r=0;t&&(r|=4),uB(n,e,r,t)}var Gg="_reactListening"+Math.random().toString(36).slice(2);function B0(e){if(!e[Gg]){e[Gg]=!0,vF.forEach(function(n){n!=="selectionchange"&&(_te.has(n)||n8(n,!1,e),n8(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gg]||(t[Gg]=!0,n8("selectionchange",!1,t))}}function uB(e,t,n,r){switch(KF(t)){case 1:var i=zee;break;case 4:i=Uee;break;default:i=OS}n=i.bind(null,t,n,e),i=void 0,!cx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function r8(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Xu(a),s===null)return;if(c=s.tag,c===5||c===6){r=o=s;continue e}a=a.parentNode}}r=r.return}RF(function(){var u=o,d=_S(n),f=[];e:{var h=lB.get(e);if(h!==void 0){var p=RS,m=e;switch(e){case"keypress":if($4(n)===0)break e;case"keydown":case"keyup":p=rte;break;case"focusin":m="focus",p=Q9;break;case"focusout":m="blur",p=Q9;break;case"beforeblur":case"afterblur":p=Q9;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=RA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Wee;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=ste;break;case iB:case oB:case sB:p=Gee;break;case aB:p=lte;break;case"scroll":p=Vee;break;case"wheel":p=ute;break;case"copy":case"cut":case"paste":p=Qee;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=IA}var v=(t&4)!==0,b=!v&&e==="scroll",x=v?h!==null?h+"Capture":null:h;v=[];for(var C=u,w;C!==null;){w=C;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,x!==null&&(S=R0(C,x),S!=null&&v.push(H0(C,S,w)))),b)break;C=C.return}0<v.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:v}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==ax&&(m=n.relatedTarget||n.fromElement)&&(Xu(m)||m[wl]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?Xu(m):null,m!==null&&(b=zd(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(v=RA,S="onMouseLeave",x="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(v=IA,S="onPointerLeave",x="onPointerEnter",C="pointer"),b=p==null?h:z1(p),w=m==null?h:z1(m),h=new v(S,C+"leave",p,n,d),h.target=b,h.relatedTarget=w,S=null,Xu(d)===u&&(v=new v(x,C+"enter",m,n,d),v.target=w,v.relatedTarget=b,S=v),b=S,p&&m)t:{for(v=p,x=m,C=0,w=v;w;w=a1(w))C++;for(w=0,S=x;S;S=a1(S))w++;for(;0<C-w;)v=a1(v),C--;for(;0<w-C;)x=a1(x),w--;for(;C--;){if(v===x||x!==null&&v===x.alternate)break t;v=a1(v),x=a1(x)}v=null}else v=null;p!==null&&qA(f,h,p,v,!1),m!==null&&b!==null&&qA(f,b,m,v,!0)}}e:{if(h=u?z1(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var T=vte;else if(FA(h))if(JF)T=Cte;else{T=bte;var E=yte}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=xte);if(T&&(T=T(e,u))){ZF(f,T,n,d);break e}E&&E(e,h,u),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&nx(h,"number",h.value)}switch(E=u?z1(u):window,e){case"focusin":(FA(E)||E.contentEditable==="true")&&(B1=E,px=u,Kp=null);break;case"focusout":Kp=px=B1=null;break;case"mousedown":mx=!0;break;case"contextmenu":case"mouseup":case"dragend":mx=!1,VA(f,n,d);break;case"selectionchange":if(Ete)break;case"keydown":case"keyup":VA(f,n,d)}var k;if(IS)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else F1?QF(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(YF&&n.locale!=="ko"&&(F1||_!=="onCompositionStart"?_==="onCompositionEnd"&&F1&&(k=GF()):($c=d,PS="value"in $c?$c.value:$c.textContent,F1=!0)),E=H5(u,_),0<E.length&&(_=new MA(_,e,null,n,d),f.push({event:_,listeners:E}),k?_.data=k:(k=XF(n),k!==null&&(_.data=k)))),(k=fte?hte(e,n):pte(e,n))&&(u=H5(u,"onBeforeInput"),0<u.length&&(d=new MA("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=k))}cB(f,t)})}function H0(e,t,n){return{instance:e,listener:t,currentTarget:n}}function H5(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=R0(e,n),o!=null&&r.unshift(H0(e,o,i)),o=R0(e,t),o!=null&&r.push(H0(e,o,i))),e=e.return}return r}function a1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function qA(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,i?(c=R0(n,o),c!=null&&s.unshift(H0(n,c,a))):i||(c=R0(n,o),c!=null&&s.push(H0(n,c,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ate=/\r\n?/g,$te=/\u0000|\uFFFD/g;function KA(e){return(typeof e=="string"?e:""+e).replace(Ate,`
`).replace($te,"")}function Yg(e,t,n){if(t=KA(t),KA(e)!==t&&n)throw Error(Re(425))}function z5(){}var gx=null,vx=null;function yx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bx=typeof setTimeout=="function"?setTimeout:void 0,Dte=typeof clearTimeout=="function"?clearTimeout:void 0,GA=typeof Promise=="function"?Promise:void 0,Ote=typeof queueMicrotask=="function"?queueMicrotask:typeof GA<"u"?function(e){return GA.resolve(null).then(e).catch(Pte)}:bx;function Pte(e){setTimeout(function(){throw e})}function i8(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),L0(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);L0(t)}function Wc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function YA(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ch=Math.random().toString(36).slice(2),da="__reactFiber$"+ch,z0="__reactProps$"+ch,wl="__reactContainer$"+ch,xx="__reactEvents$"+ch,Rte="__reactListeners$"+ch,Mte="__reactHandles$"+ch;function Xu(e){var t=e[da];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wl]||n[da]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=YA(e);e!==null;){if(n=e[da])return n;e=YA(e)}return t}e=n,n=e.parentNode}return null}function zm(e){return e=e[da]||e[wl],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function z1(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Re(33))}function uy(e){return e[z0]||null}var Cx=[],U1=-1;function gu(e){return{current:e}}function Vn(e){0>U1||(e.current=Cx[U1],Cx[U1]=null,U1--)}function In(e,t){U1++,Cx[U1]=e.current,e.current=t}var iu={},yi=gu(iu),Qi=gu(!1),Ed=iu;function Df(e,t){var n=e.type.contextTypes;if(!n)return iu;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Xi(e){return e=e.childContextTypes,e!=null}function U5(){Vn(Qi),Vn(yi)}function QA(e,t,n){if(yi.current!==iu)throw Error(Re(168));In(yi,t),In(Qi,n)}function dB(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,yee(e)||"Unknown",i));return Zn({},n,r)}function V5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||iu,Ed=yi.current,In(yi,e),In(Qi,Qi.current),!0}function XA(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=dB(e,t,Ed),r.__reactInternalMemoizedMergedChildContext=e,Vn(Qi),Vn(yi),In(yi,e)):Vn(Qi),In(Qi,n)}var fl=null,dy=!1,o8=!1;function fB(e){fl===null?fl=[e]:fl.push(e)}function Ite(e){dy=!0,fB(e)}function vu(){if(!o8&&fl!==null){o8=!0;var e=0,t=gn;try{var n=fl;for(gn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fl=null,dy=!1}catch(i){throw fl!==null&&(fl=fl.slice(e+1)),NF(AS,vu),i}finally{gn=t,o8=!1}}return null}var V1=[],j1=0,j5=null,W5=0,Wo=[],qo=0,Td=null,ml=1,gl="";function Hu(e,t){V1[j1++]=W5,V1[j1++]=j5,j5=e,W5=t}function hB(e,t,n){Wo[qo++]=ml,Wo[qo++]=gl,Wo[qo++]=Td,Td=e;var r=ml;e=gl;var i=32-Bs(r)-1;r&=~(1<<i),n+=1;var o=32-Bs(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ml=1<<32-Bs(t)+i|n<<i|r,gl=o+e}else ml=1<<o|n<<i|r,gl=e}function NS(e){e.return!==null&&(Hu(e,1),hB(e,1,0))}function FS(e){for(;e===j5;)j5=V1[--j1],V1[j1]=null,W5=V1[--j1],V1[j1]=null;for(;e===Td;)Td=Wo[--qo],Wo[qo]=null,gl=Wo[--qo],Wo[qo]=null,ml=Wo[--qo],Wo[qo]=null}var So=null,vo=null,Kn=!1,Ps=null;function pB(e,t){var n=Qo(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ZA(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,So=e,vo=Wc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,So=e,vo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Td!==null?{id:ml,overflow:gl}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qo(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,So=e,vo=null,!0):!1;default:return!1}}function wx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Sx(e){if(Kn){var t=vo;if(t){var n=t;if(!ZA(e,t)){if(wx(e))throw Error(Re(418));t=Wc(n.nextSibling);var r=So;t&&ZA(e,t)?pB(r,n):(e.flags=e.flags&-4097|2,Kn=!1,So=e)}}else{if(wx(e))throw Error(Re(418));e.flags=e.flags&-4097|2,Kn=!1,So=e}}}function JA(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;So=e}function Qg(e){if(e!==So)return!1;if(!Kn)return JA(e),Kn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yx(e.type,e.memoizedProps)),t&&(t=vo)){if(wx(e))throw mB(),Error(Re(418));for(;t;)pB(e,t),t=Wc(t.nextSibling)}if(JA(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Re(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vo=Wc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vo=null}}else vo=So?Wc(e.stateNode.nextSibling):null;return!0}function mB(){for(var e=vo;e;)e=Wc(e.nextSibling)}function Of(){vo=So=null,Kn=!1}function BS(e){Ps===null?Ps=[e]:Ps.push(e)}var Lte=Hl.ReactCurrentBatchConfig;function As(e,t){if(e&&e.defaultProps){t=Zn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var q5=gu(null),K5=null,W1=null,HS=null;function zS(){HS=W1=K5=null}function US(e){var t=q5.current;Vn(q5),e._currentValue=t}function Ex(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pf(e,t){K5=e,HS=W1=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Yi=!0),e.firstContext=null)}function is(e){var t=e._currentValue;if(HS!==e)if(e={context:e,memoizedValue:t,next:null},W1===null){if(K5===null)throw Error(Re(308));W1=e,K5.dependencies={lanes:0,firstContext:e}}else W1=W1.next=e;return t}var Zu=null;function VS(e){Zu===null?Zu=[e]:Zu.push(e)}function gB(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,VS(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sl(e,r)}function Sl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var mc=!1;function jS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(an&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sl(e,n)}return i=r.interleaved,i===null?(t.next=t,VS(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sl(e,n)}function D4(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$S(e,n)}}function e$(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function G5(e,t,n,r){var i=e.updateQueue;mc=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,s===null?o=u:s.next=u,s=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=i.baseState;s=0,d=u=c=null,a=o;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(h=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=Zn({},f,h);break e;case 2:mc=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(1);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);_d|=s,e.lanes=s,e.memoizedState=f}}function t$(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Re(191,i));i.call(r)}}}var yB=new gF.Component().refs;function Tx(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Zn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fy={isMounted:function(e){return(e=e._reactInternals)?zd(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ri(),i=Gc(e),o=bl(r,i);o.payload=t,n!=null&&(o.callback=n),t=qc(e,o,i),t!==null&&(Hs(t,e,i,r),D4(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ri(),i=Gc(e),o=bl(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=qc(e,o,i),t!==null&&(Hs(t,e,i,r),D4(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ri(),r=Gc(e),i=bl(n,r);i.tag=2,t!=null&&(i.callback=t),t=qc(e,i,r),t!==null&&(Hs(t,e,r,n),D4(t,e,r))}};function n$(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!F0(n,r)||!F0(i,o):!0}function bB(e,t,n){var r=!1,i=iu,o=t.contextType;return typeof o=="object"&&o!==null?o=is(o):(i=Xi(t)?Ed:yi.current,r=t.contextTypes,o=(r=r!=null)?Df(e,i):iu),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fy,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function r$(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fy.enqueueReplaceState(t,t.state,null)}function kx(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=yB,jS(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=is(o):(o=Xi(t)?Ed:yi.current,i.context=Df(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Tx(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&fy.enqueueReplaceState(i,i.state,null),G5(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ip(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Re(309));var r=n.stateNode}if(!r)throw Error(Re(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;a===yB&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Re(284));if(!n._owner)throw Error(Re(290,e))}return e}function Xg(e,t){throw e=Object.prototype.toString.call(t),Error(Re(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function i$(e){var t=e._init;return t(e._payload)}function xB(e){function t(x,C){if(e){var w=x.deletions;w===null?(x.deletions=[C],x.flags|=16):w.push(C)}}function n(x,C){if(!e)return null;for(;C!==null;)t(x,C),C=C.sibling;return null}function r(x,C){for(x=new Map;C!==null;)C.key!==null?x.set(C.key,C):x.set(C.index,C),C=C.sibling;return x}function i(x,C){return x=Yc(x,C),x.index=0,x.sibling=null,x}function o(x,C,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<C?(x.flags|=2,C):w):(x.flags|=2,C)):(x.flags|=1048576,C)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,C,w,S){return C===null||C.tag!==6?(C=f8(w,x.mode,S),C.return=x,C):(C=i(C,w),C.return=x,C)}function c(x,C,w,S){var T=w.type;return T===N1?d(x,C,w.props.children,S,w.key):C!==null&&(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===pc&&i$(T)===C.type)?(S=i(C,w.props),S.ref=ip(x,C,w),S.return=x,S):(S=L4(w.type,w.key,w.props,null,x.mode,S),S.ref=ip(x,C,w),S.return=x,S)}function u(x,C,w,S){return C===null||C.tag!==4||C.stateNode.containerInfo!==w.containerInfo||C.stateNode.implementation!==w.implementation?(C=h8(w,x.mode,S),C.return=x,C):(C=i(C,w.children||[]),C.return=x,C)}function d(x,C,w,S,T){return C===null||C.tag!==7?(C=dd(w,x.mode,S,T),C.return=x,C):(C=i(C,w),C.return=x,C)}function f(x,C,w){if(typeof C=="string"&&C!==""||typeof C=="number")return C=f8(""+C,x.mode,w),C.return=x,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Hg:return w=L4(C.type,C.key,C.props,null,x.mode,w),w.ref=ip(x,null,C),w.return=x,w;case L1:return C=h8(C,x.mode,w),C.return=x,C;case pc:var S=C._init;return f(x,S(C._payload),w)}if($p(C)||Jh(C))return C=dd(C,x.mode,w,null),C.return=x,C;Xg(x,C)}return null}function h(x,C,w,S){var T=C!==null?C.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return T!==null?null:a(x,C,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Hg:return w.key===T?c(x,C,w,S):null;case L1:return w.key===T?u(x,C,w,S):null;case pc:return T=w._init,h(x,C,T(w._payload),S)}if($p(w)||Jh(w))return T!==null?null:d(x,C,w,S,null);Xg(x,w)}return null}function p(x,C,w,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(w)||null,a(C,x,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Hg:return x=x.get(S.key===null?w:S.key)||null,c(C,x,S,T);case L1:return x=x.get(S.key===null?w:S.key)||null,u(C,x,S,T);case pc:var E=S._init;return p(x,C,w,E(S._payload),T)}if($p(S)||Jh(S))return x=x.get(w)||null,d(C,x,S,T,null);Xg(C,S)}return null}function m(x,C,w,S){for(var T=null,E=null,k=C,_=C=0,O=null;k!==null&&_<w.length;_++){k.index>_?(O=k,k=null):O=k.sibling;var D=h(x,k,w[_],S);if(D===null){k===null&&(k=O);break}e&&k&&D.alternate===null&&t(x,k),C=o(D,C,_),E===null?T=D:E.sibling=D,E=D,k=O}if(_===w.length)return n(x,k),Kn&&Hu(x,_),T;if(k===null){for(;_<w.length;_++)k=f(x,w[_],S),k!==null&&(C=o(k,C,_),E===null?T=k:E.sibling=k,E=k);return Kn&&Hu(x,_),T}for(k=r(x,k);_<w.length;_++)O=p(k,x,_,w[_],S),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?_:O.key),C=o(O,C,_),E===null?T=O:E.sibling=O,E=O);return e&&k.forEach(function(L){return t(x,L)}),Kn&&Hu(x,_),T}function v(x,C,w,S){var T=Jh(w);if(typeof T!="function")throw Error(Re(150));if(w=T.call(w),w==null)throw Error(Re(151));for(var E=T=null,k=C,_=C=0,O=null,D=w.next();k!==null&&!D.done;_++,D=w.next()){k.index>_?(O=k,k=null):O=k.sibling;var L=h(x,k,D.value,S);if(L===null){k===null&&(k=O);break}e&&k&&L.alternate===null&&t(x,k),C=o(L,C,_),E===null?T=L:E.sibling=L,E=L,k=O}if(D.done)return n(x,k),Kn&&Hu(x,_),T;if(k===null){for(;!D.done;_++,D=w.next())D=f(x,D.value,S),D!==null&&(C=o(D,C,_),E===null?T=D:E.sibling=D,E=D);return Kn&&Hu(x,_),T}for(k=r(x,k);!D.done;_++,D=w.next())D=p(k,x,_,D.value,S),D!==null&&(e&&D.alternate!==null&&k.delete(D.key===null?_:D.key),C=o(D,C,_),E===null?T=D:E.sibling=D,E=D);return e&&k.forEach(function(N){return t(x,N)}),Kn&&Hu(x,_),T}function b(x,C,w,S){if(typeof w=="object"&&w!==null&&w.type===N1&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Hg:e:{for(var T=w.key,E=C;E!==null;){if(E.key===T){if(T=w.type,T===N1){if(E.tag===7){n(x,E.sibling),C=i(E,w.props.children),C.return=x,x=C;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===pc&&i$(T)===E.type){n(x,E.sibling),C=i(E,w.props),C.ref=ip(x,E,w),C.return=x,x=C;break e}n(x,E);break}else t(x,E);E=E.sibling}w.type===N1?(C=dd(w.props.children,x.mode,S,w.key),C.return=x,x=C):(S=L4(w.type,w.key,w.props,null,x.mode,S),S.ref=ip(x,C,w),S.return=x,x=S)}return s(x);case L1:e:{for(E=w.key;C!==null;){if(C.key===E)if(C.tag===4&&C.stateNode.containerInfo===w.containerInfo&&C.stateNode.implementation===w.implementation){n(x,C.sibling),C=i(C,w.children||[]),C.return=x,x=C;break e}else{n(x,C);break}else t(x,C);C=C.sibling}C=h8(w,x.mode,S),C.return=x,x=C}return s(x);case pc:return E=w._init,b(x,C,E(w._payload),S)}if($p(w))return m(x,C,w,S);if(Jh(w))return v(x,C,w,S);Xg(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,C!==null&&C.tag===6?(n(x,C.sibling),C=i(C,w),C.return=x,x=C):(n(x,C),C=f8(w,x.mode,S),C.return=x,x=C),s(x)):n(x,C)}return b}var Pf=xB(!0),CB=xB(!1),Um={},Ca=gu(Um),U0=gu(Um),V0=gu(Um);function Ju(e){if(e===Um)throw Error(Re(174));return e}function WS(e,t){switch(In(V0,t),In(U0,e),In(Ca,Um),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ix(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ix(t,e)}Vn(Ca),In(Ca,t)}function Rf(){Vn(Ca),Vn(U0),Vn(V0)}function wB(e){Ju(V0.current);var t=Ju(Ca.current),n=ix(t,e.type);t!==n&&(In(U0,e),In(Ca,n))}function qS(e){U0.current===e&&(Vn(Ca),Vn(U0))}var Yn=gu(0);function Y5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var s8=[];function KS(){for(var e=0;e<s8.length;e++)s8[e]._workInProgressVersionPrimary=null;s8.length=0}var O4=Hl.ReactCurrentDispatcher,a8=Hl.ReactCurrentBatchConfig,kd=0,Xn=null,Sr=null,Pr=null,Q5=!1,Gp=!1,j0=0,Nte=0;function li(){throw Error(Re(321))}function GS(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!js(e[n],t[n]))return!1;return!0}function YS(e,t,n,r,i,o){if(kd=o,Xn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O4.current=e===null||e.memoizedState===null?zte:Ute,e=n(r,i),Gp){o=0;do{if(Gp=!1,j0=0,25<=o)throw Error(Re(301));o+=1,Pr=Sr=null,t.updateQueue=null,O4.current=Vte,e=n(r,i)}while(Gp)}if(O4.current=X5,t=Sr!==null&&Sr.next!==null,kd=0,Pr=Sr=Xn=null,Q5=!1,t)throw Error(Re(300));return e}function QS(){var e=j0!==0;return j0=0,e}function ta(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pr===null?Xn.memoizedState=Pr=e:Pr=Pr.next=e,Pr}function ss(){if(Sr===null){var e=Xn.alternate;e=e!==null?e.memoizedState:null}else e=Sr.next;var t=Pr===null?Xn.memoizedState:Pr.next;if(t!==null)Pr=t,Sr=e;else{if(e===null)throw Error(Re(310));Sr=e,e={memoizedState:Sr.memoizedState,baseState:Sr.baseState,baseQueue:Sr.baseQueue,queue:Sr.queue,next:null},Pr===null?Xn.memoizedState=Pr=e:Pr=Pr.next=e}return Pr}function W0(e,t){return typeof t=="function"?t(e):t}function l8(e){var t=ss(),n=t.queue;if(n===null)throw Error(Re(311));n.lastRenderedReducer=e;var r=Sr,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,c=null,u=o;do{var d=u.lane;if((kd&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,s=r):c=c.next=f,Xn.lanes|=d,_d|=d}u=u.next}while(u!==null&&u!==o);c===null?s=r:c.next=a,js(r,t.memoizedState)||(Yi=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Xn.lanes|=o,_d|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function c8(e){var t=ss(),n=t.queue;if(n===null)throw Error(Re(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);js(o,t.memoizedState)||(Yi=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function SB(){}function EB(e,t){var n=Xn,r=ss(),i=t(),o=!js(r.memoizedState,i);if(o&&(r.memoizedState=i,Yi=!0),r=r.queue,XS(_B.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Pr!==null&&Pr.memoizedState.tag&1){if(n.flags|=2048,q0(9,kB.bind(null,n,r,i,t),void 0,null),Nr===null)throw Error(Re(349));(kd&30)!==0||TB(n,t,i)}return i}function TB(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xn.updateQueue,t===null?(t={lastEffect:null,stores:null},Xn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kB(e,t,n,r){t.value=n,t.getSnapshot=r,AB(t)&&$B(e)}function _B(e,t,n){return n(function(){AB(t)&&$B(e)})}function AB(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!js(e,n)}catch{return!0}}function $B(e){var t=Sl(e,1);t!==null&&Hs(t,e,1,-1)}function o$(e){var t=ta();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:W0,lastRenderedState:e},t.queue=e,e=e.dispatch=Hte.bind(null,Xn,e),[t.memoizedState,e]}function q0(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Xn.updateQueue,t===null?(t={lastEffect:null,stores:null},Xn.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function DB(){return ss().memoizedState}function P4(e,t,n,r){var i=ta();Xn.flags|=e,i.memoizedState=q0(1|t,n,void 0,r===void 0?null:r)}function hy(e,t,n,r){var i=ss();r=r===void 0?null:r;var o=void 0;if(Sr!==null){var s=Sr.memoizedState;if(o=s.destroy,r!==null&&GS(r,s.deps)){i.memoizedState=q0(t,n,o,r);return}}Xn.flags|=e,i.memoizedState=q0(1|t,n,o,r)}function s$(e,t){return P4(8390656,8,e,t)}function XS(e,t){return hy(2048,8,e,t)}function OB(e,t){return hy(4,2,e,t)}function PB(e,t){return hy(4,4,e,t)}function RB(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function MB(e,t,n){return n=n!=null?n.concat([e]):null,hy(4,4,RB.bind(null,t,e),n)}function ZS(){}function IB(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&GS(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function LB(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&GS(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function NB(e,t,n){return(kd&21)===0?(e.baseState&&(e.baseState=!1,Yi=!0),e.memoizedState=n):(js(n,t)||(n=HF(),Xn.lanes|=n,_d|=n,e.baseState=!0),t)}function Fte(e,t){var n=gn;gn=n!==0&&4>n?n:4,e(!0);var r=a8.transition;a8.transition={};try{e(!1),t()}finally{gn=n,a8.transition=r}}function FB(){return ss().memoizedState}function Bte(e,t,n){var r=Gc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},BB(e))HB(t,n);else if(n=gB(e,t,n,r),n!==null){var i=Ri();Hs(n,e,r,i),zB(n,t,r)}}function Hte(e,t,n){var r=Gc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(BB(e))HB(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,js(a,s)){var c=t.interleaved;c===null?(i.next=i,VS(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=gB(e,t,i,r),n!==null&&(i=Ri(),Hs(n,e,r,i),zB(n,t,r))}}function BB(e){var t=e.alternate;return e===Xn||t!==null&&t===Xn}function HB(e,t){Gp=Q5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zB(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$S(e,n)}}var X5={readContext:is,useCallback:li,useContext:li,useEffect:li,useImperativeHandle:li,useInsertionEffect:li,useLayoutEffect:li,useMemo:li,useReducer:li,useRef:li,useState:li,useDebugValue:li,useDeferredValue:li,useTransition:li,useMutableSource:li,useSyncExternalStore:li,useId:li,unstable_isNewReconciler:!1},zte={readContext:is,useCallback:function(e,t){return ta().memoizedState=[e,t===void 0?null:t],e},useContext:is,useEffect:s$,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,P4(4194308,4,RB.bind(null,t,e),n)},useLayoutEffect:function(e,t){return P4(4194308,4,e,t)},useInsertionEffect:function(e,t){return P4(4,2,e,t)},useMemo:function(e,t){var n=ta();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ta();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bte.bind(null,Xn,e),[r.memoizedState,e]},useRef:function(e){var t=ta();return e={current:e},t.memoizedState=e},useState:o$,useDebugValue:ZS,useDeferredValue:function(e){return ta().memoizedState=e},useTransition:function(){var e=o$(!1),t=e[0];return e=Fte.bind(null,e[1]),ta().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xn,i=ta();if(Kn){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),Nr===null)throw Error(Re(349));(kd&30)!==0||TB(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,s$(_B.bind(null,r,o,e),[e]),r.flags|=2048,q0(9,kB.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ta(),t=Nr.identifierPrefix;if(Kn){var n=gl,r=ml;n=(r&~(1<<32-Bs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=j0++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Nte++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ute={readContext:is,useCallback:IB,useContext:is,useEffect:XS,useImperativeHandle:MB,useInsertionEffect:OB,useLayoutEffect:PB,useMemo:LB,useReducer:l8,useRef:DB,useState:function(){return l8(W0)},useDebugValue:ZS,useDeferredValue:function(e){var t=ss();return NB(t,Sr.memoizedState,e)},useTransition:function(){var e=l8(W0)[0],t=ss().memoizedState;return[e,t]},useMutableSource:SB,useSyncExternalStore:EB,useId:FB,unstable_isNewReconciler:!1},Vte={readContext:is,useCallback:IB,useContext:is,useEffect:XS,useImperativeHandle:MB,useInsertionEffect:OB,useLayoutEffect:PB,useMemo:LB,useReducer:c8,useRef:DB,useState:function(){return c8(W0)},useDebugValue:ZS,useDeferredValue:function(e){var t=ss();return Sr===null?t.memoizedState=e:NB(t,Sr.memoizedState,e)},useTransition:function(){var e=c8(W0)[0],t=ss().memoizedState;return[e,t]},useMutableSource:SB,useSyncExternalStore:EB,useId:FB,unstable_isNewReconciler:!1};function Mf(e,t){try{var n="",r=t;do n+=vee(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function u8(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function _x(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jte=typeof WeakMap=="function"?WeakMap:Map;function UB(e,t,n){n=bl(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){J5||(J5=!0,Nx=r),_x(e,t)},n}function VB(e,t,n){n=bl(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){_x(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){_x(e,t),typeof r!="function"&&(Kc===null?Kc=new Set([this]):Kc.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function a$(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jte;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ine.bind(null,e,t,n),t.then(e,e))}function l$(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function c$(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=bl(-1,1),t.tag=2,qc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Wte=Hl.ReactCurrentOwner,Yi=!1;function $i(e,t,n,r){t.child=e===null?CB(t,null,n,r):Pf(t,e.child,n,r)}function u$(e,t,n,r,i){n=n.render;var o=t.ref;return pf(t,i),r=YS(e,t,n,r,o,i),n=QS(),e!==null&&!Yi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,El(e,t,i)):(Kn&&n&&NS(t),t.flags|=1,$i(e,t,r,i),t.child)}function d$(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!sE(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,jB(e,t,o,r,i)):(e=L4(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:F0,n(s,r)&&e.ref===t.ref)return El(e,t,i)}return t.flags|=1,e=Yc(o,r),e.ref=t.ref,e.return=t,t.child=e}function jB(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(F0(o,r)&&e.ref===t.ref)if(Yi=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Yi=!0);else return t.lanes=e.lanes,El(e,t,i)}return Ax(e,t,n,r,i)}function WB(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},In(K1,po),po|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,In(K1,po),po|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,In(K1,po),po|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,In(K1,po),po|=r;return $i(e,t,i,n),t.child}function qB(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ax(e,t,n,r,i){var o=Xi(n)?Ed:yi.current;return o=Df(t,o),pf(t,i),n=YS(e,t,n,r,o,i),r=QS(),e!==null&&!Yi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,El(e,t,i)):(Kn&&r&&NS(t),t.flags|=1,$i(e,t,n,i),t.child)}function f$(e,t,n,r,i){if(Xi(n)){var o=!0;V5(t)}else o=!1;if(pf(t,i),t.stateNode===null)R4(e,t),bB(t,n,r),kx(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=is(u):(u=Xi(n)?Ed:yi.current,u=Df(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||c!==u)&&r$(t,s,r,u),mc=!1;var h=t.memoizedState;s.state=h,G5(t,r,s,i),c=t.memoizedState,a!==r||h!==c||Qi.current||mc?(typeof d=="function"&&(Tx(t,n,d,r),c=t.memoizedState),(a=mc||n$(t,n,a,r,h,c,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,vB(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:As(t.type,a),s.props=u,f=t.pendingProps,h=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=is(c):(c=Xi(n)?Ed:yi.current,c=Df(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==c)&&r$(t,s,r,c),mc=!1,h=t.memoizedState,s.state=h,G5(t,r,s,i);var m=t.memoizedState;a!==f||h!==m||Qi.current||mc?(typeof p=="function"&&(Tx(t,n,p,r),m=t.memoizedState),(u=mc||n$(t,n,u,r,h,m,c)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return $x(e,t,n,r,o,i)}function $x(e,t,n,r,i,o){qB(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&XA(t,n,!1),El(e,t,o);r=t.stateNode,Wte.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Pf(t,e.child,null,o),t.child=Pf(t,null,a,o)):$i(e,t,a,o),t.memoizedState=r.state,i&&XA(t,n,!0),t.child}function KB(e){var t=e.stateNode;t.pendingContext?QA(e,t.pendingContext,t.pendingContext!==t.context):t.context&&QA(e,t.context,!1),WS(e,t.containerInfo)}function h$(e,t,n,r,i){return Of(),BS(i),t.flags|=256,$i(e,t,n,r),t.child}var Dx={dehydrated:null,treeContext:null,retryLane:0};function Ox(e){return{baseLanes:e,cachePool:null,transitions:null}}function GB(e,t,n){var r=t.pendingProps,i=Yn.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),In(Yn,i&1),e===null)return Sx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=s):o=gy(s,r,0,null),e=dd(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ox(n),t.memoizedState=Dx,e):JS(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return qte(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var c={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yc(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Yc(a,o):(o=dd(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ox(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Dx,r}return o=e.child,e=o.sibling,r=Yc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function JS(e,t){return t=gy({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Zg(e,t,n,r){return r!==null&&BS(r),Pf(t,e.child,null,n),e=JS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qte(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=u8(Error(Re(422))),Zg(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=gy({mode:"visible",children:r.children},i,0,null),o=dd(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&Pf(t,e.child,null,s),t.child.memoizedState=Ox(s),t.memoizedState=Dx,o);if((t.mode&1)===0)return Zg(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Re(419)),r=u8(o,r,void 0),Zg(e,t,s,r)}if(a=(s&e.childLanes)!==0,Yi||a){if(r=Nr,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|s))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Sl(e,i),Hs(r,e,i,-1))}return oE(),r=u8(Error(Re(421))),Zg(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=one.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,vo=Wc(i.nextSibling),So=t,Kn=!0,Ps=null,e!==null&&(Wo[qo++]=ml,Wo[qo++]=gl,Wo[qo++]=Td,ml=e.id,gl=e.overflow,Td=t),t=JS(t,r.children),t.flags|=4096,t)}function p$(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ex(e.return,t,n)}function d8(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function YB(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if($i(e,t,r.children,n),r=Yn.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&p$(e,n,t);else if(e.tag===19)p$(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(In(Yn,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Y5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),d8(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Y5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}d8(t,!0,n,null,o);break;case"together":d8(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function R4(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function El(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_d|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Re(153));if(t.child!==null){for(e=t.child,n=Yc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kte(e,t,n){switch(t.tag){case 3:KB(t),Of();break;case 5:wB(t);break;case 1:Xi(t.type)&&V5(t);break;case 4:WS(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;In(q5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(In(Yn,Yn.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?GB(e,t,n):(In(Yn,Yn.current&1),e=El(e,t,n),e!==null?e.sibling:null);In(Yn,Yn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return YB(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),In(Yn,Yn.current),r)break;return null;case 22:case 23:return t.lanes=0,WB(e,t,n)}return El(e,t,n)}var QB,Px,XB,ZB;QB=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Px=function(){};XB=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ju(Ca.current);var o=null;switch(n){case"input":i=ex(e,i),r=ex(e,r),o=[];break;case"select":i=Zn({},i,{value:void 0}),r=Zn({},r,{value:void 0}),o=[];break;case"textarea":i=rx(e,i),r=rx(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=z5)}ox(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(O0.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(O0.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Hn("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};ZB=function(e,t,n,r){n!==r&&(t.flags|=4)};function op(e,t){if(!Kn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ci(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gte(e,t,n){var r=t.pendingProps;switch(FS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ci(t),null;case 1:return Xi(t.type)&&U5(),ci(t),null;case 3:return r=t.stateNode,Rf(),Vn(Qi),Vn(yi),KS(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Qg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ps!==null&&(Hx(Ps),Ps=null))),Px(e,t),ci(t),null;case 5:qS(t);var i=Ju(V0.current);if(n=t.type,e!==null&&t.stateNode!=null)XB(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Re(166));return ci(t),null}if(e=Ju(Ca.current),Qg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[da]=t,r[z0]=o,e=(t.mode&1)!==0,n){case"dialog":Hn("cancel",r),Hn("close",r);break;case"iframe":case"object":case"embed":Hn("load",r);break;case"video":case"audio":for(i=0;i<Op.length;i++)Hn(Op[i],r);break;case"source":Hn("error",r);break;case"img":case"image":case"link":Hn("error",r),Hn("load",r);break;case"details":Hn("toggle",r);break;case"input":SA(r,o),Hn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Hn("invalid",r);break;case"textarea":TA(r,o),Hn("invalid",r)}ox(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Yg(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Yg(r.textContent,a,e),i=["children",""+a]):O0.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Hn("scroll",r)}switch(n){case"input":zg(r),EA(r,o,!0);break;case"textarea":zg(r),kA(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=z5)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=TF(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[da]=t,e[z0]=r,QB(e,t,!1,!1),t.stateNode=e;e:{switch(s=sx(n,r),n){case"dialog":Hn("cancel",e),Hn("close",e),i=r;break;case"iframe":case"object":case"embed":Hn("load",e),i=r;break;case"video":case"audio":for(i=0;i<Op.length;i++)Hn(Op[i],e);i=r;break;case"source":Hn("error",e),i=r;break;case"img":case"image":case"link":Hn("error",e),Hn("load",e),i=r;break;case"details":Hn("toggle",e),i=r;break;case"input":SA(e,r),i=ex(e,r),Hn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Zn({},r,{value:void 0}),Hn("invalid",e);break;case"textarea":TA(e,r),i=rx(e,r),Hn("invalid",e);break;default:i=r}ox(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?AF(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&kF(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&P0(e,c):typeof c=="number"&&P0(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(O0.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Hn("scroll",e):c!=null&&SS(e,o,c,s))}switch(n){case"input":zg(e),EA(e,r,!1);break;case"textarea":zg(e),kA(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ru(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?uf(e,!!r.multiple,o,!1):r.defaultValue!=null&&uf(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=z5)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ci(t),null;case 6:if(e&&t.stateNode!=null)ZB(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Re(166));if(n=Ju(V0.current),Ju(Ca.current),Qg(t)){if(r=t.stateNode,n=t.memoizedProps,r[da]=t,(o=r.nodeValue!==n)&&(e=So,e!==null))switch(e.tag){case 3:Yg(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yg(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[da]=t,t.stateNode=r}return ci(t),null;case 13:if(Vn(Yn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Kn&&vo!==null&&(t.mode&1)!==0&&(t.flags&128)===0)mB(),Of(),t.flags|=98560,o=!1;else if(o=Qg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Re(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Re(317));o[da]=t}else Of(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ci(t),o=!1}else Ps!==null&&(Hx(Ps),Ps=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Yn.current&1)!==0?kr===0&&(kr=3):oE())),t.updateQueue!==null&&(t.flags|=4),ci(t),null);case 4:return Rf(),Px(e,t),e===null&&B0(t.stateNode.containerInfo),ci(t),null;case 10:return US(t.type._context),ci(t),null;case 17:return Xi(t.type)&&U5(),ci(t),null;case 19:if(Vn(Yn),o=t.memoizedState,o===null)return ci(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)op(o,!1);else{if(kr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Y5(e),s!==null){for(t.flags|=128,op(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return In(Yn,Yn.current&1|2),t.child}e=e.sibling}o.tail!==null&&cr()>If&&(t.flags|=128,r=!0,op(o,!1),t.lanes=4194304)}else{if(!r)if(e=Y5(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),op(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Kn)return ci(t),null}else 2*cr()-o.renderingStartTime>If&&n!==1073741824&&(t.flags|=128,r=!0,op(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=cr(),t.sibling=null,n=Yn.current,In(Yn,r?n&1|2:n&1),t):(ci(t),null);case 22:case 23:return iE(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(po&1073741824)!==0&&(ci(t),t.subtreeFlags&6&&(t.flags|=8192)):ci(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function Yte(e,t){switch(FS(t),t.tag){case 1:return Xi(t.type)&&U5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rf(),Vn(Qi),Vn(yi),KS(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return qS(t),null;case 13:if(Vn(Yn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));Of()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vn(Yn),null;case 4:return Rf(),null;case 10:return US(t.type._context),null;case 22:case 23:return iE(),null;case 24:return null;default:return null}}var Jg=!1,hi=!1,Qte=typeof WeakSet=="function"?WeakSet:Set,at=null;function q1(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){tr(e,t,r)}else n.current=null}function Rx(e,t,n){try{n()}catch(r){tr(e,t,r)}}var m$=!1;function Xte(e,t){if(gx=F5,e=nB(),LS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(c=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(a=s),h===o&&++d===r&&(c=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(vx={focusedElem:e,selectionRange:n},F5=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,x=t.stateNode,C=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:As(t.type,v),b);x.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(S){tr(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return m=m$,m$=!1,m}function Yp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Rx(t,n,o)}i=i.next}while(i!==r)}}function py(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function JB(e){var t=e.alternate;t!==null&&(e.alternate=null,JB(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[da],delete t[z0],delete t[xx],delete t[Rte],delete t[Mte])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function eH(e){return e.tag===5||e.tag===3||e.tag===4}function g$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eH(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ix(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=z5));else if(r!==4&&(e=e.child,e!==null))for(Ix(e,t,n),e=e.sibling;e!==null;)Ix(e,t,n),e=e.sibling}function Lx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lx(e,t,n),e=e.sibling;e!==null;)Lx(e,t,n),e=e.sibling}var jr=null,$s=!1;function Zl(e,t,n){for(n=n.child;n!==null;)tH(e,t,n),n=n.sibling}function tH(e,t,n){if(xa&&typeof xa.onCommitFiberUnmount=="function")try{xa.onCommitFiberUnmount(sy,n)}catch{}switch(n.tag){case 5:hi||q1(n,t);case 6:var r=jr,i=$s;jr=null,Zl(e,t,n),jr=r,$s=i,jr!==null&&($s?(e=jr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jr.removeChild(n.stateNode));break;case 18:jr!==null&&($s?(e=jr,n=n.stateNode,e.nodeType===8?i8(e.parentNode,n):e.nodeType===1&&i8(e,n),L0(e)):i8(jr,n.stateNode));break;case 4:r=jr,i=$s,jr=n.stateNode.containerInfo,$s=!0,Zl(e,t,n),jr=r,$s=i;break;case 0:case 11:case 14:case 15:if(!hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&Rx(n,t,s),i=i.next}while(i!==r)}Zl(e,t,n);break;case 1:if(!hi&&(q1(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){tr(n,t,a)}Zl(e,t,n);break;case 21:Zl(e,t,n);break;case 22:n.mode&1?(hi=(r=hi)||n.memoizedState!==null,Zl(e,t,n),hi=r):Zl(e,t,n);break;default:Zl(e,t,n)}}function v$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qte),t.forEach(function(r){var i=sne.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ws(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:jr=a.stateNode,$s=!1;break e;case 3:jr=a.stateNode.containerInfo,$s=!0;break e;case 4:jr=a.stateNode.containerInfo,$s=!0;break e}a=a.return}if(jr===null)throw Error(Re(160));tH(o,s,i),jr=null,$s=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){tr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)nH(t,e),t=t.sibling}function nH(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ws(t,e),Zs(e),r&4){try{Yp(3,e,e.return),py(3,e)}catch(v){tr(e,e.return,v)}try{Yp(5,e,e.return)}catch(v){tr(e,e.return,v)}}break;case 1:ws(t,e),Zs(e),r&512&&n!==null&&q1(n,n.return);break;case 5:if(ws(t,e),Zs(e),r&512&&n!==null&&q1(n,n.return),e.flags&32){var i=e.stateNode;try{P0(i,"")}catch(v){tr(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&SF(i,o),sx(a,s);var u=sx(a,o);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];d==="style"?AF(i,f):d==="dangerouslySetInnerHTML"?kF(i,f):d==="children"?P0(i,f):SS(i,d,f,u)}switch(a){case"input":tx(i,o);break;case"textarea":EF(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?uf(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?uf(i,!!o.multiple,o.defaultValue,!0):uf(i,!!o.multiple,o.multiple?[]:"",!1))}i[z0]=o}catch(v){tr(e,e.return,v)}}break;case 6:if(ws(t,e),Zs(e),r&4){if(e.stateNode===null)throw Error(Re(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){tr(e,e.return,v)}}break;case 3:if(ws(t,e),Zs(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{L0(t.containerInfo)}catch(v){tr(e,e.return,v)}break;case 4:ws(t,e),Zs(e);break;case 13:ws(t,e),Zs(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(nE=cr())),r&4&&v$(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(hi=(u=hi)||d,ws(t,e),hi=u):ws(t,e),Zs(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&(e.mode&1)!==0)for(at=e,d=e.child;d!==null;){for(f=at=d;at!==null;){switch(h=at,p=h.child,h.tag){case 0:case 11:case 14:case 15:Yp(4,h,h.return);break;case 1:q1(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){tr(r,n,v)}}break;case 5:q1(h,h.return);break;case 22:if(h.memoizedState!==null){b$(f);continue}}p!==null?(p.return=h,at=p):b$(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=_F("display",s))}catch(v){tr(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){tr(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ws(t,e),Zs(e),r&4&&v$(e);break;case 21:break;default:ws(t,e),Zs(e)}}function Zs(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(eH(n)){var r=n;break e}n=n.return}throw Error(Re(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(P0(i,""),r.flags&=-33);var o=g$(e);Lx(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=g$(e);Ix(e,a,s);break;default:throw Error(Re(161))}}catch(c){tr(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zte(e,t,n){at=e,rH(e)}function rH(e,t,n){for(var r=(e.mode&1)!==0;at!==null;){var i=at,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Jg;if(!s){var a=i.alternate,c=a!==null&&a.memoizedState!==null||hi;a=Jg;var u=hi;if(Jg=s,(hi=c)&&!u)for(at=i;at!==null;)s=at,c=s.child,s.tag===22&&s.memoizedState!==null?x$(i):c!==null?(c.return=s,at=c):x$(i);for(;o!==null;)at=o,rH(o),o=o.sibling;at=i,Jg=a,hi=u}y$(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,at=o):y$(e)}}function y$(e){for(;at!==null;){var t=at;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:hi||py(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!hi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:As(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&t$(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}t$(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&L0(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Re(163))}hi||t.flags&512&&Mx(t)}catch(h){tr(t,t.return,h)}}if(t===e){at=null;break}if(n=t.sibling,n!==null){n.return=t.return,at=n;break}at=t.return}}function b$(e){for(;at!==null;){var t=at;if(t===e){at=null;break}var n=t.sibling;if(n!==null){n.return=t.return,at=n;break}at=t.return}}function x$(e){for(;at!==null;){var t=at;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{py(4,t)}catch(c){tr(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){tr(t,i,c)}}var o=t.return;try{Mx(t)}catch(c){tr(t,o,c)}break;case 5:var s=t.return;try{Mx(t)}catch(c){tr(t,s,c)}}}catch(c){tr(t,t.return,c)}if(t===e){at=null;break}var a=t.sibling;if(a!==null){a.return=t.return,at=a;break}at=t.return}}var Jte=Math.ceil,Z5=Hl.ReactCurrentDispatcher,eE=Hl.ReactCurrentOwner,Jo=Hl.ReactCurrentBatchConfig,an=0,Nr=null,vr=null,Jr=0,po=0,K1=gu(0),kr=0,K0=null,_d=0,my=0,tE=0,Qp=null,qi=null,nE=0,If=1/0,cl=null,J5=!1,Nx=null,Kc=null,e2=!1,Dc=null,e3=0,Xp=0,Fx=null,M4=-1,I4=0;function Ri(){return(an&6)!==0?cr():M4!==-1?M4:M4=cr()}function Gc(e){return(e.mode&1)===0?1:(an&2)!==0&&Jr!==0?Jr&-Jr:Lte.transition!==null?(I4===0&&(I4=HF()),I4):(e=gn,e!==0||(e=window.event,e=e===void 0?16:KF(e.type)),e)}function Hs(e,t,n,r){if(50<Xp)throw Xp=0,Fx=null,Error(Re(185));Bm(e,n,r),((an&2)===0||e!==Nr)&&(e===Nr&&((an&2)===0&&(my|=n),kr===4&&Tc(e,Jr)),Zi(e,r),n===1&&an===0&&(t.mode&1)===0&&(If=cr()+500,dy&&vu()))}function Zi(e,t){var n=e.callbackNode;Lee(e,t);var r=N5(e,e===Nr?Jr:0);if(r===0)n!==null&&$A(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$A(n),t===1)e.tag===0?Ite(C$.bind(null,e)):fB(C$.bind(null,e)),Ote(function(){(an&6)===0&&vu()}),n=null;else{switch(zF(r)){case 1:n=AS;break;case 4:n=FF;break;case 16:n=L5;break;case 536870912:n=BF;break;default:n=L5}n=dH(n,iH.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iH(e,t){if(M4=-1,I4=0,(an&6)!==0)throw Error(Re(327));var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=N5(e,e===Nr?Jr:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=t3(e,r);else{t=r;var i=an;an|=2;var o=sH();(Nr!==e||Jr!==t)&&(cl=null,If=cr()+500,ud(e,t));do try{nne();break}catch(a){oH(e,a)}while(1);zS(),Z5.current=o,an=i,vr!==null?t=0:(Nr=null,Jr=0,t=kr)}if(t!==0){if(t===2&&(i=dx(e),i!==0&&(r=i,t=Bx(e,i))),t===1)throw n=K0,ud(e,0),Tc(e,r),Zi(e,cr()),n;if(t===6)Tc(e,r);else{if(i=e.current.alternate,(r&30)===0&&!ene(i)&&(t=t3(e,r),t===2&&(o=dx(e),o!==0&&(r=o,t=Bx(e,o))),t===1))throw n=K0,ud(e,0),Tc(e,r),Zi(e,cr()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Re(345));case 2:zu(e,qi,cl);break;case 3:if(Tc(e,r),(r&130023424)===r&&(t=nE+500-cr(),10<t)){if(N5(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ri(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=bx(zu.bind(null,e,qi,cl),t);break}zu(e,qi,cl);break;case 4:if(Tc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Bs(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jte(r/1960))-r,10<r){e.timeoutHandle=bx(zu.bind(null,e,qi,cl),r);break}zu(e,qi,cl);break;case 5:zu(e,qi,cl);break;default:throw Error(Re(329))}}}return Zi(e,cr()),e.callbackNode===n?iH.bind(null,e):null}function Bx(e,t){var n=Qp;return e.current.memoizedState.isDehydrated&&(ud(e,t).flags|=256),e=t3(e,t),e!==2&&(t=qi,qi=n,t!==null&&Hx(t)),e}function Hx(e){qi===null?qi=e:qi.push.apply(qi,e)}function ene(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!js(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tc(e,t){for(t&=~tE,t&=~my,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bs(t),r=1<<n;e[n]=-1,t&=~r}}function C$(e){if((an&6)!==0)throw Error(Re(327));mf();var t=N5(e,0);if((t&1)===0)return Zi(e,cr()),null;var n=t3(e,t);if(e.tag!==0&&n===2){var r=dx(e);r!==0&&(t=r,n=Bx(e,r))}if(n===1)throw n=K0,ud(e,0),Tc(e,t),Zi(e,cr()),n;if(n===6)throw Error(Re(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zu(e,qi,cl),Zi(e,cr()),null}function rE(e,t){var n=an;an|=1;try{return e(t)}finally{an=n,an===0&&(If=cr()+500,dy&&vu())}}function Ad(e){Dc!==null&&Dc.tag===0&&(an&6)===0&&mf();var t=an;an|=1;var n=Jo.transition,r=gn;try{if(Jo.transition=null,gn=1,e)return e()}finally{gn=r,Jo.transition=n,an=t,(an&6)===0&&vu()}}function iE(){po=K1.current,Vn(K1)}function ud(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Dte(n)),vr!==null)for(n=vr.return;n!==null;){var r=n;switch(FS(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&U5();break;case 3:Rf(),Vn(Qi),Vn(yi),KS();break;case 5:qS(r);break;case 4:Rf();break;case 13:Vn(Yn);break;case 19:Vn(Yn);break;case 10:US(r.type._context);break;case 22:case 23:iE()}n=n.return}if(Nr=e,vr=e=Yc(e.current,null),Jr=po=t,kr=0,K0=null,tE=my=_d=0,qi=Qp=null,Zu!==null){for(t=0;t<Zu.length;t++)if(n=Zu[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Zu=null}return e}function oH(e,t){do{var n=vr;try{if(zS(),O4.current=X5,Q5){for(var r=Xn.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Q5=!1}if(kd=0,Pr=Sr=Xn=null,Gp=!1,j0=0,eE.current=null,n===null||n.return===null){kr=1,K0=t,vr=null;break}e:{var o=e,s=n.return,a=n,c=t;if(t=Jr,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if((d.mode&1)===0&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=l$(s);if(p!==null){p.flags&=-257,c$(p,s,a,o,t),p.mode&1&&a$(o,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(c),t.updateQueue=v}else m.add(c);break e}else{if((t&1)===0){a$(o,u,t),oE();break e}c=Error(Re(426))}}else if(Kn&&a.mode&1){var b=l$(s);if(b!==null){(b.flags&65536)===0&&(b.flags|=256),c$(b,s,a,o,t),BS(Mf(c,a));break e}}o=c=Mf(c,a),kr!==4&&(kr=2),Qp===null?Qp=[o]:Qp.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=UB(o,c,t);e$(o,x);break e;case 1:a=c;var C=o.type,w=o.stateNode;if((o.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Kc===null||!Kc.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=VB(o,a,t);e$(o,S);break e}}o=o.return}while(o!==null)}lH(n)}catch(T){t=T,vr===n&&n!==null&&(vr=n=n.return);continue}break}while(1)}function sH(){var e=Z5.current;return Z5.current=X5,e===null?X5:e}function oE(){(kr===0||kr===3||kr===2)&&(kr=4),Nr===null||(_d&268435455)===0&&(my&268435455)===0||Tc(Nr,Jr)}function t3(e,t){var n=an;an|=2;var r=sH();(Nr!==e||Jr!==t)&&(cl=null,ud(e,t));do try{tne();break}catch(i){oH(e,i)}while(1);if(zS(),an=n,Z5.current=r,vr!==null)throw Error(Re(261));return Nr=null,Jr=0,kr}function tne(){for(;vr!==null;)aH(vr)}function nne(){for(;vr!==null&&!_ee();)aH(vr)}function aH(e){var t=uH(e.alternate,e,po);e.memoizedProps=e.pendingProps,t===null?lH(e):vr=t,eE.current=null}function lH(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Gte(n,t,po),n!==null){vr=n;return}}else{if(n=Yte(n,t),n!==null){n.flags&=32767,vr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{kr=6,vr=null;return}}if(t=t.sibling,t!==null){vr=t;return}vr=t=e}while(t!==null);kr===0&&(kr=5)}function zu(e,t,n){var r=gn,i=Jo.transition;try{Jo.transition=null,gn=1,rne(e,t,n,r)}finally{Jo.transition=i,gn=r}return null}function rne(e,t,n,r){do mf();while(Dc!==null);if((an&6)!==0)throw Error(Re(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Re(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Nee(e,o),e===Nr&&(vr=Nr=null,Jr=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||e2||(e2=!0,dH(L5,function(){return mf(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=Jo.transition,Jo.transition=null;var s=gn;gn=1;var a=an;an|=4,eE.current=null,Xte(e,n),nH(n,e),Ste(vx),F5=!!gx,vx=gx=null,e.current=n,Zte(n),Aee(),an=a,gn=s,Jo.transition=o}else e.current=n;if(e2&&(e2=!1,Dc=e,e3=i),o=e.pendingLanes,o===0&&(Kc=null),Oee(n.stateNode),Zi(e,cr()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(J5)throw J5=!1,e=Nx,Nx=null,e;return(e3&1)!==0&&e.tag!==0&&mf(),o=e.pendingLanes,(o&1)!==0?e===Fx?Xp++:(Xp=0,Fx=e):Xp=0,vu(),null}function mf(){if(Dc!==null){var e=zF(e3),t=Jo.transition,n=gn;try{if(Jo.transition=null,gn=16>e?16:e,Dc===null)var r=!1;else{if(e=Dc,Dc=null,e3=0,(an&6)!==0)throw Error(Re(331));var i=an;for(an|=4,at=e.current;at!==null;){var o=at,s=o.child;if((at.flags&16)!==0){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(at=u;at!==null;){var d=at;switch(d.tag){case 0:case 11:case 15:Yp(8,d,o)}var f=d.child;if(f!==null)f.return=d,at=f;else for(;at!==null;){d=at;var h=d.sibling,p=d.return;if(JB(d),d===u){at=null;break}if(h!==null){h.return=p,at=h;break}at=p}}}var m=o.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}at=o}}if((o.subtreeFlags&2064)!==0&&s!==null)s.return=o,at=s;else e:for(;at!==null;){if(o=at,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:Yp(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,at=x;break e}at=o.return}}var C=e.current;for(at=C;at!==null;){s=at;var w=s.child;if((s.subtreeFlags&2064)!==0&&w!==null)w.return=s,at=w;else e:for(s=C;at!==null;){if(a=at,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:py(9,a)}}catch(T){tr(a,a.return,T)}if(a===s){at=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,at=S;break e}at=a.return}}if(an=i,vu(),xa&&typeof xa.onPostCommitFiberRoot=="function")try{xa.onPostCommitFiberRoot(sy,e)}catch{}r=!0}return r}finally{gn=n,Jo.transition=t}}return!1}function w$(e,t,n){t=Mf(n,t),t=UB(e,t,1),e=qc(e,t,1),t=Ri(),e!==null&&(Bm(e,1,t),Zi(e,t))}function tr(e,t,n){if(e.tag===3)w$(e,e,n);else for(;t!==null;){if(t.tag===3){w$(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Kc===null||!Kc.has(r))){e=Mf(n,e),e=VB(t,e,1),t=qc(t,e,1),e=Ri(),t!==null&&(Bm(t,1,e),Zi(t,e));break}}t=t.return}}function ine(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ri(),e.pingedLanes|=e.suspendedLanes&n,Nr===e&&(Jr&n)===n&&(kr===4||kr===3&&(Jr&130023424)===Jr&&500>cr()-nE?ud(e,0):tE|=n),Zi(e,t)}function cH(e,t){t===0&&((e.mode&1)===0?t=1:(t=jg,jg<<=1,(jg&130023424)===0&&(jg=4194304)));var n=Ri();e=Sl(e,t),e!==null&&(Bm(e,t,n),Zi(e,n))}function one(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cH(e,n)}function sne(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),cH(e,n)}var uH;uH=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qi.current)Yi=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Yi=!1,Kte(e,t,n);Yi=(e.flags&131072)!==0}else Yi=!1,Kn&&(t.flags&1048576)!==0&&hB(t,W5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;R4(e,t),e=t.pendingProps;var i=Df(t,yi.current);pf(t,n),i=YS(null,t,r,e,i,n);var o=QS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xi(r)?(o=!0,V5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jS(t),i.updater=fy,t.stateNode=i,i._reactInternals=t,kx(t,r,e,n),t=$x(null,t,r,!0,o,n)):(t.tag=0,Kn&&o&&NS(t),$i(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(R4(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lne(r),e=As(r,e),i){case 0:t=Ax(null,t,r,e,n);break e;case 1:t=f$(null,t,r,e,n);break e;case 11:t=u$(null,t,r,e,n);break e;case 14:t=d$(null,t,r,As(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:As(r,i),Ax(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:As(r,i),f$(e,t,r,i,n);case 3:e:{if(KB(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vB(e,t),G5(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Mf(Error(Re(423)),t),t=h$(e,t,r,n,i);break e}else if(r!==i){i=Mf(Error(Re(424)),t),t=h$(e,t,r,n,i);break e}else for(vo=Wc(t.stateNode.containerInfo.firstChild),So=t,Kn=!0,Ps=null,n=CB(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Of(),r===i){t=El(e,t,n);break e}$i(e,t,r,n)}t=t.child}return t;case 5:return wB(t),e===null&&Sx(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,yx(r,i)?s=null:o!==null&&yx(r,o)&&(t.flags|=32),qB(e,t),$i(e,t,s,n),t.child;case 6:return e===null&&Sx(t),null;case 13:return GB(e,t,n);case 4:return WS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pf(t,null,r,n):$i(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:As(r,i),u$(e,t,r,i,n);case 7:return $i(e,t,t.pendingProps,n),t.child;case 8:return $i(e,t,t.pendingProps.children,n),t.child;case 12:return $i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,In(q5,r._currentValue),r._currentValue=s,o!==null)if(js(o.value,s)){if(o.children===i.children&&!Qi.current){t=El(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=bl(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ex(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Re(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Ex(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}$i(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pf(t,n),i=is(i),r=r(i),t.flags|=1,$i(e,t,r,n),t.child;case 14:return r=t.type,i=As(r,t.pendingProps),i=As(r.type,i),d$(e,t,r,i,n);case 15:return jB(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:As(r,i),R4(e,t),t.tag=1,Xi(r)?(e=!0,V5(t)):e=!1,pf(t,n),bB(t,r,i),kx(t,r,i,n),$x(null,t,r,!0,e,n);case 19:return YB(e,t,n);case 22:return WB(e,t,n)}throw Error(Re(156,t.tag))};function dH(e,t){return NF(e,t)}function ane(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qo(e,t,n,r){return new ane(e,t,n,r)}function sE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lne(e){if(typeof e=="function")return sE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===TS)return 11;if(e===kS)return 14}return 2}function Yc(e,t){var n=e.alternate;return n===null?(n=Qo(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function L4(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")sE(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case N1:return dd(n.children,i,o,t);case ES:s=8,i|=8;break;case Q7:return e=Qo(12,n,t,i|2),e.elementType=Q7,e.lanes=o,e;case X7:return e=Qo(13,n,t,i),e.elementType=X7,e.lanes=o,e;case Z7:return e=Qo(19,n,t,i),e.elementType=Z7,e.lanes=o,e;case xF:return gy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yF:s=10;break e;case bF:s=9;break e;case TS:s=11;break e;case kS:s=14;break e;case pc:s=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Qo(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function dd(e,t,n,r){return e=Qo(7,e,r,t),e.lanes=n,e}function gy(e,t,n,r){return e=Qo(22,e,r,t),e.elementType=xF,e.lanes=n,e.stateNode={isHidden:!1},e}function f8(e,t,n){return e=Qo(6,e,null,t),e.lanes=n,e}function h8(e,t,n){return t=Qo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cne(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=K9(0),this.expirationTimes=K9(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=K9(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aE(e,t,n,r,i,o,s,a,c){return e=new cne(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Qo(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jS(o),e}function une(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L1,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fH(e){if(!e)return iu;e=e._reactInternals;e:{if(zd(e)!==e||e.tag!==1)throw Error(Re(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Re(171))}if(e.tag===1){var n=e.type;if(Xi(n))return dB(e,n,t)}return t}function hH(e,t,n,r,i,o,s,a,c){return e=aE(n,r,!0,e,i,o,s,a,c),e.context=fH(null),n=e.current,r=Ri(),i=Gc(n),o=bl(r,i),o.callback=t!=null?t:null,qc(n,o,i),e.current.lanes=i,Bm(e,i,r),Zi(e,r),e}function vy(e,t,n,r){var i=t.current,o=Ri(),s=Gc(i);return n=fH(n),t.context===null?t.context=n:t.pendingContext=n,t=bl(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=qc(i,t,s),e!==null&&(Hs(e,i,s,o),D4(e,i,s)),s}function n3(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function S$(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lE(e,t){S$(e,t),(e=e.alternate)&&S$(e,t)}function dne(){return null}var pH=typeof reportError=="function"?reportError:function(e){console.error(e)};function cE(e){this._internalRoot=e}yy.prototype.render=cE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Re(409));vy(e,t,null,null)};yy.prototype.unmount=cE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ad(function(){vy(null,e,null,null)}),t[wl]=null}};function yy(e){this._internalRoot=e}yy.prototype.unstable_scheduleHydration=function(e){if(e){var t=jF();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ec.length&&t!==0&&t<Ec[n].priority;n++);Ec.splice(n,0,e),n===0&&qF(e)}};function uE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function by(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function E$(){}function fne(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=n3(s);o.call(u)}}var s=hH(t,r,e,0,null,!1,!1,"",E$);return e._reactRootContainer=s,e[wl]=s.current,B0(e.nodeType===8?e.parentNode:e),Ad(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=n3(c);a.call(u)}}var c=aE(e,0,!1,null,null,!1,!1,"",E$);return e._reactRootContainer=c,e[wl]=c.current,B0(e.nodeType===8?e.parentNode:e),Ad(function(){vy(t,c,n,r)}),c}function xy(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var c=n3(s);a.call(c)}}vy(t,s,e,i)}else s=fne(n,t,e,i,r);return n3(s)}UF=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dp(t.pendingLanes);n!==0&&($S(t,n|1),Zi(t,cr()),(an&6)===0&&(If=cr()+500,vu()))}break;case 13:Ad(function(){var r=Sl(e,1);if(r!==null){var i=Ri();Hs(r,e,1,i)}}),lE(e,1)}};DS=function(e){if(e.tag===13){var t=Sl(e,134217728);if(t!==null){var n=Ri();Hs(t,e,134217728,n)}lE(e,134217728)}};VF=function(e){if(e.tag===13){var t=Gc(e),n=Sl(e,t);if(n!==null){var r=Ri();Hs(n,e,t,r)}lE(e,t)}};jF=function(){return gn};WF=function(e,t){var n=gn;try{return gn=e,t()}finally{gn=n}};lx=function(e,t,n){switch(t){case"input":if(tx(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=uy(r);if(!i)throw Error(Re(90));wF(r),tx(r,i)}}}break;case"textarea":EF(e,n);break;case"select":t=n.value,t!=null&&uf(e,!!n.multiple,t,!1)}};OF=rE;PF=Ad;var hne={usingClientEntryPoint:!1,Events:[zm,z1,uy,$F,DF,rE]},sp={findFiberByHostInstance:Xu,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},pne={bundleType:sp.bundleType,version:sp.version,rendererPackageName:sp.rendererPackageName,rendererConfig:sp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Hl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=IF(e),e===null?null:e.stateNode},findFiberByHostInstance:sp.findFiberByHostInstance||dne,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var t2=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t2.isDisabled&&t2.supportsFiber)try{sy=t2.inject(pne),xa=t2}catch{}}Oo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hne;Oo.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!uE(t))throw Error(Re(200));return une(e,t,null,n)};Oo.createRoot=function(e,t){if(!uE(e))throw Error(Re(299));var n=!1,r="",i=pH;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=aE(e,1,!1,null,null,n,!1,r,i),e[wl]=t.current,B0(e.nodeType===8?e.parentNode:e),new cE(t)};Oo.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Re(188)):(e=Object.keys(e).join(","),Error(Re(268,e)));return e=IF(t),e=e===null?null:e.stateNode,e};Oo.flushSync=function(e){return Ad(e)};Oo.hydrate=function(e,t,n){if(!by(t))throw Error(Re(200));return xy(null,e,t,!0,n)};Oo.hydrateRoot=function(e,t,n){if(!uE(e))throw Error(Re(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=pH;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=hH(t,null,e,1,n!=null?n:null,i,!1,o,s),e[wl]=t.current,B0(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new yy(t)};Oo.render=function(e,t,n){if(!by(t))throw Error(Re(200));return xy(null,e,t,!1,n)};Oo.unmountComponentAtNode=function(e){if(!by(e))throw Error(Re(40));return e._reactRootContainer?(Ad(function(){xy(null,null,e,!1,function(){e._reactRootContainer=null,e[wl]=null})}),!0):!1};Oo.unstable_batchedUpdates=rE;Oo.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!by(n))throw Error(Re(200));if(e==null||e._reactInternals===void 0)throw Error(Re(38));return xy(e,t,n,!1,r)};Oo.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Oo})(Lr);const mH=Nm(Lr.exports);var T$=Lr.exports;G7.createRoot=T$.createRoot,G7.hydrateRoot=T$.hydrateRoot;class uh{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const G0=typeof window>"u"||"Deno"in window;function Ho(){}function mne(e,t){return typeof e=="function"?e(t):e}function zx(e){return typeof e=="number"&&e>=0&&e!==1/0}function gH(e,t){return Math.max(e+(t||0)-Date.now(),0)}function G1(e,t,n){return Vm(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function gne(e,t,n){return Vm(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function gc(e,t,n){return Vm(e)?[{...t,queryKey:e},n]:[e||{},t]}function k$(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(Vm(s)){if(r){if(t.queryHash!==dE(s,t.options))return!1}else if(!r3(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function _$(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(Vm(o)){if(!t.options.mutationKey)return!1;if(n){if(ed(t.options.mutationKey)!==ed(o))return!1}else if(!r3(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function dE(e,t){return((t==null?void 0:t.queryKeyHashFn)||ed)(e)}function ed(e){return JSON.stringify(e,(t,n)=>Ux(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function r3(e,t){return vH(e,t)}function vH(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!vH(e[n],t[n])):!1}function yH(e,t){if(e===t)return e;const n=A$(e)&&A$(t);if(n||Ux(e)&&Ux(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let c=0;c<o;c++){const u=n?c:i[c];s[u]=yH(e[u],t[u]),s[u]===e[u]&&a++}return r===o&&a===r?e:s}return t}function i3(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function A$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ux(e){if(!$$(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!$$(n)||!n.hasOwnProperty("isPrototypeOf"))}function $$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vm(e){return Array.isArray(e)}function bH(e){return new Promise(t=>{setTimeout(t,e)})}function D$(e){bH(0).then(e)}function vne(){if(typeof AbortController=="function")return new AbortController}function Vx(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yH(e,t):t}class yne extends uh{constructor(){super(),this.setup=t=>{if(!G0&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const o3=new yne,O$=["online","offline"];class bne extends uh{constructor(){super(),this.setup=t=>{if(!G0&&window.addEventListener){const n=()=>t();return O$.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{O$.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const s3=new bne;function xne(e){return Math.min(1e3*2**e,3e4)}function Cy(e){return(e!=null?e:"online")==="online"?s3.isOnline():!0}class xH{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function N4(e){return e instanceof xH}function CH(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((b,x)=>{o=b,s=x}),c=b=>{r||(p(new xH(b)),e.abort==null||e.abort())},u=()=>{t=!0},d=()=>{t=!1},f=()=>!o3.isFocused()||e.networkMode!=="always"&&!s3.isOnline(),h=b=>{r||(r=!0,e.onSuccess==null||e.onSuccess(b),i==null||i(),o(b))},p=b=>{r||(r=!0,e.onError==null||e.onError(b),i==null||i(),s(b))},m=()=>new Promise(b=>{i=x=>{const C=r||!f();return C&&b(x),C},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),v=()=>{if(r)return;let b;try{b=e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(h).catch(x=>{var C,w;if(r)return;const S=(C=e.retry)!=null?C:3,T=(w=e.retryDelay)!=null?w:xne,E=typeof T=="function"?T(n,x):T,k=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!k){p(x);return}n++,e.onFail==null||e.onFail(n,x),bH(E).then(()=>{if(f())return m()}).then(()=>{t?p(x):v()})})};return Cy(e.networkMode)?v():m().then(v),{promise:a,cancel:c,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:d}}const fE=console;function Cne(){let e=[],t=0,n=d=>{d()},r=d=>{d()};const i=d=>{let f;t++;try{f=d()}finally{t--,t||a()}return f},o=d=>{t?e.push(d):D$(()=>{n(d)})},s=d=>(...f)=>{o(()=>{d(...f)})},a=()=>{const d=e;e=[],d.length&&D$(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const rr=Cne();class wH{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zx(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:G0?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class wne extends wH{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||fE,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Sne(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Vx(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ho).catch(Ho):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!gH(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const s=vne(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};c(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(c(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const h=p=>{if(N4(p)&&p.silent||this.dispatch({type:"error",error:p}),!N4(p)){var m,v,b,x;(m=(v=this.cache.config).onError)==null||m.call(v,p,this),(b=(x=this.cache.config).onSettled)==null||b.call(x,this.state.data,p,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=CH({fn:d.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:p=>{var m,v,b,x;if(typeof p>"u"){h(new Error(this.queryHash+" data is undefined"));return}this.setData(p),(m=(v=this.cache.config).onSuccess)==null||m.call(v,p,this),(b=(x=this.cache.config).onSettled)==null||b.call(x,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(p,m)=>{this.dispatch({type:"failed",failureCount:p,error:m})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;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,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Cy(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return N4(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),rr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Sne(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Ene extends uh{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:dE(o,n);let a=this.get(s);return a||(a=new wne({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){rr.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=gc(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>k$(r,i))}findAll(t,n){const[r]=gc(t,n);return Object.keys(r).length>0?this.queries.filter(i=>k$(r,i)):this.queries}notify(t){rr.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){rr.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){rr.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Tne extends wH{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||fE,this.observers=[],this.state=t.state||SH(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var k;return this.retryer=CH({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(_,O)=>{this.dispatch({type:"failed",failureCount:_,error:O})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(k=this.options.retry)!=null?k:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,c,u,d;if(!n){var f,h,p,m;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(h=this.mutationCache.config).onMutate)==null?void 0:f.call(h,this.state.variables,this));const _=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,this.state.variables));_!==this.state.context&&this.dispatch({type:"loading",context:_,variables:this.state.variables})}const k=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,k,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,k,this.state.variables,this.state.context)),await((a=(c=this.mutationCache.config).onSettled)==null?void 0:a.call(c,k,null,this.state.variables,this.state.context,this)),await((u=(d=this.options).onSettled)==null?void 0:u.call(d,k,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:k}),k}catch(k){try{var v,b,x,C,w,S,T,E;throw await((v=(b=this.mutationCache.config).onError)==null?void 0:v.call(b,k,this.state.variables,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,k,this.state.variables,this.state.context)),await((w=(S=this.mutationCache.config).onSettled)==null?void 0:w.call(S,void 0,k,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,k,this.state.variables,this.state.context)),k}finally{this.dispatch({type:"error",error:k})}}}dispatch(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"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Cy(this.options.networkMode),status:"loading",variables:t.variables};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"};case"setState":return{...r,...t.state}}};this.state=n(this.state),rr.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function SH(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class kne extends uh{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new Tne({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){rr.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>_$(t,n))}findAll(t){return this.mutations.filter(n=>_$(t,n))}notify(t){rr.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return rr.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Ho)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function jx(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,c=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,u=c==null?void 0:c.pageParam,d=(c==null?void 0:c.direction)==="forward",f=(c==null?void 0:c.direction)==="backward",h=((o=e.state.data)==null?void 0:o.pages)||[],p=((s=e.state.data)==null?void 0:s.pageParams)||[];let m=p,v=!1;const b=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{var k;if((k=e.signal)!=null&&k.aborted)v=!0;else{var _;(_=e.signal)==null||_.addEventListener("abort",()=>{v=!0})}return e.signal}})},x=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),C=(E,k,_,O)=>(m=O?[k,...m]:[...m,k],O?[_,...E]:[...E,_]),w=(E,k,_,O)=>{if(v)return Promise.reject("Cancelled");if(typeof _>"u"&&!k&&E.length)return Promise.resolve(E);const D={queryKey:e.queryKey,pageParam:_,meta:e.options.meta};b(D);const L=x(D);return Promise.resolve(L).then(j=>C(E,_,j,O))};let S;if(!h.length)S=w([]);else if(d){const E=typeof u<"u",k=E?u:Wx(e.options,h);S=w(h,E,k)}else if(f){const E=typeof u<"u",k=E?u:EH(e.options,h);S=w(h,E,k,!0)}else{m=[];const E=typeof e.options.getNextPageParam>"u";S=(a&&h[0]?a(h[0],0,h):!0)?w([],E,p[0]):Promise.resolve(C([],p[0],h[0]));for(let _=1;_<h.length;_++)S=S.then(O=>{if(a&&h[_]?a(h[_],_,h):!0){const L=E?p[_]:Wx(e.options,O);return w(O,E,L)}return Promise.resolve(C(O,p[_],h[_]))})}return S.then(E=>({pages:E,pageParams:m}))}}}}function Wx(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function EH(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}function _ne(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=Wx(e,t);return typeof n<"u"&&n!==null&&n!==!1}}function Ane(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=EH(e,t);return typeof n<"u"&&n!==null&&n!==!1}}class $ne{constructor(t={}){this.queryCache=t.queryCache||new Ene,this.mutationCache=t.mutationCache||new kne,this.logger=t.logger||fE,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=o3.subscribe(()=>{o3.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=s3.subscribe(()=>{s3.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=gc(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=G1(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=mne(n,o);if(typeof s>"u")return;const a=G1(t),c=this.defaultQueryOptions(a);return this.queryCache.build(this,c).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return rr.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=gc(t,n),i=this.queryCache;rr.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=gc(t,n,r),s=this.queryCache,a={type:"active",...i};return rr.batch(()=>(s.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=gc(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=rr.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(Ho).catch(Ho)}invalidateQueries(t,n,r){const[i,o]=gc(t,n,r);return rr.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const c={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(c,o)})}refetchQueries(t,n,r){const[i,o]=gc(t,n,r),s=rr.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var u;return c.fetch(void 0,{...o,cancelRefetch:(u=o==null?void 0:o.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(Ho);return o!=null&&o.throwOnError||(a=a.catch(Ho)),a}fetchQuery(t,n,r){const i=G1(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ho).catch(Ho)}fetchInfiniteQuery(t,n,r){const i=G1(t,n,r);return i.behavior=jx(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ho).catch(Ho)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>ed(t)===ed(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>r3(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>ed(t)===ed(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>r3(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=dE(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class TH extends uh{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),P$(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qx(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qx(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),i3(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&R$(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return One(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ho)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),G0||this.currentResult.isStale||!zx(this.options.staleTime))return;const n=gH(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(G0||this.options.enabled===!1||!zx(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||o3.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,c=t!==r,u=c?t.state:this.currentQueryInitialState,d=c?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:h,error:p,errorUpdatedAt:m,fetchStatus:v,status:b}=f,x=!1,C=!1,w;if(n._optimisticResults){const _=this.hasListeners(),O=!_&&P$(t,n),D=_&&R$(t,r,n,i);(O||D)&&(v=Cy(t.options.networkMode)?"fetching":"paused",h||(b="loading")),n._optimisticResults==="isRestoring"&&(v="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&b!=="error")w=d.data,h=d.dataUpdatedAt,b=d.status,x=!0;else if(n.select&&typeof f.data<"u")if(o&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)w=this.selectResult;else try{this.selectFn=n.select,w=n.select(f.data),w=Vx(o==null?void 0:o.data,w,n),this.selectResult=w,this.selectError=null}catch(_){this.selectError=_}else w=f.data;if(typeof n.placeholderData<"u"&&typeof w>"u"&&b==="loading"){let _;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))_=o.data;else if(_=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof _<"u")try{_=n.select(_),this.selectError=null}catch(O){this.selectError=O}typeof _<"u"&&(b="success",w=Vx(o==null?void 0:o.data,_,n),C=!0)}this.selectError&&(p=this.selectError,w=this.selectResult,m=Date.now(),b="error");const S=v==="fetching",T=b==="loading",E=b==="error";return{status:b,fetchStatus:v,isLoading:T,isSuccess:b==="success",isError:E,isInitialLoading:T&&S,data:w,dataUpdatedAt:h,error:p,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!T,isLoadingError:E&&f.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:C,isPreviousData:x,isRefetchError:E&&f.dataUpdatedAt!==0,isStale:hE(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,i3(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a!=null?a:this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!N4(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){rr.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,c,u;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(c=(u=this.options).onSettled)==null||c.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Dne(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function P$(e,t){return Dne(e,t)||e.state.dataUpdatedAt>0&&qx(e,t,t.refetchOnMount)}function qx(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hE(e,t)}return!1}function R$(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hE(e,n)}function hE(e,t){return e.isStaleByTime(t.staleTime)}function One(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!i3(e.getCurrentResult(),t)}class Pne extends TH{constructor(t,n){super(t,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,n){super.setOptions({...t,behavior:jx()},n)}getOptimisticResult(t){return t.behavior=jx(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,n){var r,i,o,s,a,c;const{state:u}=t,d=super.createResult(t,n),{isFetching:f,isRefetching:h}=d,p=f&&((r=u.fetchMeta)==null||(i=r.fetchMore)==null?void 0:i.direction)==="forward",m=f&&((o=u.fetchMeta)==null||(s=o.fetchMore)==null?void 0:s.direction)==="backward";return{...d,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:_ne(n,(a=u.data)==null?void 0:a.pages),hasPreviousPage:Ane(n,(c=u.data)==null?void 0:c.pages),isFetchingNextPage:p,isFetchingPreviousPage:m,isRefetching:h&&!p&&!m}}}class Rne extends uh{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),i3(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:SH(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){rr.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,i,o;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(o=this.mutateOptions).onSettled)==null||i.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var s,a,c,u;(s=(a=this.mutateOptions).onError)==null||s.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(u=this.mutateOptions).onSettled)==null||c.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)})})}}var kH={exports:{}},_H={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lf=y.exports;function Mne(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ine=typeof Object.is=="function"?Object.is:Mne,Lne=Lf.useState,Nne=Lf.useEffect,Fne=Lf.useLayoutEffect,Bne=Lf.useDebugValue;function Hne(e,t){var n=t(),r=Lne({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Fne(function(){i.value=n,i.getSnapshot=t,p8(i)&&o({inst:i})},[e,n,t]),Nne(function(){return p8(i)&&o({inst:i}),e(function(){p8(i)&&o({inst:i})})},[e]),Bne(n),n}function p8(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ine(e,n)}catch{return!0}}function zne(e,t){return t()}var Une=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zne:Hne;_H.useSyncExternalStore=Lf.useSyncExternalStore!==void 0?Lf.useSyncExternalStore:Une;(function(e){e.exports=_H})(kH);const AH=kH.exports.useSyncExternalStore,M$=y.exports.createContext(void 0),$H=y.exports.createContext(!1);function DH(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=M$),window.ReactQueryClientContext):M$)}const Ee=({context:e}={})=>{const t=y.exports.useContext(DH(e,y.exports.useContext($H)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Vne=({client:e,children:t,context:n,contextSharing:r=!1})=>{y.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=DH(n,r);return l($H.Provider,{value:!n&&r,children:l(i.Provider,{value:e,children:t})})},OH=y.exports.createContext(!1),jne=()=>y.exports.useContext(OH);OH.Provider;function Wne(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const qne=y.exports.createContext(Wne()),Kne=()=>y.exports.useContext(qne);function PH(e,t){return typeof e=="function"?e(...t):!!e}const Gne=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Yne=e=>{y.exports.useEffect(()=>{e.clearReset()},[e])},Qne=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&PH(n,[e.error,r]),Xne=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Zne=(e,t)=>e.isLoading&&e.isFetching&&!t,Jne=(e,t,n)=>(e==null?void 0:e.suspense)&&Zne(t,n),ere=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function RH(e,t){const n=Ee({context:e.context}),r=jne(),i=Kne(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=rr.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=rr.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=rr.batchCalls(o.onSettled)),Xne(o),Gne(o,i),Yne(i);const[s]=y.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(AH(y.exports.useCallback(c=>{const u=r?()=>{}:s.subscribe(rr.batchCalls(c));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),y.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),Jne(o,a,r))throw ere(o,s,i);if(Qne({result:a,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function _t(e,t,n){const r=G1(e,t,n);return RH(r,TH)}function ve(e,t,n){const r=gne(e,t,n),i=Ee({context:r.context}),[o]=y.exports.useState(()=>new Rne(i,r));y.exports.useEffect(()=>{o.setOptions(r)},[o,r]);const s=AH(y.exports.useCallback(c=>o.subscribe(rr.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),a=y.exports.useCallback((c,u)=>{o.mutate(c,u).catch(tre)},[o]);if(s.error&&PH(o.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}function tre(){}function zl(e,t,n){const r=G1(e,t,n);return RH(r,Pne)}const nre={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class a3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||nre,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new a3(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new a3(this.logger,t)}}var ma=new a3;class wy{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(!!this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}function ap(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function I$(e){return e==null?"":""+e}function rre(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const ire=/###/g;function pE(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(ire,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s<o.length-1;){if(i())return{};const a=r(o[s]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++s}return i()?{}:{obj:e,k:r(o[s])}}function L$(e,t,n){const{obj:r,k:i}=pE(e,t,Object);r[i]=n}function ore(e,t,n,r){const{obj:i,k:o}=pE(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}function l3(e,t){const{obj:n,k:r}=pE(e,t);if(!!n)return n[r]}function sre(e,t,n){const r=l3(e,n);return r!==void 0?r:l3(t,n)}function MH(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):MH(e[r],t[r],n):e[r]=t[r]);return e}function l1(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var are={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function lre(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>are[t]):e}class cre{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ure=[" ",",","?","!",";"],dre=new cre(20);function fre(e,t,n){t=t||"",n=n||"";const r=ure.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=dre.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function Kx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],s=i[a],s!==void 0){o+=c-o+1;break}i=s}return i}function c3(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class N$ extends wy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const c=l3(this.data,a);return c||!s||typeof r!="string"?c:Kx(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),L$(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let c=l3(this.data,a)||{};i?MH(c,r,o):c={...c,...r},L$(this.data,a,c),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var IH={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const F$={};class u3 extends wy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),rre(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ma.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fre(t,r,i);if(s&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${S}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${S}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(t,n);let h=f&&f.res;const p=f&&f.usedKey||s,m=f&&f.exactUsedKey||s,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],x=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject;if(C&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&b.indexOf(v)<0&&!(typeof x=="string"&&v==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(f.res=S,f.usedParams=this.getUsedParamsDetails(n),f):S}if(o){const S=v==="[object Array]",T=S?[]:{},E=S?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const _=`${E}${o}${k}`;T[k]=this.translate(_,{...n,joinArrays:!1,ns:a}),T[k]===_&&(T[k]=h[k])}h=T}}else if(C&&typeof x=="string"&&v==="[object Array]")h=h.join(x),h&&(h=this.extendTranslation(h,t,n,r));else{let S=!1,T=!1;const E=n.count!==void 0&&typeof n.count!="string",k=u3.hasDefaultValue(n),_=E?this.pluralResolver.getSuffix(u,n.count,n):"",O=n.ordinal&&E?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),L=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(S=!0,h=L),this.isValidLookup(h)||(T=!0,h=s);const j=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:h,G=k&&L!==h&&this.options.updateMissing;if(T||S||G){if(this.logger.log(G?"updateKey":"missingKey",u,c,s,G?L:h),o){const U=this.resolve(s,{...n,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let X=[];const re=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&re&&re[0])for(let U=0;U<re.length;U++)X.push(re[U]);else this.options.saveMissingTo==="all"?X=this.languageUtils.toResolveHierarchy(n.lng||this.language):X.push(n.lng||this.language);const oe=(U,H,R)=>{const se=k&&R!==h?R:j;this.options.missingKeyHandler?this.options.missingKeyHandler(U,c,H,se,G,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(U,c,H,se,G,n),this.emit("missingKey",U,c,H,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?X.forEach(U=>{const H=this.pluralResolver.getSuffixes(U,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(R=>{oe([U],s+R,n[`defaultValue${R}`]||L)})}):oe(X,s,L))}h=this.extendTranslation(h,t,n,f,r),T&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${s}`),(T||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,S?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),u){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;d<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return o&&o[0]===p[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):s.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=IH.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;i=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",p=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(a=b,!F$[`${v[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(F$[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(x=>{if(this.isValidLookup(r))return;s=x;const C=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,d,x,b,n);else{let S;h&&(S=this.pluralResolver.getSuffix(x,n.count,n));const T=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(C.push(d+S),n.ordinal&&S.indexOf(E)===0&&C.push(d+S.replace(E,this.options.pluralSeparator)),p&&C.push(d+T)),m){const k=`${d}${this.options.contextSeparator}${n.context}`;C.push(k),h&&(C.push(k+S),n.ordinal&&S.indexOf(E)===0&&C.push(k+S.replace(E,this.options.pluralSeparator)),p&&C.push(k+T))}}let w;for(;w=C.pop();)this.isValidLookup(r)||(o=w,r=this.getResource(x,b,w,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function m8(e){return e.charAt(0).toUpperCase()+e.slice(1)}class B${constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ma.create("languageUtils")}getScriptPartFromCode(t){if(t=c3(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=c3(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=m8(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=m8(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=m8(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&o.indexOf(i)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{!s||(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let hre=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],pre={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}};const mre=["v1","v2","v3"],gre=["v4"],H$={zero:0,one:1,two:2,few:3,many:4,other:5};function vre(){const e={};return hre.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:pre[t.fc]}})}),e}class yre{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ma.create("pluralResolver"),(!this.options.compatibilityJSON||gre.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=vre()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(c3(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>H$[i]-H$[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!mre.includes(this.options.compatibilityJSON)}}function z$(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=sre(e,t,n);return!o&&i&&typeof n=="string"&&(o=Kx(e,n,r),o===void 0&&(o=Kx(t,n,r))),o}class bre{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ma.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:lre,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?l1(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?l1(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?l1(n.nestingPrefix):n.nestingPrefixEscaped||l1("$t("),this.nestingSuffix=n.nestingSuffix?l1(n.nestingSuffix):n.nestingSuffixEscaped||l1(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(m){return m.replace(/\$/g,"$$$$")}const d=m=>{if(m.indexOf(this.formatSeparator)<0){const C=z$(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...i,...n,interpolationkey:m}):C}const v=m.split(this.formatSeparator),b=v.shift().trim(),x=v.join(this.formatSeparator).trim();return this.format(z$(n,c,b,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...i,...n,interpolationkey:b})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>u(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?u(this.escape(m)):u(m)}].forEach(m=>{for(a=0;o=m.regex.exec(t);){const v=o[1].trim();if(s=d(v),s===void 0)if(typeof f=="function"){const x=f(t,o,i);s=typeof x=="string"?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(h){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=I$(s));const b=m.safeValue(s);if(t=t.replace(o[0],b),h?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(c,u){const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(p&&p.length%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),u&&(s={...u,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,v),`${c}${d}${h}`}return delete s.defaultValue,c}for(;i=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=d.shift(),c=d,u=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=I$(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function xre(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(!s)return;const[a,...c]=s.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=u),u==="false"&&(n[a.trim()]=!1),u==="true"&&(n[a.trim()]=!0),isNaN(u)||(n[a.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function c1(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(c3(i),o),t[s]=a),a(r)}}class Cre{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ma.create("formatter"),this.options=t,this.formats={number:c1((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:c1((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:c1((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:c1((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:c1((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=c1(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,c)=>{const{formatName:u,formatOptions:d}=xre(c);if(this.formats[u]){let f=a;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[u](a,p,{...d,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}function wre(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class Sre extends wy{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ma.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,d=!1,s[h]===void 0&&(s[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(c=>{ore(c.loaded,[o],s),wre(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...s,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,i,c):d=u(t,n,r,i),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,i,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function U$(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function V$(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function n2(){}function Ere(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Y0 extends wy{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=V$(t),this.services={},this.logger=ma,this.modules={external:[]},Ere(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=U$();this.options={...i,...this.options,...V$(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?ma.init(o(this.modules.logger),this.options):ma.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=Cre);const f=new B$(this.options);this.store=new N$(this.options.resources,this.options);const h=this.services;h.logger=ma,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new yre(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new bre(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Sre(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b<m;b++)v[b-1]=arguments[b];t.emit(p,...v)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new u3(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b<m;b++)v[b-1]=arguments[b];t.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=n2),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=ap(),u=()=>{const d=(f,h)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n2;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>s(c)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=ap();return t||(t=this.languages),n||(n=this.options.ns),r||(r=n2),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&IH.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=ap();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},s=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=i.options.overloadTranslationOptionHandler([s,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix=c.keyPrefix||r||o.keyPrefix;const h=i.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(s)?p=s.map(m=>`${c.keyPrefix}${h}${m}`):p=c.keyPrefix?`${c.keyPrefix}${h}${s}`:s,i.t(p,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ap();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ap();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0);return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new B$(U$());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Y0(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n2;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Y0(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new N$(this.store.data,i),o.services.resourceStore=o.store),o.translator=new u3(o.services,i),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ci=Y0.createInstance();Ci.createInstance=Y0.createInstance;Ci.createInstance;Ci.dir;Ci.init;Ci.loadResources;Ci.reloadResources;Ci.use;Ci.changeLanguage;Ci.getFixedT;Ci.t;Ci.exists;Ci.setDefaultNamespace;Ci.hasLoadedNamespace;Ci.loadNamespaces;Ci.loadLanguages;function Tre(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const j$={};function Gx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&j$[t[0]]||(typeof t[0]=="string"&&(j$[t[0]]=new Date),Tre(...t))}const LH=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function W$(e,t,n){e.loadNamespaces(t,LH(e,n))}function q$(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,LH(e,r))}function kre(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,c)=>{const u=t.services.backendConnector.state[`${a}|${c}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function _re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Gx("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):kre(e,t,n)}const Are=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$re={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Dre=e=>$re[e],Ore=e=>e.replace(Are,Dre);let Yx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ore};function Pre(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yx={...Yx,...e}}function Rre(){return Yx}let NH;function Mre(e){NH=e}function Ire(){return NH}const Lre={type:"3rdParty",init(e){Pre(e.options.react),Mre(e)}},Nre=y.exports.createContext();class Fre{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Bre=(e,t)=>{const n=y.exports.useRef();return y.exports.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function Ks(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=y.exports.useContext(Nre)||{},o=n||r||Ire();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Fre),!o){Gx("You will need to pass in an i18next instance by using initReactI18next");const w=(T,E)=>typeof E=="string"?E:E&&typeof E=="object"&&typeof E.defaultValue=="string"?E.defaultValue:Array.isArray(T)?T[T.length-1]:T,S=[w,{},!1];return S.t=w,S.i18n={},S.ready=!1,S}o.options.react&&o.options.react.wait!==void 0&&Gx("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Rre(),...o.options.react,...t},{useSuspense:a,keyPrefix:c}=s;let u=e||i||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(w=>_re(w,o,s));function f(){return o.getFixedT(t.lng||null,s.nsMode==="fallback"?u:u[0],c)}const[h,p]=y.exports.useState(f);let m=u.join();t.lng&&(m=`${t.lng}${m}`);const v=Bre(m),b=y.exports.useRef(!0);y.exports.useEffect(()=>{const{bindI18n:w,bindI18nStore:S}=s;b.current=!0,!d&&!a&&(t.lng?q$(o,t.lng,u,()=>{b.current&&p(f)}):W$(o,u,()=>{b.current&&p(f)})),d&&v&&v!==m&&b.current&&p(f);function T(){b.current&&p(f)}return w&&o&&o.on(w,T),S&&o&&o.store.on(S,T),()=>{b.current=!1,w&&o&&w.split(" ").forEach(E=>o.off(E,T)),S&&o&&S.split(" ").forEach(E=>o.store.off(E,T))}},[o,m]);const x=y.exports.useRef(!0);y.exports.useEffect(()=>{b.current&&!x.current&&p(f),x.current=!1},[o,c]);const C=[h,o,d];if(C.t=h,C.i18n=o,C.ready=d,d||!d&&!a)return C;throw new Promise(w=>{t.lng?q$(o,t.lng,u,()=>w()):W$(o,u,()=>w())})}var xn="colors",_i="sizes",ct="space",Hre={gap:ct,gridGap:ct,columnGap:ct,gridColumnGap:ct,rowGap:ct,gridRowGap:ct,inset:ct,insetBlock:ct,insetBlockEnd:ct,insetBlockStart:ct,insetInline:ct,insetInlineEnd:ct,insetInlineStart:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,marginBlock:ct,marginBlockEnd:ct,marginBlockStart:ct,marginInline:ct,marginInlineEnd:ct,marginInlineStart:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,paddingBlock:ct,paddingBlockEnd:ct,paddingBlockStart:ct,paddingInline:ct,paddingInlineEnd:ct,paddingInlineStart:ct,top:ct,right:ct,bottom:ct,left:ct,scrollMargin:ct,scrollMarginTop:ct,scrollMarginRight:ct,scrollMarginBottom:ct,scrollMarginLeft:ct,scrollMarginX:ct,scrollMarginY:ct,scrollMarginBlock:ct,scrollMarginBlockEnd:ct,scrollMarginBlockStart:ct,scrollMarginInline:ct,scrollMarginInlineEnd:ct,scrollMarginInlineStart:ct,scrollPadding:ct,scrollPaddingTop:ct,scrollPaddingRight:ct,scrollPaddingBottom:ct,scrollPaddingLeft:ct,scrollPaddingX:ct,scrollPaddingY:ct,scrollPaddingBlock:ct,scrollPaddingBlockEnd:ct,scrollPaddingBlockStart:ct,scrollPaddingInline:ct,scrollPaddingInlineEnd:ct,scrollPaddingInlineStart:ct,fontSize:"fontSizes",background:xn,backgroundColor:xn,backgroundImage:xn,borderImage:xn,border:xn,borderBlock:xn,borderBlockEnd:xn,borderBlockStart:xn,borderBottom:xn,borderBottomColor:xn,borderColor:xn,borderInline:xn,borderInlineEnd:xn,borderInlineStart:xn,borderLeft:xn,borderLeftColor:xn,borderRight:xn,borderRightColor:xn,borderTop:xn,borderTopColor:xn,caretColor:xn,color:xn,columnRuleColor:xn,fill:xn,outline:xn,outlineColor:xn,stroke:xn,textDecorationColor:xn,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:_i,minBlockSize:_i,maxBlockSize:_i,inlineSize:_i,minInlineSize:_i,maxInlineSize:_i,width:_i,minWidth:_i,maxWidth:_i,height:_i,minHeight:_i,maxHeight:_i,flexBasis:_i,gridTemplateColumns:_i,gridTemplateRows:_i,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},zre=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,dh=()=>{const e=Object.create(null);return(t,n,...r)=>{const i=(o=>JSON.stringify(o,zre))(t);return i in e?e[i]:e[i]=n(t,...r)}},fd=Symbol.for("sxs.internal"),mE=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),K$=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:Ure}=Object.prototype,Qx=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),Vre=/\s+(?![^()]*\))/,u1=e=>t=>e(...typeof t=="string"?String(t).split(Vre):[t]),G$={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:u1((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:u1((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:u1((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:u1((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:u1((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:u1((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},g8=/([\d.]+)([^]*)/,jre=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(i=>i.includes("&")?i.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(i)?`:is(${r})`:r):r+" "+i)),n),[]):t,Wre=(e,t)=>e in qre&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,i,o)=>r+(i==="stretch"?`-moz-available${o};${Qx(e)}:${r}-webkit-fill-available`:`-moz-fit-content${o};${Qx(e)}:${r}fit-content`)+o):String(t),qre={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Tl=e=>e?e+"-":"",FH=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,i,o,s,a)=>s=="$"==!!o?r:(i||s=="--"?"calc(":"")+"var(--"+(s==="$"?Tl(t)+(a.includes("$")?"":Tl(n))+a.replace(/\$/g,"-"):a)+")"+(i||s=="--"?"*"+(i||"")+(o||"1")+")":"")),Kre=/\s*,\s*(?![^()]*\))/,Gre=Object.prototype.toString,Y1=(e,t,n,r,i)=>{let o,s,a;const c=(u,d,f)=>{let h,p;const m=v=>{for(h in v){const C=h.charCodeAt(0)===64,w=C&&Array.isArray(v[h])?v[h]:[v[h]];for(p of w){const S=/[A-Z]/.test(x=h)?x:x.replace(/-[^]/g,E=>E[1].toUpperCase()),T=typeof p=="object"&&p&&p.toString===Gre&&(!r.utils[S]||!d.length);if(S in r.utils&&!T){const E=r.utils[S];if(E!==s){s=E,m(E(p)),s=null;continue}}else if(S in G$){const E=G$[S];if(E!==a){a=E,m(E(p)),a=null;continue}}if(C&&(b=h.slice(1)in r.media?"@media "+r.media[h.slice(1)]:h,h=b.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(E,k,_,O,D,L)=>{const N=g8.test(k),j=.0625*(N?-1:1),[G,X]=N?[O,k]:[k,O];return"("+(_[0]==="="?"":_[0]===">"===N?"max-":"min-")+G+":"+(_[0]!=="="&&_.length===1?X.replace(g8,(re,oe,U)=>Number(oe)+j*(_===">"?1:-1)+U):X)+(D?") and ("+(D[0]===">"?"min-":"max-")+G+":"+(D.length===1?L.replace(g8,(re,oe,U)=>Number(oe)+j*(D===">"?-1:1)+U):L):"")+")"})),T){const E=C?f.concat(h):[...f],k=C?[...d]:jre(d,h.split(Kre));o!==void 0&&i(Y$(...o)),o=void 0,c(p,k,E)}else o===void 0&&(o=[[],d,f]),h=C||h.charCodeAt(0)!==36?h:`--${Tl(r.prefix)}${h.slice(1).replace(/\$/g,"-")}`,p=T?p:typeof p=="number"?p&&S in Yre?String(p)+"px":String(p):FH(Wre(S,p==null?"":p),r.prefix,r.themeMap[S]),o[0].push(`${C?`${h} `:`${Qx(h)}:`}${p}`)}}var b,x};m(u),o!==void 0&&i(Y$(...o)),o=void 0};c(e,t,n)},Y$=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,Yre={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Q$=e=>String.fromCharCode(e+(e>25?39:97)),hd=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=Q$(n%52)+r;return Q$(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),Pp=["themed","global","styled","onevar","resonevar","allvar","inline"],Qre=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},Xre=e=>{let t;const n=()=>{const{cssRules:i}=t.sheet;return[].map.call(i,(o,s)=>{const{cssText:a}=o;let c="";if(a.startsWith("--sxs"))return"";if(i[s-1]&&(c=i[s-1].cssText).startsWith("--sxs")){if(!o.cssRules.length)return"";for(const u in t.rules)if(t.rules[u].group===o)return`--sxs{--sxs:${[...t.rules[u].cache].join(" ")}}${a}`;return o.cssRules.length?`${c}${a}`:""}return a}).join("")},r=()=>{if(t){const{rules:a,sheet:c}=t;if(!c.deleteRule){for(;Object(Object(c.cssRules)[0]).type===3;)c.cssRules.splice(0,1);c.cssRules=[]}for(const u in a)delete a[u]}const i=Object(e).styleSheets||[];for(const a of i)if(Qre(a)){for(let c=0,u=a.cssRules;u[c];++c){const d=Object(u[c]);if(d.type!==1)continue;const f=Object(u[c+1]);if(f.type!==4)continue;++c;const{cssText:h}=d;if(!h.startsWith("--sxs"))continue;const p=h.slice(14,-3).trim().split(/\s+/),m=Pp[p[0]];m&&(t||(t={sheet:a,reset:r,rules:{},toString:n}),t.rules[m]={group:f,index:c,cache:new Set(p)})}if(t)break}if(!t){const a=(c,u)=>({type:u,cssRules:[],insertRule(d,f){this.cssRules.splice(f,0,a(d,{import:3,undefined:1}[(d.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return c==="@media{}"?`@media{${[].map.call(this.cssRules,d=>d.cssText).join("")}}`:c}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:a("","text/css"),rules:{},reset:r,toString:n}}const{sheet:o,rules:s}=t;for(let a=Pp.length-1;a>=0;--a){const c=Pp[a];if(!s[c]){const u=Pp[a+1],d=s[u]?s[u].index:o.cssRules.length;o.insertRule("@media{}",d),o.insertRule(`--sxs{--sxs:${a}}`,d),s[c]={group:o.cssRules[d+1],index:d,cache:new Set([a])}}Zre(s[c])}};return r(),t},Zre=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},lp=Symbol(),Jre=dh(),X$=(e,t)=>Jre(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const i of n)if(i!=null)if(i[fd]){r.type==null&&(r.type=i[fd].type);for(const o of i[fd].composers)r.composers.add(o)}else i.constructor!==Object||i.$$typeof?r.type==null&&(r.type=i):r.composers.add(eie(i,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),tie(e,r,t)}),eie=({variants:e,compoundVariants:t,defaultVariants:n,...r},i)=>{const o=`${Tl(i.prefix)}c-${hd(r)}`,s=[],a=[],c=Object.create(null),u=[];for(const h in n)c[h]=String(n[h]);if(typeof e=="object"&&e)for(const h in e){d=c,f=h,Ure.call(d,f)||(c[h]="undefined");const p=e[h];for(const m in p){const v={[h]:String(m)};String(m)==="undefined"&&u.push(h);const b=p[m],x=[v,b,!K$(b)];s.push(x)}}var d,f;if(typeof t=="object"&&t)for(const h of t){let{css:p,...m}=h;p=typeof p=="object"&&p||{};for(const b in m)m[b]=String(m[b]);const v=[m,p,!K$(p)];a.push(v)}return[o,r,s,a,c,u]},tie=(e,t,n)=>{const[r,i,o,s]=nie(t.composers),a=typeof t.type=="function"||t.type.$$typeof?(f=>{function h(){for(let p=0;p<h[lp].length;p++){const[m,v]=h[lp][p];f.rules[m].apply(v)}return h[lp]=[],null}return h[lp]=[],h.rules={},Pp.forEach(p=>h.rules[p]={apply:m=>h[lp].push([p,m])}),h})(n):null,c=(a||n).rules,u=`.${r}${i.length>1?`:where(.${i.slice(1).join(".")})`:""}`,d=f=>{f=typeof f=="object"&&f||rie;const{css:h,...p}=f,m={};for(const x in o)if(delete p[x],x in f){let C=f[x];typeof C=="object"&&C?m[x]={"@initial":o[x],...C}:(C=String(C),m[x]=C!=="undefined"||s.has(x)?C:o[x])}else m[x]=o[x];const v=new Set([...i]);for(const[x,C,w,S]of t.composers){n.rules.styled.cache.has(x)||(n.rules.styled.cache.add(x),Y1(C,[`.${x}`],[],e,k=>{c.styled.apply(k)}));const T=Z$(w,m,e.media),E=Z$(S,m,e.media,!0);for(const k of T)if(k!==void 0)for(const[_,O,D]of k){const L=`${x}-${hd(O)}-${_}`;v.add(L);const N=(D?n.rules.resonevar:n.rules.onevar).cache,j=D?c.resonevar:c.onevar;N.has(L)||(N.add(L),Y1(O,[`.${L}`],[],e,G=>{j.apply(G)}))}for(const k of E)if(k!==void 0)for(const[_,O]of k){const D=`${x}-${hd(O)}-${_}`;v.add(D),n.rules.allvar.cache.has(D)||(n.rules.allvar.cache.add(D),Y1(O,[`.${D}`],[],e,L=>{c.allvar.apply(L)}))}}if(typeof h=="object"&&h){const x=`${r}-i${hd(h)}-css`;v.add(x),n.rules.inline.cache.has(x)||(n.rules.inline.cache.add(x),Y1(h,[`.${x}`],[],e,C=>{c.inline.apply(C)}))}for(const x of String(f.className||"").trim().split(/\s+/))x&&v.add(x);const b=p.className=[...v].join(" ");return{type:t.type,className:b,selector:u,props:p,toString:()=>b,deferredInjector:a}};return mE(d,{className:r,selector:u,[fd]:t,toString:()=>(n.rules.styled.cache.has(r)||d(),r)})},nie=e=>{let t="";const n=[],r={},i=[];for(const[o,,,,s,a]of e){t===""&&(t=o),n.push(o),i.push(...a);for(const c in s){const u=s[c];(r[c]===void 0||u!=="undefined"||a.includes(u))&&(r[c]=u)}}return[t,n,r,new Set(i)]},Z$=(e,t,n,r)=>{const i=[];e:for(let[o,s,a]of e){if(a)continue;let c,u=0,d=!1;for(c in o){const f=o[c];let h=t[c];if(h!==f){if(typeof h!="object"||!h)continue e;{let p,m,v=0;for(const b in h){if(f===String(h[b])){if(b!=="@initial"){const x=b.slice(1);(m=m||[]).push(x in n?n[x]:b.replace(/^@media ?/,"")),d=!0}u+=v,p=!0}++v}if(m&&m.length&&(s={["@media "+m.join(", ")]:s}),!p)continue e}}}(i[u]=i[u]||[]).push([r?"cv":`${c}-${o[c]}`,s,d])}return i},rie={},iie=dh(),oie=(e,t)=>iie(e,()=>(...n)=>{const r=()=>{for(let i of n){i=typeof i=="object"&&i||{};let o=hd(i);if(!t.rules.global.cache.has(o)){if(t.rules.global.cache.add(o),"@import"in i){let s=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let a of[].concat(i["@import"]))a=a.includes('"')||a.includes("'")?a:`"${a}"`,t.sheet.insertRule(`@import ${a};`,s++);delete i["@import"]}Y1(i,[],[],e,s=>{t.rules.global.apply(s)})}}return""};return mE(r,{toString:r})}),sie=dh(),aie=(e,t)=>sie(e,()=>n=>{const r=`${Tl(e.prefix)}k-${hd(n)}`,i=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const o=[];Y1(n,[],[],e,a=>o.push(a));const s=`@keyframes ${r}{${o.join("")}}`;t.rules.global.apply(s)}return r};return mE(i,{get name(){return i()},toString:i})}),lie=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Tl(this.prefix)+Tl(this.scale)+this.token}toString(){return this.computedValue}},cie=dh(),uie=(e,t)=>cie(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const i=`.${n=(n=typeof n=="string"?n:"")||`${Tl(e.prefix)}t-${hd(r)}`}`,o={},s=[];for(const c in r){o[c]={};for(const u in r[c]){const d=`--${Tl(e.prefix)}${c}-${u}`,f=FH(String(r[c][u]),e.prefix,c);o[c][u]=new lie(u,f,c,e.prefix),s.push(`${d}:${f}`)}}const a=()=>{if(s.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const c=`${r===e.theme?":root,":""}.${n}{${s.join(";")}}`;t.rules.themed.apply(c)}return n};return{...o,get className(){return a()},selector:i,toString:a}}),die=dh(),J$,fie=dh(),BH=e=>{const t=(n=>{let r=!1;const i=die(n,o=>{r=!0;const s="prefix"in(o=typeof o=="object"&&o||{})?String(o.prefix):"",a=typeof o.media=="object"&&o.media||{},c=typeof o.root=="object"?o.root||null:globalThis.document||null,u=typeof o.theme=="object"&&o.theme||{},d={prefix:s,media:a,theme:u,themeMap:typeof o.themeMap=="object"&&o.themeMap||{...Hre},utils:typeof o.utils=="object"&&o.utils||{}},f=Xre(c),h={css:X$(d,f),globalCss:oie(d,f),keyframes:aie(d,f),createTheme:uie(d,f),reset(){f.reset(),h.theme.toString()},theme:{},sheet:f,config:d,prefix:s,getCssText:f.toString,toString:f.toString};return String(h.theme=h.createTheme(u)),h});return r||i.reset(),i})(e);return t.styled=(({config:n,sheet:r})=>fie(n,()=>{const i=X$(n,r);return(...o)=>{const s=i(...o),a=s[fd].type,c=Ae.forwardRef((u,d)=>{const f=u&&u.as||a,{props:h,deferredInjector:p}=s(u);return delete h.as,h.ref=d,p?Ae.createElement(Ae.Fragment,null,Ae.createElement(f,h),Ae.createElement(p,null)):Ae.createElement(f,h)});return c.className=s.className,c.displayName=`Styled.${a.displayName||a.name||a}`,c.selector=s.selector,c.toString=()=>s.selector,c[fd]=s[fd],c}}))(t),t},gE=()=>J$||(J$=BH()),hie=(...e)=>gE().createTheme(...e),fn=(...e)=>gE().keyframes(...e),wi=(...e)=>gE().styled(...e);const pie="/assets/Inter-Bold.22097670.woff2",mie="/assets/Inter-Medium.8458f8af.woff2",gie="/assets/Inter-Regular.b6f9db9e.woff2",vie="/assets/Inter-SemiBold.8e52a861.woff2",yie="/assets/RedHatDisplay-Bold.5c7e4dfa.ttf",bie="/assets/RedHatDisplay-Regular.487129e0.ttf",xie="/assets/RedHatDisplay-SemiBold.4fb99fdf.ttf",Cie="/assets/SourceSansPro-Bold.b585c58b.ttf",wie="/assets/SourceSansPro-Regular.d0b6bd4f.ttf",Sie="/assets/SourceSansPro-SemiBold.f7b75c63.ttf",fa=hie("dark",{colors:{backgroundColor:"#080808",cardBackgroundColor:"#0d0d0d",disabledBackgroundColor:"#1A1A1A",mobileTopBarBackgroundColor:"rgba(13,13,13,0.7)",mobileBottomBarBackgroundColor:"rgba(8,8,8,0.9)",followsYouBackgroundColor:"#1e1e1e",overlayDialog:"rgba(0,0,0,0.7)",placeholderColor:"$neutral700",borderColor:"$neutral800",hrColor:"$neutral900",titleColor:"$neutral200",textColor:"$neutral200",linkColor:"rgb(96, 165, 250)",linkColorHover:"rgba(96,165,250, 0.6)",linkColorUnderline:"rgba(59,133,188,0.3)",buttonPrimaryText:"$neutral900",radioBackground:"$neutral800",radioIndicator:"$yellow600",radioBorder:"$neutral700",subTextColor:"$neutral500",handleColor:"$neutral500",subTextColorHover:"$neutral700",primfeedPostLikeHover:"$destructive400",primfeedPostLikeShadow:"$destructive900",primfeedPostLiked:"$destructive700",primfeedPostBookmarkHover:"$yellow600",primfeedPostBookmarkShadow:"$yellow900",primfeedPostBookmarked:"$yellow600",logoColor:"$textColor",logoSubColor:"$logoColor",hoveringItem:"$neutral800",hoveringCard:"$neutral600",actionTextColor:"$neutral500",actionHoverColor:"$neutral700",dropdownDangerColor:"$destructive100",dropdownDangerBackgroundColor:"$destructive900",buttonTransparentHover:"$neutral500",buttonSoftColor:"$textColor",buttonSoftBackgroundColor:"$neutral800",buttonSoftBackgroundColorHover:"$neutral700",buttonWhiteBackgroundColor:"$backgroundColor",buttonWhiteBackgroundColorHover:"$cardBackgroundColor",buttonShowMoreBackgroundColor:"$backgroundColor",buttonShowMoreBackgroundColorHover:"$cardBackgroundColor",inputBackgroundColor:"$cardBackgroundColor",inputBackgroundColorDisabled:"$neutral700",createPostBackgroundDisabled:"$neutral900",buttonPrimaryColor:"$neutral900",buttonPrimaryBackgroundColor:"$yellow300",buttonPrimaryBackgroundColorHover:"$yellow400",buttonDangerColor:"$textColor",buttonDangerBorderColor:"$destructive900",buttonDangerBackgroundColor:"$destructive800",buttonSoftDangerColor:"$destructive400",buttonSoftDangerBorderColor:"rgba(127,29,29,0.30)",buttonSoftDangerBackgroundColor:"rgba(127,29,29,0.10)",buttonSoftDangerBackgroundColorHover:"rgba(127,29,29,0.30)",primfeedGrayButtonBorder:"$neutral800",primfeedGrayButtonBackground:"$neutral900",primfeedGrayButtonBackgroundHover:"$neutral950",uploadBackgroundColorHover:"$neutral700",eventIconColor:"$textColor",tabulationBackgroundColorHover:"$neutral900",tabulationShadowActive:"$yellow500",sliderRange:"$neutral400",sliderTrack:"$neutral800",userVerifiedBackground:"rgb(2,154,230)",userVerifiedBorder:"rgba(2,154,230,0.35)",userVerifiedColor:"white",entityVerifiedBackground:"rgb(252,185,0)",entityVerifiedBorder:"rgba(252,168,0,0.35)",entityVerifiedColor:"$backgroundColor",commentBackgroundColor:"$neutral800",commentSelectedBackgroundColor:"rgba(252,168,0,0.35)",pfPremiumBackgroundColor:"rgba(2,154,230,0.20)",mentionTextColor:"rgb(96, 165, 250)",mentionTextHoverColor:"rgba(96,165,250,0.6)",mentionBackgroundColor:"rgba(96, 165, 250, 0.1)",badgeDangerBorderColor:"rgba(127,29,29,0.50)",badgeDangerBackgroundColor:"rgba(127,29,29,0.30)",badgeDangerTextColor:"$destructive500",badgeYellowBackgroundColor:"rgba(245,158,11, 0.2)",badgeYellowBorderColor:"rgba(245,158,11, 0.5)",badgeYellowTextColor:"rgba(245,158,11, 1)",badgeSuccessBorderColor:"rgba(22,101,52,0.5)",badgeSuccessBackgroundColor:"rgba(22,101,52,0.2)",badgeSuccessTextColor:"$success500",badgeGrayBorderColor:"$neutral700",badgeGrayBackgroundColor:"$neutral900",badgeGrayTextColor:"$textColor",slIconInventoryObject:"orange",slIconInventoryTexture:"$success600",slIconInventoryLandmark:"$destructive500",slIconInventoryNotecard:"$textColor",progressBackground:"$neutral700",memberStatusMissedRequirement:"$neutral800",memberStatusActive:"$success800",memberStatusMissedDeadline:"$destructive800",memberStatusAway:"$amber900",memberStatusAwayColor:"$textColor",mailboxImportantBackgroundColor:"$badgeYellowBackgroundColor",mailboxImportantIconColor:"$badgeYellowTextColor"}}),{styled:de,css:RGe,globalCss:Eie,config:Tie}=BH({theme:{colors:{backgroundColor:"$neutral50",cardBackgroundColor:"white",followsYouBackgroundColor:"#f6f6f6",mobileTopBarBackgroundColor:"rgba(255,255,255,0.7)",mobileBottomBarBackgroundColor:"rgba(255,255,255,0.9)",overlayDialog:"rgb(0, 0, 0, 0.6)",disabledColor:"$neutral400",linkColor:"$primary500",linkColorHover:"$primary800",linkColorUnderline:"rgba(59,133,188,0.3)",textColor:"$neutral800",titleColor:"$yellowBlack",hoveringItem:"$gray100",hoveringCard:"$gray300",borderColor:"$neutral200",hrColor:"$neutral200",actionTextColor:"$neutral400",actionHoverColor:"$neutral700",disabledBackgroundColor:"$gray100",placeholderColor:"$neutral300",dropdownDangerColor:"$destructive700",dropdownDangerBackgroundColor:"$destructive100",buttonSoftColor:"$textColor",buttonSoftBackgroundColor:"$gray200",buttonSoftBackgroundColorHover:"$gray100",buttonTransparentHover:"$gray900",buttonPrimaryColor:"$neutral900",buttonPrimaryBackgroundColor:"$yellow300",buttonPrimaryBackgroundColorHover:"$yellow400",radioBackground:"$cardBackgroundColor",radioIndicator:"$yellow400",radioBorder:"$neutral300",handleColor:"$neutral500",subTextColor:"$neutral500",subTextColorHover:"$neutral700",primfeedPostButtons:"$neutral500",primfeedPostLikeHover:"$destructive400",primfeedPostLikeShadow:"$destructive100",primfeedPostLiked:"$destructive600",primfeedPostBookmarkHover:"$yellow400",primfeedPostBookmarkShadow:"$yellow100",primfeedPostBookmarked:"$yellow500",primfeedGrayButtonBorder:"$neutral200",primfeedGrayButtonBackground:"$neutral50",primfeedGrayButtonBackgroundHover:"$neutral100",buttonDangerColor:"$destructive800",buttonDangerBorderColor:"$destructive200",buttonDangerBackgroundColor:"$destructive100",buttonWhiteBorderColor:"white",buttonWhiteBackgroundColor:"white",buttonWhiteBackgroundColorHover:"$gray50",buttonShowMoreBackgroundColor:"$gray50",buttonShowMoreBackgroundColorHover:"$gray100",buttonSoftDangerColor:"$destructive700",buttonSoftDangerBorderColor:"$destructive200",buttonSoftDangerBackgroundColor:"$destructive100",buttonSoftDangerBackgroundColorHover:"$destructive200",inputBackgroundColor:"white",inputBackgroundColorDisabled:"$gray200",createPostBackgroundDisabled:"$neutral100",uploadBackgroundColorHover:"$neutral200",eventIconColor:"$textColor",tabulationBackgroundColorHover:"$neutral100",tabulationShadowActive:"$yellow400",sliderRange:"$neutral400",sliderTrack:"$neutral100",logoColor:"$textColor",logoSubColor:"$logoColor",userVerifiedBackground:"rgb(2,154,230)",userVerifiedBorder:"rgba(2,154,230,0.35)",userVerifiedColor:"white",pfPremiumBackgroundColor:"rgba(2,154,230,0.10)",entityVerifiedBackground:"rgb(230,168,69)",entityVerifiedBorder:"rgba(230,168,69,0.35)",entityVerifiedColor:"$backgroundColor",commentBackgroundColor:"$gray100",commentSelectedBackgroundColor:"$yellow100",mentionTextColor:"rgb(96, 165, 250)",mentionTextHoverColor:"$primary500",mentionBackgroundColor:"rgba(96, 165, 250, 0.1)",gray50:"#f9fafb",gray100:"#f3f4f6",gray200:"#e5e7eb",gray300:"#d1d5db",gray400:"#9ca3af",gray500:"#6b7280",gray600:"#4b5563",gray700:"#374151",gray800:"#1f2937",gray900:"#111827",neutral50:"#fafafa",neutral100:"#f5f5f5",neutral200:"#e5e5e5",neutral300:"#d4d4d4",neutral400:"#a3a3a3",neutral500:"#737373",neutral600:"#525252",neutral700:"#404040",neutral800:"#262626",neutral900:"#171717",neutral950:"#0a0a0a",primary50:"#f3f7fc",primary100:"#e6eff8",primary200:"#c8deef",primary300:"#97c1e2",primary400:"#5fa1d1",primary500:"#3b85bc",primary600:"#2a6a9f",primary700:"#235581",primary800:"#21496b",primary900:"#1f3c57",success50:"#f0fdf4",success100:"#dcfce7",success200:"#bbf7d0",success300:"#86efac",success400:"#4ade80",success500:"#22c55e",success600:"#16a34a",success700:"#15803d",success800:"#166534",emerald50:"#ecfdf5",emerald100:"#d1fae5",emerald200:"#a7f3d0",emerald300:"#6ee7b7",emerald400:"#34d399",emerald500:"#10b981",emerald600:"#059669",emerald700:"#047857",emerald800:"#065f46",emerald900:"#064e3b",emerald950:"#022c22",amber50:"#fffbeb",amber100:"#fef3c7",amber200:"#fde68a",amber300:"#fcd34d",amber400:"#fbbf24",amber500:"#f59e0b",amber600:"#d97706",amber700:"#b45309",amber800:"#92400e",amber900:"#78350f",yellowBlack:"#191815",yellow50:"#fffbeb",yellow100:"#fdf3c8",yellow200:"#fbe48c",yellow300:"#fad14f",yellow400:"#f8bc27",yellow500:"#f29b0e",yellow600:"#d67509",yellow700:"#b2520b",yellow800:"#903f10",yellow900:"#773410",yellow950:"#441904",sky50:"#f0f9ff",sky100:"#e0f2fe",sky200:"#bae6fd",sky300:"#7dd3fc",sky400:"#38bdf8",sky500:"#0ea5e9",sky600:"#0284c7",sky700:"#0369a1",sky800:"#075985",sky900:"#0c4a6e",sky950:"#082f49",destructive50:"#fef2f2",destructive100:"#fee2e2",destructive200:"#fecaca",destructive300:"#fca5a5",destructive400:"#f87171",destructive500:"#ef4444",destructive600:"#dc2626",destructive700:"#b91c1c",destructive800:"#991b1b",destructive900:"#7f1d1d",premium50:"#fbf6f1",premium100:"#f7e9dd",premium200:"#edd0bb",premium300:"#e2b08f",premium400:"#d58962",premium500:"#cc6c43",premium600:"#be5738",statusAccepted:"$success300",statusInProgress:"$amber300",statusWaitingForReview:"$amber300",statusRejected:"$destructive300",statusMissedDeadline:"$destructive300",statusAcceptedHover:"$success400",statusInProgressHover:"$amber400",statusWaitingForReviewHover:"$amber400",statusRejectedHover:"$destructive400",statusMissedDeadlineHover:"$destructive400",badgeDangerBorderColor:"$destructive200",badgeDangerBackgroundColor:"$destructive100",badgeDangerTextColor:"$destructive700",badgeYellowBackgroundColor:"$amber100",badgeYellowBorderColor:"$amber200",badgeYellowTextColor:"$amber700",badgeSuccessBorderColor:"$success200",badgeSuccessBackgroundColor:"$success50",badgeSuccessTextColor:"$success700",badgeGrayBorderColor:"$gray200",badgeGrayBackgroundColor:"$gray50",badgeGrayTextColor:"$gray700",slIconInventoryObject:"orange",slIconInventoryTexture:"$success600",slIconInventoryLandmark:"red",slIconInventoryNotecard:"$textColor",progressBackground:"$neutral300",memberStatusMissedRequirement:"$neutral600",memberStatusActive:"$success600",memberStatusMissedDeadline:"$destructive600",memberStatusAway:"$amber200",memberStatusAwayColor:"$amber700",mailboxImportantBackgroundColor:"$badgeYellowBackgroundColor",mailboxImportantIconColor:"$badgeYellowTextColor"},space:{1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"40px",10:"48px",11:"64px",12:"80px",13:"96px",14:"128px",15:"160px",16:"192px",verifiedMargin:"6px"},fonts:{recoleta:"Recoleta, apple-system, system-ui, sans-serif",system:"system-ui, -apple-system, apple-system, Roboto, Helvetica, Arial, sans-serif",sourceSansPro:"'Source Sans Pro', apple-system, system-ui, sans-serif",header:"$redHatDisplay",inter:"'Inter', apple-system, system-ui, sans-serif",redHatDisplay:"'Red Hat Display', apple-system, system-ui, sans-serif"},fontSizes:{psmall:"0.75rem",pmedium:"0.875rem",plarge:"15px",h4:"1.25rem",h3:"1.5rem",h2:"1.75rem",h1:"2rem",dsmall:"2.5rem",dlarge:"3.5rem"},fontWeights:{light:300,normal:400,medium:500,semiBold:600,bold:700},shadows:{xsmall:"0px 1px 2px rgba(16, 24, 40, 0.05)",small:"0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px -1px rgba(16, 24, 40, 0.1)",medium:"0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0, 0, 0, 0.1)",large:"0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -4px rgba(0, 0, 0, 0.1)",xlarge:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 8px 10px -6px rgba(0, 0, 0, 0.1)",xxlarge:"0px 25px 50px -12px rgba(0, 0, 0, 0.25)"}},media:{xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 992px)",lg:"(max-width: 1200px)"},utils:{m:e=>({margin:e}),mt:e=>({marginTop:e}),mr:e=>({marginRight:e}),mb:e=>({marginBottom:e}),ml:e=>({marginLeft:e}),mx:e=>({marginLeft:e,marginRight:e}),my:e=>({marginTop:e,marginBottom:e}),p:e=>({padding:e}),pt:e=>({paddingTop:e}),pr:e=>({paddingRight:e}),pb:e=>({paddingBottom:e}),pl:e=>({paddingLeft:e}),px:e=>({paddingLeft:e,paddingRight:e}),py:e=>({paddingTop:e,paddingBottom:e})}}),kie={"*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *))":{all:"unset","-moz-text-size-adjust":"none","-webkit-text-size-adjust":"none",textSizeAdjust:"none",display:"revert"},"*, *::before, *::after":{boxSizing:"border-box"},"a, button":{cursor:"revert"},"ol, ul, menu":{listStyle:"inside",marginLeft:"$4"},table:{borderCollapse:"collapse"},"input, textarea":{"-webkit-user-select":"auto"},textarea:{whiteSpace:"revert"},meter:{"-webkit-appearance":"revert",appearance:"revert"},":where([hidden])":{display:"none"},":where([contenteditable]:not([contenteditable='false']))":{"-moz-user-modify":"read-write","-webkit-user-modify":"read-write",overflowWrap:"break-word","-webkit-line-break":"after-white-space","-webkit-user-select":"auto"},":where([draggable='true'])":{"-webkit-user-drag":"element"},em:{fontStyle:"italic"},u:{textDecoration:"underline"},strong:{fontWeight:"$bold"},'a:not("no-style")':{color:"$linkColor",textDecoration:"underline"}},_ie={"@font-face":[{fontFamily:"Source Sans Pro",src:"url("+wie+") format('truetype')",fontWeight:400,fontStyle:"normal"},{fontFamily:"Source Sans Pro",src:"url("+Sie+") format('truetype')",fontWeight:600,fontStyle:"normal"},{fontFamily:"Source Sans Pro",src:"url("+Cie+") format('truetype')",fontWeight:700,fontStyle:"normal"},{fontFamily:"Red Hat Display",src:"url("+bie+") format('truetype')",fontWeight:400,fontStyle:"normal"},{fontFamily:"Red Hat Display",src:"url("+xie+") format('truetype')",fontWeight:600,fontStyle:"normal"},{fontFamily:"Red Hat Display",src:"url("+yie+") format('truetype')",fontWeight:700,fontStyle:"normal"},{fontFamily:"Inter",src:"url("+gie+") format('woff2')",fontWeight:400,fontStyle:"normal"},{fontFamily:"Inter",src:"url("+mie+") format('woff2')",fontWeight:500,fontStyle:"normal"},{fontFamily:"Inter",src:"url("+vie+") format('woff2')",fontWeight:600,fontStyle:"normal"},{fontFamily:"Inter",src:"url("+pie+") format('woff2')",fontWeight:700,fontStyle:"normal"}]},Aie={"h1, h2, h3, h4":{fontFamily:"$redHatDisplay",fontWeight:700,color:"$titleColor !important"},h1:{fontSize:"$h1"},h2:{fontSize:"$h2"},h3:{fontSize:"$h3"},h4:{fontSize:"$h4"}},$ie=Eie({...kie,..._ie,...Aie,body:{backgroundColor:"$backgroundColor",fontFamily:"$system",fontWeight:"$normal",color:"$textColor",lineHeight:1.4,colorScheme:"light",fontSize:14,"-webkit-font-smoothing":"antialiased",overflowY:"scroll",paddingTop:"env(safe-area-inset-top)","@sm":{backgroundColor:"$cardBackgroundColor"}},"body.dark":{colorScheme:"dark"},".tiptap p.is-editor-empty:first-child::before":{color:"$subTextColor",content:"attr(data-placeholder)",float:"left",height:0,pointerEvents:"none"},"p a":{position:"relative",color:"$linkColor",transition:"0.2s","&:hover":{transition:"0.2s",color:"$linkColorHover","&:after":{backgroundColor:"$linkColorUnderline"}},"&:after":{transition:"0.2s",content:"",position:"absolute",left:0,right:0,bottom:-1,height:2,backgroundColor:"$linkColorUnderline",zIndex:-1}},".Canny_BadgeContainer .Canny_Badge":{position:"absolute",top:0,right:2,borderRadius:10,backgroundColor:"red",padding:3,border:"1px solid $borderColor"}}),ce=de("div",{variants:{type:{textEllipsis:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}});var HH={prefix:"far",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48C0 21.5 21.5 0 48 0l0 48V441.4l130.1-92.9c8.3-6 19.6-6 27.9 0L336 441.4V48H48V0H336c26.5 0 48 21.5 48 48V488c0 9-5 17.2-13 21.3s-17.6 3.4-24.9-1.8L192 397.5 37.9 507.5c-7.3 5.2-16.9 5.9-24.9 1.8S0 497 0 488V48z"]},zH={prefix:"far",iconName:"user",icon:[448,512,[128100,62144],"f007","M304 128a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM49.3 464H398.7c-8.9-63.3-63.3-112-129-112H178.3c-65.7 0-120.1 48.7-129 112zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3z"]},Die={prefix:"far",iconName:"image",icon:[512,512,[],"f03e","M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},vE={prefix:"far",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"]},Oie={prefix:"far",iconName:"scroll",icon:[576,512,[128220],"f70e","M48 112c0-17.7 14.3-32 32-32s32 14.3 32 32V400c0 44.2 35.8 80 80 80H496c44.2 0 80-35.8 80-80V352c0-26.5-21.5-48-48-48h-.6-.6-.6-.6-.6-.6H524h-.6-.6-.6-.6-.6-.6-.6-.6H519h-.6-.6-.6-.6-.5-.6-.5-.6-.5-.5H513h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H507h-.5H506h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H499h-.5H498h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H487h-.5H486h-.5H485h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H456h-.5H455h-.5H454h-.5H453h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H441h-.5H440h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H431h-.5H430h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H423h-.5H422h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H415h-.5H414h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H407h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H400h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H393h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H386h-.5H385h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H378h-.5H377h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H370h-.5H369h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H360h-.5H359h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H347h-.5H346h-.5H345h-.5H344h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H315h-.5H314h-.5H313h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H302h-.5H301h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H294h-.5H293h-.5-.5-.5-.5-.5-.5-.5-.5-.5-.5H287h-.5-.5-.5-.5-.5-.5-.5-.6-.6-.6H281h-.6-.6-.6-.6-.6-.6-.6-.6H276h-.6-.6-.6-.6-.6-.6H272c-26.5 0-48 21.5-48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V112c0-11.4-2.4-22.2-6.7-32H400c17.7 0 32 14.3 32 32V272h48V112c0-44.2-35.8-80-80-80H80C35.8 32 0 67.8 0 112v48c0 26.5 21.5 48 48 48H80V160H48V112zM496 432H265.3c4.3-9.8 6.7-20.6 6.7-32V352h0 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .6 .5 .6 .5 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 .6 0v48c0 17.7-14.3 32-32 32z"]},Pie={prefix:"far",iconName:"list-dropdown",icon:[512,512,[],"e1cf","M48 192V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V192H48zM0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm436.7 0H363.3c-7.1 0-10.7 8.6-5.7 13.7l36.7 36.7c3.1 3.1 8.2 3.1 11.3 0l36.7-36.7c5-5 1.5-13.7-5.7-13.7zM128 232H384c13.3 0 24 10.7 24 24s-10.7 24-24 24H128c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 96H384c13.3 0 24 10.7 24 24s-10.7 24-24 24H128c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},Rie={prefix:"far",iconName:"calendar-lines-pen",icon:[576,512,[],"e472","M128 0c13.3 0 24 10.7 24 24V64H296V24c0-13.3 10.7-24 24-24s24 10.7 24 24V64h40c35.3 0 64 28.7 64 64v16 48H400 384 48V448c0 8.8 7.2 16 16 16H262.5l-5.1 20.2c-2.3 9.4-1.8 19 1.4 27.8H64c-35.3 0-64-28.7-64-64V192 144 128C0 92.7 28.7 64 64 64h40V24c0-13.3 10.7-24 24-24zm-8 256H296c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24zM96 376c0-13.3 10.7-24 24-24H232c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z"]},Mie={prefix:"far",iconName:"arrow-right",icon:[448,512,[8594],"f061","M440.6 273.4c4.7-4.5 7.4-10.8 7.4-17.4s-2.7-12.8-7.4-17.4l-176-168c-9.6-9.2-24.8-8.8-33.9 .8s-8.8 24.8 .8 33.9L364.1 232 24 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l340.1 0L231.4 406.6c-9.6 9.2-9.9 24.3-.8 33.9s24.3 9.9 33.9 .8l176-168z"]},UH={prefix:"far",iconName:"square-poll-horizontal",icon:[448,512,["poll-h"],"f682","M400 96c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320zM384 32c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0zM256 160c0 13.3-10.7 24-24 24l-112 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l112 0c13.3 0 24 10.7 24 24zm72 72c13.3 0 24 10.7 24 24s-10.7 24-24 24l-208 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l208 0zM192 352c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24z"]},Ud={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},Iie={prefix:"far",iconName:"house-blank",icon:[576,512,["home-blank"],"e487","M303.5 5.7c-9-7.6-22.1-7.6-31.1 0l-264 224c-10.1 8.6-11.3 23.7-2.8 33.8s23.7 11.3 33.8 2.8L64 245.5V432c0 44.2 35.8 80 80 80H432c44.2 0 80-35.8 80-80V245.5l24.5 20.8c10.1 8.6 25.3 7.3 33.8-2.8s7.3-25.3-2.8-33.8l-264-224zM464 204.8V432c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V204.8L288 55.5 464 204.8z"]},Lie={prefix:"far",iconName:"arrow-left",icon:[448,512,[8592],"f060","M7.4 273.4C2.7 268.8 0 262.6 0 256s2.7-12.8 7.4-17.4l176-168c9.6-9.2 24.8-8.8 33.9 .8s8.8 24.8-.8 33.9L83.9 232 424 232c13.3 0 24 10.7 24 24s-10.7 24-24 24L83.9 280 216.6 406.6c9.6 9.2 9.9 24.3 .8 33.9s-24.3 9.9-33.9 .8l-176-168z"]},Xx={prefix:"far",iconName:"calendar-clock",icon:[576,512,["calendar-time"],"e0d2","M128 0c13.3 0 24 10.7 24 24V64H296V24c0-13.3 10.7-24 24-24s24 10.7 24 24V64h40c35.3 0 64 28.7 64 64v16 48H432 400 288 48V448c0 8.8 7.2 16 16 16H284.5c12.3 18.8 28 35.1 46.3 48H64c-35.3 0-64-28.7-64-64V192 144 128C0 92.7 28.7 64 64 64h40V24c0-13.3 10.7-24 24-24zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-80c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H448V304c0-8.8-7.2-16-16-16z"]},Zx={prefix:"far",iconName:"calendar-plus",icon:[512,512,[],"f271","M184 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H96c-35.3 0-64 28.7-64 64v16 48V448c0 35.3 28.7 64 64 64H416c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H376V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H184V24zM80 192H432V448c0 8.8-7.2 16-16 16H96c-8.8 0-16-7.2-16-16V192zm176 40c-13.3 0-24 10.7-24 24v48H184c-13.3 0-24 10.7-24 24s10.7 24 24 24h48v48c0 13.3 10.7 24 24 24s24-10.7 24-24V352h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V256c0-13.3-10.7-24-24-24z"]},yE={prefix:"far",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M256 0c17 0 33.6 1.7 49.8 4.8c7.9 1.5 21.8 6.1 29.4 20.1c2 3.7 3.6 7.6 4.6 11.8l9.3 38.5C350.5 81 360.3 86.7 366 85l38-11.2c4-1.2 8.1-1.8 12.2-1.9c16.1-.5 27 9.4 32.3 15.4c22.1 25.1 39.1 54.6 49.9 86.3c2.6 7.6 5.6 21.8-2.7 35.4c-2.2 3.6-4.9 7-8 10L459 246.3c-4.2 4-4.2 15.5 0 19.5l28.7 27.3c3.1 3 5.8 6.4 8 10c8.2 13.6 5.2 27.8 2.7 35.4c-10.8 31.7-27.8 61.1-49.9 86.3c-5.3 6-16.3 15.9-32.3 15.4c-4.1-.1-8.2-.8-12.2-1.9L366 427c-5.7-1.7-15.5 4-16.9 9.8l-9.3 38.5c-1 4.2-2.6 8.2-4.6 11.8c-7.7 14-21.6 18.5-29.4 20.1C289.6 510.3 273 512 256 512s-33.6-1.7-49.8-4.8c-7.9-1.5-21.8-6.1-29.4-20.1c-2-3.7-3.6-7.6-4.6-11.8l-9.3-38.5c-1.4-5.8-11.2-11.5-16.9-9.8l-38 11.2c-4 1.2-8.1 1.8-12.2 1.9c-16.1 .5-27-9.4-32.3-15.4c-22-25.1-39.1-54.6-49.9-86.3c-2.6-7.6-5.6-21.8 2.7-35.4c2.2-3.6 4.9-7 8-10L53 265.7c4.2-4 4.2-15.5 0-19.5L24.2 218.9c-3.1-3-5.8-6.4-8-10C8 195.3 11 181.1 13.6 173.6c10.8-31.7 27.8-61.1 49.9-86.3c5.3-6 16.3-15.9 32.3-15.4c4.1 .1 8.2 .8 12.2 1.9L146 85c5.7 1.7 15.5-4 16.9-9.8l9.3-38.5c1-4.2 2.6-8.2 4.6-11.8c7.7-14 21.6-18.5 29.4-20.1C222.4 1.7 239 0 256 0zM218.1 51.4l-8.5 35.1c-7.8 32.3-45.3 53.9-77.2 44.6L97.9 120.9c-16.5 19.3-29.5 41.7-38 65.7l26.2 24.9c24 22.8 24 66.2 0 89L59.9 325.4c8.5 24 21.5 46.4 38 65.7l34.6-10.2c31.8-9.4 69.4 12.3 77.2 44.6l8.5 35.1c24.6 4.5 51.3 4.5 75.9 0l8.5-35.1c7.8-32.3 45.3-53.9 77.2-44.6l34.6 10.2c16.5-19.3 29.5-41.7 38-65.7l-26.2-24.9c-24-22.8-24-66.2 0-89l26.2-24.9c-8.5-24-21.5-46.4-38-65.7l-34.6 10.2c-31.8 9.4-69.4-12.3-77.2-44.6l-8.5-35.1c-24.6-4.5-51.3-4.5-75.9 0zM208 256a48 48 0 1 0 96 0 48 48 0 1 0 -96 0zm48 96a96 96 0 1 1 0-192 96 96 0 1 1 0 192z"]},Nie={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},Fie={prefix:"far",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M303.5 5.7c-9-7.6-22.1-7.6-31.1 0l-264 224c-10.1 8.6-11.3 23.7-2.8 33.8s23.7 11.3 33.8 2.8L64 245.5V432c0 44.2 35.8 80 80 80H432c44.2 0 80-35.8 80-80V245.5l24.5 20.8c10.1 8.6 25.3 7.3 33.8-2.8s7.3-25.3-2.8-33.8l-264-224zM112 432V204.8L288 55.5 464 204.8V432c0 17.7-14.3 32-32 32H384V312c0-22.1-17.9-40-40-40H232c-22.1 0-40 17.9-40 40V464H144c-17.7 0-32-14.3-32-32zm128 32V320h96V464H240z"]},Bie=Fie,Sy={prefix:"far",iconName:"angle-down",icon:[448,512,[8964],"f107","M241 337c-9.4 9.4-24.6 9.4-33.9 0L47 177c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l143 143L367 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L241 337z"]},Hie={prefix:"far",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M432 256a48 48 0 1 1 -96 0 48 48 0 1 1 96 0zm-160 0a48 48 0 1 1 -96 0 48 48 0 1 1 96 0zM64 304a48 48 0 1 1 0-96 48 48 0 1 1 0 96z"]},VH={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32V49.9C119.5 61.4 64 124.2 64 200v33.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416H424c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4V200c0-75.8-55.5-138.6-128-150.1V32c0-17.7-14.3-32-32-32zm0 96h8c57.4 0 104 46.6 104 104v33.4c0 47.9 13.9 94.6 39.7 134.6H72.3C98.1 328 112 281.3 112 233.4V200c0-57.4 46.6-104 104-104h8zm64 352H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z"]},zie={prefix:"far",iconName:"timer",icon:[512,512,[],"e29e","M256 0c-13.3 0-24 10.7-24 24v80c0 13.3 10.7 24 24 24s24-10.7 24-24V49.4C383.6 61.3 464 149.2 464 256c0 114.9-93.1 208-208 208S48 370.9 48 256c0-43.3 13.2-83.5 35.8-116.8c7.5-11 4.6-25.9-6.4-33.3s-25.9-4.6-33.3 6.4C16.3 153.2 0 202.7 0 256C0 397.4 114.6 512 256 512s256-114.6 256-256S397.4 0 256 0zM193 159c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l80 80c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80z"]},jH={prefix:"far",iconName:"chevron-down",icon:[512,512,[],"f078","M239 401c9.4 9.4 24.6 9.4 33.9 0L465 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-175 175L81 175c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L239 401z"]},eD={prefix:"far",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M248 72c0-13.3-10.7-24-24-24s-24 10.7-24 24V232H40c-13.3 0-24 10.7-24 24s10.7 24 24 24H200V440c0 13.3 10.7 24 24 24s24-10.7 24-24V280H408c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V72z"]},Ul={prefix:"far",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"]},WH={prefix:"far",iconName:"angle-up",icon:[448,512,[8963],"f106","M207 143c9.4-9.4 24.6-9.4 33.9 0L401 303c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-143-143L81 337c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L207 143z"]},Uie={prefix:"far",iconName:"face-smile",icon:[512,512,[128578,"smile"],"f118","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm177.6 62.1C192.8 334.5 218.8 352 256 352s63.2-17.5 78.4-33.9c9-9.7 24.2-10.4 33.9-1.4s10.4 24.2 1.4 33.9c-22 23.8-60 49.4-113.6 49.4s-91.7-25.5-113.6-49.4c-9-9.7-8.4-24.9 1.4-33.9s24.9-8.4 33.9 1.4zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Vie={prefix:"far",iconName:"hashtag",icon:[448,512,[62098],"23","M188.7 32.5c13 2.6 21.4 15.2 18.8 28.2L192.5 136h111l16.9-84.7c2.6-13 15.2-21.4 28.2-18.8s21.4 15.2 18.8 28.2L352.5 136H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H342.9L314.1 328H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H304.5l-16.9 84.7c-2.6 13-15.2 21.4-28.2 18.8s-21.4-15.2-18.8-28.2L255.5 376h-111l-16.9 84.7c-2.6 13-15.2 21.4-28.2 18.8s-21.4-15.2-18.8-28.2L95.5 376H24c-13.3 0-24-10.7-24-24s10.7-24 24-24h81.1l28.8-144H56c-13.3 0-24-10.7-24-24s10.7-24 24-24h87.5l16.9-84.7c2.6-13 15.2-21.4 28.2-18.8zM182.9 184L154.1 328h111l28.8-144h-111z"]},bE={prefix:"far",iconName:"calendar",icon:[448,512,[128197,128198],"f133","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"]},jie={prefix:"far",iconName:"circle-plus",icon:[512,512,["plus-circle"],"f055","M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"]},Wie=jie,qH={prefix:"far",iconName:"grip-dots-vertical",icon:[256,512,[],"e411","M64 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM96 416a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},qie={prefix:"far",iconName:"share",icon:[512,512,["arrow-turn-right","mail-forward"],"f064","M288 240H192c-66.2 0-122 44.7-138.8 105.5C49.9 333.1 48 319.3 48 304c0-70.7 57.3-128 128-128H288h24c13.3 0 24-10.7 24-24V128 99.9L456.1 208 336 316.1V288 264c0-13.3-10.7-24-24-24H288zm0 48v48 16c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4s-19 16.6-19 29.2V80v48H240 176C78.8 128 0 206.8 0 304c0 78 38.6 126.2 68.7 152.1c4.1 3.5 8.1 6.6 11.7 9.3c3.2 2.4 6.2 4.4 8.9 6.2c4.5 3 8.3 5.1 10.8 6.5c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-6.8-3.6-13.2-8.3-18.1c-.5-.5-.9-.9-1.4-1.4c-2.4-2.3-5.1-5.1-7.7-8.6c-1.7-2.3-3.4-5-5-7.9c-5.3-9.7-9.5-22.9-9.5-40.2c0-53 43-96 96-96h48 48z"]},KH={prefix:"far",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"]},Kie={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},Gie={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Yie=Gie,Qie={prefix:"fas",iconName:"arrow-right-from-bracket",icon:[512,512,["sign-out"],"f08b","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},Xie={prefix:"fas",iconName:"flag",icon:[448,512,[127988,61725],"f024","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32V64 368 480c0 17.7 14.3 32 32 32s32-14.3 32-32V352l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30V66.1c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L64 48V32z"]},Q0={prefix:"fas",iconName:"feather",icon:[512,512,[129718],"f52d","M278.5 215.6L23 471c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l57-57h68c49.7 0 97.9-14.4 139-41c11.1-7.2 5.5-23-7.8-23c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l81-24.3c2.5-.8 4.8-2.1 6.7-4l22.4-22.4c10.1-10.1 2.9-27.3-11.3-27.3l-32.2 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l112-33.6c4-1.2 7.4-3.9 9.3-7.7C506.4 207.6 512 184.1 512 160c0-41-16.3-80.3-45.3-109.3l-5.5-5.5C432.3 16.3 393 0 352 0s-80.3 16.3-109.3 45.3L139 149C91 197 64 262.1 64 330v55.3L253.6 195.8c6.2-6.2 16.4-6.2 22.6 0c5.4 5.4 6.1 13.6 2.2 19.8z"]},Vd={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},GH={prefix:"fas",iconName:"angle-right",icon:[320,512,[8250],"f105","M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"]},YH={prefix:"fas",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"]},Zie={prefix:"fas",iconName:"wand-magic-sparkles",icon:[576,512,["magic-wand-sparkles"],"e2ca","M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"]},QH={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z"]},Jie={prefix:"fas",iconName:"star",icon:[576,512,[11088,61446],"f005","M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"]},XH={prefix:"fas",iconName:"paper-plane-top",icon:[512,512,["paper-plane-alt","send"],"e20a","M49.9 27.8C15.1 12.7-19.2 50.1-1.2 83.5L68.1 212.2c4.4 8.3 12.6 13.8 21.9 15c0 0 0 0 0 0l176 22c3.4 .4 6 3.3 6 6.7s-2.6 6.3-6 6.7l-176 22s0 0 0 0c-9.3 1.2-17.5 6.8-21.9 15L-1.2 428.5c-18 33.4 16.3 70.8 51.1 55.7L491.8 292.7c32.1-13.9 32.1-59.5 0-73.4L49.9 27.8z"]},ZH={prefix:"fas",iconName:"crown",icon:[576,512,[128081],"f521","M309 106c11.4-7 19-19.7 19-34c0-22.1-17.9-40-40-40s-40 17.9-40 40c0 14.4 7.6 27 19 34L209.7 220.6c-9.1 18.2-32.7 23.4-48.6 10.7L72 160c5-6.7 8-15 8-24c0-22.1-17.9-40-40-40S0 113.9 0 136s17.9 40 40 40c.2 0 .5 0 .7 0L86.4 427.4c5.5 30.4 32 52.6 63 52.6H426.6c30.9 0 57.4-22.1 63-52.6L535.3 176c.2 0 .5 0 .7 0c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40c0 9 3 17.3 8 24l-89.1 71.3c-15.9 12.7-39.5 7.5-48.6-10.7L309 106z"]},eoe={prefix:"fas",iconName:"user-unlock",icon:[640,512,[],"e058","M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c43.6 0 83.6 15.7 114.6 41.7c-.2 2.1-.3 4.2-.3 6.3V480c0 11.7 3.1 22.6 8.6 32H29.7C13.3 512 0 498.7 0 482.3zM496 272v48h16 48 48c17.7 0 32 14.3 32 32V480c0 17.7-14.3 32-32 32H448c-17.7 0-32-14.3-32-32V352c0-17.7 14.3-32 32-32V272c0-44.2 35.8-80 80-80s80 35.8 80 80H560c0-17.7-14.3-32-32-32s-32 14.3-32 32z"]},toe={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},X0=toe,noe={prefix:"fas",iconName:"scroll",icon:[576,512,[128220],"f70e","M0 80v48c0 17.7 14.3 32 32 32H48 96V80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48V384c0 35.3 28.7 64 64 64s64-28.7 64-64v-5.3c0-32.4 26.3-58.7 58.7-58.7H480V128c0-53-43-96-96-96H112zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16H314.7c-14.7 0-26.7 11.9-26.7 26.7V384c0 53-43 96-96 96H368h96z"]},JH={prefix:"fas",iconName:"pause",icon:[320,512,[9208],"f04c","M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z"]},roe={prefix:"fas",iconName:"sort",icon:[320,512,["unsorted"],"f0dc","M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8H32c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z"]},ez={prefix:"fas",iconName:"heart",icon:[512,512,[128153,128154,128155,128156,128420,129293,129294,129505,9829,10084,61578],"f004","M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"]},tz={prefix:"fas",iconName:"square-poll-horizontal",icon:[448,512,["poll-h"],"f682","M448 96c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320zM256 160c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32zm64 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l192 0zM192 352c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32z"]},ioe={prefix:"fas",iconName:"badge-check",icon:[512,512,[],"f336","M256 0c36.8 0 68.8 20.7 84.9 51.1C373.8 41 411 49 437 75s34 63.3 23.9 96.1C491.3 187.2 512 219.2 512 256s-20.7 68.8-51.1 84.9C471 373.8 463 411 437 437s-63.3 34-96.1 23.9C324.8 491.3 292.8 512 256 512s-68.8-20.7-84.9-51.1C138.2 471 101 463 75 437s-34-63.3-23.9-96.1C20.7 324.8 0 292.8 0 256s20.7-68.8 51.1-84.9C41 138.2 49 101 75 75s63.3-34 96.1-23.9C187.2 20.7 219.2 0 256 0zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"]},ooe={prefix:"fas",iconName:"shop",icon:[640,512,["store-alt"],"f54f","M36.8 192H603.2c20.3 0 36.8-16.5 36.8-36.8c0-7.3-2.2-14.4-6.2-20.4L558.2 21.4C549.3 8 534.4 0 518.3 0H121.7c-16 0-31 8-39.9 21.4L6.2 134.7c-4 6.1-6.2 13.2-6.2 20.4C0 175.5 16.5 192 36.8 192zM64 224V384v80c0 26.5 21.5 48 48 48H336c26.5 0 48-21.5 48-48V384 224H320V384H128V224H64zm448 0V480c0 17.7 14.3 32 32 32s32-14.3 32-32V224H512z"]},soe={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Nf=soe,aoe={prefix:"fas",iconName:"camera",icon:[512,512,[62258,"camera-alt"],"f030","M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},Jx={prefix:"fas",iconName:"camera-viewfinder",icon:[512,512,["screenshot"],"e0da","M56 0h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H56c-4.4 0-8 3.6-8 8v80c0 13.3-10.7 24-24 24s-24-10.7-24-24V56C0 25.1 25.1 0 56 0zM376 0h80c30.9 0 56 25.1 56 56v80c0 13.3-10.7 24-24 24s-24-10.7-24-24V56c0-4.4-3.6-8-8-8H376c-13.3 0-24-10.7-24-24s10.7-24 24-24zM48 376v80c0 4.4 3.6 8 8 8h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H56c-30.9 0-56-25.1-56-56V376c0-13.3 10.7-24 24-24s24 10.7 24 24zm464 0v80c0 30.9-25.1 56-56 56H376c-13.3 0-24-10.7-24-24s10.7-24 24-24h80c4.4 0 8-3.6 8-8V376c0-13.3 10.7-24 24-24s24 10.7 24 24zM180 128l6.2-16.4c3.5-9.4 12.5-15.6 22.5-15.6h94.7c10 0 19 6.2 22.5 15.6L332 128h36c26.5 0 48 21.5 48 48V336c0 26.5-21.5 48-48 48H144c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h36zM320 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"]},loe={prefix:"fas",iconName:"badge-dollar",icon:[512,512,[],"f645","M256 0c36.8 0 68.8 20.7 84.9 51.1C373.8 41 411 49 437 75s34 63.3 23.9 96.1C491.3 187.2 512 219.2 512 256s-20.7 68.8-51.1 84.9C471 373.8 463 411 437 437s-63.3 34-96.1 23.9C324.8 491.3 292.8 512 256 512s-68.8-20.7-84.9-51.1C138.2 471 101 463 75 437s-34-63.3-23.9-96.1C20.7 324.8 0 292.8 0 256s20.7-68.8 51.1-84.9C41 138.2 49 101 75 75s63.3-34 96.1-23.9C187.2 20.7 219.2 0 256 0zm20.9 140.4c0-11-9-20-20-20s-20 9-20 20v17.4c-8.8 1.8-17.7 4.8-25.7 9.6c-15 8.9-27.7 24.4-27.6 46.9c.1 21.5 12.6 35.1 26.3 43.4c11.9 7.2 27 11.7 39.1 15.4l1.9 .6c13.9 4.2 24.4 7.6 31.7 12.2c6.1 3.8 7.5 6.8 7.6 11c.1 6.5-2.5 10.4-7.6 13.6c-6 3.7-15.2 5.9-25.1 5.6c-12.7-.4-24.6-4.4-39.7-9.6l0 0 0 0 0 0 0 0c-2.6-.9-5.2-1.8-8-2.7c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c2.2 .7 4.5 1.5 6.8 2.3c9.7 3.3 20.9 7.2 32.8 9.6v18c0 11 9 20 20 20s20-9 20-20V354.4c9.3-1.7 18.6-4.9 26.8-10.1c15.3-9.5 26.8-25.7 26.5-48.1c-.3-21.6-12.4-35.6-26.3-44.3c-12.5-7.9-28.3-12.6-40.8-16.4l-.6-.2c-14.1-4.3-24.6-7.5-31.9-11.9c-6.2-3.7-7-6.3-7-9.3c0-5.1 2.1-8.8 7.9-12.3c6.5-3.8 16-6 25-5.8c10.9 .2 22.9 2.6 35.2 5.8c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-7.8-2.1-16.3-4.1-25.1-5.4V140.4z"]},nz={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},F4={prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},coe={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},uoe={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},rz=uoe,doe={prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z"]},foe={prefix:"fas",iconName:"user-lock",icon:[640,512,[],"f502","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H392.6c-5.4-9.4-8.6-20.3-8.6-32V352c0-2.1 .1-4.2 .3-6.3c-31-26-71-41.7-114.6-41.7H178.3zM528 240c17.7 0 32 14.3 32 32v48H496V272c0-17.7 14.3-32 32-32zm-80 32v48c-17.7 0-32 14.3-32 32V480c0 17.7 14.3 32 32 32H608c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32V272c0-44.2-35.8-80-80-80s-80 35.8-80 80z"]},iz={prefix:"fas",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"]},hoe={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},poe={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},eC={prefix:"fas",iconName:"arrows-retweet",icon:[640,512,["retweet-alt"],"f361","M150.6 73.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L96 173.3V320c0 53 43 96 96 96H304c17.7 0 32-14.3 32-32s-14.3-32-32-32H192c-17.7 0-32-14.3-32-32V173.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96zM336 96c-17.7 0-32 14.3-32 32s14.3 32 32 32H448c17.7 0 32 14.3 32 32V338.7l-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L544 338.7V192c0-53-43-96-96-96H336z"]},moe={prefix:"fas",iconName:"bars-filter",icon:[448,512,[],"e0ad","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM64 256c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32zM288 416c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h64c17.7 0 32 14.3 32 32z"]},goe={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},jd={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},jm={prefix:"fas",iconName:"thumbtack",icon:[384,512,[128204,128392,"thumb-tack"],"f08d","M32 32C32 14.3 46.3 0 64 0H320c17.7 0 32 14.3 32 32s-14.3 32-32 32H290.5l11.4 148.2c36.7 19.9 65.7 53.2 79.5 94.7l1 3c3.3 9.8 1.6 20.5-4.4 28.8s-15.7 13.3-26 13.3H32c-10.3 0-19.9-4.9-26-13.3s-7.7-19.1-4.4-28.8l1-3c13.8-41.5 42.8-74.8 79.5-94.7L93.5 64H64C46.3 64 32 49.7 32 32zM160 384h64v96c0 17.7-14.3 32-32 32s-32-14.3-32-32V384z"]},oz={prefix:"fas",iconName:"calendar",icon:[448,512,[128197,128198],"f133","M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"]},voe={prefix:"fas",iconName:"circle-plus",icon:[512,512,["plus-circle"],"f055","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"]},Pa={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},sz={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},yoe={prefix:"fas",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"]},boe={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},Zp=boe;let xoe={data:""},Coe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||xoe,woe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Soe=/\/\*[^]*?\*\/|  +/g,tD=/\n+/g,kc=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?kc(s,o):o+"{"+kc(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=kc(s,t?t.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=kc.p?kc.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ja={},az=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+az(e[n]);return t}return e},Eoe=(e,t,n,r,i)=>{let o=az(e),s=Ja[o]||(Ja[o]=(c=>{let u=0,d=11;for(;u<c.length;)d=101*d+c.charCodeAt(u++)>>>0;return"go"+d})(o));if(!Ja[s]){let c=o!==e?e:(u=>{let d,f,h=[{}];for(;d=woe.exec(u.replace(Soe,""));)d[4]?h.shift():d[3]?(f=d[3].replace(tD," ").trim(),h.unshift(h[0][f]=h[0][f]||{})):h[0][d[1]]=d[2].replace(tD," ").trim();return h[0]})(e);Ja[s]=kc(i?{["@keyframes "+s]:c}:c,n?"":"."+s)}let a=n&&Ja.g?Ja.g:null;return n&&(Ja.g=Ja[s]),((c,u,d,f)=>{f?u.data=u.data.replace(f,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(Ja[s],t,r,a),s},Toe=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let a=s(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=c?"."+c:a&&typeof a=="object"?a.props?"":kc(a,""):a===!1?"":a}return r+i+(s==null?"":s)},"");function Ey(e){let t=this||{},n=e.call?e(t.p):e;return Eoe(n.unshift?n.raw?Toe(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Coe(t.target),t.g,t.o,t.k)}let lz,tC,nC;Ey.bind({g:1});let kl=Ey.bind({k:1});function koe(e,t,n,r){kc.p=t,lz=e,tC=n,nC=r}function yu(e,t){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),c=a.className||i.className;n.p=Object.assign({theme:tC&&tC()},a),n.o=/ *go\d+/.test(c),a.className=Ey.apply(n,r)+(c?" "+c:""),t&&(a.ref=s);let u=e;return e[0]&&(u=a.as||e,delete a.as),nC&&u[0]&&nC(a),lz(u,a)}return t?t(i):i}}var _oe=e=>typeof e=="function",d3=(e,t)=>_oe(e)?e(t):e,Aoe=(()=>{let e=0;return()=>(++e).toString()})(),cz=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),$oe=20,B4=new Map,Doe=1e3,nD=e=>{if(B4.has(e))return;let t=setTimeout(()=>{B4.delete(e),Wd({type:4,toastId:e})},Doe);B4.set(e,t)},Ooe=e=>{let t=B4.get(e);t&&clearTimeout(t)},rC=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,$oe)};case 1:return t.toast.id&&Ooe(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?rC(e,{type:1,toast:n}):rC(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?nD(r):e.toasts.forEach(o=>{nD(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},H4=[],z4={toasts:[],pausedAt:void 0},Wd=e=>{z4=rC(z4,e),H4.forEach(t=>{t(z4)})},Poe={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Roe=(e={})=>{let[t,n]=y.exports.useState(z4);y.exports.useEffect(()=>(H4.push(n),()=>{let i=H4.indexOf(n);i>-1&&H4.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var o,s;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||(e==null?void 0:e.duration)||Poe[i.type],style:{...e.style,...(s=e[i.type])==null?void 0:s.style,...i.style}}});return{...t,toasts:r}},Moe=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Aoe()}),Wm=e=>(t,n)=>{let r=Moe(t,e,n);return Wd({type:2,toast:r}),r.id},yo=(e,t)=>Wm("blank")(e,t);yo.error=Wm("error");yo.success=Wm("success");yo.loading=Wm("loading");yo.custom=Wm("custom");yo.dismiss=e=>{Wd({type:3,toastId:e})};yo.remove=e=>Wd({type:4,toastId:e});yo.promise=(e,t,n)=>{let r=yo.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(yo.success(d3(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{yo.error(d3(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Ioe=(e,t)=>{Wd({type:1,toast:{id:e,height:t}})},Loe=()=>{Wd({type:5,time:Date.now()})},Noe=e=>{let{toasts:t,pausedAt:n}=Roe(e);y.exports.useEffect(()=>{if(n)return;let o=Date.now(),s=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(c<0){a.visible&&yo.dismiss(a.id);return}return setTimeout(()=>yo.dismiss(a.id),c)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=y.exports.useCallback(()=>{n&&Wd({type:6,time:Date.now()})},[n]),i=y.exports.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:u}=s||{},d=t.filter(p=>(p.position||u)===(o.position||u)&&p.height),f=d.findIndex(p=>p.id===o.id),h=d.filter((p,m)=>m<f&&p.visible).length;return d.filter(p=>p.visible).slice(...a?[h+1]:[0,h]).reduce((p,m)=>p+(m.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:Ioe,startPause:Loe,endPause:r,calculateOffset:i}}},Foe=kl`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,Boe=kl`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,Hoe=kl`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,zoe=yu("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${Foe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${Boe} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${Hoe} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,Uoe=kl`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,Voe=yu("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${Uoe} 1s linear infinite;
`,joe=kl`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,Woe=kl`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,qoe=yu("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${joe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${Woe} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,Koe=yu("div")`
  position: absolute;
`,Goe=yu("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,Yoe=kl`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,Qoe=yu("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${Yoe} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,Xoe=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?y.exports.createElement(Qoe,null,t):t:n==="blank"?null:y.exports.createElement(Goe,null,y.exports.createElement(Voe,{...r}),n!=="loading"&&y.exports.createElement(Koe,null,n==="error"?y.exports.createElement(zoe,{...r}):y.exports.createElement(qoe,{...r})))},Zoe=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,Joe=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,ese="0%{opacity:0;} 100%{opacity:1;}",tse="0%{opacity:1;} 100%{opacity:0;}",nse=yu("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,rse=yu("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,ise=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=cz()?[ese,tse]:[Zoe(n),Joe(n)];return{animation:t?`${kl(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${kl(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ose=y.exports.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?ise(e.position||t||"top-center",e.visible):{opacity:0},o=y.exports.createElement(Xoe,{toast:e}),s=y.exports.createElement(rse,{...e.ariaProps},d3(e.message,e));return y.exports.createElement(nse,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:o,message:s}):y.exports.createElement(y.exports.Fragment,null,o,s))});koe(y.exports.createElement);var sse=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let o=y.exports.useCallback(s=>{if(s){let a=()=>{let c=s.getBoundingClientRect().height;r(e,c)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return y.exports.createElement("div",{ref:o,className:t,style:n},i)},ase=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:cz()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},lse=Ey`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,r2=16,cse=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:c}=Noe(n);return y.exports.createElement("div",{style:{position:"fixed",zIndex:9999,top:r2,left:r2,right:r2,bottom:r2,pointerEvents:"none",...o},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(u=>{let d=u.position||t,f=c.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),h=ase(d,f);return y.exports.createElement(sse,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?lse:"",style:h},u.type==="custom"?d3(u.message,u):i?i(u):y.exports.createElement(ose,{toast:u,position:d}))}))},rD=yo;const Ai={display:"flex",alignItems:"center",fontWeight:600,borderRadius:10,transition:"0.2s background-color, 0.2s color",backgroundColor:"$primary500",color:"white",cursor:"pointer",py:"$2",px:"$3"},Y=de("button",{height:"fit-content",width:"fit-content",border:"1px solid transparent",'&:not([aria-label="Close"]):not([data-action="create-post"]) svg':{marginRight:"$2",width:16,height:16},'&[data-action="create-post"]) svg':{width:24,height:24},"&:disabled":{backgroundColor:"$gray200",border:"1px solid $gray200",color:"$gray500","&:hover":{backgroundColor:"$gray200",border:"1px solid $gray200",color:"$gray500",cursor:"not-allowed"}},variants:{variant:{gray:{...Ai,backgroundColor:"$primfeedGrayButtonBackground",border:"1px solid $primfeedGrayButtonBorder",color:"$textColor","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$primfeedGrayButtonBackgroundHover"}},primary:{...Ai,backgroundColor:"$buttonPrimaryBackgroundColor",color:"$buttonPrimaryColor",justifyContent:"center",transition:"0.2s background-color","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$buttonPrimaryBackgroundColorHover"}},subscription:{...Ai,backgroundColor:"$yellow300",width:"100%",fontWeight:"$bold",justifyContent:"center",color:"$buttonPrimaryColor","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$yellow400"}},danger:{...Ai,backgroundColor:"$destructive500","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$destructive600"}},blue:{...Ai,backgroundColor:"$sky500",justifyContent:"center",transition:"0.2s background-color","&:focus":{backgroundColor:"$sky500"},"&:hover, &:active":{transition:"0.2s background-color",backgroundColor:"$sky600"}},success:{...Ai,backgroundColor:"$success500","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$success600"}},emerald:{...Ai,backgroundColor:"$emerald500","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$emerald600"}},soft:{...Ai,backgroundColor:"$buttonSoftBackgroundColor",color:"$buttonSoftColor","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$buttonSoftBackgroundColorHover"}},white:{...Ai,backgroundColor:"$buttonWhiteBackgroundColor",color:"$textColor",boxShadow:"$xsmall",border:"1px solid $borderColor",justifyContent:"center","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$buttonWhiteBackgroundColorHover"}},showMore:{...Ai,backgroundColor:"$buttonShowMoreBackgroundColor",color:"$textColor",boxShadow:"$xsmall",border:"1px solid $borderColor",justifyContent:"center","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"buttonShowMoreBackgroundColorHover"}},softDanger:{...Ai,backgroundColor:"$buttonSoftDangerBackgroundColor",color:"$buttonSoftDangerColor",border:"1px solid $buttonSoftDangerBorderColor","&:hover, &:active, &:focus":{transition:"0.2s background-color",backgroundColor:"$buttonSoftDangerBackgroundColorHover"}},onlyTextGray:{...Ai,backgroundColor:"inherit",color:"$gray400",border:"inherit","&:hover, &:active, &:focus":{transition:"0.2s color",color:"$gray500"}},onlyTextPrimary:{...Ai,backgroundColor:"inherit",color:"$primary700",border:"inherit","&:hover, &:active, &:focus":{transition:"0.2s color",color:"$primary500"}},transparent:{...Ai,backgroundColor:"inherit",color:"$textColor","&:hover, &:active, &:focus":{transition:"0.2s color",color:"$buttonTransparentHover"}},inline:{...Ai,backgroundColor:"inherit",display:"inline",color:"$subTextColor",border:"inherit",p:0,"&:hover, &:active, &:focus":{transition:"0.2s color",color:"$subTextColorHover"}}},size:{small:{py:"$1",px:"$3",fontSize:13}},center:{true:{justifyContent:"center"}}}});function iD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iD(Object(n),!0).forEach(function(r){_r(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f3(e){return f3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f3(e)}function use(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dse(e,t,n){return t&&oD(e.prototype,t),n&&oD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xE(e,t){return hse(e)||mse(e,t)||uz(e,t)||vse()}function qm(e){return fse(e)||pse(e)||uz(e)||gse()}function fse(e){if(Array.isArray(e))return iC(e)}function hse(e){if(Array.isArray(e))return e}function pse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));i=!0);}catch(c){o=!0,a=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function uz(e,t){if(!!e){if(typeof e=="string")return iC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iC(e,t)}}function iC(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}function gse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var sD=function(){},CE={},dz={},fz=null,hz={mark:sD,measure:sD};try{typeof window<"u"&&(CE=window),typeof document<"u"&&(dz=document),typeof MutationObserver<"u"&&(fz=MutationObserver),typeof performance<"u"&&(hz=performance)}catch{}var yse=CE.navigator||{},aD=yse.userAgent,lD=aD===void 0?"":aD,ou=CE,jn=dz,cD=fz,i2=hz;ou.document;var Vl=!!jn.documentElement&&!!jn.head&&typeof jn.addEventListener=="function"&&typeof jn.createElement=="function",pz=~lD.indexOf("MSIE")||~lD.indexOf("Trident/"),o2,s2,a2,l2,c2,_l="___FONT_AWESOME___",oC=16,mz="fa",gz="svg-inline--fa",$d="data-fa-i2svg",sC="data-fa-pseudo-element",bse="data-fa-pseudo-element-pending",wE="data-prefix",SE="data-icon",uD="fontawesome-i2svg",xse="async",Cse=["HTML","HEAD","STYLE","SCRIPT"],vz=function(){try{return!0}catch{return!1}}(),zn="classic",nr="sharp",EE=[zn,nr];function Km(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[zn]}})}var Z0=Km((o2={},_r(o2,zn,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),_r(o2,nr,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),o2)),J0=Km((s2={},_r(s2,zn,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),_r(s2,nr,{solid:"fass",regular:"fasr",light:"fasl"}),s2)),em=Km((a2={},_r(a2,zn,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),_r(a2,nr,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),a2)),wse=Km((l2={},_r(l2,zn,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),_r(l2,nr,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),l2)),Sse=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,yz="fa-layers-text",Ese=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,Tse=Km((c2={},_r(c2,zn,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),_r(c2,nr,{900:"fass",400:"fasr",300:"fasl"}),c2)),bz=[1,2,3,4,5,6,7,8,9,10],kse=bz.concat([11,12,13,14,15,16,17,18,19,20]),_se=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],td={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},tm=new Set;Object.keys(J0[zn]).map(tm.add.bind(tm));Object.keys(J0[nr]).map(tm.add.bind(tm));var Ase=[].concat(EE,qm(tm),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",td.GROUP,td.SWAP_OPACITY,td.PRIMARY,td.SECONDARY]).concat(bz.map(function(e){return"".concat(e,"x")})).concat(kse.map(function(e){return"w-".concat(e)})),Jp=ou.FontAwesomeConfig||{};function $se(e){var t=jn.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function Dse(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(jn&&typeof jn.querySelector=="function"){var Ose=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];Ose.forEach(function(e){var t=xE(e,2),n=t[0],r=t[1],i=Dse($se(n));i!=null&&(Jp[r]=i)})}var xz={styleDefault:"solid",familyDefault:"classic",cssPrefix:mz,replacementClass:gz,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Jp.familyPrefix&&(Jp.cssPrefix=Jp.familyPrefix);var Ff=ot(ot({},xz),Jp);Ff.autoReplaceSvg||(Ff.observeMutations=!1);var gt={};Object.keys(xz).forEach(function(e){Object.defineProperty(gt,e,{enumerable:!0,set:function(n){Ff[e]=n,e0.forEach(function(r){return r(gt)})},get:function(){return Ff[e]}})});Object.defineProperty(gt,"familyPrefix",{enumerable:!0,set:function(t){Ff.cssPrefix=t,e0.forEach(function(n){return n(gt)})},get:function(){return Ff.cssPrefix}});ou.FontAwesomeConfig=gt;var e0=[];function Pse(e){return e0.push(e),function(){e0.splice(e0.indexOf(e),1)}}var Jl=oC,ga={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Rse(e){if(!(!e||!Vl)){var t=jn.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=jn.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return jn.head.insertBefore(t,r),e}}var Mse="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function nm(){for(var e=12,t="";e-- >0;)t+=Mse[Math.random()*62|0];return t}function fh(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function TE(e){return e.classList?fh(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Cz(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ise(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Cz(e[n]),'" ')},"").trim()}function Ty(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function kE(e){return e.size!==ga.size||e.x!==ga.x||e.y!==ga.y||e.rotate!==ga.rotate||e.flipX||e.flipY}function Lse(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(a)},u={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:u}}function Nse(e){var t=e.transform,n=e.width,r=n===void 0?oC:n,i=e.height,o=i===void 0?oC:i,s=e.startCentered,a=s===void 0?!1:s,c="";return a&&pz?c+="translate(".concat(t.x/Jl-r/2,"em, ").concat(t.y/Jl-o/2,"em) "):a?c+="translate(calc(-50% + ".concat(t.x/Jl,"em), calc(-50% + ").concat(t.y/Jl,"em)) "):c+="translate(".concat(t.x/Jl,"em, ").concat(t.y/Jl,"em) "),c+="scale(".concat(t.size/Jl*(t.flipX?-1:1),", ").concat(t.size/Jl*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var Fse=`:root, :host {
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
  --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";
  --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
  --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-brands: normal 400 1em/1 "Font Awesome 6 Brands";
}

svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
  overflow: visible;
  box-sizing: content-box;
}

.svg-inline--fa {
  display: var(--fa-display, inline-block);
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}
.svg-inline--fa.fa-2xs {
  vertical-align: 0.1em;
}
.svg-inline--fa.fa-xs {
  vertical-align: 0em;
}
.svg-inline--fa.fa-sm {
  vertical-align: -0.0714285705em;
}
.svg-inline--fa.fa-lg {
  vertical-align: -0.2em;
}
.svg-inline--fa.fa-xl {
  vertical-align: -0.25em;
}
.svg-inline--fa.fa-2xl {
  vertical-align: -0.3125em;
}
.svg-inline--fa.fa-pull-left {
  margin-right: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-pull-right {
  margin-left: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-li {
  width: var(--fa-li-width, 2em);
  top: 0.25em;
}
.svg-inline--fa.fa-fw {
  width: var(--fa-fw-width, 1.25em);
}

.fa-layers svg.svg-inline--fa {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.fa-layers-counter, .fa-layers-text {
  display: inline-block;
  position: absolute;
  text-align: center;
}

.fa-layers {
  display: inline-block;
  height: 1em;
  position: relative;
  text-align: center;
  vertical-align: -0.125em;
  width: 1em;
}
.fa-layers svg.svg-inline--fa {
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.fa-layers-text {
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.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);
  overflow: hidden;
  padding: var(--fa-counter-padding, 0.25em 0.5em);
  right: var(--fa-right, 0);
  text-overflow: ellipsis;
  top: var(--fa-top, 0);
  -webkit-transform: scale(var(--fa-counter-scale, 0.25));
          transform: scale(var(--fa-counter-scale, 0.25));
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-bottom-right {
  bottom: var(--fa-bottom, 0);
  right: var(--fa-right, 0);
  top: auto;
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: bottom right;
          transform-origin: bottom right;
}

.fa-layers-bottom-left {
  bottom: var(--fa-bottom, 0);
  left: var(--fa-left, 0);
  right: auto;
  top: auto;
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: bottom left;
          transform-origin: bottom left;
}

.fa-layers-top-right {
  top: var(--fa-top, 0);
  right: var(--fa-right, 0);
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-top-left {
  left: var(--fa-left, 0);
  right: auto;
  top: var(--fa-top, 0);
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: top left;
          transform-origin: top left;
}

.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 {
  font-size: 0.625em;
  line-height: 0.1em;
  vertical-align: 0.225em;
}

.fa-xs {
  font-size: 0.75em;
  line-height: 0.0833333337em;
  vertical-align: 0.125em;
}

.fa-sm {
  font-size: 0.875em;
  line-height: 0.0714285718em;
  vertical-align: 0.0535714295em;
}

.fa-lg {
  font-size: 1.25em;
  line-height: 0.05em;
  vertical-align: -0.075em;
}

.fa-xl {
  font-size: 1.5em;
  line-height: 0.0416666682em;
  vertical-align: -0.125em;
}

.fa-2xl {
  font-size: 2em;
  line-height: 0.03125em;
  vertical-align: -0.1875em;
}

.fa-fw {
  text-align: center;
  width: 1.25em;
}

.fa-ul {
  list-style-type: none;
  margin-left: var(--fa-li-margin, 2.5em);
  padding-left: 0;
}
.fa-ul > li {
  position: relative;
}

.fa-li {
  left: calc(var(--fa-li-width, 2em) * -1);
  position: absolute;
  text-align: center;
  width: var(--fa-li-width, 2em);
  line-height: inherit;
}

.fa-border {
  border-color: var(--fa-border-color, #eee);
  border-radius: var(--fa-border-radius, 0.1em);
  border-style: var(--fa-border-style, solid);
  border-width: var(--fa-border-width, 0.08em);
  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
}

.fa-pull-left {
  float: left;
  margin-right: var(--fa-pull-margin, 0.3em);
}

.fa-pull-right {
  float: right;
  margin-left: var(--fa-pull-margin, 0.3em);
}

.fa-beat {
  -webkit-animation-name: fa-beat;
          animation-name: fa-beat;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
          animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-bounce {
  -webkit-animation-name: fa-bounce;
          animation-name: fa-bounce;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}

.fa-fade {
  -webkit-animation-name: fa-fade;
          animation-name: fa-fade;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-beat-fade {
  -webkit-animation-name: fa-beat-fade;
          animation-name: fa-beat-fade;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-flip {
  -webkit-animation-name: fa-flip;
          animation-name: fa-flip;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
          animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-shake {
  -webkit-animation-name: fa-shake;
          animation-name: fa-shake;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, linear);
          animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin {
  -webkit-animation-name: fa-spin;
          animation-name: fa-spin;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 2s);
          animation-duration: var(--fa-animation-duration, 2s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, linear);
          animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin-reverse {
  --fa-animation-direction: reverse;
}

.fa-pulse,
.fa-spin-pulse {
  -webkit-animation-name: fa-spin;
          animation-name: fa-spin;
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
          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 {
    -webkit-animation-delay: -1ms;
            animation-delay: -1ms;
    -webkit-animation-duration: 1ms;
            animation-duration: 1ms;
    -webkit-animation-iteration-count: 1;
            animation-iteration-count: 1;
    -webkit-transition-delay: 0s;
            transition-delay: 0s;
    -webkit-transition-duration: 0s;
            transition-duration: 0s;
  }
}
@-webkit-keyframes fa-beat {
  0%, 90% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  45% {
    -webkit-transform: scale(var(--fa-beat-scale, 1.25));
            transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@keyframes fa-beat {
  0%, 90% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  45% {
    -webkit-transform: scale(var(--fa-beat-scale, 1.25));
            transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@-webkit-keyframes fa-bounce {
  0% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  10% {
    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  100% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
}
@keyframes fa-bounce {
  0% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  10% {
    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  100% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
}
@-webkit-keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@-webkit-keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
            transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
            transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@-webkit-keyframes fa-flip {
  50% {
    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@keyframes fa-flip {
  50% {
    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@-webkit-keyframes fa-shake {
  0% {
    -webkit-transform: rotate(-15deg);
            transform: rotate(-15deg);
  }
  4% {
    -webkit-transform: rotate(15deg);
            transform: rotate(15deg);
  }
  8%, 24% {
    -webkit-transform: rotate(-18deg);
            transform: rotate(-18deg);
  }
  12%, 28% {
    -webkit-transform: rotate(18deg);
            transform: rotate(18deg);
  }
  16% {
    -webkit-transform: rotate(-22deg);
            transform: rotate(-22deg);
  }
  20% {
    -webkit-transform: rotate(22deg);
            transform: rotate(22deg);
  }
  32% {
    -webkit-transform: rotate(-12deg);
            transform: rotate(-12deg);
  }
  36% {
    -webkit-transform: rotate(12deg);
            transform: rotate(12deg);
  }
  40%, 100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
@keyframes fa-shake {
  0% {
    -webkit-transform: rotate(-15deg);
            transform: rotate(-15deg);
  }
  4% {
    -webkit-transform: rotate(15deg);
            transform: rotate(15deg);
  }
  8%, 24% {
    -webkit-transform: rotate(-18deg);
            transform: rotate(-18deg);
  }
  12%, 28% {
    -webkit-transform: rotate(18deg);
            transform: rotate(18deg);
  }
  16% {
    -webkit-transform: rotate(-22deg);
            transform: rotate(-22deg);
  }
  20% {
    -webkit-transform: rotate(22deg);
            transform: rotate(22deg);
  }
  32% {
    -webkit-transform: rotate(-12deg);
            transform: rotate(-12deg);
  }
  36% {
    -webkit-transform: rotate(12deg);
            transform: rotate(12deg);
  }
  40%, 100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
@-webkit-keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
@keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
.fa-rotate-90 {
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

.fa-rotate-180 {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}

.fa-rotate-270 {
  -webkit-transform: rotate(270deg);
          transform: rotate(270deg);
}

.fa-flip-horizontal {
  -webkit-transform: scale(-1, 1);
          transform: scale(-1, 1);
}

.fa-flip-vertical {
  -webkit-transform: scale(1, -1);
          transform: scale(1, -1);
}

.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
  -webkit-transform: scale(-1, -1);
          transform: scale(-1, -1);
}

.fa-rotate-by {
  -webkit-transform: rotate(var(--fa-rotate-angle, none));
          transform: rotate(var(--fa-rotate-angle, none));
}

.fa-stack {
  display: inline-block;
  vertical-align: middle;
  height: 2em;
  position: relative;
  width: 2.5em;
}

.fa-stack-1x,
.fa-stack-2x {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
  z-index: var(--fa-stack-z-index, auto);
}

.svg-inline--fa.fa-stack-1x {
  height: 1em;
  width: 1.25em;
}
.svg-inline--fa.fa-stack-2x {
  height: 2em;
  width: 2.5em;
}

.fa-inverse {
  color: var(--fa-inverse, #fff);
}

.sr-only,
.fa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:not(:focus),
.fa-sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.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, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-primary {
  opacity: var(--fa-secondary-opacity, 0.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: black;
}

.fad.fa-inverse,
.fa-duotone.fa-inverse {
  color: var(--fa-inverse, #fff);
}`;function wz(){var e=mz,t=gz,n=gt.cssPrefix,r=gt.replacementClass,i=Fse;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var dD=!1;function v8(){gt.autoAddCss&&!dD&&(Rse(wz()),dD=!0)}var Bse={mixout:function(){return{dom:{css:wz,insertCss:v8}}},hooks:function(){return{beforeDOMElementCreation:function(){v8()},beforeI2svg:function(){v8()}}}},Al=ou||{};Al[_l]||(Al[_l]={});Al[_l].styles||(Al[_l].styles={});Al[_l].hooks||(Al[_l].hooks={});Al[_l].shims||(Al[_l].shims=[]);var Ls=Al[_l],Sz=[],Hse=function e(){jn.removeEventListener("DOMContentLoaded",e),h3=1,Sz.map(function(t){return t()})},h3=!1;Vl&&(h3=(jn.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(jn.readyState),h3||jn.addEventListener("DOMContentLoaded",Hse));function zse(e){!Vl||(h3?setTimeout(e,0):Sz.push(e))}function Gm(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?Cz(e):"<".concat(t," ").concat(Ise(r),">").concat(o.map(Gm).join(""),"</").concat(t,">")}function fD(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Use=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},y8=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?Use(n,i):n,c,u,d;for(r===void 0?(c=1,d=t[o[0]]):(c=0,d=r);c<s;c++)u=o[c],d=a(d,t[u],u,t);return d};function Vse(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}function aC(e){var t=Vse(e);return t.length===1?t[0].toString(16):null}function jse(e,t){var n=e.length,r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function hD(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function lC(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=hD(t);typeof Ls.hooks.addPack=="function"&&!i?Ls.hooks.addPack(e,hD(t)):Ls.styles[e]=ot(ot({},Ls.styles[e]||{}),o),e==="fas"&&lC("fa",t)}var u2,d2,f2,Q1=Ls.styles,Wse=Ls.shims,qse=(u2={},_r(u2,zn,Object.values(em[zn])),_r(u2,nr,Object.values(em[nr])),u2),_E=null,Ez={},Tz={},kz={},_z={},Az={},Kse=(d2={},_r(d2,zn,Object.keys(Z0[zn])),_r(d2,nr,Object.keys(Z0[nr])),d2);function Gse(e){return~Ase.indexOf(e)}function Yse(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!Gse(i)?i:null}var $z=function(){var t=function(o){return y8(Q1,function(s,a,c){return s[c]=y8(a,o,{}),s},{})};Ez=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(c){return typeof c=="number"});a.forEach(function(c){i[c.toString(16)]=s})}return i}),Tz=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(c){return typeof c=="string"});a.forEach(function(c){i[c]=s})}return i}),Az=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(c){i[c]=s}),i});var n="far"in Q1||gt.autoFetchSvg,r=y8(Wse,function(i,o){var s=o[0],a=o[1],c=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:c}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:c}),i},{names:{},unicodes:{}});kz=r.names,_z=r.unicodes,_E=ky(gt.styleDefault,{family:gt.familyDefault})};Pse(function(e){_E=ky(e.styleDefault,{family:gt.familyDefault})});$z();function AE(e,t){return(Ez[e]||{})[t]}function Qse(e,t){return(Tz[e]||{})[t]}function nd(e,t){return(Az[e]||{})[t]}function Dz(e){return kz[e]||{prefix:null,iconName:null}}function Xse(e){var t=_z[e],n=AE("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function su(){return _E}var $E=function(){return{prefix:null,iconName:null,rest:[]}};function ky(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?zn:n,i=Z0[r][e],o=J0[r][e]||J0[r][i],s=e in Ls.styles?e:null;return o||s||null}var pD=(f2={},_r(f2,zn,Object.keys(em[zn])),_r(f2,nr,Object.keys(em[nr])),f2);function _y(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},_r(t,zn,"".concat(gt.cssPrefix,"-").concat(zn)),_r(t,nr,"".concat(gt.cssPrefix,"-").concat(nr)),t),s=null,a=zn;(e.includes(o[zn])||e.some(function(u){return pD[zn].includes(u)}))&&(a=zn),(e.includes(o[nr])||e.some(function(u){return pD[nr].includes(u)}))&&(a=nr);var c=e.reduce(function(u,d){var f=Yse(gt.cssPrefix,d);if(Q1[d]?(d=qse[a].includes(d)?wse[a][d]:d,s=d,u.prefix=d):Kse[a].indexOf(d)>-1?(s=d,u.prefix=ky(d,{family:a})):f?u.iconName=f:d!==gt.replacementClass&&d!==o[zn]&&d!==o[nr]&&u.rest.push(d),!i&&u.prefix&&u.iconName){var h=s==="fa"?Dz(u.iconName):{},p=nd(u.prefix,u.iconName);h.prefix&&(s=null),u.iconName=h.iconName||p||u.iconName,u.prefix=h.prefix||u.prefix,u.prefix==="far"&&!Q1.far&&Q1.fas&&!gt.autoFetchSvg&&(u.prefix="fas")}return u},$E());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&a===nr&&(Q1.fass||gt.autoFetchSvg)&&(c.prefix="fass",c.iconName=nd(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||s==="fa")&&(c.prefix=su()||"fas"),c}var Zse=function(){function e(){use(this,e),this.definitions={}}return dse(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i.reduce(this._pullDefinitions,{});Object.keys(s).forEach(function(a){n.definitions[a]=ot(ot({},n.definitions[a]||{}),s[a]),lC(a,s[a]);var c=em[zn][a];c&&lC(c,s[a]),$z()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(o){var s=i[o],a=s.prefix,c=s.iconName,u=s.icon,d=u[2];n[a]||(n[a]={}),d.length>0&&d.forEach(function(f){typeof f=="string"&&(n[a][f]=u)}),n[a][c]=u}),n}}]),e}(),mD=[],X1={},gf={},Jse=Object.keys(gf);function eae(e,t){var n=t.mixoutsTo;return mD=e,X1={},Object.keys(gf).forEach(function(r){Jse.indexOf(r)===-1&&delete gf[r]}),mD.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),f3(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){X1[s]||(X1[s]=[]),X1[s].push(o[s])})}r.provides&&r.provides(gf)}),n}function cC(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=X1[e]||[];return o.forEach(function(s){t=s.apply(null,[t].concat(r))}),t}function Dd(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=X1[e]||[];i.forEach(function(o){o.apply(null,n)})}function $l(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return gf[e]?gf[e].apply(null,t):void 0}function uC(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||su();if(!!t)return t=nd(n,t)||t,fD(Oz.definitions,n,t)||fD(Ls.styles,n,t)}var Oz=new Zse,tae=function(){gt.autoReplaceSvg=!1,gt.observeMutations=!1,Dd("noAuto")},nae={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Vl?(Dd("beforeI2svg",t),$l("pseudoElements2svg",t),$l("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;gt.autoReplaceSvg===!1&&(gt.autoReplaceSvg=!0),gt.observeMutations=!0,zse(function(){iae({autoReplaceSvgRoot:n}),Dd("watch",t)})}},rae={icon:function(t){if(t===null)return null;if(f3(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:nd(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=ky(t[0]);return{prefix:r,iconName:nd(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(gt.cssPrefix,"-"))>-1||t.match(Sse))){var i=_y(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||su(),iconName:nd(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=su();return{prefix:o,iconName:nd(o,t)||t}}}},Ro={noAuto:tae,config:gt,dom:nae,parse:rae,library:Oz,findIconDefinition:uC,toHtml:Gm},iae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?jn:n;(Object.keys(Ls.styles).length>0||gt.autoFetchSvg)&&Vl&&gt.autoReplaceSvg&&Ro.dom.i2svg({node:r})};function Ay(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Gm(r)})}}),Object.defineProperty(e,"node",{get:function(){if(!!Vl){var r=jn.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function oae(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(kE(s)&&n.found&&!r.found){var a=n.width,c=n.height,u={x:a/c/2,y:.5};i.style=Ty(ot(ot({},o),{},{"transform-origin":"".concat(u.x+s.x/16,"em ").concat(u.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function sae(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(gt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ot(ot({},i),{},{id:s}),children:r}]}]}function DE(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,c=e.title,u=e.maskId,d=e.titleId,f=e.extra,h=e.watchable,p=h===void 0?!1:h,m=r.found?r:n,v=m.width,b=m.height,x=i==="fak",C=[gt.replacementClass,o?"".concat(gt.cssPrefix,"-").concat(o):""].filter(function(O){return f.classes.indexOf(O)===-1}).filter(function(O){return O!==""||!!O}).concat(f.classes).join(" "),w={children:[],attributes:ot(ot({},f.attributes),{},{"data-prefix":i,"data-icon":o,class:C,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(v," ").concat(b)})},S=x&&!~f.classes.indexOf("fa-fw")?{width:"".concat(v/b*16*.0625,"em")}:{};p&&(w.attributes[$d]=""),c&&(w.children.push({tag:"title",attributes:{id:w.attributes["aria-labelledby"]||"title-".concat(d||nm())},children:[c]}),delete w.attributes.title);var T=ot(ot({},w),{},{prefix:i,iconName:o,main:n,mask:r,maskId:u,transform:s,symbol:a,styles:ot(ot({},S),f.styles)}),E=r.found&&n.found?$l("generateAbstractMask",T)||{children:[],attributes:{}}:$l("generateAbstractIcon",T)||{children:[],attributes:{}},k=E.children,_=E.attributes;return T.children=k,T.attributes=_,a?sae(T):oae(T)}function gD(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,c=a===void 0?!1:a,u=ot(ot(ot({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});c&&(u[$d]="");var d=ot({},s.styles);kE(i)&&(d.transform=Nse({transform:i,startCentered:!0,width:n,height:r}),d["-webkit-transform"]=d.transform);var f=Ty(d);f.length>0&&(u.style=f);var h=[];return h.push({tag:"span",attributes:u,children:[t]}),o&&h.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),h}function aae(e){var t=e.content,n=e.title,r=e.extra,i=ot(ot(ot({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=Ty(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var b8=Ls.styles;function dC(e){var t=e[0],n=e[1],r=e.slice(4),i=xE(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(gt.cssPrefix,"-").concat(td.GROUP)},children:[{tag:"path",attributes:{class:"".concat(gt.cssPrefix,"-").concat(td.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(gt.cssPrefix,"-").concat(td.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var lae={found:!1,width:512,height:512};function cae(e,t){!vz&&!gt.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function fC(e,t){var n=t;return t==="fa"&&gt.styleDefault!==null&&(t=su()),new Promise(function(r,i){if($l("missingIconAbstract"),n==="fa"){var o=Dz(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&b8[t]&&b8[t][e]){var s=b8[t][e];return r(dC(s))}cae(e,t),r(ot(ot({},lae),{},{icon:gt.showMissingIcons&&e?$l("missingIconAbstract")||{}:{}}))})}var vD=function(){},hC=gt.measurePerformance&&i2&&i2.mark&&i2.measure?i2:{mark:vD,measure:vD},Rp='FA "6.4.2"',uae=function(t){return hC.mark("".concat(Rp," ").concat(t," begins")),function(){return Pz(t)}},Pz=function(t){hC.mark("".concat(Rp," ").concat(t," ends")),hC.measure("".concat(Rp," ").concat(t),"".concat(Rp," ").concat(t," begins"),"".concat(Rp," ").concat(t," ends"))},OE={begin:uae,end:Pz},U4=function(){};function yD(e){var t=e.getAttribute?e.getAttribute($d):null;return typeof t=="string"}function dae(e){var t=e.getAttribute?e.getAttribute(wE):null,n=e.getAttribute?e.getAttribute(SE):null;return t&&n}function fae(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(gt.replacementClass)}function hae(){if(gt.autoReplaceSvg===!0)return V4.replace;var e=V4[gt.autoReplaceSvg];return e||V4.replace}function pae(e){return jn.createElementNS("http://www.w3.org/2000/svg",e)}function mae(e){return jn.createElement(e)}function Rz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?pae:mae:n;if(typeof e=="string")return jn.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(Rz(s,{ceFn:r}))}),i}function gae(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var V4={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(Rz(i),n)}),n.getAttribute($d)===null&&gt.keepOriginalSource){var r=jn.createComment(gae(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~TE(n).indexOf(gt.replacementClass))return V4.replace(t);var i=new RegExp("".concat(gt.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,c){return c===gt.replacementClass||c.match(i)?a.toSvg.push(c):a.toNode.push(c),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return Gm(a)}).join(`
`);n.setAttribute($d,""),n.innerHTML=s}};function bD(e){e()}function Mz(e,t){var n=typeof t=="function"?t:U4;if(e.length===0)n();else{var r=bD;gt.mutateApproach===xse&&(r=ou.requestAnimationFrame||bD),r(function(){var i=hae(),o=OE.begin("mutate");e.map(i),o(),n()})}}var PE=!1;function Iz(){PE=!0}function pC(){PE=!1}var p3=null;function xD(e){if(!!cD&&!!gt.observeMutations){var t=e.treeCallback,n=t===void 0?U4:t,r=e.nodeCallback,i=r===void 0?U4:r,o=e.pseudoElementsCallback,s=o===void 0?U4:o,a=e.observeMutationsRoot,c=a===void 0?jn:a;p3=new cD(function(u){if(!PE){var d=su();fh(u).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!yD(f.addedNodes[0])&&(gt.searchPseudoElements&&s(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&gt.searchPseudoElements&&s(f.target.parentNode),f.type==="attributes"&&yD(f.target)&&~_se.indexOf(f.attributeName))if(f.attributeName==="class"&&dae(f.target)){var h=_y(TE(f.target)),p=h.prefix,m=h.iconName;f.target.setAttribute(wE,p||d),m&&f.target.setAttribute(SE,m)}else fae(f.target)&&i(f.target)})}}),Vl&&p3.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function vae(){!p3||p3.disconnect()}function yae(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function bae(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=_y(TE(e));return i.prefix||(i.prefix=su()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=Qse(i.prefix,e.innerText)||AE(i.prefix,aC(e.innerText))),!i.iconName&&gt.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function xae(e){var t=fh(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return gt.autoA11y&&(n?t["aria-labelledby"]="".concat(gt.replacementClass,"-title-").concat(r||nm()):(t["aria-hidden"]="true",t.focusable="false")),t}function Cae(){return{iconName:null,title:null,titleId:null,prefix:null,transform:ga,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function CD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=bae(e),r=n.iconName,i=n.prefix,o=n.rest,s=xae(e),a=cC("parseNodeAttributes",{},e),c=t.styleParser?yae(e):[];return ot({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:ga,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:c,attributes:s}},a)}var wae=Ls.styles;function Lz(e){var t=gt.autoReplaceSvg==="nest"?CD(e,{styleParser:!1}):CD(e);return~t.extra.classes.indexOf(yz)?$l("generateLayersText",e,t):$l("generateSvgReplacementMutation",e,t)}var au=new Set;EE.map(function(e){au.add("fa-".concat(e))});Object.keys(Z0[zn]).map(au.add.bind(au));Object.keys(Z0[nr]).map(au.add.bind(au));au=qm(au);function wD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Vl)return Promise.resolve();var n=jn.documentElement.classList,r=function(f){return n.add("".concat(uD,"-").concat(f))},i=function(f){return n.remove("".concat(uD,"-").concat(f))},o=gt.autoFetchSvg?au:EE.map(function(d){return"fa-".concat(d)}).concat(Object.keys(wae));o.includes("fa")||o.push("fa");var s=[".".concat(yz,":not([").concat($d,"])")].concat(o.map(function(d){return".".concat(d,":not([").concat($d,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=fh(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var c=OE.begin("onTree"),u=a.reduce(function(d,f){try{var h=Lz(f);h&&d.push(h)}catch(p){vz||p.name==="MissingIcon"&&console.error(p)}return d},[]);return new Promise(function(d,f){Promise.all(u).then(function(h){Mz(h,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),c(),d()})}).catch(function(h){c(),f(h)})})}function Sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Lz(e).then(function(n){n&&Mz([n],t)})}function Eae(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:uC(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:uC(i||{})),e(r,ot(ot({},n),{},{mask:i}))}}var Tae=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?ga:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,c=a===void 0?null:a,u=n.maskId,d=u===void 0?null:u,f=n.title,h=f===void 0?null:f,p=n.titleId,m=p===void 0?null:p,v=n.classes,b=v===void 0?[]:v,x=n.attributes,C=x===void 0?{}:x,w=n.styles,S=w===void 0?{}:w;if(!!t){var T=t.prefix,E=t.iconName,k=t.icon;return Ay(ot({type:"icon"},t),function(){return Dd("beforeDOMElementCreation",{iconDefinition:t,params:n}),gt.autoA11y&&(h?C["aria-labelledby"]="".concat(gt.replacementClass,"-title-").concat(m||nm()):(C["aria-hidden"]="true",C.focusable="false")),DE({icons:{main:dC(k),mask:c?dC(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:T,iconName:E,transform:ot(ot({},ga),i),symbol:s,title:h,maskId:d,titleId:m,extra:{attributes:C,styles:S,classes:b}})})}},kae={mixout:function(){return{icon:Eae(Tae)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=wD,n.nodeCallback=Sae,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?jn:r,o=n.callback,s=o===void 0?function(){}:o;return wD(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,c=r.transform,u=r.symbol,d=r.mask,f=r.maskId,h=r.extra;return new Promise(function(p,m){Promise.all([fC(i,a),d.iconName?fC(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var b=xE(v,2),x=b[0],C=b[1];p([n,DE({icons:{main:x,mask:C},prefix:a,iconName:i,transform:c,symbol:u,maskId:f,title:o,titleId:s,extra:h,watchable:!0})])}).catch(m)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,c=Ty(a);c.length>0&&(i.style=c);var u;return kE(s)&&(u=$l("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(u||o.icon),{children:r,attributes:i}}}},_ae={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return Ay({type:"layer"},function(){Dd("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(c){s=s.concat(c.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(gt.cssPrefix,"-layers")].concat(qm(o)).join(" ")},children:s}]})}}}},Aae={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,c=r.attributes,u=c===void 0?{}:c,d=r.styles,f=d===void 0?{}:d;return Ay({type:"counter",content:n},function(){return Dd("beforeDOMElementCreation",{content:n,params:r}),aae({content:n.toString(),title:o,extra:{attributes:u,styles:f,classes:["".concat(gt.cssPrefix,"-layers-counter")].concat(qm(a))}})})}}}},$ae={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?ga:i,s=r.title,a=s===void 0?null:s,c=r.classes,u=c===void 0?[]:c,d=r.attributes,f=d===void 0?{}:d,h=r.styles,p=h===void 0?{}:h;return Ay({type:"text",content:n},function(){return Dd("beforeDOMElementCreation",{content:n,params:r}),gD({content:n,transform:ot(ot({},ga),o),title:a,extra:{attributes:f,styles:p,classes:["".concat(gt.cssPrefix,"-layers-text")].concat(qm(u))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,c=null;if(pz){var u=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();a=d.width/u,c=d.height/u}return gt.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,gD({content:n.innerHTML,width:a,height:c,transform:o,title:i,extra:s,watchable:!0})])}}},Dae=new RegExp('"',"ug"),SD=[1105920,1112319];function Oae(e){var t=e.replace(Dae,""),n=jse(t,0),r=n>=SD[0]&&n<=SD[1],i=t.length===2?t[0]===t[1]:!1;return{value:aC(i?t[0]:t),isSecondary:r||i}}function ED(e,t){var n="".concat(bse).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=fh(e.children),s=o.filter(function(k){return k.getAttribute(sC)===t})[0],a=ou.getComputedStyle(e,t),c=a.getPropertyValue("font-family").match(Ese),u=a.getPropertyValue("font-weight"),d=a.getPropertyValue("content");if(s&&!c)return e.removeChild(s),r();if(c&&d!=="none"&&d!==""){var f=a.getPropertyValue("content"),h=~["Sharp"].indexOf(c[2])?nr:zn,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?J0[h][c[2].toLowerCase()]:Tse[h][u],m=Oae(f),v=m.value,b=m.isSecondary,x=c[0].startsWith("FontAwesome"),C=AE(p,v),w=C;if(x){var S=Xse(v);S.iconName&&S.prefix&&(C=S.iconName,p=S.prefix)}if(C&&!b&&(!s||s.getAttribute(wE)!==p||s.getAttribute(SE)!==w)){e.setAttribute(n,w),s&&e.removeChild(s);var T=Cae(),E=T.extra;E.attributes[sC]=t,fC(C,p).then(function(k){var _=DE(ot(ot({},T),{},{icons:{main:k,mask:$E()},prefix:p,iconName:w,extra:E,watchable:!0})),O=jn.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(O,e.firstChild):e.appendChild(O),O.outerHTML=_.map(function(D){return Gm(D)}).join(`
`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function Pae(e){return Promise.all([ED(e,"::before"),ED(e,"::after")])}function Rae(e){return e.parentNode!==document.head&&!~Cse.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(sC)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function TD(e){if(!!Vl)return new Promise(function(t,n){var r=fh(e.querySelectorAll("*")).filter(Rae).map(Pae),i=OE.begin("searchPseudoElements");Iz(),Promise.all(r).then(function(){i(),pC(),t()}).catch(function(){i(),pC(),n()})})}var Mae={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=TD,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?jn:r;gt.searchPseudoElements&&TD(i)}}},kD=!1,Iae={mixout:function(){return{dom:{unwatch:function(){Iz(),kD=!0}}}},hooks:function(){return{bootstrap:function(){xD(cC("mutationObserverCallbacks",{}))},noAuto:function(){vae()},watch:function(n){var r=n.observeMutationsRoot;kD?pC():xD(cC("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},_D=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},Lae={mixout:function(){return{parse:{transform:function(n){return _D(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=_D(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),u="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),d="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(c," ").concat(u," ").concat(d)},h={transform:"translate(".concat(s/2*-1," -256)")},p={outer:a,inner:f,path:h};return{tag:"g",attributes:ot({},p.outer),children:[{tag:"g",attributes:ot({},p.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ot(ot({},r.icon.attributes),p.path)}]}]}}}},x8={x:0,y:0,width:"100%",height:"100%"};function AD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Nae(e){return e.tag==="g"?e.children:[e]}var Fae={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?_y(i.split(" ").map(function(s){return s.trim()})):$E();return o.prefix||(o.prefix=su()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,c=n.transform,u=o.width,d=o.icon,f=s.width,h=s.icon,p=Lse({transform:c,containerWidth:f,iconWidth:u}),m={tag:"rect",attributes:ot(ot({},x8),{},{fill:"white"})},v=d.children?{children:d.children.map(AD)}:{},b={tag:"g",attributes:ot({},p.inner),children:[AD(ot({tag:d.tag,attributes:ot(ot({},d.attributes),p.path)},v))]},x={tag:"g",attributes:ot({},p.outer),children:[b]},C="mask-".concat(a||nm()),w="clip-".concat(a||nm()),S={tag:"mask",attributes:ot(ot({},x8),{},{id:C,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[m,x]},T={tag:"defs",children:[{tag:"clipPath",attributes:{id:w},children:Nae(h)},S]};return r.push(T,{tag:"rect",attributes:ot({fill:"currentColor","clip-path":"url(#".concat(w,")"),mask:"url(#".concat(C,")")},x8)}),{children:r,attributes:i}}}},Bae={provides:function(t){var n=!1;ou.matchMedia&&(n=ou.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:ot(ot({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=ot(ot({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:ot(ot({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:ot(ot({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ot(ot({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:ot(ot({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:ot(ot({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:ot(ot({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:ot(ot({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},Hae={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},zae=[Bse,kae,_ae,Aae,$ae,Mae,Iae,Lae,Fae,Bae,Hae];eae(zae,{mixoutsTo:Ro});Ro.noAuto;Ro.config;Ro.library;Ro.dom;var mC=Ro.parse;Ro.findIconDefinition;Ro.toHtml;var Uae=Ro.icon;Ro.layer;Ro.text;Ro.counter;var ze={exports:{}},Vae="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jae=Vae,Wae=jae;function Nz(){}function Fz(){}Fz.resetWarningCache=Nz;var qae=function(){function e(r,i,o,s,a,c){if(c!==Wae){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Fz,resetWarningCache:Nz};return n.PropTypes=n,n};ze.exports=qae();function $D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(n),!0).forEach(function(r){Z1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$D(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m3(e){return m3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m3(e)}function Z1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kae(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Gae(e,t){if(e==null)return{};var n=Kae(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function gC(e){return Yae(e)||Qae(e)||Xae(e)||Zae()}function Yae(e){if(Array.isArray(e))return vC(e)}function Qae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xae(e,t){if(!!e){if(typeof e=="string")return vC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vC(e,t)}}function vC(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}function Zae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jae(e){var t,n=e.beat,r=e.fade,i=e.beatFade,o=e.bounce,s=e.shake,a=e.flash,c=e.spin,u=e.spinPulse,d=e.spinReverse,f=e.pulse,h=e.fixedWidth,p=e.inverse,m=e.border,v=e.listItem,b=e.flip,x=e.size,C=e.rotation,w=e.pull,S=(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":o,"fa-shake":s,"fa-flash":a,"fa-spin":c,"fa-spin-reverse":d,"fa-spin-pulse":u,"fa-pulse":f,"fa-fw":h,"fa-inverse":p,"fa-border":m,"fa-li":v,"fa-flip":b===!0,"fa-flip-horizontal":b==="horizontal"||b==="both","fa-flip-vertical":b==="vertical"||b==="both"},Z1(t,"fa-".concat(x),typeof x<"u"&&x!==null),Z1(t,"fa-rotate-".concat(C),typeof C<"u"&&C!==null&&C!==0),Z1(t,"fa-pull-".concat(w),typeof w<"u"&&w!==null),Z1(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(S).map(function(T){return S[T]?T:null}).filter(function(T){return T})}function ele(e){return e=e-0,e===e}function Bz(e){return ele(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var tle=["style"];function nle(e){return e.charAt(0).toUpperCase()+e.slice(1)}function rle(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),i=Bz(n.slice(0,r)),o=n.slice(r+1).trim();return i.startsWith("webkit")?t[nle(i)]=o:t[i]=o,t},{})}function Hz(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(c){return Hz(e,c)}),i=Object.keys(t.attributes||{}).reduce(function(c,u){var d=t.attributes[u];switch(u){case"class":c.attrs.className=d,delete t.attributes.class;break;case"style":c.attrs.style=rle(d);break;default:u.indexOf("aria-")===0||u.indexOf("data-")===0?c.attrs[u.toLowerCase()]=d:c.attrs[Bz(u)]=d}return c},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=Gae(n,tle);return i.attrs.style=Oc(Oc({},i.attrs.style),s),e.apply(void 0,[t.tag,Oc(Oc({},i.attrs),a)].concat(gC(r)))}var zz=!1;try{zz=!0}catch{}function ile(){if(!zz&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function DD(e){if(e&&m3(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(mC.icon)return mC.icon(e);if(e===null)return null;if(e&&m3(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function C8(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Z1({},e,t):{}}var hh=Ae.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,c=e.maskId,u=DD(n),d=C8("classes",[].concat(gC(Jae(e)),gC(o.split(" ")))),f=C8("transform",typeof e.transform=="string"?mC.transform(e.transform):e.transform),h=C8("mask",DD(r)),p=Uae(u,Oc(Oc(Oc(Oc({},d),f),h),{},{symbol:i,title:s,titleId:a,maskId:c}));if(!p)return ile("Could not find icon",u),null;var m=p.abstract,v={ref:t};return Object.keys(e).forEach(function(b){hh.defaultProps.hasOwnProperty(b)||(v[b]=e[b])}),ole(m[0],v)});hh.displayName="FontAwesomeIcon";hh.propTypes={beat:ze.exports.bool,border:ze.exports.bool,beatFade:ze.exports.bool,bounce:ze.exports.bool,className:ze.exports.string,fade:ze.exports.bool,flash:ze.exports.bool,mask:ze.exports.oneOfType([ze.exports.object,ze.exports.array,ze.exports.string]),maskId:ze.exports.string,fixedWidth:ze.exports.bool,inverse:ze.exports.bool,flip:ze.exports.oneOf([!0,!1,"horizontal","vertical","both"]),icon:ze.exports.oneOfType([ze.exports.object,ze.exports.array,ze.exports.string]),listItem:ze.exports.bool,pull:ze.exports.oneOf(["right","left"]),pulse:ze.exports.bool,rotation:ze.exports.oneOf([0,90,180,270]),shake:ze.exports.bool,size:ze.exports.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:ze.exports.bool,spinPulse:ze.exports.bool,spinReverse:ze.exports.bool,symbol:ze.exports.oneOfType([ze.exports.bool,ze.exports.string]),title:ze.exports.string,titleId:ze.exports.string,transform:ze.exports.oneOfType([ze.exports.string,ze.exports.object]),swapOpacity:ze.exports.bool};hh.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var ole=Hz.bind(null,Ae.createElement);const W=wi(hh,{}),M=de("div",{display:"flex"}),P=de(M,{flexDirection:"column"}),A=de("p",{overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word",variants:{text:{ellipsis:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},type:{light:{color:"$gray500",marginTop:"$2"}}}});function sle(){return l(cse,{position:"bottom-left",reverseOrder:!1})}function F({type:e,title:t,message:n=null,Button:r=null}){const i=e==="update"?864e5:4e3;let o="$emerald800",s="$emerald700",a=null;e==="success"?(o="$emerald800",s="$emerald700",a=vE):e==="error"?(o="$destructive800",s="$destructive700",a=KH):e==="update"&&(o="$primary500");const c={duration:i,id:e==="update"?"update":null};rD.custom(u=>g(M,{css:{backgroundColor:"$cardBackgroundColor",px:"$4",py:"$4",borderRadius:10,boxShadow:"$large",borderLeft:e==="update"?"3px solid $primary500":"none",alignItems:n?"inherit":"center",width:375,animation:`${fn({"0%":{opacity:0,transform:"translateY(10px)"},"100%":{opacity:1,transform:"translateY(0)"}})} 230ms cubic-bezier(.21,1.02,.73,1)`},children:[a&&l(M,{css:{justifyContent:"center",alignItems:"center",color:s,marginRight:"$4"},children:l(W,{css:{height:20,width:20},icon:a})}),g(P,{css:{flexGrow:1,paddingTop:"0.1rem",gap:"$2"},children:[t&&l(A,{css:{fontWeight:"$bold",fontFamily:"$redHatDisplay",color:o},children:t}),n&&l(A,{css:{fontSize:13},children:n}),e==="update"&&g(Y,{variant:"white",size:"small",onClick:()=>window.location.reload(),css:{marginTop:"$2",marginLeft:"auto"},children:[l(W,{icon:doe,css:{height:"13px !important"}}),"Reload"]}),r!==null&&l(z,{children:r})]}),e!=="update"&&l(M,{children:l(W,{onClick:()=>rD.remove(u.id),icon:Ul,css:{marginLeft:"$1",paddingTop:"0.125rem",color:"$gray400",cursor:"pointer",height:14,width:14}})})]}),c)}const RE=Ae.createContext(null);RE.displayName="AuthContext";function hs(){return Ae.useContext(RE)}const ME=Ae.createContext(null);ME.displayName="PageActionsContext";function Si(){return Ae.useContext(ME)}const IE=Ae.createContext(null);IE.displayName="TitlePageContext";function Ar(){return Ae.useContext(IE)}const $y=Ae.createContext(null);$y.displayName="UserContext";function st(){return Ae.useContext($y)}const LE=Ae.createContext(null);LE.displayName="CreatePostContext";function Ym(){return Ae.useContext(LE)}const NE=Ae.createContext(null);NE.displayName="ViewingMediaContext";function Ra(){return Ae.useContext(NE)}const FE=Ae.createContext(null);FE.displayName="PostsOpenedContext";function Dy(){return Ae.useContext(FE)}const Oy=Ae.createContext(null);Oy.displayName="SharingPostContext";function BE(){return Ae.useContext(Oy)}var Uz=60,Vz=Uz*60,jz=Vz*24,ale=jz*7,Bf=1e3,j4=Uz*Bf,OD=Vz*Bf,lle=jz*Bf,cle=ale*Bf,Py="millisecond",rd="second",va="minute",id="hour",hl="day",W4="week",Uo="month",Wz="quarter",pl="year",J1="date",qz="YYYY-MM-DDTHH:mm:ssZ",PD="Invalid Date",ule=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,dle=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;const fle={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}};var yC=function(t,n,r){var i=String(t);return!i||i.length>=n?t:""+Array(n+1-i.length).join(r)+t},hle=function(t){var n=-t.utcOffset(),r=Math.abs(n),i=Math.floor(r/60),o=r%60;return(n<=0?"+":"-")+yC(i,2,"0")+":"+yC(o,2,"0")},ple=function e(t,n){if(t.date()<n.date())return-e(n,t);var r=(n.year()-t.year())*12+(n.month()-t.month()),i=t.clone().add(r,Uo),o=n-i<0,s=t.clone().add(r+(o?-1:1),Uo);return+(-(r+(n-i)/(o?i-s:s-i))||0)},mle=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},gle=function(t){var n={M:Uo,y:pl,w:W4,d:hl,D:J1,h:id,m:va,s:rd,ms:Py,Q:Wz};return n[t]||String(t||"").toLowerCase().replace(/s$/,"")},vle=function(t){return t===void 0};const yle={s:yC,z:hle,m:ple,a:mle,p:gle,u:vle};var t0="en",pd={};pd[t0]=fle;var Kz="$isDayjsObject",HE=function(t){return t instanceof Ry||!!(t&&t[Kz])},g3=function e(t,n,r){var i;if(!t)return t0;if(typeof t=="string"){var o=t.toLowerCase();pd[o]&&(i=o),n&&(pd[o]=n,i=o);var s=t.split("-");if(!i&&s.length>1)return e(s[0])}else{var a=t.name;pd[a]=t,i=a}return!r&&i&&(t0=i),i||!r&&t0},Z=function(t,n){if(HE(t))return t.clone();var r=typeof n=="object"?n:{};return r.date=t,r.args=arguments,new Ry(r)},ble=function(t,n){return Z(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})},wn=yle;wn.l=g3;wn.i=HE;wn.w=ble;var xle=function(t){var n=t.date,r=t.utc;if(n===null)return new Date(NaN);if(wn.u(n))return new Date;if(n instanceof Date)return new Date(n);if(typeof n=="string"&&!/Z$/i.test(n)){var i=n.match(ule);if(i){var o=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)},Ry=function(){function e(n){this.$L=g3(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[Kz]=!0}var t=e.prototype;return t.parse=function(r){this.$d=xle(r),this.init()},t.init=function(){var r=this.$d;this.$y=r.getFullYear(),this.$M=r.getMonth(),this.$D=r.getDate(),this.$W=r.getDay(),this.$H=r.getHours(),this.$m=r.getMinutes(),this.$s=r.getSeconds(),this.$ms=r.getMilliseconds()},t.$utils=function(){return wn},t.isValid=function(){return this.$d.toString()!==PD},t.isSame=function(r,i){var o=Z(r);return this.startOf(i)<=o&&o<=this.endOf(i)},t.isAfter=function(r,i){return Z(r)<this.startOf(i)},t.isBefore=function(r,i){return this.endOf(i)<Z(r)},t.$g=function(r,i,o){return wn.u(r)?this[i]:this.set(o,r)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(r,i){var o=this,s=wn.u(i)?!0:i,a=wn.p(r),c=function(x,C){var w=wn.w(o.$u?Date.UTC(o.$y,C,x):new Date(o.$y,C,x),o);return s?w:w.endOf(hl)},u=function(x,C){var w=[0,0,0,0],S=[23,59,59,999];return wn.w(o.toDate()[x].apply(o.toDate("s"),(s?w:S).slice(C)),o)},d=this.$W,f=this.$M,h=this.$D,p="set"+(this.$u?"UTC":"");switch(a){case pl:return s?c(1,0):c(31,11);case Uo:return s?c(1,f):c(0,f+1);case W4:{var m=this.$locale().weekStart||0,v=(d<m?d+7:d)-m;return c(s?h-v:h+(6-v),f)}case hl:case J1:return u(p+"Hours",0);case id:return u(p+"Minutes",1);case va:return u(p+"Seconds",2);case rd:return u(p+"Milliseconds",3);default:return this.clone()}},t.endOf=function(r){return this.startOf(r,!1)},t.$set=function(r,i){var o,s=wn.p(r),a="set"+(this.$u?"UTC":""),c=(o={},o[hl]=a+"Date",o[J1]=a+"Date",o[Uo]=a+"Month",o[pl]=a+"FullYear",o[id]=a+"Hours",o[va]=a+"Minutes",o[rd]=a+"Seconds",o[Py]=a+"Milliseconds",o)[s],u=s===hl?this.$D+(i-this.$W):i;if(s===Uo||s===pl){var d=this.clone().set(J1,1);d.$d[c](u),d.init(),this.$d=d.set(J1,Math.min(this.$D,d.daysInMonth())).$d}else c&&this.$d[c](u);return this.init(),this},t.set=function(r,i){return this.clone().$set(r,i)},t.get=function(r){return this[wn.p(r)]()},t.add=function(r,i){var o=this,s;r=Number(r);var a=wn.p(i),c=function(h){var p=Z(o);return wn.w(p.date(p.date()+Math.round(h*r)),o)};if(a===Uo)return this.set(Uo,this.$M+r);if(a===pl)return this.set(pl,this.$y+r);if(a===hl)return c(1);if(a===W4)return c(7);var u=(s={},s[va]=j4,s[id]=OD,s[rd]=Bf,s)[a]||1,d=this.$d.getTime()+r*u;return wn.w(d,this)},t.subtract=function(r,i){return this.add(r*-1,i)},t.format=function(r){var i=this,o=this.$locale();if(!this.isValid())return o.invalidDate||PD;var s=r||qz,a=wn.z(this),c=this.$H,u=this.$m,d=this.$M,f=o.weekdays,h=o.months,p=o.meridiem,m=function(w,S,T,E){return w&&(w[S]||w(i,s))||T[S].slice(0,E)},v=function(w){return wn.s(c%12||12,w,"0")},b=p||function(C,w,S){var T=C<12?"AM":"PM";return S?T.toLowerCase():T},x=function(w){switch(w){case"YY":return String(i.$y).slice(-2);case"YYYY":return wn.s(i.$y,4,"0");case"M":return d+1;case"MM":return wn.s(d+1,2,"0");case"MMM":return m(o.monthsShort,d,h,3);case"MMMM":return m(h,d);case"D":return i.$D;case"DD":return wn.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return m(o.weekdaysMin,i.$W,f,2);case"ddd":return m(o.weekdaysShort,i.$W,f,3);case"dddd":return f[i.$W];case"H":return String(c);case"HH":return wn.s(c,2,"0");case"h":return v(1);case"hh":return v(2);case"a":return b(c,u,!0);case"A":return b(c,u,!1);case"m":return String(u);case"mm":return wn.s(u,2,"0");case"s":return String(i.$s);case"ss":return wn.s(i.$s,2,"0");case"SSS":return wn.s(i.$ms,3,"0");case"Z":return a}return null};return s.replace(dle,function(C,w){return w||x(C)||a.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(r,i,o){var s=this,a=wn.p(i),c=Z(r),u=(c.utcOffset()-this.utcOffset())*j4,d=this-c,f=function(){return wn.m(s,c)},h;switch(a){case pl:h=f()/12;break;case Uo:h=f();break;case Wz:h=f()/3;break;case W4:h=(d-u)/cle;break;case hl:h=(d-u)/lle;break;case id:h=d/OD;break;case va:h=d/j4;break;case rd:h=d/Bf;break;default:h=d;break}return o?h:wn.a(h)},t.daysInMonth=function(){return this.endOf(Uo).$D},t.$locale=function(){return pd[this.$L]},t.locale=function(r,i){if(!r)return this.$L;var o=this.clone(),s=g3(r,i,!0);return s&&(o.$L=s),o},t.clone=function(){return wn.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},e}(),Gz=Ry.prototype;Z.prototype=Gz;[["$ms",Py],["$s",rd],["$m",va],["$H",id],["$W",hl],["$M",Uo],["$y",pl],["$D",J1]].forEach(function(e){Gz[e[1]]=function(t){return this.$g(t,e[0],e[1])}});Z.extend=function(e,t){return e.$i||(e(t,Ry,Z),e.$i=!0),Z};Z.locale=g3;Z.isDayjs=HE;Z.unix=function(e){return Z(e*1e3)};Z.en=pd[t0];Z.Ls=pd;Z.p={};var Cle=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(n,r,i){return r||i.slice(1)})},Yz={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},wle=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(r,i,o){var s=o&&o.toUpperCase();return i||n[o]||Yz[o]||Cle(n[s])})};const On=function(e,t,n){var r=t.prototype,i=r.format;n.en.formats=Yz,r.format=function(o){o===void 0&&(o=qz);var s=this.$locale(),a=s.formats,c=a===void 0?{}:a,u=wle(o,c);return i.call(this,u)}},Pn=function(e,t,n){e=e||{};var r=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};n.en.relativeTime=i,r.fromToBase=function(a,c,u,d,f){for(var h=u.$locale().relativeTime||i,p=e.thresholds||[{l:"s",r:44,d:rd},{l:"m",r:89},{l:"mm",r:44,d:va},{l:"h",r:89},{l:"hh",r:21,d:id},{l:"d",r:35},{l:"dd",r:25,d:hl},{l:"M",r:45},{l:"MM",r:10,d:Uo},{l:"y",r:17},{l:"yy",d:pl}],m=p.length,v,b,x,C=0;C<m;C+=1){var w=p[C];w.d&&(v=d?n(a).diff(u,w.d,!0):u.diff(a,w.d,!0));var S=(e.rounding||Math.round)(Math.abs(v));if(x=v>0,S<=w.r||!w.r){S<=1&&C>0&&(w=p[C-1]);var T=h[w.l];f&&(S=f(""+S)),typeof T=="string"?b=T.replace("%d",S):b=T(S,c,w.l,x);break}}if(c)return b;var E=x?h.future:h.past;return typeof E=="function"?E(b):E.replace("%s",b)};function o(a,c,u,d){return r.fromToBase(a,c,u,d)}r.to=function(a,c){return o(a,c,this,!0)},r.from=function(a,c){return o(a,c,this)};var s=function(c){return c.$u?n.utc():n()};r.toNow=function(a){return this.to(s(this),a)},r.fromNow=function(a){return this.from(s(this),a)}},zE=function(e,t,n){n.updateLocale=function(r,i){var o=n.Ls,s=o[r];if(!!s){var a=i?Object.keys(i):[];return a.forEach(function(c){s[c]=i[c]}),s}}};var Tn={exports:{}};(function(e,t){(function(r,i){e.exports=i(y.exports)})(VJ,n=>(()=>{var r={"./node_modules/css-mediaquery/index.js":(a,c)=>{c.match=m,c.parse=v;var u=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,d=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,f=/^(?:(min|max)-)?(.+)/,h=/(em|rem|px|cm|mm|in|pt|pc)?$/,p=/(dpi|dpcm|dppx)?$/;function m(w,S){return v(w).some(function(T){var E=T.inverse,k=T.type==="all"||S.type===T.type;if(k&&E||!(k||E))return!1;var _=T.expressions.every(function(O){var D=O.feature,L=O.modifier,N=O.value,j=S[D];if(!j)return!1;switch(D){case"orientation":case"scan":return j.toLowerCase()===N.toLowerCase();case"width":case"height":case"device-width":case"device-height":N=C(N),j=C(j);break;case"resolution":N=x(N),j=x(j);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":N=b(N),j=b(j);break;case"grid":case"color":case"color-index":case"monochrome":N=parseInt(N,10)||1,j=parseInt(j,10)||0;break}switch(L){case"min":return j>=N;case"max":return j<=N;default:return j===N}});return _&&!E||!_&&E})}function v(w){return w.split(",").map(function(S){S=S.trim();var T=S.match(u),E=T[1],k=T[2],_=T[3]||"",O={};return O.inverse=!!E&&E.toLowerCase()==="not",O.type=k?k.toLowerCase():"all",_=_.match(/\([^\)]+\)/g)||[],O.expressions=_.map(function(D){var L=D.match(d),N=L[1].toLowerCase().match(f);return{modifier:N[1],feature:N[2],value:L[2]}}),O})}function b(w){var S=Number(w),T;return S||(T=w.match(/^(\d+)\s*\/\s*(\d+)$/),S=T[1]/T[2]),S}function x(w){var S=parseFloat(w),T=String(w).match(p)[1];switch(T){case"dpcm":return S/2.54;case"dppx":return S*96;default:return S}}function C(w){var S=parseFloat(w),T=String(w).match(h)[1];switch(T){case"em":return S*16;case"rem":return S*16;case"cm":return S*96/2.54;case"mm":return S*96/2.54/10;case"in":return S*96;case"pt":return S*72;case"pc":return S*72/12;default:return S}}},"./node_modules/hyphenate-style-name/index.js":(a,c,u)=>{u.r(c),u.d(c,{default:()=>v});var d=/[A-Z]/g,f=/^ms-/,h={};function p(b){return"-"+b.toLowerCase()}function m(b){if(h.hasOwnProperty(b))return h[b];var x=b.replace(d,p);return h[b]=f.test(x)?"-"+x:x}const v=m},"./node_modules/matchmediaquery/index.js":(a,c,u)=>{var d=u("./node_modules/css-mediaquery/index.js").match,f=typeof window<"u"?window.matchMedia:null;function h(m,v,b){var x=this;if(f&&!b){var C=f.call(window,m);this.matches=C.matches,this.media=C.media,C.addListener(T)}else this.matches=d(m,v),this.media=m;this.addListener=w,this.removeListener=S,this.dispose=E;function w(k){C&&C.addListener(k)}function S(k){C&&C.removeListener(k)}function T(k){x.matches=k.matches,x.media=k.media}function E(){C&&C.removeListener(T)}}function p(m,v,b){return new h(m,v,b)}a.exports=p},"./node_modules/object-assign/index.js":a=>{/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;function f(p){if(p==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(p)}function h(){try{if(!Object.assign)return!1;var p=new String("abc");if(p[5]="de",Object.getOwnPropertyNames(p)[0]==="5")return!1;for(var m={},v=0;v<10;v++)m["_"+String.fromCharCode(v)]=v;var b=Object.getOwnPropertyNames(m).map(function(C){return m[C]});if(b.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(C){x[C]=C}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}a.exports=h()?Object.assign:function(p,m){for(var v,b=f(p),x,C=1;C<arguments.length;C++){v=Object(arguments[C]);for(var w in v)u.call(v,w)&&(b[w]=v[w]);if(c){x=c(v);for(var S=0;S<x.length;S++)d.call(v,x[S])&&(b[x[S]]=v[x[S]])}}return b}},"./node_modules/prop-types/checkPropTypes.js":(a,c,u)=>{var d=function(){};{var f=u("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),h={},p=u("./node_modules/prop-types/lib/has.js");d=function(v){var b="Warning: "+v;typeof console<"u"&&console.error(b);try{throw new Error(b)}catch{}}}function m(v,b,x,C,w){for(var S in v)if(p(v,S)){var T;try{if(typeof v[S]!="function"){var E=Error((C||"React class")+": "+x+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}T=v[S](b,S,C,x,null,f)}catch(_){T=_}if(T&&!(T instanceof Error)&&d((C||"React class")+": type specification of "+x+" `"+S+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof T+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),T instanceof Error&&!(T.message in h)){h[T.message]=!0;var k=w?w():"";d("Failed "+x+" type: "+T.message+(k!=null?k:""))}}}m.resetWarningCache=function(){h={}},a.exports=m},"./node_modules/prop-types/factoryWithTypeCheckers.js":(a,c,u)=>{var d=u("./node_modules/react-is/index.js"),f=u("./node_modules/object-assign/index.js"),h=u("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),p=u("./node_modules/prop-types/lib/has.js"),m=u("./node_modules/prop-types/checkPropTypes.js"),v=function(){};v=function(x){var C="Warning: "+x;typeof console<"u"&&console.error(C);try{throw new Error(C)}catch{}};function b(){return null}a.exports=function(x,C){var w=typeof Symbol=="function"&&Symbol.iterator,S="@@iterator";function T(J){var fe=J&&(w&&J[w]||J[S]);if(typeof fe=="function")return fe}var E="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:N(),arrayOf:j,element:G(),elementType:X(),instanceOf:re,node:R(),objectOf:U,oneOf:oe,oneOfType:H,shape:ee,exact:I};function _(J,fe){return J===fe?J!==0||1/J===1/fe:J!==J&&fe!==fe}function O(J,fe){this.message=J,this.data=fe&&typeof fe=="object"?fe:{},this.stack=""}O.prototype=Error.prototype;function D(J){var fe={},we=0;function Le(Ge,Pe,rt,ft,vt,We,De){if(ft=ft||E,We=We||rt,De!==h){if(C){var Vt=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 Vt.name="Invariant Violation",Vt}else if(typeof console<"u"){var bn=ft+":"+rt;!fe[bn]&&we<3&&(v("You are manually calling a React.PropTypes validation function for the `"+We+"` prop on `"+ft+"`. 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."),fe[bn]=!0,we++)}}return Pe[rt]==null?Ge?Pe[rt]===null?new O("The "+vt+" `"+We+"` is marked as required "+("in `"+ft+"`, but its value is `null`.")):new O("The "+vt+" `"+We+"` is marked as required in "+("`"+ft+"`, but its value is `undefined`.")):null:J(Pe,rt,ft,vt,We)}var He=Le.bind(null,!1);return He.isRequired=Le.bind(null,!0),He}function L(J){function fe(we,Le,He,Ge,Pe,rt){var ft=we[Le],vt=pe(ft);if(vt!==J){var We=ye(ft);return new O("Invalid "+Ge+" `"+Pe+"` of type "+("`"+We+"` supplied to `"+He+"`, expected ")+("`"+J+"`."),{expectedType:J})}return null}return D(fe)}function N(){return D(b)}function j(J){function fe(we,Le,He,Ge,Pe){if(typeof J!="function")return new O("Property `"+Pe+"` of component `"+He+"` has invalid PropType notation inside arrayOf.");var rt=we[Le];if(!Array.isArray(rt)){var ft=pe(rt);return new O("Invalid "+Ge+" `"+Pe+"` of type "+("`"+ft+"` supplied to `"+He+"`, expected an array."))}for(var vt=0;vt<rt.length;vt++){var We=J(rt,vt,He,Ge,Pe+"["+vt+"]",h);if(We instanceof Error)return We}return null}return D(fe)}function G(){function J(fe,we,Le,He,Ge){var Pe=fe[we];if(!x(Pe)){var rt=pe(Pe);return new O("Invalid "+He+" `"+Ge+"` of type "+("`"+rt+"` supplied to `"+Le+"`, expected a single ReactElement."))}return null}return D(J)}function X(){function J(fe,we,Le,He,Ge){var Pe=fe[we];if(!d.isValidElementType(Pe)){var rt=pe(Pe);return new O("Invalid "+He+" `"+Ge+"` of type "+("`"+rt+"` supplied to `"+Le+"`, expected a single ReactElement type."))}return null}return D(J)}function re(J){function fe(we,Le,He,Ge,Pe){if(!(we[Le]instanceof J)){var rt=J.name||E,ft=$e(we[Le]);return new O("Invalid "+Ge+" `"+Pe+"` of type "+("`"+ft+"` supplied to `"+He+"`, expected ")+("instance of `"+rt+"`."))}return null}return D(fe)}function oe(J){if(!Array.isArray(J))return arguments.length>1?v("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])."):v("Invalid argument supplied to oneOf, expected an array."),b;function fe(we,Le,He,Ge,Pe){for(var rt=we[Le],ft=0;ft<J.length;ft++)if(_(rt,J[ft]))return null;var vt=JSON.stringify(J,function(De,Vt){var bn=ye(Vt);return bn==="symbol"?String(Vt):Vt});return new O("Invalid "+Ge+" `"+Pe+"` of value `"+String(rt)+"` "+("supplied to `"+He+"`, expected one of "+vt+"."))}return D(fe)}function U(J){function fe(we,Le,He,Ge,Pe){if(typeof J!="function")return new O("Property `"+Pe+"` of component `"+He+"` has invalid PropType notation inside objectOf.");var rt=we[Le],ft=pe(rt);if(ft!=="object")return new O("Invalid "+Ge+" `"+Pe+"` of type "+("`"+ft+"` supplied to `"+He+"`, expected an object."));for(var vt in rt)if(p(rt,vt)){var We=J(rt,vt,He,Ge,Pe+"."+vt,h);if(We instanceof Error)return We}return null}return D(fe)}function H(J){if(!Array.isArray(J))return v("Invalid argument supplied to oneOfType, expected an instance of array."),b;for(var fe=0;fe<J.length;fe++){var we=J[fe];if(typeof we!="function")return v("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_e(we)+" at index "+fe+"."),b}function Le(He,Ge,Pe,rt,ft){for(var vt=[],We=0;We<J.length;We++){var De=J[We],Vt=De(He,Ge,Pe,rt,ft,h);if(Vt==null)return null;Vt.data&&p(Vt.data,"expectedType")&&vt.push(Vt.data.expectedType)}var bn=vt.length>0?", expected one of type ["+vt.join(", ")+"]":"";return new O("Invalid "+rt+" `"+ft+"` supplied to "+("`"+Pe+"`"+bn+"."))}return D(Le)}function R(){function J(fe,we,Le,He,Ge){return me(fe[we])?null:new O("Invalid "+He+" `"+Ge+"` supplied to "+("`"+Le+"`, expected a ReactNode."))}return D(J)}function se(J,fe,we,Le,He){return new O((J||"React class")+": "+fe+" type `"+we+"."+Le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+He+"`.")}function ee(J){function fe(we,Le,He,Ge,Pe){var rt=we[Le],ft=pe(rt);if(ft!=="object")return new O("Invalid "+Ge+" `"+Pe+"` of type `"+ft+"` "+("supplied to `"+He+"`, expected `object`."));for(var vt in J){var We=J[vt];if(typeof We!="function")return se(He,Ge,Pe,vt,ye(We));var De=We(rt,vt,He,Ge,Pe+"."+vt,h);if(De)return De}return null}return D(fe)}function I(J){function fe(we,Le,He,Ge,Pe){var rt=we[Le],ft=pe(rt);if(ft!=="object")return new O("Invalid "+Ge+" `"+Pe+"` of type `"+ft+"` "+("supplied to `"+He+"`, expected `object`."));var vt=f({},we[Le],J);for(var We in vt){var De=J[We];if(p(J,We)&&typeof De!="function")return se(He,Ge,Pe,We,ye(De));if(!De)return new O("Invalid "+Ge+" `"+Pe+"` key `"+We+"` supplied to `"+He+"`.\nBad object: "+JSON.stringify(we[Le],null,"  ")+`
Valid keys: `+JSON.stringify(Object.keys(J),null,"  "));var Vt=De(rt,We,He,Ge,Pe+"."+We,h);if(Vt)return Vt}return null}return D(fe)}function me(J){switch(typeof J){case"number":case"string":case"undefined":return!0;case"boolean":return!J;case"object":if(Array.isArray(J))return J.every(me);if(J===null||x(J))return!0;var fe=T(J);if(fe){var we=fe.call(J),Le;if(fe!==J.entries){for(;!(Le=we.next()).done;)if(!me(Le.value))return!1}else for(;!(Le=we.next()).done;){var He=Le.value;if(He&&!me(He[1]))return!1}}else return!1;return!0;default:return!1}}function Se(J,fe){return J==="symbol"?!0:fe?fe["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&fe instanceof Symbol:!1}function pe(J){var fe=typeof J;return Array.isArray(J)?"array":J instanceof RegExp?"object":Se(fe,J)?"symbol":fe}function ye(J){if(typeof J>"u"||J===null)return""+J;var fe=pe(J);if(fe==="object"){if(J instanceof Date)return"date";if(J instanceof RegExp)return"regexp"}return fe}function _e(J){var fe=ye(J);switch(fe){case"array":case"object":return"an "+fe;case"boolean":case"date":case"regexp":return"a "+fe;default:return fe}}function $e(J){return!J.constructor||!J.constructor.name?E:J.constructor.name}return k.checkPropTypes=m,k.resetWarningCache=m.resetWarningCache,k.PropTypes=k,k}},"./node_modules/prop-types/index.js":(a,c,u)=>{{var d=u("./node_modules/react-is/index.js"),f=!0;a.exports=u("./node_modules/prop-types/factoryWithTypeCheckers.js")(d.isElement,f)}},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":a=>{var c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";a.exports=c},"./node_modules/prop-types/lib/has.js":a=>{a.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":(a,c)=>{/** @license React v16.13.1
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(){var u=typeof Symbol=="function"&&Symbol.for,d=u?Symbol.for("react.element"):60103,f=u?Symbol.for("react.portal"):60106,h=u?Symbol.for("react.fragment"):60107,p=u?Symbol.for("react.strict_mode"):60108,m=u?Symbol.for("react.profiler"):60114,v=u?Symbol.for("react.provider"):60109,b=u?Symbol.for("react.context"):60110,x=u?Symbol.for("react.async_mode"):60111,C=u?Symbol.for("react.concurrent_mode"):60111,w=u?Symbol.for("react.forward_ref"):60112,S=u?Symbol.for("react.suspense"):60113,T=u?Symbol.for("react.suspense_list"):60120,E=u?Symbol.for("react.memo"):60115,k=u?Symbol.for("react.lazy"):60116,_=u?Symbol.for("react.block"):60121,O=u?Symbol.for("react.fundamental"):60117,D=u?Symbol.for("react.responder"):60118,L=u?Symbol.for("react.scope"):60119;function N(De){return typeof De=="string"||typeof De=="function"||De===h||De===C||De===m||De===p||De===S||De===T||typeof De=="object"&&De!==null&&(De.$$typeof===k||De.$$typeof===E||De.$$typeof===v||De.$$typeof===b||De.$$typeof===w||De.$$typeof===O||De.$$typeof===D||De.$$typeof===L||De.$$typeof===_)}function j(De){if(typeof De=="object"&&De!==null){var Vt=De.$$typeof;switch(Vt){case d:var bn=De.type;switch(bn){case x:case C:case h:case m:case p:case S:return bn;default:var $r=bn&&bn.$$typeof;switch($r){case b:case w:case k:case E:case v:return $r;default:return Vt}}case f:return Vt}}}var G=x,X=C,re=b,oe=v,U=d,H=w,R=h,se=k,ee=E,I=f,me=m,Se=p,pe=S,ye=!1;function _e(De){return ye||(ye=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$e(De)||j(De)===x}function $e(De){return j(De)===C}function J(De){return j(De)===b}function fe(De){return j(De)===v}function we(De){return typeof De=="object"&&De!==null&&De.$$typeof===d}function Le(De){return j(De)===w}function He(De){return j(De)===h}function Ge(De){return j(De)===k}function Pe(De){return j(De)===E}function rt(De){return j(De)===f}function ft(De){return j(De)===m}function vt(De){return j(De)===p}function We(De){return j(De)===S}c.AsyncMode=G,c.ConcurrentMode=X,c.ContextConsumer=re,c.ContextProvider=oe,c.Element=U,c.ForwardRef=H,c.Fragment=R,c.Lazy=se,c.Memo=ee,c.Portal=I,c.Profiler=me,c.StrictMode=Se,c.Suspense=pe,c.isAsyncMode=_e,c.isConcurrentMode=$e,c.isContextConsumer=J,c.isContextProvider=fe,c.isElement=we,c.isForwardRef=Le,c.isFragment=He,c.isLazy=Ge,c.isMemo=Pe,c.isPortal=rt,c.isProfiler=ft,c.isStrictMode=vt,c.isSuspense=We,c.isValidElementType=N,c.typeOf=j})()},"./node_modules/react-is/index.js":(a,c,u)=>{a.exports=u("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(a,c,u)=>{u.r(c),u.d(c,{shallowEqualArrays:()=>f,shallowEqualObjects:()=>d});function d(h,p){if(h===p)return!0;if(!h||!p)return!1;var m=Object.keys(h),v=Object.keys(p),b=m.length;if(v.length!==b)return!1;for(var x=0;x<b;x++){var C=m[x];if(h[C]!==p[C]||!Object.prototype.hasOwnProperty.call(p,C))return!1}return!0}function f(h,p){if(h===p)return!0;if(!h||!p)return!1;var m=h.length;if(p.length!==m)return!1;for(var v=0;v<m;v++)if(h[v]!==p[v])return!1;return!0}},"./src/Component.ts":function(a,c,u){var d=this&&this.__rest||function(m,v){var b={};for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&v.indexOf(x)<0&&(b[x]=m[x]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,x=Object.getOwnPropertySymbols(m);C<x.length;C++)v.indexOf(x[C])<0&&Object.prototype.propertyIsEnumerable.call(m,x[C])&&(b[x[C]]=m[x[C]]);return b},f=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(c,"__esModule",{value:!0});var h=f(u("./src/useMediaQuery.ts")),p=function(m){var v=m.children,b=m.device,x=m.onChange,C=d(m,["children","device","onChange"]),w=(0,h.default)(C,b,x);return typeof v=="function"?v(w):w?v:null};c.default=p},"./src/Context.ts":(a,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0});var d=u("react"),f=(0,d.createContext)(void 0);c.default=f},"./src/index.ts":function(a,c,u){var d=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(c,"__esModule",{value:!0}),c.Context=c.toQuery=c.useMediaQuery=c.default=void 0;var f=d(u("./src/useMediaQuery.ts"));c.useMediaQuery=f.default;var h=d(u("./src/Component.ts"));c.default=h.default;var p=d(u("./src/toQuery.ts"));c.toQuery=p.default;var m=d(u("./src/Context.ts"));c.Context=m.default},"./src/mediaQuery.ts":function(a,c,u){var d=this&&this.__assign||function(){return d=Object.assign||function(S){for(var T,E=1,k=arguments.length;E<k;E++){T=arguments[E];for(var _ in T)Object.prototype.hasOwnProperty.call(T,_)&&(S[_]=T[_])}return S},d.apply(this,arguments)},f=this&&this.__rest||function(S,T){var E={};for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&T.indexOf(k)<0&&(E[k]=S[k]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,k=Object.getOwnPropertySymbols(S);_<k.length;_++)T.indexOf(k[_])<0&&Object.prototype.propertyIsEnumerable.call(S,k[_])&&(E[k[_]]=S[k[_]]);return E},h=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(c,"__esModule",{value:!0});var p=h(u("./node_modules/prop-types/index.js")),m=p.default.oneOfType([p.default.string,p.default.number]),v={all:p.default.bool,grid:p.default.bool,aural:p.default.bool,braille:p.default.bool,handheld:p.default.bool,print:p.default.bool,projection:p.default.bool,screen:p.default.bool,tty:p.default.bool,tv:p.default.bool,embossed:p.default.bool},b={orientation:p.default.oneOf(["portrait","landscape"]),scan:p.default.oneOf(["progressive","interlace"]),aspectRatio:p.default.string,deviceAspectRatio:p.default.string,height:m,deviceHeight:m,width:m,deviceWidth:m,color:p.default.bool,colorIndex:p.default.bool,monochrome:p.default.bool,resolution:m,type:Object.keys(v)};b.type;var x=f(b,["type"]),C=d({minAspectRatio:p.default.string,maxAspectRatio:p.default.string,minDeviceAspectRatio:p.default.string,maxDeviceAspectRatio:p.default.string,minHeight:m,maxHeight:m,minDeviceHeight:m,maxDeviceHeight:m,minWidth:m,maxWidth:m,minDeviceWidth:m,maxDeviceWidth:m,minColor:p.default.number,maxColor:p.default.number,minColorIndex:p.default.number,maxColorIndex:p.default.number,minMonochrome:p.default.number,maxMonochrome:p.default.number,minResolution:m,maxResolution:m},x),w=d(d({},v),C);c.default={all:w,types:v,matchers:b,features:C}},"./src/toQuery.ts":function(a,c,u){var d=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(c,"__esModule",{value:!0});var f=d(u("./node_modules/hyphenate-style-name/index.js")),h=d(u("./src/mediaQuery.ts")),p=function(x){return"not ".concat(x)},m=function(x,C){var w=(0,f.default)(x);return typeof C=="number"&&(C="".concat(C,"px")),C===!0?w:C===!1?p(w):"(".concat(w,": ").concat(C,")")},v=function(x){return x.join(" and ")},b=function(x){var C=[];return Object.keys(h.default.all).forEach(function(w){var S=x[w];S!=null&&C.push(m(w,S))}),v(C)};c.default=b},"./src/useMediaQuery.ts":function(a,c,u){var d=this&&this.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(c,"__esModule",{value:!0});var f=u("react"),h=d(u("./node_modules/matchmediaquery/index.js")),p=d(u("./node_modules/hyphenate-style-name/index.js")),m=u("./node_modules/shallow-equal/dist/index.esm.js"),v=d(u("./src/toQuery.ts")),b=d(u("./src/Context.ts")),x=function(O){return O.query||(0,v.default)(O)},C=function(O){if(!!O){var D=Object.keys(O);return D.reduce(function(L,N){return L[(0,p.default)(N)]=O[N],L},{})}},w=function(){var O=(0,f.useRef)(!1);return(0,f.useEffect)(function(){O.current=!0},[]),O.current},S=function(O){var D=(0,f.useContext)(b.default),L=function(){return C(O)||C(D)},N=(0,f.useState)(L),j=N[0],G=N[1];return(0,f.useEffect)(function(){var X=L();(0,m.shallowEqualObjects)(j,X)||G(X)},[O,D]),j},T=function(O){var D=function(){return x(O)},L=(0,f.useState)(D),N=L[0],j=L[1];return(0,f.useEffect)(function(){var G=D();N!==G&&j(G)},[O]),N},E=function(O,D){var L=function(){return(0,h.default)(O,D||{},!!D)},N=(0,f.useState)(L),j=N[0],G=N[1],X=w();return(0,f.useEffect)(function(){if(X){var re=L();return G(re),function(){re&&re.dispose()}}},[O,D]),j},k=function(O){var D=(0,f.useState)(O.matches),L=D[0],N=D[1];return(0,f.useEffect)(function(){var j=function(G){N(G.matches)};return O.addListener(j),N(O.matches),function(){O.removeListener(j)}},[O]),L},_=function(O,D,L){var N=S(D),j=T(O);if(!j)throw new Error("Invalid or missing MediaQuery!");var G=E(j,N),X=k(G),re=w();return(0,f.useEffect)(function(){re&&L&&L(X)},[X]),(0,f.useEffect)(function(){return function(){G&&G.dispose()}},[]),X};c.default=_},react:a=>{a.exports=n}},i={};function o(a){var c=i[a];if(c!==void 0)return c.exports;var u=i[a]={exports:{}};return r[a].call(u.exports,u,u.exports,o),u.exports}o.d=(a,c)=>{for(var u in c)o.o(c,u)&&!o.o(a,u)&&Object.defineProperty(a,u,{enumerable:!0,get:c[u]})},o.o=(a,c)=>Object.prototype.hasOwnProperty.call(a,c),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s=o("./src/index.ts");return s})())})(Tn);var Qz={exports:{}};(()=>{var e={296:(i,o,s)=>{var a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,f=parseInt,h=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),v=Object.prototype.toString,b=Math.max,x=Math.min,C=function(){return m.Date.now()};function w(T){var E=typeof T;return!!T&&(E=="object"||E=="function")}function S(T){if(typeof T=="number")return T;if(function(_){return typeof _=="symbol"||function(O){return!!O&&typeof O=="object"}(_)&&v.call(_)=="[object Symbol]"}(T))return NaN;if(w(T)){var E=typeof T.valueOf=="function"?T.valueOf():T;T=w(E)?E+"":E}if(typeof T!="string")return T===0?T:+T;T=T.replace(a,"");var k=u.test(T);return k||d.test(T)?f(T.slice(2),k?2:8):c.test(T)?NaN:+T}i.exports=function(T,E,k){var _,O,D,L,N,j,G=0,X=!1,re=!1,oe=!0;if(typeof T!="function")throw new TypeError("Expected a function");function U(I){var me=_,Se=O;return _=O=void 0,G=I,L=T.apply(Se,me)}function H(I){var me=I-j;return j===void 0||me>=E||me<0||re&&I-G>=D}function R(){var I=C();if(H(I))return se(I);N=setTimeout(R,function(me){var Se=E-(me-j);return re?x(Se,D-(me-G)):Se}(I))}function se(I){return N=void 0,oe&&_?U(I):(_=O=void 0,L)}function ee(){var I=C(),me=H(I);if(_=arguments,O=this,j=I,me){if(N===void 0)return function(Se){return G=Se,N=setTimeout(R,E),X?U(Se):L}(j);if(re)return N=setTimeout(R,E),U(j)}return N===void 0&&(N=setTimeout(R,E)),L}return E=S(E)||0,w(k)&&(X=!!k.leading,D=(re="maxWait"in k)?b(S(k.maxWait)||0,E):D,oe="trailing"in k?!!k.trailing:oe),ee.cancel=function(){N!==void 0&&clearTimeout(N),G=0,_=j=O=N=void 0},ee.flush=function(){return N===void 0?L:se(C())},ee}},96:(i,o,s)=>{var a="Expected a function",c=NaN,u="[object Symbol]",d=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,p=/^0o[0-7]+$/i,m=parseInt,v=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,b=typeof self=="object"&&self&&self.Object===Object&&self,x=v||b||Function("return this")(),C=Object.prototype.toString,w=Math.max,S=Math.min,T=function(){return x.Date.now()};function E(_){var O=typeof _;return!!_&&(O=="object"||O=="function")}function k(_){if(typeof _=="number")return _;if(function(L){return typeof L=="symbol"||function(N){return!!N&&typeof N=="object"}(L)&&C.call(L)==u}(_))return c;if(E(_)){var O=typeof _.valueOf=="function"?_.valueOf():_;_=E(O)?O+"":O}if(typeof _!="string")return _===0?_:+_;_=_.replace(d,"");var D=h.test(_);return D||p.test(_)?m(_.slice(2),D?2:8):f.test(_)?c:+_}i.exports=function(_,O,D){var L=!0,N=!0;if(typeof _!="function")throw new TypeError(a);return E(D)&&(L="leading"in D?!!D.leading:L,N="trailing"in D?!!D.trailing:N),function(j,G,X){var re,oe,U,H,R,se,ee=0,I=!1,me=!1,Se=!0;if(typeof j!="function")throw new TypeError(a);function pe(fe){var we=re,Le=oe;return re=oe=void 0,ee=fe,H=j.apply(Le,we)}function ye(fe){var we=fe-se;return se===void 0||we>=G||we<0||me&&fe-ee>=U}function _e(){var fe=T();if(ye(fe))return $e(fe);R=setTimeout(_e,function(we){var Le=G-(we-se);return me?S(Le,U-(we-ee)):Le}(fe))}function $e(fe){return R=void 0,Se&&re?pe(fe):(re=oe=void 0,H)}function J(){var fe=T(),we=ye(fe);if(re=arguments,oe=this,se=fe,we){if(R===void 0)return function(Le){return ee=Le,R=setTimeout(_e,G),I?pe(Le):H}(se);if(me)return R=setTimeout(_e,G),pe(se)}return R===void 0&&(R=setTimeout(_e,G)),H}return G=k(G)||0,E(X)&&(I=!!X.leading,U=(me="maxWait"in X)?w(k(X.maxWait)||0,G):U,Se="trailing"in X?!!X.trailing:Se),J.cancel=function(){R!==void 0&&clearTimeout(R),ee=0,re=se=oe=R=void 0},J.flush=function(){return R===void 0?H:$e(T())},J}(_,O,{leading:L,maxWait:O,trailing:N})}},703:(i,o,s)=>{var a=s(414);function c(){}function u(){}u.resetWarningCache=c,i.exports=function(){function d(p,m,v,b,x,C){if(C!==a){var w=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 w.name="Invariant Violation",w}}function f(){return d}d.isRequired=d;var h={array:d,bigint:d,bool:d,func:d,number:d,object:d,string:d,symbol:d,any:d,arrayOf:f,element:d,elementType:d,instanceOf:f,node:d,objectOf:f,oneOf:f,oneOfType:f,shape:f,exact:f,checkPropTypes:u,resetWarningCache:c};return h.PropTypes=h,h}},697:(i,o,s)=>{i.exports=s(703)()},414:i=>{i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(i){var o=t[i];if(o!==void 0)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.n=i=>{var o=i&&i.__esModule?()=>i.default:()=>i;return n.d(o,{a:o}),o},n.d=(i,o)=>{for(var s in o)n.o(o,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:o[s]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{LazyLoadComponent:()=>He,LazyLoadImage:()=>Xs,trackWindowScroll:()=>se});const i=y.exports;var o=n.n(i),s=n(697);const a=Lr.exports;var c=n.n(a);function u(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function d(K){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},d(K)}function f(K,V){var le=Object.keys(K);if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(K);V&&(ge=ge.filter(function(qe){return Object.getOwnPropertyDescriptor(K,qe).enumerable})),le.push.apply(le,ge)}return le}function h(K,V,le){return(V=m(V))in K?Object.defineProperty(K,V,{value:le,enumerable:!0,configurable:!0,writable:!0}):K[V]=le,K}function p(K,V){for(var le=0;le<V.length;le++){var ge=V[le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(K,m(ge.key),ge)}}function m(K){var V=function(le,ge){if(d(le)!=="object"||le===null)return le;var qe=le[Symbol.toPrimitive];if(qe!==void 0){var xt=qe.call(le,"string");if(d(xt)!=="object")return xt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(K);return d(V)==="symbol"?V:String(V)}function v(K,V){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},v(K,V)}function b(K){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},b(K)}var x=function(K){K.forEach(function(V){V.isIntersecting&&V.target.onVisible()})},C={},w=function(K){(function(B,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(ne&&ne.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),ne&&v(B,ne)})(Mt,K);var V,le,ge,qe,xt=(ge=Mt,qe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var B,ne=b(ge);if(qe){var xe=b(this).constructor;B=Reflect.construct(ne,arguments,xe)}else B=ne.apply(this,arguments);return function(be,ke){if(ke&&(d(ke)==="object"||typeof ke=="function"))return ke;if(ke!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(lt){if(lt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return lt}(be)}(this,B)});function Mt(B){var ne;if(function(be,ke){if(!(be instanceof ke))throw new TypeError("Cannot call a class as a function")}(this,Mt),(ne=xt.call(this,B)).supportsObserver=!B.scrollPosition&&B.useIntersectionObserver&&u(),ne.supportsObserver){var xe=B.threshold;ne.observer=function(be){return C[be]=C[be]||new IntersectionObserver(x,{rootMargin:be+"px"}),C[be]}(xe)}return ne}return V=Mt,le=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,ne=this.placeholder.getBoundingClientRect(),xe=c().findDOMNode(this.placeholder).style,be=parseInt(xe.getPropertyValue("margin-left"),10)||0,ke=parseInt(xe.getPropertyValue("margin-top"),10)||0;return{bottom:B.y+ne.bottom+ke,left:B.x+ne.left+be,right:B.x+ne.right+be,top:B.y+ne.top+ke}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var B=this.props,ne=B.scrollPosition,xe=B.threshold,be=this.getPlaceholderBoundingBox(ne),ke=ne.y+window.innerHeight,lt=ne.x,jt=ne.x+window.innerWidth,Ot=ne.y;return Boolean(Ot-xe<=be.bottom&&ke+xe>=be.top&&lt-xe<=be.right&&jt+xe>=be.left)}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var B=this,ne=this.props,xe=ne.className,be=ne.height,ke=ne.placeholder,lt=ne.style,jt=ne.width;if(ke&&typeof ke.type!="function")return o().cloneElement(ke,{ref:function(It){return B.placeholder=It}});var Ot=function(It){for(var Ut=1;Ut<arguments.length;Ut++){var sn=arguments[Ut]!=null?arguments[Ut]:{};Ut%2?f(Object(sn),!0).forEach(function(tn){h(It,tn,sn[tn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(It,Object.getOwnPropertyDescriptors(sn)):f(Object(sn)).forEach(function(tn){Object.defineProperty(It,tn,Object.getOwnPropertyDescriptor(sn,tn))})}return It}({display:"inline-block"},lt);return jt!==void 0&&(Ot.width=jt),be!==void 0&&(Ot.height=be),o().createElement("span",{className:xe,ref:function(It){return B.placeholder=It},style:Ot},ke)}}],le&&p(V.prototype,le),Object.defineProperty(V,"prototype",{writable:!1}),Mt}(o().Component);w.propTypes={onVisible:s.PropTypes.func.isRequired,className:s.PropTypes.string,height:s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string]),placeholder:s.PropTypes.element,threshold:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool,scrollPosition:s.PropTypes.shape({x:s.PropTypes.number.isRequired,y:s.PropTypes.number.isRequired}),width:s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string])},w.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const S=w;var T=n(296),E=n.n(T),k=n(96),_=n.n(k),O=function(K){var V=getComputedStyle(K,null);return V.getPropertyValue("overflow")+V.getPropertyValue("overflow-y")+V.getPropertyValue("overflow-x")};const D=function(K){if(!(K instanceof HTMLElement))return window;for(var V=K;V&&V instanceof HTMLElement;){if(/(scroll|auto)/.test(O(V)))return V;V=V.parentNode}return window};function L(K){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},L(K)}var N=["delayMethod","delayTime"];function j(){return j=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var le=arguments[V];for(var ge in le)Object.prototype.hasOwnProperty.call(le,ge)&&(K[ge]=le[ge])}return K},j.apply(this,arguments)}function G(K,V){for(var le=0;le<V.length;le++){var ge=V[le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(K,(qe=function(xt,Mt){if(L(xt)!=="object"||xt===null)return xt;var B=xt[Symbol.toPrimitive];if(B!==void 0){var ne=B.call(xt,"string");if(L(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(xt)}(ge.key),L(qe)==="symbol"?qe:String(qe)),ge)}var qe}function X(K,V){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},X(K,V)}function re(K,V){if(V&&(L(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oe(K)}function oe(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function U(K){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},U(K)}var H=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},R=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const se=function(K){var V=function(le){(function(xe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(be&&be.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),Object.defineProperty(xe,"prototype",{writable:!1}),be&&X(xe,be)})(ne,le);var ge,qe,xt,Mt,B=(xt=ne,Mt=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var xe,be=U(xt);if(Mt){var ke=U(this).constructor;xe=Reflect.construct(be,arguments,ke)}else xe=be.apply(this,arguments);return re(this,xe)});function ne(xe){var be;if(function(lt,jt){if(!(lt instanceof jt))throw new TypeError("Cannot call a class as a function")}(this,ne),(be=B.call(this,xe)).useIntersectionObserver=xe.useIntersectionObserver&&u(),be.useIntersectionObserver)return re(be);var ke=be.onChangeScroll.bind(oe(be));return xe.delayMethod==="debounce"?be.delayedScroll=E()(ke,xe.delayTime):xe.delayMethod==="throttle"&&(be.delayedScroll=_()(ke,xe.delayTime)),be.state={scrollPosition:{x:H(),y:R()}},be.baseComponentRef=o().createRef(),be}return ge=ne,(qe=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||D(c().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=D(c().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:H(),y:R()}})}},{key:"render",value:function(){var xe=this.props,be=(xe.delayMethod,xe.delayTime,function(lt,jt){if(lt==null)return{};var Ot,It,Ut=function(tn,Fn){if(tn==null)return{};var fr,ki,xr={},Xl=Object.keys(tn);for(ki=0;ki<Xl.length;ki++)fr=Xl[ki],Fn.indexOf(fr)>=0||(xr[fr]=tn[fr]);return xr}(lt,jt);if(Object.getOwnPropertySymbols){var sn=Object.getOwnPropertySymbols(lt);for(It=0;It<sn.length;It++)Ot=sn[It],jt.indexOf(Ot)>=0||Object.prototype.propertyIsEnumerable.call(lt,Ot)&&(Ut[Ot]=lt[Ot])}return Ut}(xe,N)),ke=this.useIntersectionObserver?null:this.state.scrollPosition;return o().createElement(K,j({forwardRef:this.baseComponentRef,scrollPosition:ke},be))}}])&&G(ge.prototype,qe),Object.defineProperty(ge,"prototype",{writable:!1}),ne}(o().Component);return V.propTypes={delayMethod:s.PropTypes.oneOf(["debounce","throttle"]),delayTime:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool},V.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},V};function ee(K){return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},ee(K)}function I(K,V){for(var le=0;le<V.length;le++){var ge=V[le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(K,(qe=function(xt,Mt){if(ee(xt)!=="object"||xt===null)return xt;var B=xt[Symbol.toPrimitive];if(B!==void 0){var ne=B.call(xt,"string");if(ee(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(xt)}(ge.key),ee(qe)==="symbol"?qe:String(qe)),ge)}var qe}function me(K,V){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},me(K,V)}function Se(K){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},Se(K)}var pe=function(K){(function(B,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(ne&&ne.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),ne&&me(B,ne)})(Mt,K);var V,le,ge,qe,xt=(ge=Mt,qe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var B,ne=Se(ge);if(qe){var xe=Se(this).constructor;B=Reflect.construct(ne,arguments,xe)}else B=ne.apply(this,arguments);return function(be,ke){if(ke&&(ee(ke)==="object"||typeof ke=="function"))return ke;if(ke!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(lt){if(lt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return lt}(be)}(this,B)});function Mt(B){return function(ne,xe){if(!(ne instanceof xe))throw new TypeError("Cannot call a class as a function")}(this,Mt),xt.call(this,B)}return V=Mt,(le=[{key:"render",value:function(){return o().createElement(S,this.props)}}])&&I(V.prototype,le),Object.defineProperty(V,"prototype",{writable:!1}),Mt}(o().Component);const ye=se(pe);function _e(K){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},_e(K)}function $e(K,V){for(var le=0;le<V.length;le++){var ge=V[le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(K,(qe=function(xt,Mt){if(_e(xt)!=="object"||xt===null)return xt;var B=xt[Symbol.toPrimitive];if(B!==void 0){var ne=B.call(xt,"string");if(_e(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(xt)}(ge.key),_e(qe)==="symbol"?qe:String(qe)),ge)}var qe}function J(K,V){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},J(K,V)}function fe(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}function we(K){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},we(K)}var Le=function(K){(function(B,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(ne&&ne.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),ne&&J(B,ne)})(Mt,K);var V,le,ge,qe,xt=(ge=Mt,qe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var B,ne=we(ge);if(qe){var xe=we(this).constructor;B=Reflect.construct(ne,arguments,xe)}else B=ne.apply(this,arguments);return function(be,ke){if(ke&&(_e(ke)==="object"||typeof ke=="function"))return ke;if(ke!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fe(be)}(this,B)});function Mt(B){var ne;(function(jt,Ot){if(!(jt instanceof Ot))throw new TypeError("Cannot call a class as a function")})(this,Mt),ne=xt.call(this,B);var xe=B.afterLoad,be=B.beforeLoad,ke=B.scrollPosition,lt=B.visibleByDefault;return ne.state={visible:lt},lt&&(be(),xe()),ne.onVisible=ne.onVisible.bind(fe(ne)),ne.isScrollTracked=Boolean(ke&&Number.isFinite(ke.x)&&ke.x>=0&&Number.isFinite(ke.y)&&ke.y>=0),ne}return V=Mt,(le=[{key:"componentDidUpdate",value:function(B,ne){ne.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var B=this.props,ne=B.className,xe=B.delayMethod,be=B.delayTime,ke=B.height,lt=B.placeholder,jt=B.scrollPosition,Ot=B.style,It=B.threshold,Ut=B.useIntersectionObserver,sn=B.width;return this.isScrollTracked||Ut&&u()?o().createElement(S,{className:ne,height:ke,onVisible:this.onVisible,placeholder:lt,scrollPosition:jt,style:Ot,threshold:It,useIntersectionObserver:Ut,width:sn}):o().createElement(ye,{className:ne,delayMethod:xe,delayTime:be,height:ke,onVisible:this.onVisible,placeholder:lt,style:Ot,threshold:It,width:sn})}}])&&$e(V.prototype,le),Object.defineProperty(V,"prototype",{writable:!1}),Mt}(o().Component);Le.propTypes={afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool},Le.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const He=Le;function Ge(K){return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},Ge(K)}var Pe=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function rt(K,V){var le=Object.keys(K);if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(K);V&&(ge=ge.filter(function(qe){return Object.getOwnPropertyDescriptor(K,qe).enumerable})),le.push.apply(le,ge)}return le}function ft(K){for(var V=1;V<arguments.length;V++){var le=arguments[V]!=null?arguments[V]:{};V%2?rt(Object(le),!0).forEach(function(ge){vt(K,ge,le[ge])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(le)):rt(Object(le)).forEach(function(ge){Object.defineProperty(K,ge,Object.getOwnPropertyDescriptor(le,ge))})}return K}function vt(K,V,le){return(V=Vt(V))in K?Object.defineProperty(K,V,{value:le,enumerable:!0,configurable:!0,writable:!0}):K[V]=le,K}function We(){return We=Object.assign?Object.assign.bind():function(K){for(var V=1;V<arguments.length;V++){var le=arguments[V];for(var ge in le)Object.prototype.hasOwnProperty.call(le,ge)&&(K[ge]=le[ge])}return K},We.apply(this,arguments)}function De(K,V){for(var le=0;le<V.length;le++){var ge=V[le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(K,Vt(ge.key),ge)}}function Vt(K){var V=function(le,ge){if(Ge(le)!=="object"||le===null)return le;var qe=le[Symbol.toPrimitive];if(qe!==void 0){var xt=qe.call(le,"string");if(Ge(xt)!=="object")return xt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}(K);return Ge(V)==="symbol"?V:String(V)}function bn(K,V){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},bn(K,V)}function $r(K){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(V){return V.__proto__||Object.getPrototypeOf(V)},$r(K)}var Lo=function(K){(function(B,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(ne&&ne.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),Object.defineProperty(B,"prototype",{writable:!1}),ne&&bn(B,ne)})(Mt,K);var V,le,ge,qe,xt=(ge=Mt,qe=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var B,ne=$r(ge);if(qe){var xe=$r(this).constructor;B=Reflect.construct(ne,arguments,xe)}else B=ne.apply(this,arguments);return function(be,ke){if(ke&&(Ge(ke)==="object"||typeof ke=="function"))return ke;if(ke!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(lt){if(lt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return lt}(be)}(this,B)});function Mt(B){var ne;return function(xe,be){if(!(xe instanceof be))throw new TypeError("Cannot call a class as a function")}(this,Mt),(ne=xt.call(this,B)).state={loaded:!1},ne}return V=Mt,(le=[{key:"onImageLoad",value:function(){var B=this;return this.state.loaded?null:function(ne){B.props.onLoad(ne),B.props.afterLoad(),B.setState({loaded:!0})}}},{key:"getImg",value:function(){var B=this.props,ne=(B.afterLoad,B.beforeLoad,B.delayMethod,B.delayTime,B.effect,B.placeholder,B.placeholderSrc,B.scrollPosition,B.threshold,B.useIntersectionObserver,B.visibleByDefault,B.wrapperClassName,B.wrapperProps,function(xe,be){if(xe==null)return{};var ke,lt,jt=function(It,Ut){if(It==null)return{};var sn,tn,Fn={},fr=Object.keys(It);for(tn=0;tn<fr.length;tn++)sn=fr[tn],Ut.indexOf(sn)>=0||(Fn[sn]=It[sn]);return Fn}(xe,be);if(Object.getOwnPropertySymbols){var Ot=Object.getOwnPropertySymbols(xe);for(lt=0;lt<Ot.length;lt++)ke=Ot[lt],be.indexOf(ke)>=0||Object.prototype.propertyIsEnumerable.call(xe,ke)&&(jt[ke]=xe[ke])}return jt}(B,Pe));return o().createElement("img",We({},ne,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var B=this.props,ne=B.beforeLoad,xe=B.className,be=B.delayMethod,ke=B.delayTime,lt=B.height,jt=B.placeholder,Ot=B.scrollPosition,It=B.style,Ut=B.threshold,sn=B.useIntersectionObserver,tn=B.visibleByDefault,Fn=B.width;return o().createElement(He,{beforeLoad:ne,className:xe,delayMethod:be,delayTime:ke,height:lt,placeholder:jt,scrollPosition:Ot,style:It,threshold:Ut,useIntersectionObserver:sn,visibleByDefault:tn,width:Fn},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(B){var ne=this.props,xe=ne.effect,be=ne.height,ke=ne.placeholderSrc,lt=ne.width,jt=ne.wrapperClassName,Ot=ne.wrapperProps,It=this.state.loaded,Ut=It?" lazy-load-image-loaded":"",sn=It||!ke?{}:{backgroundImage:"url(".concat(ke,")"),backgroundSize:"100% 100%"};return o().createElement("span",We({className:jt+" lazy-load-image-background "+xe+Ut,style:ft(ft({},sn),{},{color:"transparent",display:"inline-block",height:be,width:lt})},Ot),B)}},{key:"render",value:function(){var B=this.props,ne=B.effect,xe=B.placeholderSrc,be=B.visibleByDefault,ke=B.wrapperClassName,lt=B.wrapperProps,jt=this.getLazyLoadImage();return(ne||xe)&&!be||ke||lt?this.getWrappedLazyLoadImage(jt):jt}}])&&De(V.prototype,le),Object.defineProperty(V,"prototype",{writable:!1}),Mt}(o().Component);Lo.propTypes={onLoad:s.PropTypes.func,afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,delayMethod:s.PropTypes.string,delayTime:s.PropTypes.number,effect:s.PropTypes.string,placeholderSrc:s.PropTypes.string,threshold:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool,wrapperClassName:s.PropTypes.string,wrapperProps:s.PropTypes.object},Lo.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Xs=Lo})(),Qz.exports=r})();const Sle=de(Qz.exports.LazyLoadImage,{}),Dt=y.exports.forwardRef(({src:e,css:t=null,height:n,width:r,visibleByDefault:i=!1,...o},s)=>l(Sle,{alt:"",src:e,ref:s,height:n,width:r,threshold:250,css:{...t},visibleByDefault:i,...o}));function Ma({post:e,css:t=null,showComments:n=!0,noBorder:r=!1,quotedPost:i=!1,fromSharesDialog:o=!1,fromScheduledList:s=!1,mediaCrop:a=!0,infiniteScrollRef:c=null}){Z.extend(Pn),Z.extend(On),Z.extend(zE),Z.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1 min",mm:"%d min",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});const u=y.exports.useRef(),[d,f]=y.exports.useState(400);return y.exports.useLayoutEffect(()=>{u.current&&f(u.current.offsetWidth-26);const h=()=>{u.current&&f(u.current.offsetWidth-26)};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[]),l(M,{css:{...t,marginTop:i?"$2":0,py:"$4",paddingBottom:"$2",marginBottom:i?"$2":"$0",px:"$3",width:"100%",borderRadius:12,backgroundColor:"$cardBackgroundColor",border:r?"none":"1px solid $borderColor",boxShadow:"$xsmall","@sm":i?{}:n?{border:"none",borderRadius:0,boxShadow:"none"}:{border:"none",borderBottom:"1px solid $borderColor",borderRadius:0}},ref:u,children:g(P,{ref:c,css:{width:"100%",gap:"$2",maxWidth:"100%"},children:[(e==null?void 0:e.repostedBy)!==void 0&&l(M,{css:{maxWidth:"100%",gap:"$4",color:"$handleColor"},children:l(T_,{pinned:!1,onlyRepost:!0,user:e.repostedBy,date:e.data.createdAt,rating:e.data.rating,linkDate:`/${e.data.owner.handle}/posts/${e.data.id}`,isFollowingOwner:e.isFollowingOwner,isAi:e.data.isAi,isRender:e.data.isRender})}),l(Ele,{post:e,quotedPost:i,fromSharesDialog:o,fromScheduledList:s,showComments:n,mediaCrop:a,size:d})]})})}function Ele({post:e,quotedPost:t,fromSharesDialog:n,fromScheduledList:r,showComments:i,mediaCrop:o,size:s}){var h,p,m;const{perms:a}=st(),{postsOpened:c,setPostsOpened:u}=Dy(),d=e.id||e.postId||e.data.id,f=()=>{if(!c.includes(d)){const v=[...c,d];u(v)}};return g(z,{children:[g(M,{css:{maxWidth:"100%",gap:"$4"},children:[l(T_,{pinned:e.pinned,user:e.data.owner,date:e.data.createdAt,rating:e.data.rating,linkDate:`/${e.data.owner.handle}/posts/${e.data.id}`,isFollowingOwner:e.isFollowingOwner,isAi:e.data.isAi,isRender:e.data.isRender,showPublicGalleryBadge:((h=a==null?void 0:a.mod)==null?void 0:h.editPost)&&e.data.publicGallery,showVendorBadge:((p=a==null?void 0:a.mod)==null?void 0:p.editPost)&&e.data.vendorAd,showFullDate:i}),(t===!1||n===!0)&&l(OX,{post:e})]}),e.data.content&&l(k_,{content:e.data.content,whenOpened:f,showFull:i||c.includes(d)||["Primfeed","Second Life","Luke Rowley"].includes(e.data.owner.name)}),e.data.media.length>0&&l(Tle,{post:e.data,mediaCrop:o,size:s}),n===!1&&e.data.quotedPost&&l(Ma,{post:e.data.quotedPost,quotedPost:!0,showComments:i}),((m=e.data.products)==null?void 0:m.length)>0&&l(XX,{products:e.data.products}),(t===!1&&r===!1||n===!0)&&l(_X,{post:e,fromSharesDialog:n}),i&&l(P,{children:l(ZX,{post:e})})]})}function Tle({post:e,mediaCrop:t,size:n}){const{setViewingMedia:r}=Ra(),i=Tn.exports.useMediaQuery({maxWidth:767}),o=a=>{r({post:e,selectedMediaIndex:a})},s=5;if(t===!1){const a=$le(e.media,n,200,s,i?500:600);return l(ce,{css:{position:"relative",overflow:"hidden",maxWidth:600,mx:"auto"},children:a.map((c,u)=>l(M,{css:{marginTop:5,gap:5},children:c.map((d,f)=>l(Ale,{img:d,onClick:()=>{const h=e.media.findIndex(p=>p.id===d.id);r({post:e,selectedMediaIndex:h>=0?h:0})}},`${e.postId}-${u}-${f}`))},"row-"+u))})}return l(_le,{elements:e.media.length,css:{my:"$2"},children:e.media.map((a,c)=>l(kle,{postImage:a,index:c,mediasLength:e.media.length,selectImage:o},"image-"+a.id+"-"+c))})}function kle({postImage:e,index:t,mediasLength:n,selectImage:r}){return l(M,{css:{position:"relative",width:"fit-content",mx:"auto",overflow:"hidden",paddingBottom:n>1?300:0,maxHeight:n>1?300:600,"@md":{paddingBottom:n>1?200:0,maxHeight:n>1?200:500}},children:l(Dt,{css:{borderRadius:4,position:n>1?"absolute":"initial",top:"0",left:"0",width:"100%",height:"100%",objectFit:n>1?"cover":"contain",userSelect:"none",cursor:"pointer",maxHeight:n>1?300:"100%","@md":{maxHeight:n>1?200:"100%"}},visibleByDefault:!0,src:`${e.url}_x1024.webp?v`+e.version,onClick:()=>{r(t)}})})}const _le=de("div",{display:"flex",flexWrap:"wrap",gap:"8px",width:"100%",variants:{elements:{1:{flexDirection:"column"},2:{flexDirection:"row","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}},3:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(1), & > :nth-child(2)":{flex:"1 1 calc(50% - 8px)"},"& > :nth-child(3)":{flex:"1 1 100%"}},4:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}}}}});function Ale({img:e,onClick:t}){const[n,r]=y.exports.useState(e.url+"_x1024.webp?v"+e.version),[i,o]=y.exports.useState({width:0,height:0}),s=y.exports.useRef();return y.exports.useLayoutEffect(()=>{s.current&&o({width:s.current.offsetWidth,height:s.current.offsetHeight});const a=()=>{s.current&&(o({width:s.current.offsetWidth,height:s.current.offsetHeight}),r(e.url+"_x1024.webp?v"+e.version))};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),y.exports.useEffect(()=>{r(e.url+"_x1024.webp?v"+e.version)},[i]),l(Dt,{ref:s,onClick:t,src:n,css:{cursor:"pointer",width:`${e.width}px`,userSelect:"none",height:`${e.height}px`,borderRadius:4}})}const $le=(e,t,n,r,i)=>{let o=[];const s=[];let a=0;return e.forEach((c,u)=>{const d=c.width/c.height,f=n*d;o.push({...c,targetWidth:f}),a+=f+r,a>t&&(s.push(o),o=[],a=0),u===e.length-1&&o.length>0&&s.push(o)}),s.map(c=>{const u=c.reduce((f,h)=>f+h.width/h.height,0);let d=(t-r*(c.length-1))/u;return d>i&&(d=i),c.map(f=>({...f,width:d*(f.width/f.height),height:d}))})};var Dle={prefix:"fad",iconName:"user-xmark",icon:[640,512,["user-times"],"f235",["M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z","M505 143c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47z"]]},Xz={prefix:"fad",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM112 256c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112zm0 64c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112zm0 64c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112z","M384 160L224 0V128c0 17.7 14.3 32 32 32H384zM112 256c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112zm0 64c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112zm0 64c-8.8 0-16 7.2-16 16s7.2 16 16 16H272c8.8 0 16-7.2 16-16s-7.2-16-16-16H112z"]]},Ole={prefix:"fad",iconName:"text-size",icon:[640,512,[],"f894",["M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H192 336c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H224l0 320h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H128c-17.7 0-32-14.3-32-32s14.3-32 32-32h32l0-320H64z","M384 288v16c0 17.7-14.3 32-32 32s-32-14.3-32-32V272c0-26.5 21.5-48 48-48H592c26.5 0 48 21.5 48 48v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V288H512l0 128h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H432c-17.7 0-32-14.3-32-32s14.3-32 32-32h16l0-128H384z"]]},Ple={prefix:"fad",iconName:"right-from-bracket",icon:[512,512,["sign-out-alt"],"f2f5",["M199.7 60.8c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96l0-256c0-53 43-96 96-96l64 0c17.7 0 32 14.3 32 32z","M508.4 225.5L385.7 102.7c-6.4-6.4-15-9.9-24-9.9c-18.7 0-33.9 15.2-33.9 33.9l0 62.1-128 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0 0 62.1c0 18.7 15.2 33.9 33.9 33.9c9 0 17.6-3.6 24-9.9L508.4 280.1c7.2-7.2 11.3-17.1 11.3-27.3s-4.1-20.1-11.3-27.3z"]]},Rle={prefix:"fad",iconName:"icons",icon:[512,512,["heart-music-camera-bolt"],"f86d",["M139.7 219.1l96.4-99.9c28-29 26.5-76.9-4.5-103.9c-28-23.5-68.9-19-93.9 6.5l-9.5 10.5-10-10.5c-25-25.5-66.4-30-93.4-6.5c-31.5 27-33 74.9-5 103.9l96.9 99.9c6 6.5 16.5 6.5 23 0zm333.7 39.9c-6-4.4-14.3-4-19.9 .9l-128 112c-5 4.4-6.8 11.4-4.4 17.7s8.3 10.4 15 10.4h55.7l-38.4 89.7c-2.9 6.9-.7 14.9 5.3 19.2s14.3 4 19.9-.9l128-112c5-4.4 6.8-11.4 4.4-17.7s-8.3-10.4-15-10.4H440.3l38.4-89.7c2.9-6.9 .7-14.9-5.3-19.2z","M500.3 7.3C507.7 13.3 512 22.4 512 32V176c0 26.5-28.7 48-64 48s-64-21.5-64-48s28.7-48 64-48V71L352 90.2V208c0 26.5-28.7 48-64 48s-64-21.5-64-48s28.7-48 64-48V64c0-15.3 10.8-28.4 25.7-31.4l160-32c9.4-1.9 19.1 .6 26.6 6.6zM74.7 304l11.8-17.8c5.9-8.9 15.9-14.2 26.6-14.2h61.7c10.7 0 20.7 5.3 26.6 14.2L213.3 304H256c17.7 0 32 14.3 32 32V480c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V336c0-17.7 14.3-32 32-32H74.7zM192 408a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"]]},Mle={prefix:"fad",iconName:"location-minus",icon:[384,512,["map-marker-minus"],"f609",["M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM120 168H264c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24z","M96 192c0-13.3 10.7-24 24-24H264c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24z"]]},RD={prefix:"fad",iconName:"user-vneck",icon:[448,512,[],"e461",["M352 128A128 128 0 1 1 96 128a128 128 0 1 1 256 0z","M130 308.3c6.1-1.4 12.4 1.4 15.9 6.6L210.7 412c6.3 9.5 20.3 9.5 26.6 0l64.8-97.1c3.5-5.2 9.8-8 15.9-6.6c74.5 17.2 130 84 130 163.7v8c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32v-8c0-79.7 55.5-146.5 130-163.7z"]]},Ile={prefix:"fad",iconName:"people-roof",icon:[640,512,[],"e537",["M360 200a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zM184 296a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm312 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM200 441.5l26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-36.3-67.5c1.7-1.7 3.2-3.6 4.3-5.8L264 345.5V400c0 17.7 14.3 32 32 32h48c17.7 0 32-14.3 32-32V345.5l26.9 49.9c1.2 2.2 2.6 4.1 4.3 5.8l-36.3 67.5c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L440 441.5V480c0 17.7 14.3 32 32 32h48c17.7 0 32-14.3 32-32V441.5l26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-37.9-70.3c-15.3-28.5-45.1-46.3-77.5-46.3H486.2c-16.3 0-31.9 4.5-45.4 12.6l-33.6-62.3c-15.3-28.5-45.1-46.3-77.5-46.3H310.2c-32.4 0-62.1 17.8-77.5 46.3l-33.6 62.3c-13.5-8.1-29.1-12.6-45.4-12.6H134.2c-32.4 0-62.1 17.8-77.5 46.3L18.9 468.6c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L88 441.5V480c0 17.7 14.3 32 32 32h48c17.7 0 32-14.3 32-32V441.5z","M304.5 4c9.7-5.4 21.4-5.4 31.1 0l288 160c15.4 8.6 21 28.1 12.4 43.5s-28.1 21-43.5 12.4L320 68.6 47.5 220c-15.4 8.6-34.9 3-43.5-12.4s-3-34.9 12.4-43.5L304.5 4z"]]},Lle={prefix:"fad",iconName:"location-plus",icon:[384,512,["map-marker-plus"],"f60a",["M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM168 280V216H104c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V104c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H216v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z","M168 216v64c0 13.3 10.7 24 24 24s24-10.7 24-24V216h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H216V104c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H104c-13.3 0-24 10.7-24 24s10.7 24 24 24h64z"]]},Nle={prefix:"fad",iconName:"envelopes-bulk",icon:[640,512,["mail-bulk"],"f674",["M96 32V224h96V192c0-35.3 28.7-64 64-64H480V32c0-17.7-14.3-32-32-32H128C110.3 0 96 14.3 96 32zM256 160c-17.7 0-32 14.3-32 32v32h96c35.3 0 64 28.7 64 64V416H576c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32H256zm240 64h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V240c0-8.8 7.2-16 16-16zM32 301v39.8L168 441.6c6.9 5.1 15.3 7.9 24 7.9s17-2.8 24-7.9L352 340.8V301L196.9 415.9c-1.4 1-3.1 1.6-4.9 1.6s-3.5-.6-4.9-1.6L32 301z","M496 224h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V240c0-8.8 7.2-16 16-16zM32 288c0-17.7 14.3-32 32-32H320c17.7 0 32 14.3 32 32v13L196.9 415.9c-1.4 1-3.1 1.6-4.9 1.6s-3.5-.6-4.9-1.6L32 301V288zM216 441.6L352 340.8V480c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32V340.8L168 441.6c6.9 5.1 15.3 7.9 24 7.9s17-2.8 24-7.9z"]]},Fle={prefix:"fad",iconName:"gauge-min",icon:[512,512,["tachometer-alt-slowest"],"f628",["M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM256 416c35.3 0 64-28.7 64-64s-28.7-64-64-64c-14.1 0-27.2 4.6-37.8 12.4L100.6 227.6c-11.3-7-26.1-3.5-33 7.8s-3.5 26.1 7.8 33l117.5 72.8c-.6 3.5-.9 7.1-.9 10.8c0 35.3 28.7 64 64 64zM176 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z","M100.6 227.6c-11.3-7-26.1-3.5-33 7.8s-3.5 26.1 7.8 33l117.5 72.8c-.6 3.5-.9 7.1-.9 10.8c0 35.3 28.7 64 64 64s64-28.7 64-64s-28.7-64-64-64c-14.1 0-27.2 4.6-37.8 12.4L100.6 227.6z"]]},Zz={prefix:"fad",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303",["M492.7 58.2c25 25 25 65.5 0 90.5l-60 60L302.7 78.7l60-60c25-25 65.5-25 90.5 0l39.4 39.4zM315.3 186.7l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z","M432.7 208.7L302.7 78.7 58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L432.7 208.7zM89.3 360.5l22.7-9.1v32c0 8.8 7.2 16 16 16h32l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3zm226-196.4c6.2 6.2 6.2 16.4 0 22.6l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0z"]]},Ble={prefix:"fad",iconName:"comments",icon:[640,512,[128490,61670],"f086",["M231.5 383C348.9 372.9 448 288.3 448 176c0-5.2-.2-10.4-.6-15.5C555.1 167.1 640 243.2 640 336c0 38.6-14.7 74.3-39.6 103.4c3.5 9.4 8.7 17.7 14.2 24.7c4.8 6.2 9.7 11 13.3 14.3c1.8 1.6 3.3 2.9 4.3 3.7c.5 .4 .9 .7 1.1 .8l.2 .2 0 0 0 0c5.6 4.1 7.9 11.3 5.8 17.9c-2.1 6.6-8.3 11.1-15.2 11.1c-21.8 0-43.8-5.6-62.1-12.5c-9.2-3.5-17.8-7.4-25.2-11.4C505.9 503.3 470.2 512 432 512c-95.6 0-176.2-54.6-200.5-129z","M416 176c0 97.2-93.1 176-208 176c-38.2 0-73.9-8.7-104.7-23.9c-7.5 4-16 7.9-25.3 11.4C59.8 346.4 37.8 352 16 352c-6.9 0-13.1-4.5-15.2-11.1s.2-13.8 5.8-17.9l0 0 0 0 .2-.2c.2-.2 .6-.4 1.1-.8c1-.8 2.5-2 4.3-3.7c3.6-3.3 8.5-8.1 13.3-14.3c5.5-7 10.7-15.4 14.2-24.7C14.7 250.3 0 214.6 0 176C0 78.8 93.1 0 208 0S416 78.8 416 176z"]]},Jz={prefix:"fad",iconName:"note",icon:[448,512,[],"e1ff",["M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V320H320c-17.7 0-32 14.3-32 32V480H64c-35.3 0-64-28.7-64-64V96zM112 384a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM88 104a24 24 0 1 0 0 48 24 24 0 1 0 0-48zm24 152a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z","M288 352V480h5.5c17 0 33.3-6.7 45.3-18.7l90.5-90.5c12-12 18.7-28.3 18.7-45.3V320H320c-17.7 0-32 14.3-32 32z"]]},Hle={prefix:"fad",iconName:"box-archive",icon:[512,512,["archive"],"f187",["M480 128H32V416c0 35.3 28.7 64 64 64H416c35.3 0 64-28.7 64-64V128zM192 192H320c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32z","M0 64C0 46.3 14.3 32 32 32H480c17.7 0 32 14.3 32 32V96c0 17.7-14.3 32-32 32H32C14.3 128 0 113.7 0 96V64z"]]},zle={prefix:"fad",iconName:"message-pen",icon:[512,512,["comment-alt-edit","message-edit"],"f4a4",["M0 64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L185.6 508.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V416H64c-35.3 0-64-28.7-64-64V64zm340.8 59c-14.7-14.7-38.6-14.7-53.3 0L272.6 138l53.3 53.3 14.9-14.9c14.7-14.7 14.7-38.6 0-53.3zM178.1 232.5c-4.1 4.1-7 9.2-8.4 14.9L160.5 284c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l36.6-9.2c5.6-1.4 10.8-4.3 14.9-8.4l71.9-71.9L250 160.6l-71.9 71.9z","M287.5 123L272.6 138l53.3 53.3 14.9-14.9c14.7-14.7 14.7-38.6 0-53.3s-38.6-14.7-53.3 0zM250 160.6l-71.9 71.9c-4.1 4.1-7 9.2-8.4 14.9L160.5 284c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l36.6-9.2c5.6-1.4 10.8-4.3 14.9-8.4l71.9-71.9L250 160.6z"]]},Ule={prefix:"fad",iconName:"message-image",icon:[512,512,["comment-alt-image"],"e1e0",["M0 64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L185.6 508.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V416H64c-35.3 0-64-28.7-64-64V64zm176 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm120 0c-8 0-15.5 4-20 10.7l-56 84L202.7 201c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h80 48H392c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144C311.5 132 304 128 296 128z","M144 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm172-21.3C311.5 132 304 128 296 128s-15.5 4-20 10.7l-56 84L202.7 201c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h80 48H392c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144z"]]},Vle={prefix:"fad",iconName:"people-group",icon:[640,512,[],"e533",["M128 160a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM48 304c0-16.2 6-31.1 16-42.3v84.7C54 335 48 320.2 48 304zm112 0c0-37.8 14.6-72.2 38.4-97.9c-16.1-9-34.7-14.1-54.4-14.1H112C50.1 192 0 242.1 0 304c0 44.7 26.2 83.2 64 101.2V448c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V405.2 394.5c-20-24.7-32-56.2-32-90.5zM448 405.2V448c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V405.2c37.8-18 64-56.5 64-101.2c0-61.9-50.1-112-112-112H496c-19.7 0-38.3 5.1-54.4 14.1C465.4 231.8 480 266.2 480 304c0 34.3-12 65.8-32 90.5v10.7zM512 160a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm80 144c0 16.2-6 31-16 42.3V261.7c10 11.3 16 26.1 16 42.3z","M384 96A64 64 0 1 0 256 96a64 64 0 1 0 128 0zM256 261.7v84.7c-10-11.3-16-26.1-16-42.3s6-31.1 16-42.3zm128 84.7V261.7c10 11.3 16 26.1 16 42.3s-6 31-16 42.3zm0 58.9c37.8-18 64-56.5 64-101.2c0-61.9-50.1-112-112-112H304c-61.9 0-112 50.1-112 112c0 44.7 26.2 83.2 64 101.2V448c0 17.7 14.3 32 32 32h64c17.7 0 32-14.3 32-32V405.2z"]]},jle={prefix:"fad",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a",["M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z","M280 152c0-13.3-10.7-24-24-24s-24 10.7-24 24V264c0 13.3 10.7 24 24 24s24-10.7 24-24V152zM256 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]]},Wle={prefix:"fad",iconName:"xmark-to-slot",icon:[576,512,["times-to-slot","vote-nay"],"f771",["M144 32c-26.5 0-48 21.5-48 48V400H480V80c0-26.5-21.5-48-48-48H144zm63 103c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z","M207 135c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9zM48 288H96v80H80c-8.8 0-16 7.2-16 16s7.2 16 16 16H496c8.8 0 16-7.2 16-16s-7.2-16-16-16H480V288h48c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336c0-26.5 21.5-48 48-48z"]]},Qm={prefix:"fad",iconName:"box-taped",icon:[448,512,["box-alt"],"f49a",["M50.7 58.5C58.9 42.3 75.5 32 93.7 32H192L160 160H0L50.7 58.5zM288 160v96c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V160H288zm0 0L256 32h98.3c18.2 0 34.8 10.3 42.9 26.5L448 160H288z","M160 160H0V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V160H288v96c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V160z"]]},Ia={prefix:"fad",iconName:"globe-pointer",icon:[512,512,[],"e60e",["M352 256c0 22.2-1.2 43.6-3.3 64H281.8l12.6-42.8c10.7-36.4-23.1-70.3-59.6-59.6l-74.6 21.9c.4-16.3 1.5-32.2 3.1-47.5H348.7c2.2 20.4 3.3 41.8 3.3 64zM20.4 280.6c-7.1 2.1-13.1 5.5-18.1 9.9C.8 279.2 0 267.7 0 256c0-22.1 2.8-43.5 8.1-64H131.2c-1.9 18.4-2.9 37.4-3.1 57L20.4 280.6zM231.4 491.6L272.4 352h71.9c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512c-7.2 0-16.3-3.1-27.3-13.4c1-2.2 1.9-4.6 2.7-7.1zM380.8 192H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-325.7 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7H167.7zm-32.4 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM493.4 352c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z","M243.9 248.3L39 308.5c-13.9 4.1-15.6 23.2-2.6 29.7l57.3 28.7c1.3 .7 2.6 1.5 3.7 2.5l-88 88c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l88-88c1 1.1 1.9 2.3 2.5 3.7l28.7 57.3c6.5 13 25.6 11.3 29.7-2.6l60.2-204.8c3.6-12.1-7.7-23.4-19.9-19.9z"]]},qle={prefix:"fad",iconName:"heart-circle-minus",icon:[576,512,[],"e4ff",["M228.3 469.1L47.6 300.4C17.2 272.1 0 232.4 0 190.9v-5.8c0-69.9 50.5-129.5 119.4-141C165 36.5 211.4 51.4 244 84l12 12 12-12c32.6-32.6 79-47.5 124.6-39.9C461.5 55.6 512 115.2 512 185.1v5.8c0 6.6-.4 13.2-1.3 19.6C487 198.7 460.3 192 432 192c-97.2 0-176 78.8-176 176c0 36.6 11.2 70.6 30.3 98.7l-2.6 2.4c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9z","M432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm64-128l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16H496c8.8 0 16 7.2 16 16s-7.2 16-16 16z"]]},eU={prefix:"fad",iconName:"users",icon:[640,512,[],"f0c0",["M224 80A80 80 0 1 0 64 80a80 80 0 1 0 160 0zm368 0A80 80 0 1 0 432 80a80 80 0 1 0 160 0zM106.7 192C47.8 192 0 239.8 0 298.7C0 310.4 9.6 320 21.3 320H234.7c.2 0 .4 0 .7 0c-26.6-23.5-43.3-57.8-43.3-96c0-7.6 .7-15 1.9-22.3c-13.6-6.3-28.7-9.7-44.6-9.7H106.7zm298 128c.2 0 .4 0 .7 0H618.7c11.8 0 21.3-9.6 21.3-21.3C640 239.8 592.2 192 533.3 192H490.7c-15.9 0-31 3.5-44.6 9.7c1.3 7.2 1.9 14.7 1.9 22.3c0 38.2-16.8 72.5-43.3 96z","M320 320a96 96 0 1 0 0-192 96 96 0 1 0 0 192zm-58.7 32C187.7 352 128 411.7 128 485.3c0 14.7 11.9 26.7 26.7 26.7H485.3c14.7 0 26.7-11.9 26.7-26.7C512 411.7 452.3 352 378.7 352H261.3z"]]},Kle={prefix:"fad",iconName:"file-plus",icon:[384,512,[],"f319",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM192 240c-13.3 0-24 10.7-24 24v48H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h48v48c0 13.3 10.7 24 24 24s24-10.7 24-24V360h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H216V264c0-13.3-10.7-24-24-24z","M384 160H256c-17.7 0-32-14.3-32-32V0L384 160zM192 240c13.3 0 24 10.7 24 24v48h48c13.3 0 24 10.7 24 24s-10.7 24-24 24H216v48c0 13.3-10.7 24-24 24s-24-10.7-24-24V360H120c-13.3 0-24-10.7-24-24s10.7-24 24-24h48V264c0-13.3 10.7-24 24-24z"]]},bC={prefix:"fad",iconName:"user",icon:[448,512,[128100,62144],"f007",["M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128z","M0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3z"]]},Gle={prefix:"fad",iconName:"key",icon:[512,512,[128273],"f084",["M168.3 229.7L282.3 343.7l0 0s0 0 0 0L249 377c-4.5 4.5-10.6 7-17 7H192v40c0 13.3-10.7 24-24 24H128v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V408c0-6.4 2.5-12.5 7-17L168.3 229.7s0 0 0 0l0 0z","M168.3 229.7L282.3 343.7l0 0c16.9 5.4 35 8.3 53.7 8.3c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7l0 0zM336 136a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z"]]},Od={prefix:"fad",iconName:"person-dolly",icon:[512,512,[],"f4d0",["M247.3 186.2c-3.2-12.9-16.2-20.7-29.1-17.5s-20.7 16.2-17.5 29.1l49.6 198.4c-16 11.6-26.3 30.5-26.3 51.7c0 35.3 28.7 64 64 64c32.3 0 59.1-24 63.4-55.1l134.4-33.6c12.9-3.2 20.7-16.2 17.5-29.1s-16.2-20.7-29.1-17.5L339.7 410.3c-10-13.7-25.3-23.3-42.8-25.7L247.3 186.2zM272 448a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm85.4-71.8L449 353.4c17.1-4.3 27.6-21.7 23.3-38.8L449.4 223c-4.3-17.1-21.7-27.6-38.8-23.3L319 222.6c-17.1 4.3-27.6 21.7-23.3 38.8L318.6 353c4.3 17.1 21.7 27.6 38.8 23.3z","M80 96A48 48 0 1 0 80 0a48 48 0 1 0 0 96zM96 306.7V241.7l16.6 24.9c8.9 13.4 23.9 21.4 39.9 21.4h70.7l-16-64H161.1l-42.6-64c-13.3-20-35.8-32-59.9-32C26.2 128 0 154.2 0 186.6v88.1c0 17 6.7 33.3 18.7 45.3l79.4 79.4 14.3 85.9c2.9 17.4 19.4 29.2 36.8 26.3s29.2-19.4 26.3-36.8l-15.2-90.9c-1.6-9.9-6.3-19-13.4-26.1l-51-51zM0 346.5L0 480c0 17.7 14.3 32 32 32s32-14.3 32-32v0V410.5l-64-64z"]]},tU={prefix:"fad",iconName:"mailbox",icon:[576,512,[128234],"f813",["M512 448H224c35.3 0 64-28.7 64-64V208c0-79.5-64.5-144-144-144H432c79.5 0 144 64.5 144 144V384c0 35.3-28.7 64-64 64zM400 192c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V208c0-8.8-7.2-16-16-16H464 400z","M0 208C0 128.5 64.5 64 144 64s144 64.5 144 144V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V208zm64 0c0 8.8 7.2 16 16 16H208c8.8 0 16-7.2 16-16s-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm336-16h64 32c8.8 0 16 7.2 16 16v64c0 8.8-7.2 16-16 16H464c-8.8 0-16-7.2-16-16V224H400c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]]},Yle={prefix:"fad",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e",["M99.5 144.8L367.2 412.5c17.5-12.5 32.8-27.8 45.3-45.3L144.8 99.5C127.3 112 112 127.3 99.5 144.8z","M256 64a192 192 0 1 1 0 384 192 192 0 1 1 0-384zm0 448A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]]},Qle={prefix:"fad",iconName:"repeat",icon:[512,512,[128257],"f363",["M480 256c17.7 0 32 14.3 32 32c0 88.4-71.6 160-160 160H192l0 32c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3l64-64c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6v32H352c53 0 96-43 96-96c0-17.7 14.3-32 32-32z","M32 256c-17.7 0-32-14.3-32-32C0 135.6 71.6 64 160 64H320l0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c12.5 12.5 12.5 32.8 0 45.3l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V128H160c-53 0-96 43-96 96c0 17.7-14.3 32-32 32z"]]},Xle={prefix:"fad",iconName:"server",icon:[512,512,[],"f233",["M416 152a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm32 280a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]]},My={prefix:"fad",iconName:"hourglass-clock",icon:[576,512,[],"e41b",["M0 32C0 14.3 14.3 0 32 0H64 320h32c17.7 0 32 14.3 32 32s-14.3 32-32 32V75c0 42.4-16.9 83.1-46.9 113.1L237.3 256l36 36c-11 23-17.2 48.8-17.2 76c0 59.5 29.6 112.1 74.8 144H320 64 32c-17.7 0-32-14.3-32-32s14.3-32 32-32V437c0-42.4 16.9-83.1 46.9-113.1L146.7 256 78.9 188.1C48.9 158.1 32 117.4 32 75V64C14.3 64 0 49.7 0 32zM96 64V75c0 19 5.6 37.4 16 53H272c10.3-15.6 16-34 16-53V64H96z","M432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208v48h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H432c-8.8 0-16-7.2-16-16V304c0-8.8 7.2-16 16-16s16 7.2 16 16z"]]},Zle={prefix:"fad",iconName:"layer-minus",icon:[576,512,["layer-group-minus"],"f5fe",["M264.5 133.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l218.6-101zM476.9 337.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2z","M384 80c0-13.3 10.7-24 24-24H520c13.3 0 24 10.7 24 24s-10.7 24-24 24H408c-13.3 0-24-10.7-24-24z"]]},MD={prefix:"fad",iconName:"right-to-bracket",icon:[512,512,["sign-in-alt"],"f2f6",["M320 448c0-17.7 14.3-32 32-32l64 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c53 0 96 43 96 96l0 256c0 53-43 96-96 96l-64 0c-17.7 0-32-14.3-32-32z","M340.7 228.7L217.9 105.9c-6.4-6.4-15-9.9-24-9.9c-18.7 0-33.9 15.2-33.9 33.9l0 62.1L32 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0 0 62.1c0 18.7 15.2 33.9 33.9 33.9c9 0 17.6-3.6 24-9.9L340.7 283.3c7.2-7.2 11.3-17.1 11.3-27.3s-4.1-20.1-11.3-27.3z"]]},q4={prefix:"fad",iconName:"layer-plus",icon:[576,512,["layer-group-plus"],"f5ff",["M264.5 133.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l218.6-101zM476.9 337.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2z","M488 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 32H408c-13.3 0-24 10.7-24 24s10.7 24 24 24h32l0 32c0 13.3 10.7 24 24 24s24-10.7 24-24V104h32c13.3 0 24-10.7 24-24s-10.7-24-24-24H488V24z"]]},Jle={prefix:"fad",iconName:"heart-circle-plus",icon:[576,512,[],"e500",["M507 208.7C484.3 198 458.8 192 432 192c-97.2 0-176 78.8-176 176c0 35.7 10.6 68.9 28.9 96.6l-5.4 5.6c-13 13-34 13-45.9 0L39.7 270.5c-55.9-57.9-52.9-153.8 10-207.8c53.9-47 136.8-38 186.8 13l20 21 19-21c49.9-50.9 131.8-59.9 187.8-13c42.9 37.4 57.5 95 43.8 146.1z","M288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-80c-8.8 0-16 7.2-16 16v48H368c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v48c0 8.8 7.2 16 16 16s16-7.2 16-16V384h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H448V304c0-8.8-7.2-16-16-16z"]]},ece={prefix:"fad",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0",["M416 503V200.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503zM15.1 187.3l122.6-49c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3zM384 255V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0c13.9-17.4 35.7-45.7 56.2-77z","M302.8 312C334.9 271.9 408 174.6 408 120C408 53.7 354.3 0 288 0S168 53.7 168 120c0 54.6 73.1 151.9 105.2 192c7.7 9.6 22 9.6 29.6 0zM288 72a40 40 0 1 1 0 80 40 40 0 1 1 0-80z"]]},nU={prefix:"fad",iconName:"square-plus",icon:[448,512,[61846,"plus-square"],"f0fe",["M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM200 344V280H136c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H248v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z","M200 280v64c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H136c-13.3 0-24 10.7-24 24s10.7 24 24 24h64z"]]},ph=nU,tce={prefix:"fad",iconName:"message-lines",icon:[512,512,["comment-alt-lines"],"f4a6",["M0 64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L185.6 508.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V416H64c-35.3 0-64-28.7-64-64V64zm152 80c-13.3 0-24 10.7-24 24s10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H152zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H264c13.3 0 24-10.7 24-24s-10.7-24-24-24H152z","M128 168c0-13.3 10.7-24 24-24H360c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24H264c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24z"]]},nce={prefix:"fad",iconName:"image",icon:[512,512,[],"f03e",["M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z","M323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176z"]]},rce={prefix:"fad",iconName:"camera-retro",icon:[512,512,[128247],"f083",["M0 128v32H256 512V96c0-35.3-28.7-64-64-64H271.1c-9.9 0-19.7 2.3-28.6 6.8L192 64H64C28.7 64 0 92.7 0 128z","M64 48c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16V64H64V48zM0 416V160H512V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64zm256-16a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"]]},ice={prefix:"fad",iconName:"layer-group",icon:[576,512,[],"f5fd",["M324.9 279.8l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 337.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2z"]]},oce={prefix:"fad",iconName:"money-check-dollar",icon:[576,512,["money-check-alt"],"f53d",["M64 64C28.7 64 0 92.7 0 128V384c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64zM272 192H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H272c-8.8 0-16-7.2-16-16s7.2-16 16-16zM256 304c0-8.8 7.2-16 16-16H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H272c-8.8 0-16-7.2-16-16zM164 152v13.9c7.5 1.2 14.6 2.9 21.1 4.7c10.7 2.8 17 13.8 14.2 24.5s-13.8 17-24.5 14.2c-11-2.9-21.6-5-31.2-5.2c-7.9-.1-16 1.8-21.5 5c-4.8 2.8-6.2 5.6-6.2 9.3c0 1.8 .1 3.5 5.3 6.7c6.3 3.8 15.5 6.7 28.3 10.5l.7 .2c11.2 3.4 25.6 7.7 37.1 15c12.9 8.1 24.3 21.3 24.6 41.6c.3 20.9-10.5 36.1-24.8 45c-7.2 4.5-15.2 7.3-23.2 9V360c0 11-9 20-20 20s-20-9-20-20V345.4c-10.3-2.2-20-5.5-28.2-8.4l0 0 0 0c-2.1-.7-4.1-1.4-6.1-2.1c-10.5-3.5-16.1-14.8-12.6-25.3s14.8-16.1 25.3-12.6c2.5 .8 4.9 1.7 7.2 2.4c13.6 4.6 24 8.1 35.1 8.5c8.6 .3 16.5-1.6 21.4-4.7c4.1-2.5 6-5.5 5.9-10.5c0-2.9-.8-5-5.9-8.2c-6.3-4-15.4-6.9-28-10.7l-1.7-.5c-10.9-3.3-24.6-7.4-35.6-14c-12.7-7.7-24.6-20.5-24.7-40.7c-.1-21.1 11.8-35.7 25.8-43.9c6.9-4.1 14.5-6.8 22.2-8.5V152c0-11 9-20 20-20s20 9 20 20z","M164 152c0-11-9-20-20-20s-20 9-20 20v14c-7.6 1.7-15.2 4.4-22.2 8.5c-13.9 8.3-25.9 22.8-25.8 43.9c.1 20.3 12 33.1 24.7 40.7c11 6.6 24.7 10.8 35.6 14l1.7 .5c12.6 3.8 21.8 6.8 28 10.7c5.1 3.2 5.8 5.4 5.9 8.2c.1 5-1.8 8-5.9 10.5c-5 3.1-12.9 5-21.4 4.7c-11.1-.4-21.5-3.9-35.1-8.5c-2.3-.8-4.7-1.6-7.2-2.4c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c1.9 .6 4 1.3 6.1 2.1l0 0 0 0c8.3 2.9 17.9 6.2 28.2 8.4V360c0 11 9 20 20 20s20-9 20-20V346.2c8-1.7 16-4.5 23.2-9c14.3-8.9 25.1-24.1 24.8-45c-.3-20.3-11.7-33.4-24.6-41.6c-11.5-7.2-25.9-11.6-37.1-15l-.7-.2c-12.8-3.9-21.9-6.7-28.3-10.5c-5.2-3.1-5.3-4.9-5.3-6.7c0-3.7 1.4-6.5 6.2-9.3c5.4-3.2 13.6-5.1 21.5-5c9.6 .1 20.2 2.2 31.2 5.2c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-6.5-1.7-13.7-3.4-21.1-4.7V152zm108 40c-8.8 0-16 7.2-16 16s7.2 16 16 16H496c8.8 0 16-7.2 16-16s-7.2-16-16-16H272z"]]},sce={prefix:"fad",iconName:"question",icon:[320,512,[10067,10068,61736],"3f",["M120 440a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z","M144 96c-35.3 0-64 28.7-64 64c0 17.7-14.3 32-32 32s-32-14.3-32-32C16 89.3 73.3 32 144 32h32c70.7 0 128 57.3 128 128v3.6c0 43.6-22.1 84.1-58.8 107.7L203 298.4c-6.9 4.4-11 12-11 20.2V320c0 17.7-14.3 32-32 32s-32-14.3-32-32v-1.4c0-29.9 15.2-57.8 40.4-74l42.2-27.1c18.3-11.8 29.4-32.1 29.4-53.8V160c0-35.3-28.7-64-64-64H144z"]]},v3={prefix:"fad",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e",["M0 112C0 67.8 35.8 32 80 32H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H80c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16H400c8.8 0 16-7.2 16-16V320c0-17.7 14.3-32 32-32s32 14.3 32 32V432c0 44.2-35.8 80-80 80H80c-44.2 0-80-35.8-80-80V112z","M288 32c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V109.3L246.6 310.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L402.7 64H320c-17.7 0-32-14.3-32-32z"]]},ace={prefix:"fad",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200",["M32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272z","M527.4 240H304V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16zm31 48c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]]},UE={prefix:"fad",iconName:"location-pin",icon:[384,512,["map-marker"],"f041",["M384 192c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384 86 384 192z",""]]},ID={prefix:"fad",iconName:"square-list",icon:[448,512,[],"e489",["M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM96 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32-128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM96 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm96-248c-13.3 0-24 10.7-24 24s10.7 24 24 24H352c13.3 0 24-10.7 24-24s-10.7-24-24-24H192zM168 352c0 13.3 10.7 24 24 24H352c13.3 0 24-10.7 24-24s-10.7-24-24-24H192c-13.3 0-24 10.7-24 24zm24-120c-13.3 0-24 10.7-24 24s10.7 24 24 24H352c13.3 0 24-10.7 24-24s-10.7-24-24-24H192z","M168 160c0-13.3 10.7-24 24-24H352c13.3 0 24 10.7 24 24s-10.7 24-24 24H192c-13.3 0-24-10.7-24-24zm0 192c0-13.3 10.7-24 24-24H352c13.3 0 24 10.7 24 24s-10.7 24-24 24H192c-13.3 0-24-10.7-24-24zm24-120H352c13.3 0 24 10.7 24 24s-10.7 24-24 24H192c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]]},lce={prefix:"fad",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059",["M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z","M222.6 128c-23.7 0-44.8 14.9-52.8 37.3l-.4 1.2c-4.4 12.5 2.1 26.2 14.6 30.6s26.2-2.1 30.6-14.6l.4-1.2c1.1-3.2 4.2-5.3 7.5-5.3h58.3c8.4 0 15.1 6.8 15.1 15.1c0 5.4-2.9 10.4-7.6 13.1l-44.3 25.4c-7.5 4.3-12.1 12.2-12.1 20.8V264c0 13.3 10.7 24 24 24c13.1 0 23.8-10.5 24-23.6l32.3-18.5c19.6-11.3 31.7-32.2 31.7-54.8c0-34.9-28.3-63.1-63.1-63.1H222.6zM256 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]]},cce=lce,cp={prefix:"fad",iconName:"user-slash",icon:[640,512,[],"f506",["M448 128c0 59.2-40.1 109-94.7 123.6L192 125.2C193.5 55.8 250.2 0 320 0c70.7 0 128 57.3 128 128zM264.3 304.3l261 205.6c-3.4 1.4-7.1 2.1-11 2.1H125.7C109.3 512 96 498.7 96 482.3c0-95.1 74.5-172.9 168.3-178z","M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z"]]},uce={prefix:"fad",iconName:"calendar-circle-plus",icon:[576,512,[],"e470",["M96 32c0-17.7 14.3-32 32-32s32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32zM416 192.7c-89.7 8.1-160 83.5-160 175.3c0 59.5 29.6 112.1 74.8 144H48c-26.5 0-48-21.5-48-48V192H416v.7z","M288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-80c-8.8 0-16 7.2-16 16v48H368c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v48c0 8.8 7.2 16 16 16s16-7.2 16-16V384h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H448V304c0-8.8-7.2-16-16-16z"]]},dce={prefix:"fad",iconName:"house-blank",icon:[576,512,["home-blank"],"e487",["M64 270.5L64.1 448c0 35.3 28.7 64 64 64H448.5c35.4 0 64.1-28.7 64-64.1l-.4-177.3L288 74.5 64 270.5z","M266.9 7.9C279-2.6 297-2.6 309.1 7.9l256 224c13.3 11.6 14.6 31.9 3 45.2s-31.9 14.6-45.2 3L288 74.5 53.1 280.1c-13.3 11.6-33.5 10.3-45.2-3s-10.3-33.5 3-45.2l256-224z"]]},fce={prefix:"fad",iconName:"box-circle-check",icon:[576,512,[],"e0c4",["M50.7 58.5L0 160H208V32H93.7C75.5 32 58.9 42.3 50.7 58.5zM240 160H416h32L397.3 58.5C389.1 42.3 372.5 32 354.3 32H240V160zm176 32H0V416c0 35.3 28.7 64 64 64H296.2C271.1 449.6 256 410.5 256 368c0-91.8 70.3-167.2 160-175.3V192z","M432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm67.3-164.7l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L416 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]]},so={prefix:"fad",iconName:"trash",icon:[448,512,[],"f1f8",["M394.6 466.8L416 96H32L53.4 466.8c1.5 25.4 22.5 45.2 47.9 45.2H346.7c25.4 0 46.5-19.8 47.9-45.2z","M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z"]]},Xm={prefix:"fad",iconName:"envelope",icon:[512,512,[128386,9993,61443],"f0e0",["M0 112V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V112c0 15.1-7.1 29.3-19.2 38.4L275.2 313.6c-11.4 8.5-27 8.5-38.4 0L19.2 150.4C7.1 141.3 0 127.1 0 112z","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48z"]]},w8={prefix:"fad",iconName:"file-xmark",icon:[384,512,["file-times"],"f317",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM111 239c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z","M384 160H256c-17.7 0-32-14.3-32-32V0L384 160zM111 239c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]]},hce={prefix:"fad",iconName:"arrow-down-a-z",icon:[576,512,["sort-alpha-asc","sort-alpha-down"],"f15d",["M416 32c12.1 0 23.2 6.8 28.6 17.7l64 128 16 32c7.9 15.8 1.5 35-14.3 42.9s-35 1.5-42.9-14.3L460.2 224H371.8l-7.2 14.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l16-32 64-128C392.8 38.8 403.9 32 416 32zM395.8 176h40.4L416 135.6 395.8 176zM352 352c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9L429.3 416H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H352c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L402.7 352H352z","M160 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L192 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L95.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C142.5 476.2 151 480 160 480z"]]},VE={prefix:"fad",iconName:"hard-drive",icon:[512,512,[128436,"hdd"],"f0a0",["M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V320c0 5.5-.7 10.9-2 16c-7.1-27.6-32.2-48-62-48H64c-29.8 0-54.9 20.4-62 48c-1.3-5.1-2-10.5-2-16V96zM320 352a32 32 0 1 1 0 64 32 32 0 1 1 0-64z","M0 352c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V352zm352 32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm64 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]]},pce={prefix:"fad",iconName:"list-timeline",icon:[512,512,[],"e1d1",["M153.1 83.2c-8.5 6.4-8.5 19.2 0 25.6l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4H424c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H210.7c-6.9 0-13.7 2.2-19.2 6.4L153.1 83.2zm38.4 131.2l-38.4 28.8c-8.5 6.4-8.5 19.2 0 25.6l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4H488c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H210.7c-6.9 0-13.7 2.2-19.2 6.4zm0 160l-38.4 28.8c-8.5 6.4-8.5 19.2 0 25.6l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4H424c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H210.7c-6.9 0-13.7 2.2-19.2 6.4z","M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48 112a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 160a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"]]},mce={prefix:"fad",iconName:"gear",icon:[512,512,[9881,"cog"],"f013",["M192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z","M489.6 191.2c6.9-6.2 9.6-15.9 6.4-24.6c-4.4-11.9-9.7-23.3-15.8-34.3l-4.7-8.1c-6.6-11-14-21.4-22.1-31.2c-5.9-7.2-15.7-9.6-24.5-6.8L389.1 98.8c-10 3.2-20.8 1.1-29.7-4.6c-4.9-3.1-9.9-6.1-15.1-8.7c-9.3-4.8-16.5-13.2-18.8-23.4l-8.9-40.7c-2-9.1-9-16.3-18.2-17.8C284.7 1.2 270.5 0 256 0s-28.7 1.2-42.5 3.5c-9.2 1.5-16.2 8.7-18.2 17.8l-8.9 40.7c-2.2 10.2-9.5 18.6-18.8 23.4c-5.2 2.7-10.2 5.6-15.1 8.7c-8.8 5.7-19.7 7.7-29.7 4.6L83.1 86.1c-8.8-2.8-18.6-.3-24.5 6.8c-8.1 9.8-15.5 20.2-22.1 31.2l-4.7 8.1c-6.1 11-11.4 22.4-15.8 34.3c-3.2 8.7-.5 18.4 6.4 24.6l30.9 28.1c7.7 7.1 11.4 17.5 10.9 27.9c-.1 2.9-.2 5.8-.2 8.8s.1 5.9 .2 8.8c.5 10.5-3.1 20.9-10.9 27.9L22.4 320.8c-6.9 6.2-9.6 15.9-6.4 24.6c4.4 11.9 9.7 23.3 15.8 34.3l4.7 8.1c6.6 11 14 21.4 22.1 31.2c5.9 7.2 15.7 9.6 24.5 6.8l39.7-12.6c10-3.2 20.8-1.1 29.7 4.6c4.9 3.1 9.9 6.1 15.1 8.7c9.3 4.8 16.5 13.2 18.8 23.4l8.9 40.7c2 9.1 9 16.3 18.2 17.8c13.8 2.3 28 3.5 42.5 3.5s28.7-1.2 42.5-3.5c9.2-1.5 16.2-8.7 18.2-17.8l8.9-40.7c2.2-10.2 9.4-18.6 18.8-23.4c5.2-2.7 10.2-5.6 15.1-8.7c8.8-5.7 19.7-7.7 29.7-4.6l39.7 12.6c8.8 2.8 18.6 .3 24.5-6.8c8.1-9.8 15.5-20.2 22.1-31.2l4.7-8.1c6.1-11 11.3-22.4 15.8-34.3c3.2-8.7 .5-18.4-6.4-24.6l-30.9-28.1c-7.7-7.1-11.4-17.5-10.9-27.9c.1-2.9 .2-5.8 .2-8.8s-.1-5.9-.2-8.8c-.5-10.5 3.1-20.9 10.9-27.9l30.9-28.1zM256 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]]},gce={prefix:"fad",iconName:"sliders",icon:[512,512,["sliders-h"],"f1de",["M0 416c0-17.7 14.3-32 32-32l54.7 0c-4.3 9.8-6.7 20.6-6.7 32s2.4 22.2 6.7 32L32 448c-17.7 0-32-14.3-32-32zm233.3 32c4.3-9.8 6.7-20.6 6.7-32s-2.4-22.2-6.7-32L480 384c17.7 0 32 14.3 32 32s-14.3 32-32 32l-246.7 0zM0 256c0-17.7 14.3-32 32-32l246.7 0c-4.3 9.8-6.7 20.6-6.7 32s2.4 22.2 6.7 32L32 288c-17.7 0-32-14.3-32-32zm425.3 32c4.3-9.8 6.7-20.6 6.7-32s-2.4-22.2-6.7-32l54.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-54.7 0zM32 64l86.7 0c-4.3 9.8-6.7 20.6-6.7 32s2.4 22.2 6.7 32L32 128C14.3 128 0 113.7 0 96S14.3 64 32 64zm233.3 64c4.3-9.8 6.7-20.6 6.7-32s-2.4-22.2-6.7-32L480 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-214.7 0z","M128 416a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm112 0A80 80 0 1 0 80 416a80 80 0 1 0 160 0zm80-160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm112 0a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-112a80 80 0 1 0 0 160 80 80 0 1 0 0-160z"]]},vce={prefix:"fad",iconName:"file-circle-check",icon:[576,512,[],"e5a0",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384v38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7H64c-35.3 0-64-28.7-64-64V64z","M384 160H256c-17.7 0-32-14.3-32-32V0L384 160zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L416 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z"]]},yce={prefix:"fad",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015",["M64 270.5L64.1 472c0 22.1 17.9 40 40 40H184c22.1 0 40-17.9 40-40V383.7c0-17.7 14.3-32 32-32h64c17.7 0 32 14.3 32 32V472c0 22.1 17.9 40 40 40h80.5c22.1 0 40-18 40-40.1l-.4-201.3L288 74.5 64 270.5z","M266.9 7.9C279-2.6 297-2.6 309.1 7.9l256 224c13.3 11.6 14.6 31.9 3 45.2s-31.9 14.6-45.2 3L288 74.5 53.1 280.1c-13.3 11.6-33.5 10.3-45.2-3s-10.3-33.5 3-45.2l256-224z"]]},bce=yce,xce={prefix:"fad",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161",["M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z","M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z"]]},Cce={prefix:"fad",iconName:"message-slash",icon:[640,512,["comment-alt-slash"],"f4a9",["M406.2 416L64 146.4V352c0 35.3 28.7 64 64 64h96v80c0 6.1 3.4 11.6 8.8 14.3s11.9 2.1 16.8-1.5L373.3 416h32.8zm142.3-11.4C565.1 393 576 373.8 576 352V64c0-35.3-28.7-64-64-64H128C104.4 0 83.8 12.7 72.7 31.7L548.5 404.6z","M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z"]]},wce={prefix:"fad",iconName:"arrows-repeat",icon:[512,512,["repeat-alt"],"f364",["M490.1 257.6c16.8 5.6 25.8 23.7 20.2 40.5C486.9 368.5 421 416 346.8 416H173.3l41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L173.3 352H346.8c46.7 0 88.1-29.9 102.8-74.1c5.6-16.8 23.7-25.8 40.5-20.2z","M21.9 254.4C5.1 248.8-3.9 230.6 1.6 213.9C25.1 143.5 91 96 165.2 96H338.7L297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3l-96 96c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L338.7 160H165.2c-46.7 0-88.1 29.9-102.8 74.1c-5.6 16.8-23.7 25.8-40.5 20.2z"]]},Sce={prefix:"fad",iconName:"arrow-down-short-wide",icon:[576,512,["sort-amount-desc","sort-amount-down-alt"],"f884",["M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z","M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z"]]},Ece={prefix:"fad",iconName:"bell",icon:[448,512,[128276,61602],"f0f3",["M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32z","M288 448c0 17-6.7 33.3-18.7 45.3s-28.3 18.7-45.3 18.7s-33.3-6.7-45.3-18.7s-18.7-28.3-18.7-45.3l64 0h64z"]]},Iy={prefix:"fad",iconName:"box-open-full",icon:[640,512,["box-full"],"f49c",["M17.2 253.5c-9 17.9 .6 39.6 19.8 45.1l163.3 46.7c13.9 4 28.8-1.9 36.2-14.3L320 192 75.2 161.4c-6.7-.8-13.3 2.7-16.3 8.7L17.2 253.5zm605.5 0l-41.7-83.4c-3-6.1-9.6-9.6-16.3-8.7L320 192l83.4 139c7.4 12.4 22.3 18.3 36.2 14.3l163.3-46.7c19.3-5.5 28.8-27.2 19.8-45.1z","M480.9 3.1c24.8 9.3 37.4 37 28.1 61.8l-27.5 73.4L320 158.5l-7.2-.9c4.6-8.8 7.2-18.9 7.2-29.6c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 5.1 .6 10 1.7 14.7l-65.5-8.2c-.1-2.2-.2-4.3-.2-6.5C128 57.3 185.3 0 256 0c69.6 0 126.2 55.6 128 124.7l35.1-93.6c9.3-24.8 37-37.4 61.8-28.1zM236.6 331L320 192l83.4 139c7.4 12.4 22.3 18.3 36.2 14.3l136.4-39V410.5c0 22-15 41.2-36.4 46.6l-204.1 51c-10.2 2.5-20.9 2.5-31 0l-204.1-51C79 451.7 64 432.5 64 410.5V306.3l136.4 39c13.9 4 28.8-1.9 36.2-14.3z"]]},Tce={prefix:"fad",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b",["M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64z","M224 0L384 160H256c-17.7 0-32-14.3-32-32V0z"]]},rU={prefix:"fad",iconName:"grid-4",icon:[448,512,[],"e198",["M119.5 48v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H135.5c-8.8 0-16 7.2-16 16zM16 151.5c-8.8 0-16 7.2-16 16v57.6c0 8.8 7.2 16 16 16H73.6c8.8 0 16-7.2 16-16V167.5c0-8.8-7.2-16-16-16H16zm0 238.9c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16H73.6c8.8 0 16-7.2 16-16V406.4c0-8.8-7.2-16-16-16H16zM135.5 270.9c-8.8 0-16 7.2-16 16v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V286.9c0-8.8-7.2-16-16-16H135.5zM238.9 167.5v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V167.5c0-8.8-7.2-16-16-16H254.9c-8.8 0-16 7.2-16 16zm16 222.9c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V406.4c0-8.8-7.2-16-16-16H254.9zM358.4 48v57.6c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H374.4c-8.8 0-16 7.2-16 16zm16 222.9c-8.8 0-16 7.2-16 16v57.6c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V286.9c0-8.8-7.2-16-16-16H374.4z","M16 32C7.2 32 0 39.2 0 48v57.6c0 8.8 7.2 16 16 16H73.6c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H16zm0 238.9c-8.8 0-16 7.2-16 16v57.6c0 8.8 7.2 16 16 16H73.6c8.8 0 16-7.2 16-16V286.9c0-8.8-7.2-16-16-16H16zM119.5 167.5v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V167.5c0-8.8-7.2-16-16-16H135.5c-8.8 0-16 7.2-16 16zm16 222.9c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V406.4c0-8.8-7.2-16-16-16H135.5zM238.9 48v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H254.9c-8.8 0-16 7.2-16 16zm16 222.9c-8.8 0-16 7.2-16 16v57.6c0 8.8 7.2 16 16 16h57.6c8.8 0 16-7.2 16-16V286.9c0-8.8-7.2-16-16-16H254.9zM358.4 167.5v57.6c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V167.5c0-8.8-7.2-16-16-16H374.4c-8.8 0-16 7.2-16 16zm16 222.9c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V406.4c0-8.8-7.2-16-16-16H374.4z"]]},kce={prefix:"fad",iconName:"inbox",icon:[512,512,[],"f01c",["M391 96H121L73 288h51.2c12.1 0 23.2 6.8 28.6 17.7l14.3 28.6c5.4 10.8 16.5 17.7 28.6 17.7H316.2c12.1 0 23.2-6.8 28.6-17.7l14.3-28.6c5.4-10.8 16.5-17.7 28.6-17.7H439L391 96z","M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V323.9c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32H121zm0 64H391l48 192H387.8c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7H195.8c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7H73L121 96z"]]},_ce={prefix:"fad",iconName:"timer",icon:[512,512,[],"e29e",["M224 32c0-17.7 14.3-32 32-32C397.4 0 512 114.6 512 256s-114.6 256-256 256S0 397.4 0 256C0 184.4 29.5 119.6 76.8 73.1c12.6-12.4 32.9-12.2 45.3 .5s12.2 32.9-.5 45.3C86 153.7 64 202.3 64 256c0 106 86 192 192 192s192-86 192-192c0-95.1-69.2-174.1-160-189.3V96c0 17.7-14.3 32-32 32s-32-14.3-32-32V32z","M159 159c9.4-9.4 24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-80-80c-9.4-9.4-9.4-24.6 0-33.9z"]]},Ace={prefix:"fad",iconName:"boxes-stacked",icon:[576,512,[62625,"boxes","boxes-alt"],"f468",["M248 80V16c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16V80c0 8.8-7.2 16-16 16H264c-8.8 0-16-7.2-16-16zM104 336V256h80v80c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16zm288-80h80v80c0 8.8-7.2 16-16 16H408c-8.8 0-16-7.2-16-16V256z","M248 0H208c-26.5 0-48 21.5-48 48V160c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V48c0-26.5-21.5-48-48-48H328V80c0 8.8-7.2 16-16 16H264c-8.8 0-16-7.2-16-16V0zM64 256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H224c35.3 0 64-28.7 64-64V320c0-35.3-28.7-64-64-64H184v80c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V256H64zM352 512H512c35.3 0 64-28.7 64-64V320c0-35.3-28.7-64-64-64H472v80c0 8.8-7.2 16-16 16H408c-8.8 0-16-7.2-16-16V256H352c-15 0-28.8 5.1-39.7 13.8c4.9 10.4 7.7 22 7.7 34.2V464c0 12.2-2.8 23.8-7.7 34.2C323.2 506.9 337 512 352 512z"]]},jE={prefix:"fad",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002",["M208 64a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 352A208 208 0 1 0 208 0a208 208 0 1 0 0 416z","M330.7 376L457.4 502.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7C363.3 348 348 363.3 330.7 376z"]]},LD={prefix:"fad",iconName:"file-pen",icon:[576,512,[128221,"file-edit"],"f31c",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V299.5l-94.7 94.7c-8.2 8.2-14 18.5-16.8 29.7l-15 60.1c-2.3 9.4-1.8 19.1 1.4 27.9H64c-35.3 0-64-28.7-64-64V64z","M384 160H256c-17.7 0-32-14.3-32-32V0L384 160zm165.9 75.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.5-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417.1L441.2 287.8l71 71L382.9 488.1c-4.1 4.1-9.2 7-14.9 8.4l-60.2 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.2c1.4-5.6 4.3-10.8 8.4-14.9z"]]},$ce={prefix:"fad",iconName:"list-check",icon:[512,512,["tasks"],"f0ae",["M160 416c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192c-17.7 0-32 14.3-32 32zm64-160c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H256c-17.7 0-32 14.3-32 32zm32-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H256c-17.7 0-32 14.3-32 32s14.3 32 32 32z","M153.8 72.1c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L63.1 101.1 41 79C31.6 69.7 16.4 69.7 7 79s-9.4 24.6 0 33.9l40 40c4.7 4.7 11 7.2 17.6 7s12.8-3 17.2-7.9l72-80zm0 160c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L63.1 261.1 41 239c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l40 40c4.7 4.7 11 7.2 17.6 7s12.8-3 17.2-7.9l72-80zM48 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]]},y3={prefix:"fad",iconName:"copy",icon:[448,512,[],"f0c5",["M128 128H48c-26.5 0-48 21.5-48 48V464c0 26.5 21.5 48 48 48H272c26.5 0 48-21.5 48-48V416H256v32H64V192h64V128z","M160 48c0-26.5 21.5-48 48-48H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48z"]]},Dce={prefix:"fad",iconName:"store",icon:[576,512,[],"f54e",["M64 219.1V384v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V384 219.1c-5.1 2-10.6 3.4-16.5 4.1c-4 .5-7.9 .8-12.1 .8c-12.7 0-24.6-2.7-35.4-7.5V384H128V216.5c-10.8 4.8-22.9 7.5-35.6 7.5c-4.1 0-8.2-.3-12.1-.8c-5.7-.8-11.2-2.2-16.2-4.1z","M490.3 13.1l57.3 90.7c29.7 46.9 3.4 112-52.1 119.4c-4 .5-7.9 .8-12.1 .8c-26.1 0-49.2-11.4-65.2-29c-15.9 17.6-39 29-65.2 29c-26.1 0-49.3-11.4-65.2-29c-15.9 17.6-39 29-65.2 29c-26.1 0-49.3-11.4-65.2-29c-15.9 17.6-39.1 29-65.2 29c-4.1 0-8.2-.3-12.1-.8c-55.3-7.4-81.5-72.6-51.9-119.4L85.7 13.1C90.8 5 99.9 0 109.6 0H466.4c9.7 0 18.8 5 23.9 13.1z"]]},xC={prefix:"fad",iconName:"person-to-door",icon:[576,512,[58704],"e433",["M432 0c-26.5 0-48 21.5-48 48V224c17.7 0 32 14.3 32 32s-14.3 32-32 32V464c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48H432z","M320 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM125.7 175.5c9.9-9.9 23.4-15.5 37.5-15.5c1.9 0 3.8 .1 5.6 .3L137.6 254c-9.3 28 1.7 58.8 26.8 74.5l86.2 53.9-25.4 88.8c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l28.7-100.4c5.9-20.6-2.6-42.6-20.7-53.9L238 299l30.9-82.4 5.1 12.3C289 264.7 323.9 288 362.7 288H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H362.7c-12.9 0-24.6-7.8-29.5-19.7l-6.3-15c-14.6-35.1-44.1-61.9-80.5-73.1l-48.7-15c-11.1-3.4-22.7-5.2-34.4-5.2c-31 0-60.8 12.3-82.7 34.3L57.4 153.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l23.1-23.1zM91.2 352H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h69.6c19 0 36.2-11.2 43.9-28.5L157 361.6l-9.5-6c-17.5-10.9-30.5-26.8-37.9-44.9L91.2 352z"]]},iU={prefix:"fad",iconName:"gears",icon:[640,512,["cogs"],"f085",["M529.7 506.7c-8.7 3.7-18.6 .9-25-6.2l-19.8-22.2c-6.8 1.1-13.8 1.7-20.9 1.7s-14.1-.6-20.9-1.7l-19.8 22.2c-6.3 7.1-16.2 9.9-25 6.2c-5.3-2.3-10.5-4.8-15.5-7.6l-5.4-3.1c-5-3-9.9-6.3-14.6-9.8c-7.6-5.7-10.1-15.7-7.1-24.7l9.3-28.2c-8.8-10.7-16-23-20.9-36.2L315.1 391c-9.3-1.9-16.7-9.1-17.8-18.5c-.8-6.7-1.2-13.5-1.2-20.4s.4-13.7 1.2-20.4c1.1-9.4 8.6-16.6 17.8-18.5l29.1-6.1c5-13.3 12.1-25.5 20.9-36.2l-9.3-28.2c-3-9-.5-19 7.1-24.7c4.7-3.5 9.6-6.8 14.6-9.9l5.2-3c5-2.8 10.2-5.3 15.6-7.6c8.7-3.7 18.6-.9 25 6.2l19.8 22.2c6.8-1.1 13.8-1.7 20.9-1.7s14.1 .6 20.9 1.7l19.8-22.2c6.3-7.1 16.2-9.9 25-6.2c5.3 2.3 10.5 4.8 15.6 7.6l5.3 3c5.1 3 9.9 6.3 14.6 9.9c7.6 5.7 10.1 15.7 7.1 24.7l-9.3 28.2c8.8 10.7 16 23 20.9 36.2l29.1 6.1c9.3 1.9 16.7 9.1 17.8 18.5c.8 6.7 1.2 13.5 1.2 20.4s-.4 13.7-1.2 20.4c-1.1 9.4-8.6 16.6-17.8 18.5L583.9 397c-5 13.3-12.1 25.5-20.9 36.2l9.3 28.2c3 9 .5 19-7.1 24.7c-4.7 3.5-9.5 6.8-14.6 9.8l-5.4 3.1c-5 2.8-10.2 5.3-15.5 7.6zM416 352a48 48 0 1 0 96 0 48 48 0 1 0 -96 0z","M314.7 110.3c3.7 8.7 .9 18.6-6.2 25l-22.2 19.8c1.1 6.8 1.7 13.8 1.7 20.9s-.6 14.1-1.7 20.9l22.2 19.8c7.1 6.3 9.9 16.2 6.2 25c-2.3 5.3-4.8 10.5-7.6 15.5l-3.1 5.4c-3 5-6.3 9.9-9.8 14.6c-5.7 7.6-15.7 10.1-24.7 7.1l-28.2-9.3c-10.7 8.8-23 16-36.2 20.9L199 324.9c-1.9 9.3-9.1 16.7-18.5 17.8c-6.7 .8-13.5 1.2-20.4 1.2s-13.7-.4-20.4-1.2c-9.4-1.1-16.6-8.6-18.5-17.8L115 295.9c-13.3-5-25.5-12.1-36.2-20.9l-28.2 9.3c-9 3-19 .5-24.7-7.1c-3.5-4.7-6.8-9.6-9.9-14.6l-3-5.2c-2.8-5-5.3-10.2-7.6-15.6c-3.7-8.7-.9-18.6 6.2-25l22.2-19.8C32.6 190.1 32 183.1 32 176s.6-14.1 1.7-20.9L11.5 135.3c-7.1-6.3-9.9-16.2-6.2-25c2.3-5.3 4.8-10.5 7.6-15.6l3-5.3c3-5.1 6.3-9.9 9.9-14.6c5.7-7.6 15.7-10.1 24.7-7.1l28.2 9.3c10.7-8.8 23-16 36.2-20.9L121 27.1c1.9-9.3 9.1-16.7 18.5-17.8C146.3 8.4 153.1 8 160 8s13.7 .4 20.4 1.2c9.4 1.1 16.6 8.6 18.5 17.8L205 56.1c13.3 5 25.5 12.1 36.2 20.9l28.2-9.3c9-3 19-.5 24.7 7.1c3.5 4.7 6.8 9.5 9.8 14.6l3.1 5.4c2.8 5 5.3 10.2 7.6 15.5zM160 224a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]]},Oce={prefix:"fad",iconName:"user-group-simple",icon:[640,512,[],"e603",["M480 32a104 104 0 1 1 0 208 104 104 0 1 1 0-208zM448 480c-38.3 0-72.7-16.8-96.1-43.5c.1-1.5 .1-3 .1-4.5V416c0-34.9-11.2-67.1-30.1-93.4c5.8-20 24.2-34.6 46.1-34.6H592c26.5 0 48 21.5 48 48v16c0 70.7-57.3 128-128 128H448z","M160 240a104 104 0 1 0 0-208 104 104 0 1 0 0 208zm-32 48C57.3 288 0 345.3 0 416v16c0 26.5 21.5 48 48 48H272c26.5 0 48-21.5 48-48V416c0-70.7-57.3-128-128-128H128z"]]},Pce={prefix:"fad",iconName:"pen-nib",icon:[512,512,[10001],"f5ad",["M293.9 92.8L419.2 218.1l-4.5 15.1L371.4 377.3c-6 19.9-21.2 35.7-41 42.3L66.2 508.2c-11.3 3.8-23.9 1-32.4-7.4L187.3 347.3c6.3 3 13.3 4.7 20.7 4.7c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48c0 7.4 1.7 14.4 4.7 20.7L11.1 478.3C2.8 469.7 0 457.2 3.8 445.8L92.4 181.5c6.6-19.7 22.4-35 42.3-41L278.8 97.4l15.1-4.5 0 0z","M368.4 18.3c21.9-21.9 57.3-21.9 79.2 0l46.1 46.1c21.9 21.9 21.9 57.3 0 79.2l-71 71-3.4 3.4 0 0L293.9 92.8l0 0 0 0 3.4-3.4 71-71z"]]},Rce={prefix:"fad",iconName:"box-heart",icon:[448,512,[],"f49d",["M93.7 32C75.5 32 58.9 42.3 50.7 58.5L0 160H208V32H93.7zM240 32V160H448L397.3 58.5C389.1 42.3 372.5 32 354.3 32H240z","M448 160H240V32H208V160H0V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V160zM212.7 404.7l-77.3-77.3c-20.5-20.5-20.5-53.8 0-74.3s53.8-20.5 74.3 0L224 267.4l14.3-14.3c20.5-20.5 53.8-20.5 74.3 0s20.5 53.8 0 74.3l-77.3 77.3c-6.2 6.2-16.4 6.2-22.6 0z"]]},Mce={prefix:"fad",iconName:"circle-plus",icon:[512,512,["plus-circle"],"f055",["M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z","M232 280v64c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64z"]]},oU=Mce,Ice={prefix:"fad",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127",["M220.9 270L406.6 416.4C357.4 431 301.9 418.9 263 380c-29.9-29.9-44.3-70.2-42.2-110zM116.6 187.9l50.6 39.9-61.8 61.8C74 321 74 372 105.5 403.5c27.9 27.9 71.8 31.5 103.8 8.6l1.6-1.1c14.4-10.3 34.4-6.9 44.6 7.4s6.9 34.4-7.4 44.6l-1.6 1.1C189 505.3 110.2 498.7 60.2 448.8c-56.5-56.5-56.5-148 0-204.5l56.4-56.4zm215.1-10.6C306.6 152.1 269.1 147 239 162l-53.2-41.7C242.5 75.8 324.7 79.7 377 132c43.1 43.1 53.9 107.6 29.7 161.5l-53.2-41.7c5.8-26.2-1.7-54.5-21.7-74.5zm248 90.5l-90.5 90.5-50.7-39.8 96-96c31.5-31.5 31.5-82.5 0-114C506.7 80.6 462.7 77 430.7 99.9l-1.6 1.1c-14.4 10.3-34.4 6.9-44.6-7.4s-6.9-34.4 7.4-44.6l1.6-1.1C451 6.7 529.8 13.3 579.8 63.2c56.5 56.5 56.5 148 0 204.5z","M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z"]]},Lce={prefix:"fad",iconName:"arrow-up-z-a",icon:[576,512,["sort-alpha-up-alt"],"f882",["M352 96c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9L429.3 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H352c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L402.7 96H352zm64 160c12.1 0 23.2 6.8 28.6 17.7l64 128 16 32c7.9 15.8 1.5 35-14.3 42.9s-35 1.5-42.9-14.3L460.2 448H371.8l-7.2 14.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l16-32 64-128c5.4-10.8 16.5-17.7 28.6-17.7zM395.8 400h40.4L416 359.6 395.8 400z","M160 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L192 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L95.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C142.5 35.8 151 32 160 32z"]]},sU={prefix:"fad",iconName:"file-circle-plus",icon:[576,512,[58606],"e494",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384v38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7H64c-35.3 0-64-28.7-64-64V64z","M384 160L224 0V128c0 17.7 14.3 32 32 32H384zm48 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208v48h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V384H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h48V304c0-8.8 7.2-16 16-16s16 7.2 16 16z"]]},Nce={prefix:"fad",iconName:"book",icon:[448,512,[128212],"f02d",["M64 416c0-17.7 14.3-32 32-32H416v64H96c-17.7 0-32-14.3-32-32z","M0 96C0 43 43 0 96 0H384h32c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H352 256 96c-17.7 0-32 14.3-32 32s14.3 32 32 32H256h96 64c17.7 0 32 14.3 32 32s-14.3 32-32 32H384 96c-53 0-96-43-96-96V96zm144 32c-8.8 0-16 7.2-16 16s7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H144zm-16 80c0 8.8 7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H144c-8.8 0-16 7.2-16 16z"]]},rm={prefix:"fad",iconName:"user-plus",icon:[640,512,[],"f234",["M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z","M504 248v64c0 13.3 10.7 24 24 24s24-10.7 24-24V248h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H552V136c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H440c-13.3 0-24 10.7-24 24s10.7 24 24 24h64z"]]},Fce={prefix:"fad",iconName:"gifts",icon:[640,512,[],"f79c",["M200.6 32C205 19.5 198.5 5.8 186 1.4S159.8 3.5 155.4 16L144.7 46.2l-9.9-29.8C130.6 3.8 117-3 104.4 1.2S85 19 89.2 31.6l9.4 28.3L71.2 37.4C60.9 29 45.8 30.5 37.4 40.8S30.5 66.2 40.8 74.6L67 96H221l26.2-21.4c10.3-8.4 11.8-23.5 3.4-33.8s-23.5-11.8-33.8-3.4L191.3 58.3 200.6 32zM592 224h-4.1c-9.9 28-36.6 48-67.9 48H448v80H640V272c0-26.5-21.5-48-48-48zM448 384V512H592c26.5 0 48-21.5 48-48V384H448zm-32 0H224v80c0 26.5 21.5 48 48 48H416V384zm0-32V272H400 344c-31.3 0-58-20-67.9-48H272c-26.5 0-48 21.5-48 48v80H416z","M48 96C21.5 96 0 117.5 0 144V464c0 26.5 21.5 48 48 48H200.6c-5.4-9.4-8.6-20.3-8.6-32V256c0-29.9 20.5-55 48.2-62c1.8-31 17.1-58.2 40.1-76.1C271.7 104.7 256.9 96 240 96H48zm315.5 89.5L393.1 224H344c-13.3 0-24-10.7-24-24c0-13.1 10.8-24 24.2-24c7.6 0 14.7 3.5 19.3 9.5zM344 272h56 16v80H224v32H416V512h32V384H640V352H448V272h72c39.8 0 72-32.2 72-72c0-39.9-32.5-72-72.2-72c-22.4 0-43.6 10.4-57.3 28.2L432 195.8l-30.5-39.6c-13.7-17.8-35-28.2-57.3-28.2c-39.7 0-72.2 32.1-72.2 72c0 39.8 32.2 72 72 72zm175.8-96c13.4 0 24.2 10.9 24.2 24c0 13.3-10.7 24-24 24H470.9l29.6-38.5c4.6-5.9 11.7-9.5 19.3-9.5z"]]},Bce={prefix:"fad",iconName:"calendar-heart",icon:[448,512,[],"e0d3",["M448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192zM112 317.3c0-33.8 27.4-61.3 61.3-61.3c16.2 0 31.8 6.5 43.3 17.9l7.4 7.4 7.4-7.4c11.5-11.5 27.1-17.9 43.3-17.9c33.8 0 61.3 27.4 61.3 61.3c0 16.2-6.5 31.8-17.9 43.3l-82.7 82.7c-6.2 6.2-16.4 6.2-22.6 0l-82.7-82.7c-11.5-11.5-17.9-27.1-17.9-43.3z","M128 0C110.3 0 96 14.3 96 32V64H48C21.5 64 0 85.5 0 112v80H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32zM112 317.3c0 16.2 6.5 31.8 17.9 43.3l82.7 82.7c6.2 6.2 16.4 6.2 22.6 0l82.7-82.7c11.5-11.5 17.9-27.1 17.9-43.3c0-33.8-27.4-61.3-61.3-61.3c-16.2 0-31.8 6.5-43.3 17.9l-7.4 7.4-7.4-7.4c-11.5-11.5-27.1-17.9-43.3-17.9c-33.8 0-61.3 27.4-61.3 61.3z"]]},Hce={prefix:"fad",iconName:"file-check",icon:[384,512,[],"f316",["M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM305 281c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L305 281z","M384 160L224 0V128c0 17.7 14.3 32 32 32H384zM305 281c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L305 281z"]]};function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(this,arguments)}function Ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function zce(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ly(...e){return t=>e.forEach(n=>zce(n,t))}function zt(...e){return y.exports.useCallback(Ly(...e),e)}function ii(e,t=[]){let n=[];function r(o,s){const a=y.exports.createContext(s),c=n.length;n=[...n,s];function u(f){const{scope:h,children:p,...m}=f,v=(h==null?void 0:h[e][c])||a,b=y.exports.useMemo(()=>m,Object.values(m));return y.exports.createElement(v.Provider,{value:b},p)}function d(f,h){const p=(h==null?void 0:h[e][c])||a,m=y.exports.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>y.exports.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return y.exports.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Uce(i,...t)]}function Uce(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return y.exports.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const ri=Boolean(globalThis==null?void 0:globalThis.document)?y.exports.useLayoutEffect:()=>{},Vce=D0["useId".toString()]||(()=>{});let jce=0;function es(e){const[t,n]=y.exports.useState(Vce());return ri(()=>{e||n(r=>r!=null?r:String(jce++))},[e]),e||(t?`radix-${t}`:"")}function Ao(e){const t=y.exports.useRef(e);return y.exports.useEffect(()=>{t.current=e}),y.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function $o({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Wce({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Ao(n),c=y.exports.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else i(u)},[o,e,i,a]);return[s,c]}function Wce({defaultProp:e,onChange:t}){const n=y.exports.useState(e),[r]=n,i=y.exports.useRef(r),o=Ao(t);return y.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Pd=y.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.exports.Children.toArray(n),o=i.find(qce);if(o){const s=o.props.children,a=i.map(c=>c===o?y.exports.Children.count(s)>1?y.exports.Children.only(null):y.exports.isValidElement(s)?s.props.children:null:c);return y.exports.createElement(CC,ue({},r,{ref:t}),y.exports.isValidElement(s)?y.exports.cloneElement(s,void 0,a):null)}return y.exports.createElement(CC,ue({},r,{ref:t}),n)});Pd.displayName="Slot";const CC=y.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return y.exports.isValidElement(n)?y.exports.cloneElement(n,{...Kce(r,n.props),ref:t?Ly(t,n.ref):n.ref}):y.exports.Children.count(n)>1?y.exports.Children.only(null):null});CC.displayName="SlotClone";const aU=({children:e})=>y.exports.createElement(y.exports.Fragment,null,e);function qce(e){return y.exports.isValidElement(e)&&e.type===aU}function Kce(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Gce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pt=Gce.reduce((e,t)=>{const n=y.exports.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Pd:t;return y.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.exports.createElement(a,ue({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lU(e,t){e&&Lr.exports.flushSync(()=>e.dispatchEvent(t))}function Yce(e,t=globalThis==null?void 0:globalThis.document){const n=Ao(e);y.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const wC="dismissableLayer.update",Qce="dismissableLayer.pointerDownOutside",Xce="dismissableLayer.focusOutside";let ND;const Zce=y.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zm=y.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=y.exports.useContext(Zce),[f,h]=y.exports.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=y.exports.useState({}),v=zt(t,_=>h(_)),b=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=b.indexOf(x),w=f?b.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,T=w>=C,E=Jce(_=>{const O=_.target,D=[...d.branches].some(L=>L.contains(O));!T||D||(o==null||o(_),a==null||a(_),_.defaultPrevented||c==null||c())},p),k=eue(_=>{const O=_.target;[...d.branches].some(L=>L.contains(O))||(s==null||s(_),a==null||a(_),_.defaultPrevented||c==null||c())},p);return Yce(_=>{w===d.layers.size-1&&(i==null||i(_),!_.defaultPrevented&&c&&(_.preventDefault(),c()))},p),y.exports.useEffect(()=>{if(!!f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ND=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),FD(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ND)}},[f,p,r,d]),y.exports.useEffect(()=>()=>{!f||(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),FD())},[f,d]),y.exports.useEffect(()=>{const _=()=>m({});return document.addEventListener(wC,_),()=>document.removeEventListener(wC,_)},[]),y.exports.createElement(Pt.div,ue({},u,{ref:v,style:{pointerEvents:S?T?"auto":"none":void 0,...e.style},onFocusCapture:Ue(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ue(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ue(e.onPointerDownCapture,E.onPointerDownCapture)}))});function Jce(e,t=globalThis==null?void 0:globalThis.document){const n=Ao(e),r=y.exports.useRef(!1),i=y.exports.useRef(()=>{});return y.exports.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let d=function(){cU(Qce,n,u,{discrete:!0})};var c=d;const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function eue(e,t=globalThis==null?void 0:globalThis.document){const n=Ao(e),r=y.exports.useRef(!1);return y.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&cU(Xce,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function FD(){const e=new CustomEvent(wC);document.dispatchEvent(e)}function cU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?lU(i,o):i.dispatchEvent(o)}const S8="focusScope.autoFocusOnMount",E8="focusScope.autoFocusOnUnmount",BD={bubbles:!1,cancelable:!0},WE=y.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=y.exports.useState(null),u=Ao(i),d=Ao(o),f=y.exports.useRef(null),h=zt(t,v=>c(v)),p=y.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.exports.useEffect(()=>{if(r){let C=function(E){if(p.paused||!a)return;const k=E.target;a.contains(k)?f.current=k:cc(f.current,{select:!0})},w=function(E){if(p.paused||!a)return;const k=E.relatedTarget;k!==null&&(a.contains(k)||cc(f.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&cc(a)};var v=C,b=w,x=S;document.addEventListener("focusin",C),document.addEventListener("focusout",w);const T=new MutationObserver(S);return a&&T.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",w),T.disconnect()}}},[r,a,p.paused]),y.exports.useEffect(()=>{if(a){zD.add(p);const v=document.activeElement;if(!a.contains(v)){const x=new CustomEvent(S8,BD);a.addEventListener(S8,u),a.dispatchEvent(x),x.defaultPrevented||(tue(sue(uU(a)),{select:!0}),document.activeElement===v&&cc(a))}return()=>{a.removeEventListener(S8,u),setTimeout(()=>{const x=new CustomEvent(E8,BD);a.addEventListener(E8,d),a.dispatchEvent(x),x.defaultPrevented||cc(v!=null?v:document.body,{select:!0}),a.removeEventListener(E8,d),zD.remove(p)},0)}}},[a,u,d,p]);const m=y.exports.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(b&&x){const C=v.currentTarget,[w,S]=nue(C);w&&S?!v.shiftKey&&x===S?(v.preventDefault(),n&&cc(w,{select:!0})):v.shiftKey&&x===w&&(v.preventDefault(),n&&cc(S,{select:!0})):x===C&&v.preventDefault()}},[n,r,p.paused]);return y.exports.createElement(Pt.div,ue({tabIndex:-1},s,{ref:h,onKeyDown:m}))});function tue(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function nue(e){const t=uU(e),n=HD(t,e),r=HD(t.reverse(),e);return[n,r]}function uU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function HD(e,t){for(const n of e)if(!rue(n,{upTo:t}))return n}function rue(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function iue(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iue(e)&&t&&e.select()}}const zD=oue();function oue(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=UD(e,t),e.unshift(t)},remove(t){var n;e=UD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function UD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sue(e){return e.filter(t=>t.tagName!=="A")}const Ny=y.exports.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?mH.createPortal(y.exports.createElement(Pt.div,ue({},i,{ref:t})),r):null});function aue(e,t){return y.exports.useReducer((n,r)=>{const i=t[n][r];return i!=null?i:n},e)}const Hi=e=>{const{present:t,children:n}=e,r=lue(t),i=typeof n=="function"?n({present:r.isPresent}):y.exports.Children.only(n),o=zt(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.exports.cloneElement(i,{ref:o}):null};Hi.displayName="Presence";function lue(e){const[t,n]=y.exports.useState(),r=y.exports.useRef({}),i=y.exports.useRef(e),o=y.exports.useRef("none"),s=e?"mounted":"unmounted",[a,c]=aue(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.exports.useEffect(()=>{const u=h2(r.current);o.current=a==="mounted"?u:"none"},[a]),ri(()=>{const u=r.current,d=i.current;if(d!==e){const h=o.current,p=h2(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ri(()=>{if(t){const u=f=>{const p=h2(r.current).includes(f.animationName);f.target===t&&p&&Lr.exports.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=h2(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function h2(e){return(e==null?void 0:e.animationName)||"none"}let T8=0;function qE(){y.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:VD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:VD()),T8++,()=>{T8===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),T8--}},[])}function VD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var SC=function(e,t){return SC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},SC(e,t)};function cue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");SC(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var qn=function(){return qn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},qn.apply(this,arguments)};function dU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function uue(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var K4="right-scroll-bar-position",G4="width-before-scroll-bar",due="with-scroll-bars-hidden",fue="--removed-body-scroll-bar-size";function hue(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pue(e,t){var n=y.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function mue(e,t){return pue(t||null,function(n){return e.forEach(function(r){return hue(r,n)})})}function gue(e){return e}function vue(e,t){t===void 0&&(t=gue);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function yue(e){e===void 0&&(e={});var t=vue(null);return t.options=qn({async:!0,ssr:!1},e),t}var fU=function(e){var t=e.sideCar,n=dU(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l(r,{...qn({},n)})};fU.isSideCarExport=!0;function bue(e,t){return e.useMedium(t),fU}var hU=yue(),k8=function(){},Fy=y.exports.forwardRef(function(e,t){var n=y.exports.useRef(null),r=y.exports.useState({onScrollCapture:k8,onWheelCapture:k8,onTouchMoveCapture:k8}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,C=dU(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,S=mue([n,t]),T=qn(qn({},C),i);return g(z,{children:[d&&l(w,{sideCar:hU,removeScrollBar:u,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),s?y.exports.cloneElement(y.exports.Children.only(a),qn(qn({},T),{ref:S})):l(x,{...qn({},T,{className:c,ref:S}),children:a})]})});Fy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fy.classNames={fullWidth:G4,zeroRight:K4};var xue=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cue(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xue();return t&&e.setAttribute("nonce",t),e}function wue(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Sue(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Eue=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cue())&&(wue(t,n),Sue(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tue=function(){var e=Eue();return function(t,n){y.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},pU=function(){var e=Tue(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},kue={left:0,top:0,right:0,gap:0},_8=function(e){return parseInt(e||"",10)||0},_ue=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_8(n),_8(r),_8(i)]},Aue=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kue;var t=_ue(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$ue=pU(),Due=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(due,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(K4,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(G4,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(K4," .").concat(K4,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(G4," .").concat(G4,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body {
    `).concat(fue,": ").concat(a,`px;
  }
`)},Oue=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=y.exports.useMemo(function(){return Aue(i)},[i]);return l($ue,{styles:Due(o,!t,i,n?"":"!important")})},EC=!1;if(typeof window<"u")try{var p2=Object.defineProperty({},"passive",{get:function(){return EC=!0,!0}});window.addEventListener("test",p2,p2),window.removeEventListener("test",p2,p2)}catch{EC=!1}var d1=EC?{passive:!1}:!1,Pue=function(e){return e.tagName==="TEXTAREA"},mU=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Pue(e)&&n[t]==="visible")},Rue=function(e){return mU(e,"overflowY")},Mue=function(e){return mU(e,"overflowX")},jD=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=gU(e,n);if(r){var i=vU(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Iue=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lue=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gU=function(e,t){return e==="v"?Rue(t):Mue(t)},vU=function(e,t){return e==="v"?Iue(t):Lue(t)},Nue=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fue=function(e,t,n,r,i){var o=Nue(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),u=!1,d=s>0,f=0,h=0;do{var p=vU(e,a),m=p[0],v=p[1],b=p[2],x=v-b-o*m;(m||x)&&gU(e,a)&&(f+=x,h+=m),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(i&&f===0||!i&&s>f)||!d&&(i&&h===0||!i&&-s>h))&&(u=!0),u},m2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},WD=function(e){return[e.deltaX,e.deltaY]},qD=function(e){return e&&"current"in e?e.current:e},Bue=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hue=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},zue=0,f1=[];function Uue(e){var t=y.exports.useRef([]),n=y.exports.useRef([0,0]),r=y.exports.useRef(),i=y.exports.useState(zue++)[0],o=y.exports.useState(function(){return pU()})[0],s=y.exports.useRef(e);y.exports.useEffect(function(){s.current=e},[e]),y.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=uue([e.lockRef.current],(e.shards||[]).map(qD),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.exports.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var x=m2(v),C=n.current,w="deltaX"in v?v.deltaX:C[0]-x[0],S="deltaY"in v?v.deltaY:C[1]-x[1],T,E=v.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in v&&k==="h"&&E.type==="range")return!1;var _=jD(k,E);if(!_)return!0;if(_?T=k:(T=k==="v"?"h":"v",_=jD(k,E)),!_)return!1;if(!r.current&&"changedTouches"in v&&(w||S)&&(r.current=T),!T)return!0;var O=r.current||T;return Fue(O,b,v,O==="h"?w:S,!0)},[]),c=y.exports.useCallback(function(v){var b=v;if(!(!f1.length||f1[f1.length-1]!==o)){var x="deltaY"in b?WD(b):m2(b),C=t.current.filter(function(T){return T.name===b.type&&T.target===b.target&&Bue(T.delta,x)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var w=(s.current.shards||[]).map(qD).filter(Boolean).filter(function(T){return T.contains(b.target)}),S=w.length>0?a(b,w[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=y.exports.useCallback(function(v,b,x,C){var w={name:v,delta:b,target:x,should:C};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=y.exports.useCallback(function(v){n.current=m2(v),r.current=void 0},[]),f=y.exports.useCallback(function(v){u(v.type,WD(v),v.target,a(v,e.lockRef.current))},[]),h=y.exports.useCallback(function(v){u(v.type,m2(v),v.target,a(v,e.lockRef.current))},[]);y.exports.useEffect(function(){return f1.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,d1),document.addEventListener("touchmove",c,d1),document.addEventListener("touchstart",d,d1),function(){f1=f1.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,d1),document.removeEventListener("touchmove",c,d1),document.removeEventListener("touchstart",d,d1)}},[]);var p=e.removeScrollBar,m=e.inert;return g(z,{children:[m?l(o,{styles:Hue(i)}):null,p?l(Oue,{gapMode:"margin"}):null]})}const Vue=bue(hU,Uue);var yU=y.exports.forwardRef(function(e,t){return l(Fy,{...qn({},e,{ref:t,sideCar:Vue})})});yU.classNames=Fy.classNames;const KE=yU;var jue=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},h1=new WeakMap,g2=new WeakMap,v2={},A8=0,bU=function(e){return e&&(e.host||bU(e.parentNode))},Wue=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bU(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},que=function(e,t,n,r){var i=Wue(t,Array.isArray(e)?e:[e]);v2[n]||(v2[n]=new WeakMap);var o=v2[n],s=[],a=new Set,c=new Set(i),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(h1.get(h)||0)+1,b=(o.get(h)||0)+1;h1.set(h,v),o.set(h,b),s.push(h),v===1&&m&&g2.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}})};return d(t),a.clear(),A8++,function(){s.forEach(function(f){var h=h1.get(f)-1,p=o.get(f)-1;h1.set(f,h),o.set(f,p),h||(g2.has(f)||f.removeAttribute(r),g2.delete(f)),p||f.removeAttribute(n)}),A8--,A8||(h1=new WeakMap,h1=new WeakMap,g2=new WeakMap,v2={})}},GE=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||jue(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),que(r,i,n,"aria-hidden")):function(){return null}};const xU="Dialog",[CU,MGe]=ii(xU),[Kue,Gs]=CU(xU),Gue=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=y.exports.useRef(null),c=y.exports.useRef(null),[u=!1,d]=$o({prop:r,defaultProp:i,onChange:o});return y.exports.createElement(Kue,{scope:t,triggerRef:a,contentRef:c,contentId:es(),titleId:es(),descriptionId:es(),open:u,onOpenChange:d,onOpenToggle:y.exports.useCallback(()=>d(f=>!f),[d]),modal:s},n)},Yue="DialogTrigger",Que=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Gs(Yue,n),o=zt(t,i.triggerRef);return y.exports.createElement(Pt.button,ue({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":YE(i.open)},r,{ref:o,onClick:Ue(e.onClick,i.onOpenToggle)}))}),wU="DialogPortal",[Xue,SU]=CU(wU,{forceMount:void 0}),Zue=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Gs(wU,t);return y.exports.createElement(Xue,{scope:t,forceMount:n},y.exports.Children.map(r,s=>y.exports.createElement(Hi,{present:n||o.open},y.exports.createElement(Ny,{asChild:!0,container:i},s))))},TC="DialogOverlay",Jue=y.exports.forwardRef((e,t)=>{const n=SU(TC,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Gs(TC,e.__scopeDialog);return o.modal?y.exports.createElement(Hi,{present:r||o.open},y.exports.createElement(ede,ue({},i,{ref:t}))):null}),ede=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Gs(TC,n);return y.exports.createElement(KE,{as:Pd,allowPinchZoom:!0,shards:[i.contentRef]},y.exports.createElement(Pt.div,ue({"data-state":YE(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),im="DialogContent",tde=y.exports.forwardRef((e,t)=>{const n=SU(im,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Gs(im,e.__scopeDialog);return y.exports.createElement(Hi,{present:r||o.open},o.modal?y.exports.createElement(nde,ue({},i,{ref:t})):y.exports.createElement(rde,ue({},i,{ref:t})))}),nde=y.exports.forwardRef((e,t)=>{const n=Gs(im,e.__scopeDialog),r=y.exports.useRef(null),i=zt(t,n.contentRef,r);return y.exports.useEffect(()=>{const o=r.current;if(o)return GE(o)},[]),y.exports.createElement(EU,ue({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ue(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Ue(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Ue(e.onFocusOutside,o=>o.preventDefault())}))}),rde=y.exports.forwardRef((e,t)=>{const n=Gs(im,e.__scopeDialog),r=y.exports.useRef(!1),i=y.exports.useRef(!1);return y.exports.createElement(EU,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),EU=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Gs(im,n),c=y.exports.useRef(null),u=zt(t,c);return qE(),y.exports.createElement(y.exports.Fragment,null,y.exports.createElement(WE,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.exports.createElement(Zm,ue({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":YE(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),ide="DialogTitle",ode=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Gs(ide,n);return y.exports.createElement(Pt.h2,ue({id:i.titleId},r,{ref:t}))}),sde="DialogDescription",ade=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Gs(sde,n);return y.exports.createElement(Pt.p,ue({id:i.descriptionId},r,{ref:t}))}),lde="DialogClose",cde=y.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Gs(lde,n);return y.exports.createElement(Pt.button,ue({type:"button"},r,{ref:t,onClick:Ue(e.onClick,()=>i.onOpenChange(!1))}))});function YE(e){return e?"open":"closed"}const Ye=Gue,pt=Que,Qe=Zue,ude=Jue,dde=tde,fde=ode,hde=ade,Te=cde;function By(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var pde=["color"],mde=y.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=By(e,pde);return y.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.exports.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gde=["color"],KD=y.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=By(e,gde);return y.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.exports.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vde=["color"],yde=y.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=By(e,vde);return y.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.exports.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bde=["color"],Je=y.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=By(e,bde);return y.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.exports.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function Jm(e){const t=y.exports.useRef({value:e,previous:e});return y.exports.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function eg(e){const[t,n]=y.exports.useState(void 0);return ri(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const TU="Switch",[xde,IGe]=ii(TU),[Cde,wde]=xde(TU),Sde=y.exports.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=y.exports.useState(null),p=zt(t,C=>h(C)),m=y.exports.useRef(!1),v=f?Boolean(f.closest("form")):!0,[b=!1,x]=$o({prop:i,defaultProp:o,onChange:u});return y.exports.createElement(Cde,{scope:n,checked:b,disabled:a},y.exports.createElement(Pt.button,ue({type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":kU(b),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onClick:Ue(e.onClick,C=>{x(w=>!w),v&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})})),v&&y.exports.createElement(kde,{control:f,bubbles:!m.current,name:r,value:c,checked:b,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),Ede="SwitchThumb",Tde=y.exports.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=wde(Ede,n);return y.exports.createElement(Pt.span,ue({"data-state":kU(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),kde=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.exports.useRef(null),s=Jm(n),a=eg(t);return y.exports.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[s,n,r]),y.exports.createElement("input",ue({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kU(e){return e?"checked":"unchecked"}const tg=Sde,ng=Tde;function Wr(e){this.content=e}Wr.prototype={constructor:Wr,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new Wr(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Wr(n)},addToStart:function(e,t){return new Wr([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Wr(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new Wr(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Wr.from(e),e.size?new Wr(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Wr.from(e),e.size?new Wr(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Wr.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Wr.from=function(e){if(e instanceof Wr)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Wr(t)};function _U(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=_U(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function AU(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),c=s.nodeSize;if(s==a){n-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,d=Math.min(s.text.length,a.text.length);for(;u<d&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=AU(s.content,a.content,n-1,r-1);if(u)return u}n-=c,r-=c}}class Oe{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let c=this.content[s],u=a+c.nodeSize;if(u>t&&r(c,i+a,o||null,s)!==!1&&c.content.size){let d=a+1;c.nodesBetween(Math.max(0,t-d),Math.min(c.content.size,n-d),r,i+d)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,c)=>{let u=a.isText?a.text.slice(Math.max(t,c)-c,n-c):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new Oe(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],c=s+a.nodeSize;c>t&&((s<t||c>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=c}return new Oe(r,i)}cutByIndex(t,n){return t==n?Oe.empty:t==0&&n==this.content.length?this:new Oe(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Oe(i,o)}addToStart(t){return new Oe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Oe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return _U(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return AU(this,t,n,r)}findIndex(t,n=-1){if(t==0)return y2(0,t);if(t==this.size)return y2(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=t)return s==t||n>0?y2(r+1,s):y2(r,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Oe.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Oe.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Oe(n||t,r)}static from(t){if(!t)return Oe.empty;if(t instanceof Oe)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Oe([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Oe.empty=new Oe([],0);const $8={index:0,offset:0};function y2(e,t){return $8.index=e,$8.offset=t,$8}function b3(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!b3(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!b3(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class pn{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&b3(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return pn.none;if(t instanceof pn)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}pn.none=[];class x3 extends Error{}class tt{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=DU(this.content,t+this.openStart,n);return r&&new tt(r,this.openStart,this.openEnd)}removeBetween(t,n){return new tt($U(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return tt.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new tt(Oe.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new tt(t,r,i)}}tt.empty=new tt(Oe.empty,0,0);function $U(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy($U(o.content,t-i-1,n-i-1)))}function DU(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=DU(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function _de(e,t,n){if(n.openStart>e.depth)throw new x3("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new x3("Inconsistent open depths");return OU(e,t,n,0)}function OU(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=OU(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return gd(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=Ade(n,e);return gd(o,RU(e,s,a,t,r))}else return gd(o,C3(e,t,r))}function PU(e,t){if(!t.type.compatibleContent(e.type))throw new x3("Cannot join "+t.type.name+" onto "+e.type.name)}function kC(e,t,n){let r=e.node(n);return PU(r,t.node(n)),r}function md(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function n0(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(md(e.nodeAfter,r),o++));for(let a=o;a<s;a++)md(i.child(a),r);t&&t.depth==n&&t.textOffset&&md(t.nodeBefore,r)}function gd(e,t){return e.type.checkContent(t),e.copy(t)}function RU(e,t,n,r,i){let o=e.depth>i&&kC(e,t,i+1),s=r.depth>i&&kC(n,r,i+1),a=[];return n0(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(PU(o,s),md(gd(o,RU(e,t,n,r,i+1)),a)):(o&&md(gd(o,C3(e,t,i+1)),a),n0(t,n,i,a),s&&md(gd(s,C3(n,r,i+1)),a)),n0(r,null,i,a),new Oe(a)}function C3(e,t,n){let r=[];if(n0(null,e,n,r),e.depth>n){let i=kC(e,t,n+1);md(gd(i,C3(e,t,n+1)),r)}return n0(t,null,n,r),new Oe(r)}function Ade(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(Oe.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class om{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return pn.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new w3(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:c}=s.content.findIndex(o),u=o-c;if(r.push(s,a,i+c),!u||(s=s.child(a),s.isText))break;o=u-1,i+=c+1}return new om(n,r,o)}static resolveCached(t,n){let r=GD.get(t);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else GD.set(t,r=new $de);let i=r.elts[r.i]=om.resolve(t,n);return r.i=(r.i+1)%Dde,i}}class $de{constructor(){this.elts=[],this.i=0}}const Dde=12,GD=new WeakMap;class w3{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ode=Object.create(null);class wa{constructor(t,n,r,i=pn.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||Oe.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&b3(this.attrs,n||t.defaultAttrs||Ode)&&pn.sameSet(this.marks,r||pn.none)}copy(t=null){return t==this.content?this:new wa(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new wa(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return tt.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),u=i.node(s).content.cut(i.pos-a,o.pos-a);return new tt(u,i.depth-s,o.depth-s)}replace(t,n,r){return _de(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return om.resolveCached(this,t)}resolveNoCache(t){return om.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),MU(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Oe.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=pn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!pn.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=Oe.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}wa.prototype.text=void 0;class S3 extends wa{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):MU(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new S3(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new S3(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function MU(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Rd{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Pde(t,n);if(r.next==null)return Rd.empty;let i=IU(r);r.next&&r.err("Unexpected trailing text");let o=Bde(Fde(i));return Hde(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(s,a){let c=s.matchFragment(t,r);if(c&&(!n||c.validEnd))return Oe.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:d,next:f}=s.next[u];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,a.concat(d));if(h)return h}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:c}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||c.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return o}).join(`
`)}}Rd.empty=new Rd(!0);class Pde{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function IU(e){let t=[];do t.push(Rde(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Rde(e){let t=[];do t.push(Mde(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Mde(e){let t=Nde(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=Ide(e,t);else break;return t}function YD(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Ide(e,t){let n=YD(e),r=n;return e.eat(",")&&(e.next!="}"?r=YD(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Lde(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.groups.indexOf(t)>-1&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function Nde(e){if(e.eat("(")){let t=IU(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=Lde(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Fde(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,c){let u={term:c,to:a};return t[s].push(u),u}function i(s,a){s.forEach(c=>c.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(o(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=o(s.exprs[c],a);if(c==s.exprs.length-1)return u;i(u,a=n())}else if(s.type=="star"){let c=n();return r(a,c),i(o(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return i(o(s.expr,a),c),i(o(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u<s.min;u++){let d=n();i(o(s.expr,c),d),c=d}if(s.max==-1)i(o(s.expr,c),c);else for(let u=s.min;u<s.max;u++){let d=n();r(c,d),i(o(s.expr,c),d),c=d}return[r(c)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function LU(e,t){return t-e}function QD(e,t){let n=[];return r(t),n.sort(LU);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:c}=o[s];!a&&n.indexOf(c)==-1&&r(c)}}}function Bde(e){let t=Object.create(null);return n(QD(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let d=0;d<i.length;d++)i[d][0]==a&&(u=i[d][1]);QD(e,c).forEach(d=>{u||i.push([a,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let o=t[r.join(",")]=new Rd(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(LU);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function Hde(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:c,next:u}=i.next[a];s.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function NU(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function FU(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function BU(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function HU(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Ude(e,r,t[r]);return n}class E3{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=HU(t,r.attrs),this.defaultAttrs=NU(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Rd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:FU(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wa(this,this.computeAttrs(t),Oe.from(n),pn.setFrom(r))}createChecked(t=null,n,r){return n=Oe.from(n),this.checkContent(n),new wa(this,this.computeAttrs(t),n,pn.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Oe.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(Oe.empty,!0);return o?new wa(this,t,n.append(o),pn.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){BU(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:pn.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new E3(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}function zde(e,t,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}}class Ude{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?zde(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Hy{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=HU(t,i.attrs),this.excluded=null;let o=NU(this.attrs);this.instance=o?new pn(this,o):null}create(t=null){return!t&&this.instance?this.instance:new pn(this,FU(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new Hy(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){BU(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class zU{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Wr.from(t.nodes),n.marks=Wr.from(t.marks||{}),this.nodes=E3.compile(this.spec.nodes,this),this.marks=Hy.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Rd.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?XD(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:XD(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof E3){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new S3(r,r.defaultAttrs,t,pn.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return wa.fromJSON(this,t)}markFromJSON(t){return pn.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function XD(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let a in e.marks){let c=e.marks[a];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function Vde(e){return e.tag!=null}function jde(e){return e.style!=null}class Qc{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Vde(i))this.tags.push(i);else if(jde(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new JD(this,n,!1);return r.addAll(t,pn.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new JD(this,n,!0);return r.addAll(t,pn.none,n.from,n.to),tt.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Kde(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=eO(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=eO(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Qc(t,Qc.schemaRules(t)))}}const UU={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Wde={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},VU={ol:!0,ul:!0},T3=1,k3=2,r0=4;function ZD(e,t,n){return t!=null?(t?T3:0)|(t==="full"?k3:0):e&&e.whitespace=="pre"?T3|k3:n&~r0}class b2{constructor(t,n,r,i,o,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=pn.none,this.match=o||(s&r0?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Oe.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&T3)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=Oe.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Oe.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!UU.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class JD{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,s=ZD(null,n.preserveWhitespace,0)|(r?r0:0);i?o=new b2(i.type,i.attrs,pn.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new b2(null,null,pn.none,!0,null,s):o=new b2(t.schema.topNodeType,null,pn.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top;if(i.options&k3||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i.options&T3)i.options&k3?r=r.replace(/\r\n?/g,`
`):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=t.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=t.nodeName.toLowerCase(),o;VU.hasOwnProperty(i)&&this.parser.normalizeLists&&qde(t);let s=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,r));if(s?s.ignore:Wde.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t,n);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(t=s.skip);let a,c=this.top,u=this.needsBlock;if(UU.hasOwnProperty(i))c.content.length&&c.content[0].isInline&&this.open&&(this.open--,c=this.top),a=!0,c.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);return}let d=s&&s.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),a&&this.sync(c),this.needsBlock=u}else{let a=this.readStyles(t,n);a&&this.addElementByRule(t,s,a,s.consuming===!1?o:void 0)}}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let c=this.parser.matchStyle(o,s,this,a);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(u=>!c.clearMark(u)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)a=c;else break}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(t,r);else{let c=this.enter(s,n.attrs||null,r,n.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c,r)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=pn.none;for(let s of r.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):tO(s.type,t.type))&&(o=s.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=ZD(t,o,s.options);s.options&r0&&s.content.length==0&&(a|=r0);let c=pn.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):tO(u.type,t))?(c=u.addToSet(c),!1):!0),this.nodes.push(new b2(t,n,c,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,c)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;c>=o;c--)if(s(a-1,c))return!0;return!1}else{let d=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!d||d.name!=u&&d.groups.indexOf(u)==-1)return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function qde(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&VU.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function Kde(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function eO(e){let t={};for(let n in e)t[n]=e[n];return t}function tO(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let c=0;c<a.edgeCount;c++){let{type:u,next:d}=a.edge(c);if(u==t||o.indexOf(d)<0&&s(d))return!0}};if(s(i.contentMatch))return!0}}class qd{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=D8(n).createDocumentFragment());let i=r,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,c=0;for(;a<o.length&&c<s.marks.length;){let u=s.marks[c];if(!this.marks[u.type.name]){c++;continue}if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,c++}for(;a<o.length;)i=o.pop()[1];for(;c<s.marks.length;){let u=s.marks[c++],d=this.serializeMark(u,s.isInline,n);d&&(o.push([u,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=Y4(D8(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&Y4(D8(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return Y4(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new qd(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=nO(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return nO(t.marks)}}function nO(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function D8(e){return e.document||window.document}const rO=new WeakMap;function Gde(e){let t=rO.get(e);return t===void 0&&rO.set(e,t=Yde(e)),t}function Yde(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function Y4(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Gde(r))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,c=n?e.createElementNS(n,i):e.createElement(i),u=t[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let f in u)if(u[f]!=null){let h=f.indexOf(" ");h>0?c.setAttributeNS(f.slice(0,h),f.slice(h+1),u[f]):c.setAttribute(f,u[f])}}for(let f=d;f<t.length;f++){let h=t[f];if(h===0){if(f<t.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=Y4(e,h,n,r);if(c.appendChild(p),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:c,contentDOM:a}}const jU=65535,WU=Math.pow(2,16);function Qde(e,t){return e+t*WU}function iO(e){return e&jU}function Xde(e){return(e-(e&jU))/WU}const qU=1,KU=2,Q4=4,GU=8;class _C{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&GU)>0}get deletedBefore(){return(this.delInfo&(qU|Q4))>0}get deletedAfter(){return(this.delInfo&(KU|Q4))>0}get deletedAcross(){return(this.delInfo&Q4)>0}}class go{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&go.empty)return go.empty}recover(t){let n=0,r=iO(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Xde(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?i:0);if(c>t)break;let u=this.ranges[a+o],d=this.ranges[a+s],f=c+u;if(t<=f){let h=u?t==c?-1:t==f?1:n:n,p=c+i+(h<0?0:d);if(r)return p;let m=t==(n<0?c:f)?null:Qde(a/3,t-c),v=t==c?KU:t==f?qU:Q4;return(n<0?t!=c:t!=f)&&(v|=GU),new _C(p,v,m)}i+=d-u}return r?t+i:new _C(t+i,0,null)}touches(t,n){let r=0,i=iO(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>t)break;let u=this.ranges[a+o],d=c+u;if(t<=d&&a==i*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),c=s+(this.inverted?0:o),u=this.ranges[i+n],d=this.ranges[i+r];t(a,a+u,c,c+d),o+=d-u}}invert(){return new go(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?go.empty:new go(t<0?[0,-t,0]:[0,0,t])}}go.empty=new go([]);class vf{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new vf(this.maps,this.mirror,t,n)}copy(){return new vf(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new vf;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(t,n);if(a.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,t=this.maps[c].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new _C(t,i,null)}}const O8=Object.create(null);class Ei{getMap(){return go.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=O8[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in O8)throw new RangeError("Duplicate use of step JSON ID "+t);return O8[t]=n,n.prototype.jsonID=t,n}}class yr{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new yr(t,null)}static fail(t){return new yr(null,t)}static fromReplace(t,n,r,i){try{return yr.ok(t.replace(n,r,i))}catch(o){if(o instanceof x3)return yr.fail(o.message);throw o}}}function QE(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(QE(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Oe.fromArray(r)}class Pc extends Ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new tt(QE(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return yr.fromReplace(t,this.from,this.to,o)}invert(){return new ya(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Pc(n.pos,r.pos,this.mark)}merge(t){return t instanceof Pc&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Pc(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Pc(n.from,n.to,t.markFromJSON(n.mark))}}Ei.jsonID("addMark",Pc);class ya extends Ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new tt(QE(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return yr.fromReplace(t,this.from,this.to,r)}invert(){return new Pc(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ya(n.pos,r.pos,this.mark)}merge(t){return t instanceof ya&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ya(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ya(n.from,n.to,t.markFromJSON(n.mark))}}Ei.jsonID("removeMark",ya);class Rc extends Ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return yr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return yr.fromReplace(t,this.pos,this.pos+1,new tt(Oe.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Rc(this.pos,n.marks[i]);return new Rc(this.pos,this.mark)}}return new Hf(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Rc(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Rc(n.pos,t.markFromJSON(n.mark))}}Ei.jsonID("addNodeMark",Rc);class Hf extends Ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return yr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return yr.fromReplace(t,this.pos,this.pos+1,new tt(Oe.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Rc(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Hf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Hf(n.pos,t.markFromJSON(n.mark))}}Ei.jsonID("removeNodeMark",Hf);class Mr extends Ei{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&AC(t,this.from,this.to)?yr.fail("Structure replace would overwrite content"):yr.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new go([this.from,this.to-this.from,this.slice.size])}invert(t){return new Mr(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Mr(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Mr)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?tt.empty:new tt(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Mr(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?tt.empty:new tt(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Mr(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Mr(n.from,n.to,tt.fromJSON(t,n.slice),!!n.structure)}}Ei.jsonID("replace",Mr);class Fr extends Ei{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(AC(t,this.from,this.gapFrom)||AC(t,this.gapTo,this.to)))return yr.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return yr.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?yr.fromReplace(t,this.from,this.to,r):yr.fail("Content does not fit in gap")}getMap(){return new go([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Fr(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Fr(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Fr(n.from,n.to,n.gapFrom,n.gapTo,tt.fromJSON(t,n.slice),n.insert,!!n.structure)}}Ei.jsonID("replaceAround",Fr);function AC(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Zde(e,t,n,r){let i=[],o=[],s,a;e.doc.nodesBetween(t,n,(c,u,d)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(u,t),p=Math.min(u+c.nodeSize,n),m=r.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[v])?s.to=p:i.push(s=new ya(h,p,f[v])));a&&a.to==h?a.to=p:o.push(a=new Pc(h,p,r))}}),i.forEach(c=>e.step(c)),o.forEach(c=>e.step(c))}function Jde(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;o++;let c=null;if(r instanceof Hy){let u=s.marks,d;for(;d=r.isInSet(u);)(c||(c=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let u=Math.min(a+s.nodeSize,n);for(let d=0;d<c.length;d++){let f=c[d],h;for(let p=0;p<i.length;p++){let m=i[p];m.step==o-1&&f.eq(i[p].style)&&(h=m)}h?(h.to=u,h.step=o):i.push({style:f,from:Math.max(a,t),to:u,step:o})}}}),i.forEach(s=>e.step(new ya(s.from,s.to,s.style)))}function YU(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let c=0;c<o.childCount;c++){let u=o.child(c),d=a+u.nodeSize,f=r.matchType(u.type);if(!f)s.push(new Mr(a,d,tt.empty));else{r=f;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||e.step(new ya(a,d,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(u.text);)m||(m=new tt(Oe.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Mr(a+h.index,a+h.index+h[0].length,m))}}a=d}if(!r.validEnd){let c=r.fillBefore(Oe.empty,!0);e.replace(a,a,new tt(c,0,0))}for(let c=s.length-1;c>=0;c--)e.step(s[c])}function e1e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function mh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),s=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!e1e(i,o,s))break}return null}function t1e(e,t,n){let{$from:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),c=s,u=a,d=Oe.empty,f=0;for(let m=o,v=!1;m>n;m--)v||r.index(m)>0?(v=!0,d=Oe.from(r.node(m).copy(d)),f++):c--;let h=Oe.empty,p=0;for(let m=o,v=!1;m>n;m--)v||i.after(m+1)<i.end(m)?(v=!0,h=Oe.from(i.node(m).copy(h)),p++):u++;e.step(new Fr(c,u,s,a,new tt(d.append(h),f,p),d.size-f,!0))}function QU(e,t,n=null,r=e){let i=n1e(e,t),o=i&&r1e(r,t);return o?i.map(oO).concat({type:t,attrs:n}).concat(o.map(oO)):null}function oO(e){return{type:e,attrs:null}}function n1e(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}function r1e(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let c=(s.length?s[s.length-1]:t).contentMatch;for(let u=r;c&&u<i;u++)c=c.matchType(n.child(u).type);return!c||!c.validEnd?null:s}function i1e(e,t,n){let r=Oe.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Oe.from(n[s].type.create(n[s].attrs,r))}let i=t.start,o=t.end;e.step(new Fr(i,o,i,o,new tt(r,0,0),n.length,!0))}function o1e(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let c=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,c)&&l1e(e.doc,e.mapping.slice(o).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?u=!1:!p&&m&&(u=!0)}u===!1&&a1e(e,s,a,o),YU(e,e.mapping.slice(o).map(a,1),r,void 0,u===null);let d=e.mapping.slice(o),f=d.map(a,1),h=d.map(a+s.nodeSize,1);return e.step(new Fr(f,h,f+1,h-1,new tt(Oe.from(r.create(c,null,s.marks)),0,0),1,!0)),u===!0&&s1e(e,s,a,o),!1}})}function s1e(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let c=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(c,c+1,t.type.schema.linebreakReplacement.create())}}})}function a1e(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
`))}})}function l1e(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function c1e(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Fr(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new tt(Oe.from(s),0,0),1,!0))}function yf(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,d=n-2;u>o;u--,d--){let f=i.node(u),h=i.index(u);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[d+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[d]||f;if(!f.canReplace(h+1,f.childCount)||!v.type.validContent(p))return!1}let a=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(a,a,c?c.type:i.node(o+1).type)}function u1e(e,t,n=1,r){let i=e.doc.resolve(t),o=Oe.empty,s=Oe.empty;for(let a=i.depth,c=i.depth-n,u=n-1;a>c;a--,u--){o=Oe.from(i.node(a).copy(o));let d=r&&r[u];s=Oe.from(d?d.type.create(d.attrs,s):i.node(a).copy(s))}e.step(new Mr(t,t,new tt(o.append(s),n,n),!0))}function Kd(e,t){let n=e.resolve(t),r=n.index();return XU(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function XU(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function zy(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&XU(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function d1e(e,t,n){let r=new Mr(t-n,t+n,tt.empty,!0);e.step(r)}function f1e(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function h1e(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),u=r.node(s),d=!1;if(o==1)d=u.canReplace(c,c,i);else{let f=u.contentMatchAt(c).findWrapping(i.firstChild.type);d=f&&u.canReplaceWith(c,c,f[0])}if(d)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Uy(e,t,n=t,r=tt.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return ZU(i,o,r)?new Mr(t,n,r):new p1e(i,o,r).fit()}function ZU(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class p1e{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Oe.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Oe.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let c=new tt(o,s,a);return t>-1?new Fr(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new Mr(r.pos,i.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=P8(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:u}=this.frontier[a],d,f=null;if(n==1&&(s?u.matchType(s.type)||(f=u.fillBefore(Oe.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&s&&(d=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:d};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=P8(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new tt(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=P8(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new tt(Mp(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new tt(Mp(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let s=this.unplaced,a=r?r.content:s.content,c=s.openStart-t,u=0,d=[],{match:f,type:h}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)d.push(i.child(v));f=f.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;u<a.childCount;){let v=a.child(u),b=f.matchType(v.type);if(!b)break;u++,(u>1||c==0||v.content.size)&&(f=b,d.push(JU(v.mark(h.allowedMarks(v.marks)),u==1?c:0,u==a.childCount?p:-1)))}let m=u==a.childCount;m||(p=-1),this.placed=Ip(this.placed,n,Oe.from(d)),this.frontier[n].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,b=a;v<p;v++){let x=b.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),b=x.content}this.unplaced=m?t==0?tt.empty:new tt(Mp(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new tt(Mp(s.content,t,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!R8(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=R8(t,n,i,r,o);if(!!s){for(let a=n-1;a>=0;a--){let{match:c,type:u}=this.frontier[a],d=R8(t,a,u,c,!0);if(!d||d.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ip(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ip(this.placed,this.depth,Oe.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Oe.empty,!0);n.childCount&&(this.placed=Ip(this.placed,this.frontier.length,n))}}function Mp(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Mp(e.firstChild.content,t-1,n)))}function Ip(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ip(e.lastChild.content,t-1,n)))}function P8(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function JU(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,JU(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Oe.empty,!0)))),e.copy(r)}function R8(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!m1e(n,o.content,s)?a:null}function m1e(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function g1e(e){return e.spec.defining||e.spec.definingForContent}function v1e(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(ZU(i,o,r))return e.step(new Mr(t,n,r));let s=tV(i,e.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let h=i.depth,p=i.pos-1;h>0;h--,p--){let m=i.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?a=h:i.before(h)==p&&s.splice(1,0,-h)}let c=s.indexOf(a),u=[],d=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(u.push(m),p==r.openStart)break;h=m.content}for(let h=d-1;h>=0;h--){let p=u[h],m=g1e(p.type);if(m&&!p.sameMarkup(i.node(Math.abs(a)-1)))d=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+d+1)%(r.openStart+1),m=u[p];if(!!m)for(let v=0;v<s.length;v++){let b=s[(v+c)%s.length],x=!0;b<0&&(x=!1,b=-b);let C=i.node(b-1),w=i.index(b-1);if(C.canReplaceWith(w,w,m.type,m.marks))return e.replace(i.before(b),x?o.after(b):n,new tt(eV(r.content,0,r.openStart,p),p,r.openEnd))}}let f=e.steps.length;for(let h=s.length-1;h>=0&&(e.replace(t,n,r),!(e.steps.length>f));h--){let p=s[h];p<0||(t=i.before(p),n=o.after(p))}}function eV(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(eV(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(Oe.empty,!0))}return e}function y1e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=f1e(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new tt(Oe.from(r),0,0))}function b1e(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=tV(r,i);for(let s=0;s<o.length;s++){let a=o[s],c=s==o.length-1;if(c&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(c||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function tV(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let o=e.start(i);if(o<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(o==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==o-1)&&n.push(i)}return n}class bf extends Ei{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return yr.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return yr.fromReplace(t,this.pos,this.pos+1,new tt(Oe.from(i),0,n.isLeaf?0:1))}getMap(){return go.empty}invert(t){return new bf(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new bf(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new bf(n.pos,n.attr,n.value)}}Ei.jsonID("attr",bf);class sm extends Ei{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return yr.ok(r)}getMap(){return go.empty}invert(t){return new sm(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new sm(n.attr,n.value)}}Ei.jsonID("docAttr",sm);let zf=class extends Error{};zf=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};zf.prototype=Object.create(Error.prototype);zf.prototype.constructor=zf;zf.prototype.name="TransformError";class nV{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new vf}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new zf(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=tt.empty){let i=Uy(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new tt(Oe.from(r),0,0))}delete(t,n){return this.replace(t,n,tt.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return v1e(this,t,n,r),this}replaceRangeWith(t,n,r){return y1e(this,t,n,r),this}deleteRange(t,n){return b1e(this,t,n),this}lift(t,n){return t1e(this,t,n),this}join(t,n=1){return d1e(this,t,n),this}wrap(t,n){return i1e(this,t,n),this}setBlockType(t,n=t,r,i=null){return o1e(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return c1e(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new bf(t,n,r)),this}setDocAttribute(t,n){return this.step(new sm(t,n)),this}addNodeMark(t,n){return this.step(new Rc(t,n)),this}removeNodeMark(t,n){if(!(n instanceof pn)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Hf(t,n)),this}split(t,n=1,r){return u1e(this,t,n,r),this}addMark(t,n,r){return Zde(this,t,n,r),this}removeMark(t,n,r){return Jde(this,t,n,r),this}clearIncompatible(t,n,r){return YU(this,t,n,r),this}}const M8=Object.create(null);class Qt{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new x1e(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=tt.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:c,$to:u}=s[a],d=t.mapping.slice(o);t.replaceRange(d.map(c.pos),d.map(u.pos),a?tt.empty:n),a==0&&lO(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],c=t.mapping.slice(r),u=c.map(s.pos),d=c.map(a.pos);o?t.deleteRange(u,d):(t.replaceRangeWith(u,d,n),lO(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Wt(t):E1(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?E1(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):E1(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new zs(t.node(0))}static atStart(t){return E1(t,t,0,0,1)||new zs(t)}static atEnd(t){return E1(t,t,t.content.size,t.childCount,-1)||new zs(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=M8[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in M8)throw new RangeError("Duplicate use of selection JSON ID "+t);return M8[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Wt.between(this.$anchor,this.$head).getBookmark()}}Qt.prototype.visible=!0;class x1e{constructor(t,n){this.$from=t,this.$to=n}}let sO=!1;function aO(e){!sO&&!e.parent.inlineContent&&(sO=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Wt extends Qt{constructor(t,n=t){aO(t),aO(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Qt.near(r);let i=t.resolve(n.map(this.anchor));return new Wt(i.parent.inlineContent?i:r,r)}replace(t,n=tt.empty){if(super.replace(t,n),n==tt.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Wt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Vy(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Wt(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Qt.findFrom(n,r,!0)||Qt.findFrom(n,-r,!0);if(o)n=o.$head;else return Qt.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Qt.findFrom(t,-r,!0)||Qt.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Wt(t,n)}}Qt.jsonID("text",Wt);class Vy{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Vy(t.map(this.anchor),t.map(this.head))}resolve(t){return Wt.between(t.resolve(this.anchor),t.resolve(this.head))}}class $t extends Qt{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?Qt.near(o):new $t(o)}content(){return new tt(Oe.from(this.node),0,0)}eq(t){return t instanceof $t&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new XE(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new $t(t.resolve(n.anchor))}static create(t,n){return new $t(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}$t.prototype.visible=!1;Qt.jsonID("node",$t);class XE{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Vy(r,r):new XE(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&$t.isSelectable(r)?new $t(n):Qt.near(n)}}class zs extends Qt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=tt.empty){if(n==tt.empty){t.delete(0,t.doc.content.size);let r=Qt.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new zs(t)}map(t){return new zs(t)}eq(t){return t instanceof zs}getBookmark(){return C1e}}Qt.jsonID("all",zs);const C1e={map(){return this},resolve(e){return new zs(e)}};function E1(e,t,n,r,i,o=!1){if(t.inlineContent)return Wt.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&$t.isSelectable(a))return $t.create(e,n-(i<0?a.nodeSize:0))}else{let c=E1(e,a,n+i,i<0?a.childCount:0,i,o);if(c)return c}n+=a.nodeSize*i}return null}function lO(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Mr||i instanceof Fr))return;let o=e.mapping.maps[r],s;o.forEach((a,c,u,d)=>{s==null&&(s=d)}),e.setSelection(Qt.near(e.doc.resolve(s),n))}const cO=1,x2=2,uO=4;class w1e extends nV{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|cO)&~x2,this.storedMarks=null,this}get selectionSet(){return(this.updated&cO)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=x2,this}ensureMarks(t){return pn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&x2)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~x2,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||pn.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!t)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,o)),this.selection.empty||this.setSelection(Qt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=uO,this}get scrolledIntoView(){return(this.updated&uO)>0}}function dO(e,t){return!t||!e?e:e.bind(t)}class Lp{constructor(t,n,r){this.name=t,this.init=dO(n.init,r),this.apply=dO(n.apply,r)}}const S1e=[new Lp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Lp("selection",{init(e,t){return e.selection||Qt.atStart(t.doc)},apply(e){return e.selection}}),new Lp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Lp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class I8{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=S1e.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Lp(r.key,r.spec.state,r))})}}class ef{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let c=i?i[s].n:0,u=i?i[s].state:this,d=c<n.length&&a.spec.appendTransaction.call(a,c?n.slice(c):n,u,r);if(d&&r.filterTransaction(d,s)){if(d.setMeta("appendedTransaction",t),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ef(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new w1e(this)}static create(t){let n=new I8(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ef(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new I8(this.schema,t.plugins),r=n.fields,i=new ef(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new I8(t.schema,t.plugins),o=new ef(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=wa.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=Qt.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],u=c.spec.state;if(c.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=u.fromJSON.call(c,t,n[a],o);return}}o[s.name]=s.init(t,o)}}),o}}function rV(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=rV(i,t,{})),n[r]=i}return n}class zr{constructor(t){this.spec=t,this.props={},t.props&&rV(t.props,this,this.props),this.key=t.key?t.key.key:iV("plugin")}getState(t){return t[this.key]}}const L8=Object.create(null);function iV(e){return e in L8?e+"$"+ ++L8[e]:(L8[e]=0,e+"$")}class oi{constructor(t="key"){this.key=iV(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Xr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},am=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let $C=null;const ul=function(e,t,n){let r=$C||($C=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},E1e=function(){$C=null},Md=function(e,t,n,r){return n&&(fO(e,t,n,r,-1)||fO(e,t,n,r,1))},T1e=/^(img|br|input|textarea|hr)$/i;function fO(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Go(e))){let o=e.parentNode;if(!o||o.nodeType!=1||rg(e)||T1e.test(e.nodeName)||e.contentEditable=="false")return!1;t=Xr(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Go(e):0}else return!1}}function Go(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function k1e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Go(e)}else if(e.parentNode&&!rg(e))t=Xr(e),e=e.parentNode;else return null}}function _1e(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!rg(e))t=Xr(e)+1,e=e.parentNode;else return null}}function A1e(e,t,n){for(let r=t==0,i=t==Go(e);r||i;){if(e==n)return!0;let o=Xr(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Go(e)}}function rg(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const jy=function(e){return e.focusNode&&Md(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function qu(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function $1e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function D1e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Go(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Go(r.startContainer),r.startOffset)}}}const Aa=typeof navigator<"u"?navigator:null,hO=typeof document<"u"?document:null,bu=Aa&&Aa.userAgent||"",DC=/Edge\/(\d+)/.exec(bu),oV=/MSIE \d/.exec(bu),OC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(bu),Ji=!!(oV||OC||DC),Xc=oV?document.documentMode:OC?+OC[1]:DC?+DC[1]:0,Ws=!Ji&&/gecko\/(\d+)/i.test(bu);Ws&&+(/Firefox\/(\d+)/.exec(bu)||[0,0])[1];const PC=!Ji&&/Chrome\/(\d+)/.exec(bu),gi=!!PC,sV=PC?+PC[1]:0,Mi=!Ji&&!!Aa&&/Apple Computer/.test(Aa.vendor),Uf=Mi&&(/Mobile\/\w+/.test(bu)||!!Aa&&Aa.maxTouchPoints>2),Vo=Uf||(Aa?/Mac/.test(Aa.platform):!1),O1e=Aa?/Win/.test(Aa.platform):!1,Rs=/Android \d/.test(bu),ig=!!hO&&"webkitFontSmoothing"in hO.documentElement.style,P1e=ig?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function R1e(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function el(e,t){return typeof e=="number"?e:e[t]}function M1e(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function pO(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=am(s)){if(s.nodeType!=1)continue;let a=s,c=a==o.body,u=c?R1e(o):M1e(a),d=0,f=0;if(t.top<u.top+el(r,"top")?f=-(u.top-t.top+el(i,"top")):t.bottom>u.bottom-el(r,"bottom")&&(f=t.bottom-t.top>u.bottom-u.top?t.top+el(i,"top")-u.top:t.bottom-u.bottom+el(i,"bottom")),t.left<u.left+el(r,"left")?d=-(u.left-t.left+el(i,"left")):t.right>u.right-el(r,"right")&&(d=t.right-u.right+el(i,"right")),d||f)if(c)o.defaultView.scrollBy(d,f);else{let h=a.scrollLeft,p=a.scrollTop;f&&(a.scrollTop+=f),d&&(a.scrollLeft+=d);let m=a.scrollLeft-h,v=a.scrollTop-p;t={left:t.left-m,top:t.top-v,right:t.right-m,bottom:t.bottom-v}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function I1e(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let o=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(o,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let c=a.getBoundingClientRect();if(c.top>=n-20){r=a,i=c.top;break}}return{refDOM:r,refTop:i,stack:aV(e.dom)}}function aV(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=am(r));return t}function L1e({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;lV(n,r==0?0:r-t)}function lV(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let p1=null;function N1e(e){if(e.setActive)return e.setActive();if(p1)return e.focus(p1);let t=aV(e);e.focus(p1==null?{get preventScroll(){return p1={preventScroll:!0},!0}}:void 0),p1||(p1=!1,lV(t,0))}function cV(e,t){let n,r=2e8,i,o=0,s=t.top,a=t.top,c,u;for(let d=e.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=ul(d).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=a){s=Math.max(m.bottom,s),a=Math.min(m.top,a);let v=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(v<r){n=d,r=v,i=v&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,d.nodeType==1&&v&&(o=f+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!c&&m.left<=t.left&&m.right>=t.left&&(c=d,u={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(o=f+1)}}return!n&&c&&(n=c,i=u,r=0),n&&n.nodeType==3?F1e(n,i):!n||r&&n.nodeType==1?{node:e,offset:o}:cV(n,i)}function F1e(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let o=uc(r,1);if(o.top!=o.bottom&&ZE(t,o))return{node:e,offset:i+(t.left>=(o.left+o.right)/2?1:0)}}return{node:e,offset:0}}function ZE(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function B1e(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function H1e(e,t,n){let{node:r,offset:i}=cV(t,n),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}function z1e(e,t,n,r){let i=-1;for(let o=t,s=!1;o!=e.dom;){let a=e.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let c=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!s&&c.left>r.left||c.top>r.top?i=a.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText)return(a.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function uV(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let c=0;c<a.length;c++){let u=a[c];if(ZE(t,u))return uV(s,t,u)}}if((o=(o+1)%r)==i)break}return e}function U1e(e,t){let n=e.dom.ownerDocument,r,i=0,o=D1e(n,t.left,t.top);o&&({node:r,offset:i}=o);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=e.dom.getBoundingClientRect();if(!ZE(t,u)||(s=uV(e.dom,t,u),!s))return null}if(Mi)for(let u=s;r&&u;u=am(u))u.draggable&&(r=void 0);if(s=B1e(s,t),r){if(Ws&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let d=r.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&i++}let u;ig&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=z1e(e,r,i,t))}a==null&&(a=H1e(e,s,t));let c=e.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function mO(e){return e.top<e.bottom||e.left<e.right}function uc(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(mO(r))return r}return Array.prototype.find.call(n,mO)||e.getBoundingClientRect()}const V1e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function dV(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=ig||Ws;if(r.nodeType==3)if(s&&(V1e.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let c=uc(ul(r,i,i),n);if(Ws&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=uc(ul(r,i-1,i-1),-1);if(u.top==c.top){let d=uc(ul(r,i,i+1),-1);if(d.top!=c.top)return up(d,d.left<u.left)}}return c}else{let c=i,u=i,d=n<0?1:-1;return n<0&&!i?(u++,d=-1):n>=0&&i==r.nodeValue.length?(c--,d=1):n<0?c--:u++,up(uc(ul(r,c,u),d),d<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Go(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return N8(c.getBoundingClientRect(),!1)}if(o==null&&i<Go(r)){let c=r.childNodes[i];if(c.nodeType==1)return N8(c.getBoundingClientRect(),!0)}return N8(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Go(r))){let c=r.childNodes[i-1],u=c.nodeType==3?ul(c,Go(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return up(uc(u,1),!1)}if(o==null&&i<Go(r)){let c=r.childNodes[i];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let u=c?c.nodeType==3?ul(c,0,s?0:1):c.nodeType==1?c:null:null;if(u)return up(uc(u,-1),!0)}return up(uc(r.nodeType==3?ul(r):r,-n),n>=0)}function up(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function N8(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function fV(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function j1e(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return fV(e,t,()=>{let{node:o}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=dV(e,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=ul(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<c.length;u++){let d=c[u];if(d.bottom>d.top+1&&(n=="up"?s.top-d.top>(d.bottom-s.top)*2:d.bottom-s.bottom>(s.bottom-d.top)*2))return!1}}return!0})}const W1e=/[\u0590-\u08ac]/;function q1e(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!W1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:fV(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:d,anchorOffset:f}=e.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:v}=e.domSelectionRange(),b=m&&!p.contains(m.nodeType==1?m:m.parentNode)||c==m&&u==v;try{a.collapse(d,f),c&&(c!=d||u!=f)&&a.extend&&a.extend(c,u)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):r.pos==r.start()||r.pos==r.end()}let gO=null,vO=null,yO=!1;function K1e(e,t,n){return gO==t&&vO==n?yO:(gO=t,vO=n,yO=n=="up"||n=="down"?j1e(e,t,n):q1e(e,t,n))}const ts=0,bO=1,od=2,$a=3;class og{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=ts,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let o,s;if(t==this.contentDOM)o=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(t==this.contentDOM)o=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Xr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!n||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return o}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>t||s instanceof pV){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof hV&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Xr(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Xr(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let c=this.children[a],u=s+c.size;if(i==-1&&t<=u){let d=s+c.border;if(t>=d&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,d);t=s;for(let f=a;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Xr(h.dom)+1;break}t-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let d=a+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=Xr(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],v=p+m.size;if(o>p&&s<v)return m.setSelection(t-p-m.border,n-p-m.border,r,i);p=v}let a=this.domFromPos(t,t?-1:1),c=n==t?a:this.domFromPos(n,n?-1:1),u=r.getSelection(),d=!1;if((Ws||Mi)&&t==n){let{node:h,offset:p}=a;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==`
`),d&&p==h.nodeValue.length)for(let m=h,v;m;m=m.parentNode){if(v=m.nextSibling){v.nodeName=="BR"&&(a=c={node:v.parentNode,offset:Xr(v)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=h.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Ws&&u.focusNode&&u.focusNode!=c.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||d&&Mi)&&Md(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Md(c.node,c.offset,u.focusNode,u.focusOffset))return;let f=!1;if((u.extend||t==n)&&!d){u.collapse(a.node,a.offset);try{t!=n&&u.extend(c.node,c.offset),f=!0}catch{}}if(!f){if(t>n){let p=a;a=c,c=p}let h=document.createRange();h.setEnd(c.node,c.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,c=s-o.border;if(t>=a&&n<=c){this.dirty=t==r||n==s?od:bO,t==a&&n==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=$a:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?od:$a}r=s}this.dirty=od}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?od:bO;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class hV extends og{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==ts&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class G1e extends og{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Id extends og{constructor(t,n,r,i){super(t,[],r,i),this.mark=n}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=qd.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Id(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&$a||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=$a&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=ts){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ts}}slice(t,n,r){let i=Id.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=MC(o,n,s,r)),t>0&&(o=MC(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class Zc extends og{constructor(t,n,r,i,o,s,a,c,u){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a=o.nodeViews[n.type.name],c,u=a&&a(n,o,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,i),d=u&&u.dom,f=u&&u.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=qd.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let h=d;return d=vV(d,r,n),u?c=new Y1e(t,n,r,i,d,f||null,h,u,o,s+1):n.isText?new Wy(t,n,r,i,d,h,o):new Zc(t,n,r,i,d,f||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Oe.empty)}return t}matchesNode(t,n,r){return this.dirty==ts&&t.eq(this.node)&&_3(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,c=new X1e(this,s&&s.node,t);efe(this.node,this.innerDeco,(u,d,f)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!f&&c.syncToMarks(d==this.node.childCount?pn.none:this.node.child(d).marks,r,t),c.placeWidget(u,t,i)},(u,d,f,h)=>{c.syncToMarks(u.marks,r,t);let p;c.findNodeMatch(u,d,f,h)||a&&t.state.selection.from>i&&t.state.selection.to<i+u.nodeSize&&(p=c.findIndexWithChild(o.node))>-1&&c.updateNodeAt(u,d,f,p,t)||c.updateNextNode(u,d,f,t,h,i)||c.addNode(u,d,f,t,i),i+=u.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==od)&&(s&&this.protectLocalComposition(t,s),mV(this.contentDOM,this.children,t),Uf&&tfe(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof Wt)||r<n||i>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=nfe(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new G1e(this,o,n,i);t.input.compositionNodes.push(s),this.children=MC(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==$a||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=ts}updateOuterDeco(t){if(_3(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=gV(this.dom,this.nodeDOM,RC(this.outerDeco,this.node,n),RC(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function xO(e,t,n,r,i){vV(r,t,e);let o=new Zc(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Wy extends Zc{constructor(t,n,r,i,o,s,a){super(t,n,r,i,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==$a||this.dirty!=ts&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ts||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=ts,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),o=document.createTextNode(i.text);return new Wy(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=$a)}get domAtom(){return!1}isText(t){return this.node.text==t}}class pV extends og{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==ts&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Y1e extends Zc{constructor(t,n,r,i,o,s,a,c,u,d){super(t,n,r,i,o,s,a,u,d),this.spec=c}update(t,n,r,i){if(this.dirty==$a)return!1;if(this.spec.update){let o=this.spec.update(t,n,r);return o&&this.updateInner(t,n,r,i),o}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function mV(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=CO(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Id){let c=r?r.previousSibling:e.lastChild;mV(s.contentDOM,s.children,n),r=c?c.nextSibling:e.firstChild}}for(;r;)r=CO(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const i0=function(e){e&&(this.nodeName=e)};i0.prototype=Object.create(null);const sd=[new i0];function RC(e,t,n){if(e.length==0)return sd;let r=n?sd[0]:new i0,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(!!s){s.nodeName&&i.push(r=new i0(s.nodeName));for(let a in s){let c=s[a];c!=null&&(n&&i.length==1&&i.push(r=new i0(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+c:a=="style"?r.style=(r.style?r.style+";":"")+c:a!="nodeName"&&(r[a]=c))}}}return i}function gV(e,t,n,r){if(n==sd&&r==sd)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let c;a&&a.nodeName==s.nodeName&&i!=e&&(c=i.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(i),a=sd[0]),i=c}Q1e(i,a||sd[0],s)}return i}function Q1e(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.add(i[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function vV(e,t,n){return gV(e,e,sd,RC(t,n,e.nodeType!=1))}function _3(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function CO(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class X1e{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=Z1e(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,t.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&t[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=ts,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let u=this.top.children[c];if(u.matchesMark(t[o])&&!this.isLocked(u.dom)){a=c;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=Id.create(this.top,t[o],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(t,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a<c;a++){let u=this.top.children[a];if(u.matchesNode(t,n,r)&&!this.preMatch.matched.has(u)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,n,r,i,o){let s=this.top.children[i];return s.dirty==$a&&s.dom==s.contentDOM&&(s.dirty=od),s.update(t,n,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let c=this.top.children[a];if(c instanceof Zc){let u=this.preMatch.matched.get(c);if(u!=null&&u!=o)return!1;let d=c.dom,f,h=this.isLocked(d)&&!(t.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==t.text&&c.dirty!=$a&&_3(n,c.outerDeco));if(!h&&c.update(t,n,r,i))return this.destroyBetween(this.index,a),c.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(c,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=od,f.updateChildren(i,s+1),f.dirty=ts),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!_3(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=Zc.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let c of a.children)c.parent=a}return t.destroy(),a}addNode(t,n,r,i,o){let s=Zc.create(this.top,t,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new hV(this.top,t,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Id;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Wy)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Mi||gi)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new pV(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function Z1e(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof Id)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=a.node;if(!!c){if(c!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function J1e(e,t){return e.type.side-t.type.side}function efe(e,t,n,r){let i=t.locals(e),o=0;if(i.length==0){for(let u=0;u<e.childCount;u++){let d=e.child(u);r(d,i,t.forChild(o,d),u),o+=d.nodeSize}return}let s=0,a=[],c=null;for(let u=0;;){let d,f;for(;s<i.length&&i[s].to==o;){let b=i[s++];b.widget&&(d?(f||(f=[d])).push(b):d=b)}if(d)if(f){f.sort(J1e);for(let b=0;b<f.length;b++)n(f[b],u,!!c)}else n(d,u,!!c);let h,p;if(c)p=-1,h=c,c=null;else if(u<e.childCount)p=u,h=e.child(u++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let m=o+h.nodeSize;if(h.isText){let b=m;s<i.length&&i[s].from<b&&(b=i[s].from);for(let x=0;x<a.length;x++)a[x].to<b&&(b=a[x].to);b<m&&(c=h.cut(b-o),h=h.cut(0,b-o),m=b,p=-1)}else for(;s<i.length&&i[s].to<m;)s++;let v=h.isInline&&!h.isLeaf?a.filter(b=>!b.inline):a.slice();r(h,v,t.forChild(o,h),p),o=m}}function tfe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function nfe(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let c=s.text;for(;i<e.childCount;){let u=e.child(i++);if(o+=u.nodeSize,!u.isText)break;c+=u.text}if(o>=n){if(o>=r&&c.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a<r?c.lastIndexOf(t,r-a-1):-1;if(u>=0&&u+t.length+a>=n)return a+u;if(n==r&&c.length>=r+t.length-a&&c.slice(r-a,r-a+t.length)==t)return r}}return-1}function MC(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let c=e[s],u=a,d=a+=c.size;u>=n||d<=t?o.push(c):(u<t&&o.push(c.slice(0,t-u,r)),i&&(o.push(i),i=void 0),d>n&&o.push(c.slice(n-u,c.size,r)))}return o}function JE(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,u;if(jy(n)){for(c=s;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&$t.isSelectable(f)&&i.parent&&!(f.isInline&&A1e(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;u=new $t(s==h?a:r.resolve(h))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[c,s]=h==e.state.selection.anchor?[h,f]:[f,h],a=r.resolve(s)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let d=r.resolve(c);if(!u){let f=t=="pointer"||e.state.selection.head<a.pos&&!o?1:-1;u=eT(e,d,a,f)}return u}function yV(e){return e.editable?e.hasFocus():xV(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function xl(e,t=!1){let n=e.state.selection;if(bV(e,n),!!yV(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&gi){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Md(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)ife(e);else{let{anchor:r,head:i}=n,o,s;wO&&!(n instanceof Wt)&&(n.$from.parent.inlineContent||(o=SO(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=SO(e,n.to))),e.docView.setSelection(r,i,e.root,t),wO&&(o&&EO(o),s&&EO(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&rfe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const wO=Mi||gi&&sV<63;function SO(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Mi&&i&&i.contentEditable=="false")return F8(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return F8(i);if(o)return F8(o)}}function F8(e){return e.contentEditable="true",Mi&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function EO(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function rfe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!yV(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function ife(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Xr(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&Ji&&Xc<=11&&(r.disabled=!0,r.disabled=!1)}function bV(e,t){if(t instanceof $t){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(TO(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else TO(e)}function TO(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eT(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Wt.between(t,n,r)}function kO(e){return e.editable&&!e.hasFocus()?!1:xV(e)}function xV(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function ofe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Md(t.node,t.offset,n.anchorNode,n.anchorOffset)}function IC(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Qt.findFrom(o,t)}function vc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function _O(e,t,n){let r=e.state.selection;if(r instanceof Wt)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return vc(e,new Wt(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=IC(e.state,t);return i&&i instanceof $t?vc(e,i):!1}else if(!(Vo&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?$t.isSelectable(o)?vc(e,new $t(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):ig?vc(e,new Wt(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $t&&r.node.isInline)return vc(e,new Wt(t>0?r.$to:r.$from));{let i=IC(e.state,t);return i?vc(e,i):!1}}}function A3(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function o0(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function m1(e,t){return t<0?sfe(e):afe(e)}function sfe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ws&&n.nodeType==1&&r<A3(n)&&o0(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(o0(a,-1))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(CV(n))break;{let a=n.previousSibling;for(;a&&o0(a,-1);)i=n.parentNode,o=Xr(a),a=a.previousSibling;if(a)n=a,r=A3(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?LC(e,n,r):i&&LC(e,i,o)}function afe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=A3(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(o0(a,1))o=n,s=++r;else break}else{if(CV(n))break;{let a=n.nextSibling;for(;a&&o0(a,1);)o=a.parentNode,s=Xr(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=A3(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&LC(e,o,s)}function CV(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function lfe(e,t){for(;e&&t==e.childNodes.length&&!rg(e);)t=Xr(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function cfe(e,t){for(;e&&!t&&!rg(e);)t=Xr(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function LC(e,t,n){if(t.nodeType!=3){let o,s;(s=lfe(t,n))?(t=s,n=0):(o=cfe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(jy(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&xl(e)},50)}function AO(e,t){let n=e.state.doc.resolve(t);if(!(gi||O1e)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function $O(e,t,n){let r=e.state.selection;if(r instanceof Wt&&!r.empty||n.indexOf("s")>-1||Vo&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=IC(e.state,t);if(s&&s instanceof $t)return vc(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof zs?Qt.near(s,t):Qt.findFrom(s,t);return a?vc(e,a):!1}return!1}function DO(e,t){if(!(e.state.selection instanceof Wt))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function OO(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ufe(e){if(!Mi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;OO(e,r,"true"),setTimeout(()=>OO(e,r,"false"),20)}return!1}function dfe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function ffe(e,t){let n=t.keyCode,r=dfe(t);if(n==8||Vo&&n==72&&r=="c")return DO(e,-1)||m1(e,-1);if(n==46&&!t.shiftKey||Vo&&n==68&&r=="c")return DO(e,1)||m1(e,1);if(n==13||n==27)return!0;if(n==37||Vo&&n==66&&r=="c"){let i=n==37?AO(e,e.state.selection.from)=="ltr"?-1:1:-1;return _O(e,i,r)||m1(e,i)}else if(n==39||Vo&&n==70&&r=="c"){let i=n==39?AO(e,e.state.selection.from)=="ltr"?1:-1:1;return _O(e,i,r)||m1(e,i)}else{if(n==38||Vo&&n==80&&r=="c")return $O(e,-1,r)||m1(e,-1);if(n==40||Vo&&n==78&&r=="c")return ufe(e)||$O(e,1,r)||m1(e,1);if(r==(Vo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function wV(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||qd.fromSchema(e.state.schema),a=AV(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,d,f=0;for(;u&&u.nodeType==1&&(d=_V[u.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let m=a.createElement(d[p]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),f++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`

`);return{dom:c,text:h,slice:t}}function SV(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let c=t&&(r||o||!n);if(c){if(e.someProp("transformPastedText",h=>{t=h(t,o||r,e)}),o)return t?new tt(Oe.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):tt.empty;let f=e.someProp("clipboardTextParser",h=>h(t,i,r,e));if(f)a=f;else{let h=i.marks(),{schema:p}=e.state,m=qd.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let b=s.appendChild(document.createElement("p"));v&&b.appendChild(m.serializeNode(p.text(v,h)))})}}else e.someProp("transformPastedHTML",f=>{n=f(n,e)}),s=gfe(n),ig&&vfe(s);let u=s&&s.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Qc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||d),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!hfe.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)a=yfe(PO(a,+d[1],+d[2]),d[4]);else if(a=tt.maxOpen(pfe(a.content,i),!0),a.openStart||a.openEnd){let f=0,h=0;for(let p=a.content.firstChild;f<a.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=a.content.lastChild;h<a.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);a=PO(a,f,h)}return e.someProp("transformPasted",f=>{a=f(a,e)}),a}const hfe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function pfe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let c=i.findWrapping(a.type),u;if(!c)return s=null;if(u=s.length&&o.length&&TV(c,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=kV(s[s.length-1],o.length));let d=EV(a,c);s.push(d),i=i.matchType(d.type),o=c}}),s)return Oe.from(s)}return e}function EV(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Oe.from(e));return e}function TV(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=TV(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Oe.from(EV(n,e,i+1))))}}function kV(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,kV(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Oe.empty,!0);return e.copy(n.append(r))}function NC(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=NC(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Oe.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function PO(e,t,n){return t<e.openStart&&(e=new tt(NC(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new tt(NC(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const _V={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let RO=null;function AV(){return RO||(RO=document.implementation.createHTMLDocument("title"))}function mfe(e){let t=window.trustedTypes;return t?t.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(e):e}function gfe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=AV().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&_V[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=mfe(e),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function vfe(e){let t=e.querySelectorAll(gi?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function yfe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;i=Oe.from(c.create(r[a+1],i)),o++,s++}return new tt(i,o,s)}const Ii={},Li={},bfe={touchstart:!0,touchmove:!0};class xfe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Cfe(e){for(let t in Ii){let n=Ii[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{Sfe(e,r)&&!tT(e,r)&&(e.editable||!(r.type in Li))&&n(e,r)},bfe[t]?{passive:!0}:void 0)}Mi&&e.dom.addEventListener("input",()=>null),FC(e)}function Mc(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function wfe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function FC(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>tT(e,r))})}function tT(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Sfe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Efe(e,t){!tT(e,t)&&Ii[t.type]&&(e.editable||!(t.type in Li))&&Ii[t.type](e,t)}Li.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!DV(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Rs&&gi&&n.keyCode==13)))if(e.domObserver.selectionChanged(e.domSelectionRange())?e.domObserver.flush():n.keyCode!=229&&e.domObserver.forceFlush(),Uf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,qu(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||ffe(e,n)?n.preventDefault():Mc(e,"key")};Li.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Li.keypress=(e,t)=>{let n=t;if(DV(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Vo&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Wt)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",o=>o(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function qy(e){return{left:e.clientX,top:e.clientY}}function Tfe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function nT(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function xf(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function kfe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$t.isSelectable(r)?(xf(e,new $t(n),"pointer"),!0):!1}function _fe(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof $t&&(r=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if($t.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(xf(e,$t.create(e.state.doc,i),"pointer"),!0):!1}function Afe(e,t,n,r,i){return nT(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?_fe(e,n):kfe(e,n))}function $fe(e,t,n,r){return nT(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function Dfe(e,t,n,r){return nT(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||Ofe(e,n,r)}function Ofe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(xf(e,Wt.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)xf(e,Wt.create(r,a+1,a+1+s.content.size),"pointer");else if($t.isSelectable(s))xf(e,$t.create(r,a),"pointer");else continue;return!0}}function rT(e){return $3(e)}const $V=Vo?"metaKey":"ctrlKey";Ii.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=rT(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&Tfe(n,e.input.lastClick)&&!n[$V]&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(qy(n));!s||(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Pfe(e,s,n,!!r)):(o=="doubleClick"?$fe:Dfe)(e,s.pos,s.inside,n)?n.preventDefault():Mc(e,"pointer"))};class Pfe{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[$V],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let d=t.state.doc.resolve(n.pos);o=d.parent,s=d.depth?d.before():0}const a=i?null:r.target,c=a?t.docView.nearestDesc(a,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:u}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof $t&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ws&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Mc(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>xl(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(qy(t))),this.updateAllowDefault(t),this.allowDefault||!n?Mc(this.view,"pointer"):Afe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Mi&&this.mightDrag&&!this.mightDrag.node.isAtom||gi&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(xf(this.view,Qt.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Mc(this.view,"pointer")}move(t){this.updateAllowDefault(t),Mc(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Ii.touchstart=e=>{e.input.lastTouch=Date.now(),rT(e),Mc(e,"pointer")};Ii.touchmove=e=>{e.input.lastTouch=Date.now(),Mc(e,"pointer")};Ii.contextmenu=e=>rT(e);function DV(e,t){return e.composing?!0:Mi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Rfe=Rs?5e3:-1;Li.compositionstart=Li.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Wt&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),$3(e,!0),e.markCursor=null;else if($3(e,!t.selection.empty),Ws&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}e.input.composing=!0}OV(e,Rfe)};Li.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,OV(e,20))};function OV(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>$3(e),t))}function PV(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Ife());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Mfe(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=k1e(t.focusNode,t.focusOffset),r=_1e(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Ife(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function $3(e,t=!1){if(!(Rs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),PV(e),t||e.docView&&e.docView.dirty){let n=JE(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Lfe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const lm=Ji&&Xc<15||Uf&&P1e<604;Ii.copy=Li.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=lm?null:n.clipboardData,s=r.content(),{dom:a,text:c}=wV(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",c)):Lfe(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Nfe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Ffe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?cm(e,r.value,null,i,t):cm(e,r.textContent,r.innerHTML,i,t)},50)}function cm(e,t,n,r,i){let o=SV(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,i,o||tt.empty)))return!0;if(!o)return!1;let s=Nfe(o),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function RV(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Li.paste=(e,t)=>{let n=t;if(e.composing&&!Rs)return;let r=lm?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&cm(e,RV(r),r.getData("text/html"),i,n)?n.preventDefault():Ffe(e,n)};class MV{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const IV=Vo?"altKey":"ctrlKey";Ii.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(qy(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $t?i.to-1:i.to))){if(r&&r.mightDrag)s=$t.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=e.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=e.docView&&(s=$t.create(e.state.doc,f.posBefore))}}let a=(s||e.state.selection).content(),{dom:c,text:u,slice:d}=wV(e,a);(!n.dataTransfer.files.length||!gi||sV>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(lm?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",lm||n.dataTransfer.setData("text/plain",u),e.dragging=new MV(d,!n[IV],s)};Ii.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Li.dragover=Li.dragenter=(e,t)=>t.preventDefault();Li.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(qy(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",m=>{s=m(s,e)}):s=SV(e,RV(n.dataTransfer),lm?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!n[IV]);if(e.someProp("handleDrop",m=>m(e,n,s||tt.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?h1e(e.state.doc,o.pos,s):o.pos;c==null&&(c=o.pos);let u=e.state.tr;if(a){let{node:m}=r;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(c),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(f?u.replaceRangeWith(d,d,s.content.firstChild):u.replaceRange(d,d,s),u.doc.eq(h))return;let p=u.doc.resolve(d);if(f&&$t.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new $t(p));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((v,b,x,C)=>m=C),u.setSelection(eT(e,p,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};Ii.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&xl(e)},20))};Ii.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ii.beforeinput=(e,t)=>{if(gi&&Rs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,qu(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Li)Ii[e]=Li[e];function um(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class D3{constructor(t,n){this.toDOM=t,this.spec=n||vd,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new bo(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof D3&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&um(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Jc{constructor(t,n){this.attrs=t,this.spec=n||vd}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new bo(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Jc&&um(this.attrs,t.attrs)&&um(this.spec,t.spec)}static is(t){return t.type instanceof Jc}destroy(){}}class iT{constructor(t,n){this.attrs=t,this.spec=n||vd}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new bo(o.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),o;return i==n.from&&!(o=t.child(r)).isText&&i+o.nodeSize==n.to}eq(t){return this==t||t instanceof iT&&um(this.attrs,t.attrs)&&um(this.spec,t.spec)}destroy(){}}class bo{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new bo(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new bo(t,t,new D3(n,r))}static inline(t,n,r,i){return new bo(t,n,new Jc(r,i))}static node(t,n,r,i){return new bo(t,n,new iT(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Jc}get widget(){return this.type instanceof D3}}const T1=[],vd={};class mr{constructor(t,n){this.local=t.length?t:T1,this.children=n.length?n:T1}static create(t,n){return n.length?O3(n,t,0,vd):di}find(t,n,r){let i=[];return this.findInner(t==null?0:t,n==null?1e9:n,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==di||t.maps.length==0?this:this.mapInner(t,n,0,0,r||vd)}mapInner(t,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let c=this.local[a].map(t,r,i);c&&c.type.valid(n,c)?(s||(s=[])).push(c):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?Bfe(this.children,s||[],t,n,r,i,o):s?new mr(s.sort(yd),T1):di}add(t,n){return n.length?this==di?mr.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,c)=>{let u=c+r,d;if(!!(d=NV(n,a,u))){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(a,d,u+1):i.splice(o,0,c,c+a.nodeSize,O3(d,a,u+1,vd)),o+=3}});let s=LV(o?FV(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new mr(s.length?this.local.concat(s).sort(yd):this.local,i||this.children)}remove(t){return t.length==0||this==di?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,c=r[o+1]+n;for(let d=0,f;d<t.length;d++)(f=t[d])&&f.from>a&&f.to<c&&(t[d]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=di?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<t.length;o++)if(s=t[o])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new mr(i,r):di}forChild(t,n){if(this==di)return this;if(n.isLeaf)return mr.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let c=this.local[a];if(c.from<s&&c.to>o&&c.type instanceof Jc){let u=Math.max(o,c.from)-o,d=Math.min(s,c.to)-o;u<d&&(i||(i=[])).push(c.copy(u,d))}}if(i){let a=new mr(i.sort(yd),T1);return r?new _c([a,r]):a}return r||di}eq(t){if(this==t)return!0;if(!(t instanceof mr)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return oT(this.localsInner(t))}localsInner(t){if(this==di)return T1;if(t.inlineContent||!this.local.some(Jc.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Jc||n.push(this.local[r]);return n}forEachSet(t){t(this)}}mr.empty=new mr([],[]);mr.removeOverlap=oT;const di=mr.empty;class _c{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,vd));return _c.from(r)}forChild(t,n){if(n.isLeaf)return mr.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=di&&(o instanceof _c?r=r.concat(o.members):r.push(o))}return _c.from(r)}eq(t){if(!(t instanceof _c)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(!!o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?oT(r?n:n.sort(yd)):T1}static from(t){switch(t.length){case 0:return di;case 1:return t[0];default:return new _c(t.every(n=>n instanceof mr)?t:t.reduce((n,r)=>n.concat(r instanceof mr?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Bfe(e,t,n,r,i,o,s){let a=e.slice();for(let u=0,d=o;u<n.maps.length;u++){let f=0;n.maps[u].forEach((h,p,m,v)=>{let b=v-m-(p-h);for(let x=0;x<a.length;x+=3){let C=a[x+1];if(C<0||h>C+d-f)continue;let w=a[x]+d-f;p>=w?a[x+1]=h<=w?-2:-1:h>=d&&b&&(a[x]+=b,a[x+1]+=b)}f+=b}),d=n.maps[u].map(d,-1)}let c=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){c=!0,a[u+1]=-1;continue}let d=n.map(e[u]+o),f=d-i;if(f<0||f>=r.content.size){c=!0;continue}let h=n.map(e[u+1]+o,-1),p=h-i,{index:m,offset:v}=r.content.findIndex(f),b=r.maybeChild(m);if(b&&v==f&&v+b.nodeSize==p){let x=a[u+2].mapInner(n,b,d+1,e[u]+o+1,s);x!=di?(a[u]=f,a[u+1]=p,a[u+2]=x):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=Hfe(a,e,t,n,i,o,s),d=O3(u,r,0,s);t=d.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let p=d.children[f];for(;h<a.length&&a[h]<p;)h+=3;a.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new mr(t.sort(yd),a)}function LV(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new bo(i.from+t,i.to+t,i.type))}return n}function Hfe(e,t,n,r,i,o,s){function a(c,u){for(let d=0;d<c.local.length;d++){let f=c.local[d].map(r,i,u);f?n.push(f):s.onRemove&&s.onRemove(c.local[d].spec)}for(let d=0;d<c.children.length;d+=3)a(c.children[d+2],c.children[d]+u+1)}for(let c=0;c<e.length;c+=3)e[c+1]==-1&&a(e[c+2],t[c]+o+1);return n}function NV(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o=0,s;o<e.length;o++)(s=e[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[o]=null);return i}function FV(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function O3(e,t,n,r){let i=[],o=!1;t.forEach((a,c)=>{let u=NV(e,a,c+n);if(u){o=!0;let d=O3(u,a,n+c+1,r);d!=di&&i.push(c,c+a.nodeSize,d)}});let s=LV(o?FV(e):e,-n).sort(yd);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new mr(s,i):di}function yd(e,t){return e.from-t.from||e.to-t.to}function oT(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),MO(t,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),MO(t,i,r.copy(o.from,r.to)));break}}}return t}function MO(e,t,n){for(;t<e.length&&yd(n,e[t])>0;)t++;e.splice(t,0,n)}function B8(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=di&&t.push(r)}),e.cursorWrapper&&t.push(mr.create(e.state.doc,[e.cursorWrapper.deco])),_c.from(t)}const zfe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ufe=Ji&&Xc<=11;class Vfe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class jfe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Vfe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ji&&Xc<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ufe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zfe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(!!kO(this.view)){if(this.suppressingSelectionUpdates)return xl(this.view);if(Ji&&Xc<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Md(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let o=t.focusNode;o;o=am(o))n.add(o);for(let o=t.anchorNode;o;o=am(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}selectionChanged(t){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&kO(this.view)&&!this.ignoreSelectionChange(t)}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=this.selectionChanged(r),o=-1,s=-1,a=!1,c=[];if(t.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],c);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(a=!0))}if(Ws&&c.length){let d=c.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,h]=d;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of d){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||Kfe(t,f)!=p)&&h.remove()}}}let u=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&jy(r)&&(u=JE(t))&&u.eq(Qt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,xl(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),Wfe(t)),this.handleDOMChange(o,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||xl(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let d=0;d<t.addedNodes.length;d++){let f=t.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,o=t.nextSibling;if(Ji&&Xc<=11&&t.addedNodes.length)for(let d=0;d<t.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=t.addedNodes[d];(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(t.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==t.target?Xr(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),c=o&&o.parentNode==t.target?Xr(o):t.target.childNodes.length,u=r.localPosFromDOM(t.target,c,1);return{from:a,to:u}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let IO=new WeakMap,LO=!1;function Wfe(e){if(!IO.has(e)&&(IO.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Ws,LO)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),LO=!0}}function NO(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Md(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function qfe(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return NO(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?NO(e,n):null}function Kfe(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Gfe(e,t,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=e.docView.parseRange(t,n),c=e.domSelectionRange(),u,d=c.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],jy(c)||u.push({node:c.focusNode,offset:c.focusOffset})),gi&&e.input.lastKeyCode===8)for(let b=o;b>i;b--){let x=r.childNodes[b-1],C=x.pmViewDesc;if(x.nodeName=="BR"&&!C){o=b;break}if(!C||C.size)break}let f=e.state.doc,h=e.someProp("domParser")||Qc.fromSchema(e.state.schema),p=f.resolve(s),m=null,v=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:Yfe,context:p});if(u&&u[0].pos!=null){let b=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=b),m={anchor:b+s,head:x+s}}return{doc:v,sel:m,from:s,to:a}}function Yfe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Mi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Mi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Qfe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Xfe(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,D=JE(e,O);if(D&&!e.state.selection.eq(D)){if(gi&&Rs&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",N=>N(e,qu(13,"Enter"))))return;let L=e.state.tr.setSelection(D);O=="pointer"?L.setMeta("pointer",!0):O=="key"&&L.scrollIntoView(),o&&L.setMeta("composition",o),e.dispatch(L)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let c=e.state.selection,u=Gfe(e,t,n),d=e.state.doc,f=d.slice(u.from,u.to),h,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(h=e.state.selection.to,p="end"):(h=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let m=ehe(f.content,u.doc.content,u.from,h,p);if(m&&e.input.domChangeCount++,(Uf&&e.input.lastIOSEnter>Date.now()-225||Rs)&&i.some(O=>O.nodeType==1&&!Qfe.test(O.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",O=>O(e,qu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof Wt&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let O=FO(e,e.state.doc,u.sel);if(O&&!O.eq(e.state.selection)){let D=e.state.tr.setSelection(O);o&&D.setMeta("composition",o),e.dispatch(D)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Wt&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),Ji&&Xc<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)==" \xA0"&&(m.start--,m.endA--,m.endB--);let v=u.doc.resolveNoCache(m.start-u.from),b=u.doc.resolveNoCache(m.endB-u.from),x=d.resolve(m.start),C=v.sameParent(b)&&v.parent.inlineContent&&x.end()>=m.endA,w;if((Uf&&e.input.lastIOSEnter>Date.now()-225&&(!C||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!C&&v.pos<u.doc.content.size&&!v.sameParent(b)&&(w=Qt.findFrom(u.doc.resolve(v.pos+1),1,!0))&&w.head==b.pos)&&e.someProp("handleKeyDown",O=>O(e,qu(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Jfe(d,m.start,m.endA,v,b)&&e.someProp("handleKeyDown",O=>O(e,qu(8,"Backspace")))){Rs&&gi&&e.domObserver.suppressSelectionUpdates();return}gi&&Rs&&m.endB==m.start&&(e.input.lastAndroidDelete=Date.now()),Rs&&!C&&v.start()!=b.start()&&b.parentOffset==0&&v.depth==b.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,b=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,qu(13,"Enter"))})},20));let S=m.start,T=m.endA,E,k,_;if(C){if(v.pos==b.pos)Ji&&Xc<=11&&v.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>xl(e),20)),E=e.state.tr.delete(S,T),k=d.resolve(m.start).marksAcross(d.resolve(m.endA));else if(m.endA==m.endB&&(_=Zfe(v.parent.content.cut(v.parentOffset,b.parentOffset),x.parent.content.cut(x.parentOffset,m.endA-x.start()))))E=e.state.tr,_.type=="add"?E.addMark(S,T,_.mark):E.removeMark(S,T,_.mark);else if(v.parent.child(v.index()).isText&&v.index()==b.index()-(b.textOffset?0:1)){let O=v.parent.textBetween(v.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",D=>D(e,S,T,O)))return;E=e.state.tr.insertText(O,S,T)}}if(E||(E=e.state.tr.replace(S,T,u.doc.slice(m.start-u.from,m.endB-u.from))),u.sel){let O=FO(e,E.doc,u.sel);O&&!(gi&&Rs&&e.composing&&O.empty&&(m.start!=m.endB||e.input.lastAndroidDelete<Date.now()-100)&&(O.head==S||O.head==E.mapping.map(T)-1)||Ji&&O.empty&&O.head==S)&&E.setSelection(O)}k&&E.ensureMarks(k),o&&E.setMeta("composition",o),e.dispatch(E.scrollIntoView())}function FO(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:eT(e,t.resolve(n.anchor),t.resolve(n.head))}function Zfe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,o=r,s,a,c;for(let d=0;d<r.length;d++)i=r[d].removeFromSet(i);for(let d=0;d<n.length;d++)o=n[d].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",c=d=>d.mark(a.addToSet(d.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",c=d=>d.mark(a.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<t.childCount;d++)u.push(c(t.child(d)));if(Oe.from(u).eq(e))return{mark:a,type:s}}function Jfe(e,t,n,r,i){if(n-t<=i.pos-r.pos||H8(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==t+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(H8(o,!0,!0));return!s.parent.isTextblock||s.pos>n||H8(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function H8(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let o=e.node(r).maybeChild(e.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function ehe(e,t,n,r,i){let o=e.findDiffStart(t,n);if(o==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let c=Math.max(0,o-Math.min(s,a));r-=s+c-o}if(s<o&&e.size<t.size){let c=r<=o&&r>=s?o-r:0;o-=c,o&&o<t.size&&BO(t.textBetween(o-1,o+1))&&(o+=c?1:-1),a=o+(a-s),s=o}else if(a<o){let c=r<=o&&r>=a?o-r:0;o-=c,o&&o<e.size&&BO(e.textBetween(o-1,o+1))&&(o+=c?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function BO(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class the{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new xfe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(jO),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=UO(this),zO(this),this.nodeViews=VO(this),this.docView=xO(this.state.doc,HO(this),B8(this),this.dom,this),this.domObserver=new jfe(this,(r,i,o,s)=>Xfe(this,r,i,o,s)),this.domObserver.start(),Cfe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&FC(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(jO),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(PV(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=VO(this);rhe(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&FC(this),this.editable=UO(this),zO(this);let c=B8(this),u=HO(this),d=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,u,c);(f||!t.selection.eq(i.selection))&&(s=!0);let h=d=="preserve"&&s&&this.dom.style.overflowAnchor==null&&I1e(this);if(s){this.domObserver.stop();let p=f&&(Ji||gi)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&nhe(i.selection,t.selection);if(f){let m=gi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Mfe(this)),(o||!this.docView.update(t.doc,u,c,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=xO(t.doc,u,c,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ofe(this))?xl(this,p):(bV(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),((r=this.dragging)===null||r===void 0?void 0:r.node)&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&L1e(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $t){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&pO(this,n.getBoundingClientRect(),t)}else pO(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new MV(t.slice,t.move,i<0?void 0:$t.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(Ji){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&N1e(this.dom),xl(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return U1e(this,t)}coordsAtPos(t,n=1){return dV(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return K1e(this,n||this.state,t)}pasteHTML(t,n){return cm(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return cm(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){!this.docView||(wfe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],B8(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,E1e())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Efe(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?Mi&&this.root.nodeType===11&&$1e(this.dom.ownerDocument)==this.dom&&qfe(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function HO(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[bo.node(0,e.state.doc.content.size,t)]}function zO(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:bo.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function UO(e){return!e.someProp("editable",t=>t(e.state)===!1)}function nhe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function VO(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function rhe(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function jO(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var lu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},P3={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ihe=typeof navigator<"u"&&/Mac/.test(navigator.platform),ohe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Zr=0;Zr<10;Zr++)lu[48+Zr]=lu[96+Zr]=String(Zr);for(var Zr=1;Zr<=24;Zr++)lu[Zr+111]="F"+Zr;for(var Zr=65;Zr<=90;Zr++)lu[Zr]=String.fromCharCode(Zr+32),P3[Zr]=String.fromCharCode(Zr);for(var z8 in lu)P3.hasOwnProperty(z8)||(P3[z8]=lu[z8]);function she(e){var t=ihe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ohe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?P3:lu)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const ahe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function lhe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a++){let c=t[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))ahe?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function che(e){let t=Object.create(null);for(let n in e)t[lhe(n)]=e[n];return t}function U8(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function uhe(e){return new zr({props:{handleKeyDown:dhe(e)}})}function dhe(e){let t=che(e);return function(n,r){let i=she(r),o,s=t[U8(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[U8(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=lu[r.keyCode])&&o!=i){let a=t[U8(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const fhe=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function BV(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const hhe=(e,t,n)=>{let r=BV(e,n);if(!r)return!1;let i=sT(r);if(!i){let s=r.blockRange(),a=s&&mh(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(VV(e,i,t,-1))return!0;if(r.parent.content.size==0&&(Vf(o,"end")||$t.isSelectable(o)))for(let s=r.depth;;s--){let a=Uy(e.doc,r.before(s),r.after(s),tt.empty);if(a&&a.slice.size<a.to-a.from){if(t){let c=e.tr.step(a);c.setSelection(Vf(o,"end")?Qt.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):$t.create(c.doc,i.pos-o.nodeSize)),t(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},phe=(e,t,n)=>{let r=BV(e,n);if(!r)return!1;let i=sT(r);return i?HV(e,i,t):!1},mhe=(e,t,n)=>{let r=zV(e,n);if(!r)return!1;let i=aT(r);return i?HV(e,i,t):!1};function HV(e,t,n){let r=t.nodeBefore,i=r,o=t.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let s=t.nodeAfter,a=s,c=t.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let u=Uy(e.doc,o,c,tt.empty);if(!u||u.from!=o||u instanceof Mr&&u.slice.size>=c-o)return!1;if(n){let d=e.tr.step(u);d.setSelection(Wt.create(d.doc,o)),n(d.scrollIntoView())}return!0}function Vf(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const ghe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=sT(r)}let s=o&&o.nodeBefore;return!s||!$t.isSelectable(s)?!1:(t&&t(e.tr.setSelection($t.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function sT(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function zV(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const vhe=(e,t,n)=>{let r=zV(e,n);if(!r)return!1;let i=aT(r);if(!i)return!1;let o=i.nodeAfter;if(VV(e,i,t,1))return!0;if(r.parent.content.size==0&&(Vf(o,"start")||$t.isSelectable(o))){let s=Uy(e.doc,r.before(),r.after(),tt.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Vf(o,"start")?Qt.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):$t.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},yhe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=aT(r)}let s=o&&o.nodeAfter;return!s||!$t.isSelectable(s)?!1:(t&&t(e.tr.setSelection($t.create(e.doc,o.pos)).scrollIntoView()),!0)};function aT(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const bhe=(e,t)=>{let n=e.selection,r=n instanceof $t,i;if(r){if(n.node.isTextblock||!Kd(e.doc,n.from))return!1;i=n.from}else if(i=zy(e.doc,n.from,-1),i==null)return!1;if(t){let o=e.tr.join(i);r&&o.setSelection($t.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},xhe=(e,t)=>{let n=e.selection,r;if(n instanceof $t){if(n.node.isTextblock||!Kd(e.doc,n.to))return!1;r=n.to}else if(r=zy(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},Che=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&mh(i);return o==null?!1:(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},whe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
`).scrollIntoView()),!0)};function UV(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const She=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=UV(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),c=e.tr.replaceWith(a,a,s.createAndFill());c.setSelection(Qt.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},Ehe=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof zs||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=UV(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(Wt.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},The=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(yf(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&mh(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},khe=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection($t.create(e.doc,i))),!0)};function _he(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||Kd(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function VV(e,t,n,r){let i=t.nodeBefore,o=t.nodeAfter,s,a,c=i.type.spec.isolating||o.type.spec.isolating;if(!c&&_he(e,t,n))return!0;let u=!c&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,m=Oe.empty;for(let x=s.length-1;x>=0;x--)m=Oe.from(s[x].create(null,m));m=Oe.from(i.copy(m));let v=e.tr.step(new Fr(t.pos-1,p,t.pos,p,new tt(m,1,0),s.length,!0)),b=p+2*s.length;Kd(v.doc,b)&&v.join(b),n(v.scrollIntoView())}return!0}let d=o.type.spec.isolating||r>0&&c?null:Qt.findFrom(t,1),f=d&&d.$from.blockRange(d.$to),h=f&&mh(f);if(h!=null&&h>=t.depth)return n&&n(e.tr.lift(f,h).scrollIntoView()),!0;if(u&&Vf(o,"start",!0)&&Vf(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let v=o,b=1;for(;!v.isTextblock;v=v.firstChild)b++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let x=Oe.empty;for(let w=m.length-1;w>=0;w--)x=Oe.from(m[w].copy(x));let C=e.tr.step(new Fr(t.pos-m.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new tt(x,m.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function jV(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Wt.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const Ahe=jV(-1),$he=jV(1);function Dhe(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&QU(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function WO(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(c,u)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)i=!0;else{let d=n.doc.resolve(u),f=d.index();i=d.parent.canReplaceWith(f,f+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:c}}=n.selection.ranges[s];o.setBlockType(a,c,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Ohe(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let d=n.doc.resolve(s.start-2);c=new w3(d,d,s.depth),s.endIndex<s.parent.childCount&&(s=new w3(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let u=QU(c,e,t,s);return u?(r&&r(Phe(n.tr,s,u,a,e).scrollIntoView()),!0):!1}}function Phe(e,t,n,r,i){let o=Oe.empty;for(let d=n.length-1;d>=0;d--)o=Oe.from(n[d].type.create(n[d].attrs,o));e.step(new Fr(t.start-(r?2:0),t.end,t.start,t.end,new tt(o,0,0),n.length,!0));let s=0;for(let d=0;d<n.length;d++)n[d].type==i&&(s=d+1);let a=n.length-s,c=t.start+n.length-(r?2:0),u=t.parent;for(let d=t.startIndex,f=t.endIndex,h=!0;d<f;d++,h=!1)!h&&yf(e.doc,c,a)&&(e.split(c,a),c+=2*a),c+=u.child(d).nodeSize;return e}function Rhe(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?Mhe(t,n,e,o):Ihe(t,n,o):!0:!1}}function Mhe(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Fr(o-1,s,o,s,new tt(Oe.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new w3(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=mh(r);if(a==null)return!1;i.lift(r,a);let c=i.mapping.map(o,-1)-1;return Kd(i.doc,c)&&i.join(c),t(i.scrollIntoView()),!0}function Ihe(e,t,n){let r=e.tr,i=n.parent;for(let p=n.end,m=n.endIndex-1,v=n.startIndex;m>v;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,c=n.endIndex==i.childCount,u=o.node(-1),d=o.index(-1);if(!u.canReplace(d+(a?0:1),d+1,s.content.append(c?Oe.empty:Oe.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new Fr(f-(a?1:0),h+(c?1:0),f+1,h-1,new tt((a?Oe.empty:Oe.from(i.copy(Oe.empty))).append(c?Oe.empty:Oe.from(i.copy(Oe.empty))),a?0:1,c?0:1),a?0:1)),t(r.scrollIntoView()),!0}function Lhe(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,c=a.child(s-1);if(c.type!=e)return!1;if(n){let u=c.lastChild&&c.lastChild.type==a.type,d=Oe.from(u?e.create():null),f=new tt(Oe.from(e.create(null,Oe.from(a.type.create(null,d)))),u?3:1,0),h=o.start,p=o.end;n(t.tr.step(new Fr(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function Ky(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class Gy{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...d)=>{const f=c(...d)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],c=!!t,u=t||o.tr,d=()=>(!c&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...v)=>{const b=this.buildProps(u,n),x=p(...v)(b);return a.push(x),f}])),run:d};return f}createCan(t){const{rawCommands:n,state:r}=this,i=!1,o=t||r.tr,s=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...d)=>u(...d)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a={tr:t,editor:i,view:s,state:Ky({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...d)=>u(...d)(a)]))}};return a}}class Nhe{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(i=>i.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(i=>i!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function mt(e,t,n){return e.config[t]===void 0&&e.parent?mt(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?mt(e.parent,t,n):null}):e.config[t]}function Yy(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function WV(e){const t=[],{nodeExtensions:n,markExtensions:r}=Yy(e),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:i},c=mt(s,"addGlobalAttributes",a);if(!c)return;c().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([h,p])=>{t.push({type:f,name:h,attribute:{...o,...p}})})})})}),i.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=mt(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([d,f])=>{const h={...o,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),(h==null?void 0:h.isRequired)&&(h==null?void 0:h.default)===void 0&&delete h.default,t.push({type:s.name,name:d,attribute:h})})}),t}function Hr(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function xo(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?o.split(" "):[],c=r[i]?r[i].split(" "):[],u=a.filter(d=>!c.includes(d));r[i]=[...c,...u].join(" ")}else if(i==="style"){const a=o?o.split(";").map(d=>d.trim()).filter(Boolean):[],c=r[i]?r[i].split(";").map(d=>d.trim()).filter(Boolean):[],u=new Map;c.forEach(d=>{const[f,h]=d.split(":").map(p=>p.trim());u.set(f,h)}),a.forEach(d=>{const[f,h]=d.split(":").map(p=>p.trim());u.set(f,h)}),r[i]=Array.from(u.entries()).map(([d,f])=>`${d}: ${f}`).join("; ")}else r[i]=o}),r},{})}function R3(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>xo(n,r),{})}function qV(e){return typeof e=="function"}function nn(e,t=void 0,...n){return qV(e)?t?e.bind(t)(...n):e(...n):e}function Fhe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Bhe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function qO(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):Bhe(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...r,...i}}}}function KO(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&Fhe(n)?!1:n!=null))}function Hhe(e,t){var n;const r=WV(e),{nodeExtensions:i,markExtensions:o}=Yy(e),s=(n=i.find(u=>mt(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(i.map(u=>{const d=r.filter(x=>x.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:t},h=e.reduce((x,C)=>{const w=mt(C,"extendNodeSchema",f);return{...x,...w?w(u):{}}},{}),p=KO({...h,content:nn(mt(u,"content",f)),marks:nn(mt(u,"marks",f)),group:nn(mt(u,"group",f)),inline:nn(mt(u,"inline",f)),atom:nn(mt(u,"atom",f)),selectable:nn(mt(u,"selectable",f)),draggable:nn(mt(u,"draggable",f)),code:nn(mt(u,"code",f)),whitespace:nn(mt(u,"whitespace",f)),defining:nn(mt(u,"defining",f)),isolating:nn(mt(u,"isolating",f)),attrs:Object.fromEntries(d.map(x=>{var C;return[x.name,{default:(C=x==null?void 0:x.attribute)===null||C===void 0?void 0:C.default}]}))}),m=nn(mt(u,"parseHTML",f));m&&(p.parseDOM=m.map(x=>qO(x,d)));const v=mt(u,"renderHTML",f);v&&(p.toDOM=x=>v({node:x,HTMLAttributes:R3(x,d)}));const b=mt(u,"renderText",f);return b&&(p.toText=b),[u.name,p]})),c=Object.fromEntries(o.map(u=>{const d=r.filter(b=>b.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:t},h=e.reduce((b,x)=>{const C=mt(x,"extendMarkSchema",f);return{...b,...C?C(u):{}}},{}),p=KO({...h,inclusive:nn(mt(u,"inclusive",f)),excludes:nn(mt(u,"excludes",f)),group:nn(mt(u,"group",f)),spanning:nn(mt(u,"spanning",f)),code:nn(mt(u,"code",f)),attrs:Object.fromEntries(d.map(b=>{var x;return[b.name,{default:(x=b==null?void 0:b.attribute)===null||x===void 0?void 0:x.default}]}))}),m=nn(mt(u,"parseHTML",f));m&&(p.parseDOM=m.map(b=>qO(b,d)));const v=mt(u,"renderHTML",f);return v&&(p.toDOM=b=>v({mark:b,HTMLAttributes:R3(b,d)})),[u.name,p]}));return new zU({topNode:s,nodes:a,marks:c})}function V8(e,t){return t.nodes[e]||t.marks[e]||null}function GO(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const zhe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,o,s,a)=>{var c,u;const d=((u=(c=i.type.spec).toText)===null||u===void 0?void 0:u.call(c,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,r-o))}),n};function lT(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class KV{constructor(t){this.find=t.find,this.handler=t.handler}}const Uhe=(e,t)=>{if(lT(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function C2(e){var t;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:c}=n;if(c.composing)return!1;const u=c.state.doc.resolve(r);if(u.parent.type.spec.code||!!(!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(h=>h.type.spec.code)))return!1;let d=!1;const f=zhe(u)+o;return s.forEach(h=>{if(d)return;const p=Uhe(f,h.find);if(!p)return;const m=c.state.tr,v=Ky({state:c.state,transaction:m}),b={from:r-(p[0].length-o.length),to:i},{commands:x,chain:C,can:w}=new Gy({editor:n,state:v});h.handler({state:v,range:b,match:p,commands:x,chain:C,can:w})===null||!m.steps.length||(m.setMeta(a,{transform:m,from:r,to:i,text:o}),c.dispatch(m),d=!0)}),d}function Vhe(e){const{editor:t,rules:n}=e,r=new zr({state:{init(){return null},apply(i,o){const s=i.getMeta(r);if(s)return s;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:u,text:d}=a,f=u+d.length;C2({editor:t,from:u,to:f,text:d,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,a){return C2({editor:t,from:o,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&C2({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?C2({editor:t,from:s.pos,to:s.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function jhe(e){return typeof e=="number"}class Whe{constructor(t){this.find=t.find,this.handler=t.handler}}const qhe=(e,t,n)=>{if(lT(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Khe(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:c,chain:u,can:d}=new Gy({editor:t,state:n}),f=[];return n.doc.nodesBetween(r,i,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const v=Math.max(r,m),b=Math.min(i,m+p.content.size),x=p.textBetween(v-m,b-m,void 0,"\uFFFC");qhe(x,o.find,s).forEach(w=>{if(w.index===void 0)return;const S=v+w.index+1,T=S+w[0].length,E={from:n.tr.mapping.map(S),to:n.tr.mapping.map(T)},k=o.handler({state:n,range:E,match:w,commands:c,chain:u,can:d,pasteEvent:s,dropEvent:a});f.push(k)})}),f.every(p=>p!==null)}const Ghe=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Yhe(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const c=({state:d,from:f,to:h,rule:p,pasteEvt:m})=>{const v=d.tr,b=Ky({state:d,transaction:v});if(!(!Khe({editor:t,state:b,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:m,dropEvent:a})||!v.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v};return n.map(d=>new zr({view(f){const h=p=>{var m;r=!((m=f.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",h),{destroy(){window.removeEventListener("dragstart",h)}}},props:{handleDOMEvents:{drop:(f,h)=>(o=r===f.dom.parentElement,a=h,!1),paste:(f,h)=>{var p;const m=(p=h.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return s=h,i=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,p)=>{const m=f[0],v=m.getMeta("uiEvent")==="paste"&&!i,b=m.getMeta("uiEvent")==="drop"&&!o,x=m.getMeta("applyPasteRules"),C=!!x;if(!v&&!b&&!C)return;if(C){const{from:T,text:E}=x,k=T+E.length,_=Ghe(E);return c({rule:d,state:p,from:T,to:{b:k},pasteEvt:_})}const w=h.doc.content.findDiffStart(p.doc.content),S=h.doc.content.findDiffEnd(p.doc.content);if(!(!jhe(w)||!S||w===S.b))return c({rule:d,state:p,from:w,to:S,pasteEvt:s})}}))}function Qhe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class tf{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=tf.resolve(t),this.schema=Hhe(this.extensions,n),this.setupExtensions()}static resolve(t){const n=tf.sort(tf.flatten(t)),r=Qhe(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=mt(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((r,i)=>{const o=mt(r,"priority")||100,s=mt(i,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:V8(n.name,this.schema)},i=mt(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=tf.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:V8(s.name,this.schema)},c=[],u=mt(s,"addKeyboardShortcuts",a);let d={};if(s.type==="mark"&&mt(s,"exitable",a)&&(d.ArrowRight=()=>cu.handleExit({editor:t,mark:s})),u){const v=Object.fromEntries(Object.entries(u()).map(([b,x])=>[b,()=>x({editor:t})]));d={...d,...v}}const f=uhe(d);c.push(f);const h=mt(s,"addInputRules",a);GO(s,t.options.enableInputRules)&&h&&r.push(...h());const p=mt(s,"addPasteRules",a);GO(s,t.options.enablePasteRules)&&p&&i.push(...p());const m=mt(s,"addProseMirrorPlugins",a);if(m){const v=m();c.push(...v)}return c}).flat();return[Vhe({editor:t,rules:r}),...Yhe({editor:t,rules:i}),...o]}get attributes(){return WV(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Yy(this.extensions);return Object.fromEntries(n.filter(r=>!!mt(r,"addNodeView")).map(r=>{const i=this.attributes.filter(c=>c.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:Hr(r.name,this.schema)},s=mt(r,"addNodeView",o);if(!s)return[];const a=(c,u,d,f,h)=>{const p=R3(c,i);return s()({node:c,view:u,getPos:d,decorations:f,innerDecorations:h,editor:t,extension:r,HTMLAttributes:p})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:V8(t.name,this.schema)};t.type==="mark"&&((n=nn(mt(t,"keepOnSplit",r)))!==null&&n!==void 0?n:!0)&&this.splittableMarks.push(t.name);const i=mt(t,"onBeforeCreate",r),o=mt(t,"onCreate",r),s=mt(t,"onUpdate",r),a=mt(t,"onSelectionUpdate",r),c=mt(t,"onTransaction",r),u=mt(t,"onFocus",r),d=mt(t,"onBlur",r),f=mt(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),c&&this.editor.on("transaction",c),u&&this.editor.on("focus",u),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}}function Xhe(e){return Object.prototype.toString.call(e).slice(8,-1)}function w2(e){return Xhe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Qy(e,t){const n={...e};return w2(e)&&w2(t)&&Object.keys(t).forEach(r=>{w2(t[r])&&w2(e[r])?n[r]=Qy(e[r],t[r]):n[r]=t[r]}),n}class as{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nn(mt(this,"addOptions",{name:this.name}))),this.storage=nn(mt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new as(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Qy(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new as({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=nn(mt(n,"addOptions",{name:n.name})),n.storage=nn(mt(n,"addStorage",{name:n.name,options:n.options})),n}}function GV(e,t,n){const{from:r,to:i}=t,{blockSeparator:o=`

`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,i,(c,u,d,f)=>{var h;c.isBlock&&u>r&&(a+=o);const p=s==null?void 0:s[c.type.name];if(p)return d&&(a+=p({node:c,pos:u,parent:d,index:f,range:t})),!1;c.isText&&(a+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,i-u))}),a}function YV(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Zhe=as.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new zr({key:new oi("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(d=>d.$from.pos)),a=Math.max(...o.map(d=>d.$to.pos)),c=YV(n);return GV(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),Jhe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),epe=(e=!1)=>({commands:t})=>t.setContent("",e),tpe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,c)=>{if(a.type.isText)return;const{doc:u,mapping:d}=t,f=u.resolve(d.map(c)),h=u.resolve(d.map(c+a.nodeSize)),p=f.blockRange(h);if(!p)return;const m=mh(p);if(a.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());t.setNodeMarkup(p.start,v)}(m||m===0)&&t.lift(p,m)})}),!0},npe=e=>t=>e(t),rpe=()=>({state:e,dispatch:t})=>Ehe(e,t),ipe=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new Wt(r.doc.resolve(s-1))),!0},ope=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),c=i.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},spe=e=>({tr:t,state:n,dispatch:r})=>{const i=Hr(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const c=o.before(s),u=o.after(s);t.delete(c,u).scrollIntoView()}return!0}return!1},ape=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},lpe=()=>({state:e,dispatch:t})=>fhe(e,t),cpe=()=>({commands:e})=>e.keyboardShortcut("Enter"),upe=()=>({state:e,dispatch:t})=>She(e,t);function M3(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:lT(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function BC(e,t,n={}){return e.find(r=>r.type===t&&M3(r.attrs,n))}function dpe(e,t,n={}){return!!BC(e,t,n)}function cT(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=BC([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,c=s+r.node.nodeSize;for(BC([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&dpe([...e.parent.child(a).marks],t,n);)c+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:c}}function xu(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const fpe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=xu(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:d}=a;if(i){const f=cT(c,o,t);if(f&&f.from<=u&&f.to>=d){const h=Wt.create(s,f.from,f.to);n.setSelection(h)}}return!0},hpe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function uT(e){return e instanceof Wt}function vl(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function QV(e,t=null){if(!t)return null;const n=Qt.atStart(e),r=Qt.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Wt.create(e,vl(0,i,o),vl(e.content.size,i,o)):Wt.create(e,vl(t,i,o),vl(t,i,o))}function Xy(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const ppe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{Xy()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!uT(n.state.selection))return s(),!0;const a=QV(i.doc,e)||n.state.selection,c=n.state.selection.eq(a);return o&&(c||i.setSelection(a),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},mpe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),gpe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),XV=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&XV(r)}return e};function S2(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return XV(n)}function I3(e,t,n){n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return Oe.fromArray(e.map(a=>t.nodeFromJSON(a)));const s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),I3("",t,n)}if(i){if(n.errorOnInvalidContent){let s=!1,a="";const c=new zU({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Qc.fromSchema(c).parseSlice(S2(e),n.parseOptions):Qc.fromSchema(c).parse(S2(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=Qc.fromSchema(t);return n.slice?o.parseSlice(S2(e),n.parseOptions).content:o.parse(S2(e),n.parseOptions)}return I3("",t,n)}function vpe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof Mr||i instanceof Fr))return;const o=e.mapping.maps[r];let s=0;o.forEach((a,c,u,d)=>{s===0&&(s=d)}),e.setSelection(Qt.near(e.doc.resolve(s),n))}const ype=e=>!("type"in e),bpe=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{var s;if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=I3(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(m){return o.emit("contentError",{editor:o,error:m,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:c,to:u}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},d=!0,f=!0;if((ype(a)?a:[a]).forEach(m=>{m.check(),d=d?m.isText&&m.marks.length===0:!1,f=f?m.isBlock:!1}),c===u&&f){const{parent:m}=r.doc.resolve(c);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(c-=1,u+=1)}let p;d?(Array.isArray(t)?p=t.map(m=>m.text||"").join(""):typeof t=="object"&&!!t&&!!t.text?p=t.text:p=t,r.insertText(p,c,u)):(p=a,r.replaceWith(c,u,p)),n.updateSelection&&vpe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:p}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:p})}return!0},xpe=()=>({state:e,dispatch:t})=>bhe(e,t),Cpe=()=>({state:e,dispatch:t})=>xhe(e,t),wpe=()=>({state:e,dispatch:t})=>hhe(e,t),Spe=()=>({state:e,dispatch:t})=>vhe(e,t),Epe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=zy(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Tpe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=zy(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},kpe=()=>({state:e,dispatch:t})=>phe(e,t),_pe=()=>({state:e,dispatch:t})=>mhe(e,t);function ZV(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Ape(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a+=1){const c=t[a];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))Xy()||ZV()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const $pe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=Ape(e).split(/-(?!$)/),s=o.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return c==null||c.steps.forEach(u=>{const d=u.map(r.mapping);d&&i&&r.maybeStep(d)}),!0};function dm(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?Hr(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(i,h+f.nodeSize);a.push({node:f,from:p,to:m})});const c=i-r,u=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>M3(f.node.attrs,n,{strict:!1}));return o?!!u.length:u.reduce((f,h)=>f+h.to-h.from,0)>=c}const Dpe=(e,t={})=>({state:n,dispatch:r})=>{const i=Hr(e,n.schema);return dm(n,i,t)?Che(n,r):!1},Ope=()=>({state:e,dispatch:t})=>The(e,t),Ppe=e=>({state:t,dispatch:n})=>{const r=Hr(e,t.schema);return Rhe(r)(t,n)},Rpe=()=>({state:e,dispatch:t})=>whe(e,t);function Zy(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function YO(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const Mpe=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Zy(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Hr(e,r.schema)),a==="mark"&&(s=xu(e,r.schema)),i&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{o&&o===u.type&&n.setNodeMarkup(d,void 0,YO(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(f=>{s===f.type&&n.addMark(d,d+u.nodeSize,s.create(YO(f.attrs,t)))})})}),!0):!1},Ipe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Lpe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),Npe=()=>({state:e,dispatch:t})=>ghe(e,t),Fpe=()=>({state:e,dispatch:t})=>yhe(e,t),Bpe=()=>({state:e,dispatch:t})=>khe(e,t),Hpe=()=>({state:e,dispatch:t})=>$he(e,t),zpe=()=>({state:e,dispatch:t})=>Ahe(e,t);function HC(e,t,n={},r={}){return I3(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const Upe=(e,t=!1,n={},r={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{var c,u;const{doc:d}=o;if(n.preserveWhitespace!=="full"){const f=HC(e,i.schema,n,{errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:i.options.enableContentCheck});return s&&o.replaceWith(0,d.content.size,f).setMeta("preventUpdate",!t),!0}return s&&o.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:d.content.size},e,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function JV(e,t){const n=xu(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,c=>{s.push(...c.marks)});const a=s.find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function Vpe(e,t){const n=new nV(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function jpe(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Wpe(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function qpe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function dT(e){return t=>qpe(t.$from,e)}function Kpe(e,t){const n=qd.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Gpe(e,t){const n={from:0,to:e.content.size};return GV(e,n,t)}function Ype(e,t){const n=Hr(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function ej(e,t){const n=Zy(typeof t=="string"?t:t.name,e.schema);return n==="node"?Ype(e,t):n==="mark"?JV(e,t):{}}function Qpe(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function Xpe(e){const t=Qpe(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Zpe(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,c)=>{s.push({from:a,to:c})});else{const{from:a,to:c}=n[o];if(a===void 0||c===void 0)return;s.push({from:a,to:c})}s.forEach(({from:a,to:c})=>{const u=t.slice(o).map(a,-1),d=t.slice(o).map(c),f=t.invert().map(u,-1),h=t.invert().map(d);r.push({oldRange:{from:f,to:h},newRange:{from:u,to:d}})})}),Xpe(r)}function fT(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e),s=cT(o,i.type);!s||r.push({mark:i,...s})}):n.nodesBetween(e,t,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function X4(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function zC(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?xu(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>M3(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;e.doc.nodesBetween(p,m,(v,b)=>{if(!v.isText&&!v.marks.length)return;const x=Math.max(p,b),C=Math.min(m,b+v.nodeSize),w=C-x;s+=w,a.push(...v.marks.map(S=>({mark:S,from:x,to:C})))})}),s===0)return!1;const c=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>M3(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),u=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,h)=>f+h.to-h.from,0);return(c>0?c+u:c)>=s}function Jpe(e,t,n={}){if(!t)return dm(e,null,n)||zC(e,null,n);const r=Zy(t,e.schema);return r==="node"?dm(e,t,n):r==="mark"?zC(e,t,n):!1}function QO(e,t){const{nodeExtensions:n}=Yy(t),r=n.find(s=>s.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=nn(mt(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function Jy(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(o=>{i!==!1&&(Jy(o,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function e0e(e){return e instanceof $t}function t0e(e,t,n){const i=e.state.doc.content.size,o=vl(t,0,i),s=vl(n,0,i),a=e.coordsAtPos(o),c=e.coordsAtPos(s,-1),u=Math.min(a.top,c.top),d=Math.max(a.bottom,c.bottom),f=Math.min(a.left,c.left),h=Math.max(a.right,c.right),p=h-f,m=d-u,x={top:u,bottom:d,left:f,right:h,width:p,height:m,x:f,y:u};return{...x,toJSON:()=>x}}function n0e(e,t,n){var r;const{selection:i}=t;let o=null;if(uT(i)&&(o=i.$cursor),o){const a=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(a)||!a.some(c=>c.type.excludes(n))}const{ranges:s}=i;return s.some(({$from:a,$to:c})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,c.pos,(d,f,h)=>{if(u)return!1;if(d.isInline){const p=!h||h.type.allowsMarkType(n),m=!!n.isInSet(d.marks)||!d.marks.some(v=>v.type.excludes(n));u=p&&m}return!u}),u})}const r0e=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,c=xu(e,r.schema);if(i)if(s){const u=JV(r,c);n.addStoredMark(c.create({...u,...t}))}else a.forEach(u=>{const d=u.$from.pos,f=u.$to.pos;r.doc.nodesBetween(d,f,(h,p)=>{const m=Math.max(p,d),v=Math.min(p+h.nodeSize,f);h.marks.find(x=>x.type===c)?h.marks.forEach(x=>{c===x.type&&n.addMark(m,v,c.create({...x.attrs,...t}))}):n.addMark(m,v,c.create(t))})});return n0e(r,n,c)},i0e=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),o0e=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=Hr(e,n.schema);return o.isTextblock?i().command(({commands:s})=>WO(o,t)(n)?!0:s.clearNodes()).command(({state:s})=>WO(o,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},s0e=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=vl(e,0,r.content.size),o=$t.create(r,i);t.setSelection(o)}return!0},a0e=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,s=Wt.atStart(r).from,a=Wt.atEnd(r).to,c=vl(i,s,a),u=vl(o,s,a),d=Wt.create(r,c,u);t.setSelection(d)}return!0},l0e=e=>({state:t,dispatch:n})=>{const r=Hr(e,t.schema);return Lhe(r)(t,n)};function XO(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const c0e=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:c}=o,u=i.extensionManager.attributes,d=X4(u,a.node().type.name,a.node().attrs);if(o instanceof $t&&o.node.isBlock)return!a.parentOffset||!yf(s,a.pos)?!1:(r&&(e&&XO(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=c.parentOffset===c.parent.content.size,h=a.depth===0?void 0:jpe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=f&&h?[{type:h,attrs:d}]:void 0,m=yf(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!m&&yf(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:d}]:void 0),r){if(m&&(o instanceof Wt&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),h&&!f&&!a.parentOffset&&a.parent.type!==h)){const v=t.mapping.map(a.before()),b=t.doc.resolve(v);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&XO(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},u0e=(e,t={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var s;const a=Hr(e,r.schema),{$from:c,$to:u}=r.selection,d=r.selection.node;if(d&&d.isBlock||c.depth<2||!c.sameParent(u))return!1;const f=c.node(-1);if(f.type!==a)return!1;const h=o.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==a||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){let x=Oe.empty;const C=c.index(-1)?1:c.index(-2)?2:3;for(let _=c.depth-C;_>=c.depth-3;_-=1)x=Oe.from(c.node(_).copy(x));const w=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,S={...X4(h,c.node().type.name,c.node().attrs),...t},T=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(S))||void 0;x=x.append(Oe.from(a.createAndFill(null,T)||void 0));const E=c.before(c.depth-(C-1));n.replace(E,c.after(-w),new tt(x,4-C,0));let k=-1;n.doc.nodesBetween(E,n.doc.content.size,(_,O)=>{if(k>-1)return!1;_.isTextblock&&_.content.size===0&&(k=O+1)}),k>-1&&n.setSelection(Wt.near(n.doc.resolve(k))),n.scrollIntoView()}return!0}const p=u.pos===c.end()?f.contentMatchAt(0).defaultType:null,m={...X4(h,f.type.name,f.attrs),...t},v={...X4(h,c.node().type.name,c.node().attrs),...t};n.delete(c.pos,u.pos);const b=p?[{type:a,attrs:m},{type:p,attrs:v}]:[{type:a,attrs:m}];if(!yf(n.doc,c.pos,2))return!1;if(i){const{selection:x,storedMarks:C}=r,{splittableMarks:w}=o.extensionManager,S=C||x.$to.parentOffset&&x.$from.marks();if(n.split(c.pos,2,b).scrollIntoView(),!S||!i)return!0;const T=S.filter(E=>w.includes(E.type.name));n.ensureMarks(T)}return!0},j8=(e,t)=>{const n=dT(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Kd(e.doc,n.pos)&&e.join(n.pos),!0},W8=(e,t)=>{const n=dT(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Kd(e.doc,r)&&e.join(r),!0},d0e=(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:c,commands:u,can:d})=>{const{extensions:f,splittableMarks:h}=i.extensionManager,p=Hr(e,s.schema),m=Hr(t,s.schema),{selection:v,storedMarks:b}=s,{$from:x,$to:C}=v,w=x.blockRange(C),S=b||v.$to.parentOffset&&v.$from.marks();if(!w)return!1;const T=dT(E=>QO(E.type.name,f))(v);if(w.depth>=1&&T&&w.depth-T.depth<=1){if(T.node.type===p)return u.liftListItem(m);if(QO(T.node.type.name,f)&&p.validContent(T.node.content)&&a)return c().command(()=>(o.setNodeMarkup(T.pos,p),!0)).command(()=>j8(o,p)).command(()=>W8(o,p)).run()}return!n||!S||!a?c().command(()=>d().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>j8(o,p)).command(()=>W8(o,p)).run():c().command(()=>{const E=d().wrapInList(p,r),k=S.filter(_=>h.includes(_.type.name));return o.ensureMarks(k),E?!0:u.clearNodes()}).wrapInList(p,r).command(()=>j8(o,p)).command(()=>W8(o,p)).run()},f0e=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=xu(e,r.schema);return zC(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},h0e=(e,t,n={})=>({state:r,commands:i})=>{const o=Hr(e,r.schema),s=Hr(t,r.schema),a=dm(r,o,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),a?i.setNode(s,c):i.setNode(o,{...c,...n})},p0e=(e,t={})=>({state:n,commands:r})=>{const i=Hr(e,n.schema);return dm(n,i,t)?r.lift(i):r.wrapIn(i,t)},m0e=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const s=e.tr,a=o.transform;for(let c=a.steps.length-1;c>=0;c-=1)s.step(a.steps[c].invert(a.docs[c]));if(o.text){const c=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,c))}else s.delete(o.from,o.to)}return!0}}return!1},g0e=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},v0e=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=xu(e,r.schema),{$from:u,empty:d,ranges:f}=a;if(!i)return!0;if(d&&s){let{from:h,to:p}=a;const m=(o=u.marks().find(b=>b.type===c))===null||o===void 0?void 0:o.attrs,v=cT(u,c,m);v&&(h=v.from,p=v.to),n.removeMark(h,p,c)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,c)});return n.removeStoredMark(c),!0},y0e=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Zy(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Hr(e,r.schema)),a==="mark"&&(s=xu(e,r.schema)),i&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{o&&o===f.type&&n.setNodeMarkup(h,void 0,{...f.attrs,...t}),s&&f.marks.length&&f.marks.forEach(p=>{if(s===p.type){const m=Math.max(h,u),v=Math.min(h+f.nodeSize,d);n.addMark(m,v,s.create({...p.attrs,...t}))}})})}),!0):!1},b0e=(e,t={})=>({state:n,dispatch:r})=>{const i=Hr(e,n.schema);return Dhe(i,t)(n,r)},x0e=(e,t={})=>({state:n,dispatch:r})=>{const i=Hr(e,n.schema);return Ohe(i,t)(n,r)};var C0e=Object.freeze({__proto__:null,blur:Jhe,clearContent:epe,clearNodes:tpe,command:npe,createParagraphNear:rpe,cut:ipe,deleteCurrentNode:ope,deleteNode:spe,deleteRange:ape,deleteSelection:lpe,enter:cpe,exitCode:upe,extendMarkRange:fpe,first:hpe,focus:ppe,forEach:mpe,insertContent:gpe,insertContentAt:bpe,joinBackward:wpe,joinDown:Cpe,joinForward:Spe,joinItemBackward:Epe,joinItemForward:Tpe,joinTextblockBackward:kpe,joinTextblockForward:_pe,joinUp:xpe,keyboardShortcut:$pe,lift:Dpe,liftEmptyBlock:Ope,liftListItem:Ppe,newlineInCode:Rpe,resetAttributes:Mpe,scrollIntoView:Ipe,selectAll:Lpe,selectNodeBackward:Npe,selectNodeForward:Fpe,selectParentNode:Bpe,selectTextblockEnd:Hpe,selectTextblockStart:zpe,setContent:Upe,setMark:r0e,setMeta:i0e,setNode:o0e,setNodeSelection:s0e,setTextSelection:a0e,sinkListItem:l0e,splitBlock:c0e,splitListItem:u0e,toggleList:d0e,toggleMark:f0e,toggleNode:h0e,toggleWrap:p0e,undoInputRule:m0e,unsetAllMarks:g0e,unsetMark:v0e,updateAttributes:y0e,wrapIn:b0e,wrapInList:x0e});const w0e=as.create({name:"commands",addCommands(){return{...C0e}}}),S0e=as.create({name:"editable",addProseMirrorPlugins(){return[new zr({key:new oi("editable"),props:{editable:()=>this.editor.options.editable}})]}}),E0e=as.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new zr({key:new oi("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),T0e=as.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:c,doc:u}=a,{empty:d,$anchor:f}=c,{pos:h,parent:p}=f,m=f.parent.isTextblock&&h>0?a.doc.resolve(h-1):f,v=m.parent.type.spec.isolating,b=f.pos-f.parentOffset,x=v&&m.parent.childCount===1?b===f.pos:Qt.atStart(u).from===h;return!d||!p.type.isTextblock||p.textContent.length||!x||x&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Xy()||ZV()?o:i},addProseMirrorPlugins(){return[new zr({key:new oi("clearDocument"),appendTransaction:(e,t,n)=>{const r=e.some(v=>v.docChanged)&&!t.doc.eq(n.doc),i=e.some(v=>v.getMeta("preventClearDocument"));if(!r||i)return;const{empty:o,from:s,to:a}=t.selection,c=Qt.atStart(t.doc).from,u=Qt.atEnd(t.doc).to;if(o||!(s===c&&a===u)||!Jy(n.doc))return;const h=n.tr,p=Ky({state:n,transaction:h}),{commands:m}=new Gy({editor:this.editor,state:p});if(m.clearNodes(),!!h.steps.length)return h}})]}}),k0e=as.create({name:"tabindex",addProseMirrorPlugins(){return[new zr({key:new oi("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Ku{get name(){return this.node.type.name}constructor(t,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Ku(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Ku(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Ku(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,o=this.pos+r+1,s=this.resolvedPos.doc.resolve(o);if(!i&&s.depth<=this.depth)return;const a=new Ku(s,this.editor,i,i?n:null);i&&(a.actualDepth=this.depth+1),t.push(new Ku(s,this.editor,i,i?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===t)if(Object.keys(n).length>0){const o=i.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const c=s[a];if(o[c]!==n[c])break}}else r=i;i=i.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const o=Object.keys(n);return this.children.forEach(s=>{r&&i.length>0||(s.node.type.name===t&&o.every(c=>n[c]===s.node.attrs[c])&&i.push(s),!(r&&i.length>0)&&(i=i.concat(s.querySelectorAll(t,n,r))))}),i}setAttribute(t){const n=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,t).setTextSelection(n.from).run()}}const _0e=e=>new zr({key:new oi("tiptapDrop"),props:{handleDrop:(t,n,r,i)=>{e(n,r,i)}}}),A0e=e=>new zr({key:new oi("tiptapPaste"),props:{handlePaste:(t,n,r)=>{e(n,r)}}}),$0e=`.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}

.tippy-box[data-animation=fade][data-state=hidden] {
  opacity: 0
}`;function D0e(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}class O0e extends Nhe{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.options.onPaste&&this.registerPlugin(A0e(this.options.onPaste)),this.options.onDrop&&this.registerPlugin(_0e(this.options.onDrop)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=D0e($0e,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=qV(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(n))});return this.view.updateState(r),r}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[S0e,Zhe.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),w0e,E0e,T0e,k0e].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new tf(i,this)}createCommandManager(){this.commandManager=new Gy({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let t;try{t=HC(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),t=HC(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=QV(t,this.options.autofocus);this.view=new the(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ef.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),o=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return ej(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,i=typeof t=="string"?n:t;return Jpe(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Kpe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=`

`,textSerializers:r={}}=t||{};return Gpe(this.state.doc,{blockSeparator:n,textSerializers:{...YV(this.schema),...r}})}get isEmpty(){return Jy(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Ku(n,this)}get $doc(){return this.$pos(0)}}function L3(e){return new KV({find:e.find,handler:({state:t,range:n,match:r})=>{const i=nn(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),d=u+s.length;if(fT(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(v=>v===e.type&&v!==p.mark.type)).filter(p=>p.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+c,u);const h=n.from+c+s.length;o.addMark(n.from+c,h,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}class cu{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nn(mt(this,"addOptions",{name:this.name}))),this.storage=nn(mt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new cu(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Qy(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new cu(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=nn(mt(n,"addOptions",{name:n.name})),n.storage=nn(mt(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const c=s.find(u=>(u==null?void 0:u.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}class Dl{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nn(mt(this,"addOptions",{name:this.name}))),this.storage=nn(mt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Dl(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Qy(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new Dl(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=nn(mt(n,"addOptions",{name:n.name})),n.storage=nn(mt(n,"addStorage",{name:n.name,options:n.options})),n}}function P0e(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class R0e{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,i,o,s,a,c;const{view:u}=this.editor,d=t.target,f=d.nodeType===3?(n=d.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||((r=this.contentDOM)===null||r===void 0?void 0:r.contains(d))||!f)return;let h=0,p=0;if(this.dom!==f){const x=this.dom.getBoundingClientRect(),C=f.getBoundingClientRect(),w=(i=t.offsetX)!==null&&i!==void 0?i:(o=t.nativeEvent)===null||o===void 0?void 0:o.offsetX,S=(s=t.offsetY)!==null&&s!==void 0?s:(a=t.nativeEvent)===null||a===void 0?void 0:a.offsetY;h=C.x-x.x+w,p=C.y-x.y+S}(c=t.dataTransfer)===null||c===void 0||c.setDragImage(this.dom,h,p);const m=this.getPos();if(typeof m!="number")return;const v=$t.create(u.state.doc,m),b=u.state.tr.setSelection(v);u.dispatch(b)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const o=t.type.startsWith("drag"),s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!o)return!0;const{isEditable:c}=this.editor,{isDragging:u}=this,d=!!this.node.type.spec.draggable,f=$t.isSelectable(this.node),h=t.type==="copy",p=t.type==="paste",m=t.type==="cut",v=t.type==="mousedown";if(!d&&f&&o&&t.preventDefault(),d&&o&&!u)return t.preventDefault(),!1;if(d&&c&&!u&&v){const b=r.closest("[data-drag-handle]");b&&(this.dom===b||this.dom.contains(b))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||s||h||p||m||v&&f)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Xy()||P0e())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function fm(e){return new Whe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const o=nn(e.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=t,a=r[r.length-1],c=r[0];let u=n.to;if(a){const d=c.search(/\S/),f=n.from+c.indexOf(a),h=f+a.length;if(fT(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(b=>b===e.type&&b!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+d,f),u=n.from+d+a.length,s.addMark(n.from+d,u,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}function M0e(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var eo="top",ls="bottom",cs="right",to="left",hT="auto",sg=[eo,ls,cs,to],jf="start",hm="end",I0e="clippingParents",tj="viewport",dp="popper",L0e="reference",ZO=sg.reduce(function(e,t){return e.concat([t+"-"+jf,t+"-"+hm])},[]),nj=[].concat(sg,[hT]).reduce(function(e,t){return e.concat([t,t+"-"+jf,t+"-"+hm])},[]),N0e="beforeRead",F0e="read",B0e="afterRead",H0e="beforeMain",z0e="main",U0e="afterMain",V0e="beforeWrite",j0e="write",W0e="afterWrite",q0e=[N0e,F0e,B0e,H0e,z0e,U0e,V0e,j0e,W0e];function Da(e){return e?(e.nodeName||"").toLowerCase():null}function Do(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ld(e){var t=Do(e).Element;return e instanceof t||e instanceof Element}function ns(e){var t=Do(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function pT(e){if(typeof ShadowRoot>"u")return!1;var t=Do(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function K0e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ns(o)||!Da(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function G0e(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(c,u){return c[u]="",c},{});!ns(i)||!Da(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const rj={name:"applyStyles",enabled:!0,phase:"write",fn:K0e,effect:G0e,requires:["computeStyles"]};function Sa(e){return e.split("-")[0]}var bd=Math.max,N3=Math.min,Wf=Math.round;function UC(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ij(){return!/^((?!chrome|android).)*safari/i.test(UC())}function qf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ns(e)&&(i=e.offsetWidth>0&&Wf(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Wf(r.height)/e.offsetHeight||1);var s=Ld(e)?Do(e):window,a=s.visualViewport,c=!ij()&&n,u=(r.left+(c&&a?a.offsetLeft:0))/i,d=(r.top+(c&&a?a.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function mT(e){var t=qf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oj(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&pT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ol(e){return Do(e).getComputedStyle(e)}function Y0e(e){return["table","td","th"].indexOf(Da(e))>=0}function Cu(e){return((Ld(e)?e.ownerDocument:e.document)||window.document).documentElement}function e6(e){return Da(e)==="html"?e:e.assignedSlot||e.parentNode||(pT(e)?e.host:null)||Cu(e)}function JO(e){return!ns(e)||Ol(e).position==="fixed"?null:e.offsetParent}function Q0e(e){var t=/firefox/i.test(UC()),n=/Trident/i.test(UC());if(n&&ns(e)){var r=Ol(e);if(r.position==="fixed")return null}var i=e6(e);for(pT(i)&&(i=i.host);ns(i)&&["html","body"].indexOf(Da(i))<0;){var o=Ol(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ag(e){for(var t=Do(e),n=JO(e);n&&Y0e(n)&&Ol(n).position==="static";)n=JO(n);return n&&(Da(n)==="html"||Da(n)==="body"&&Ol(n).position==="static")?t:n||Q0e(e)||t}function gT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function s0(e,t,n){return bd(e,N3(t,n))}function X0e(e,t,n){var r=s0(e,t,n);return r>n?n:r}function sj(){return{top:0,right:0,bottom:0,left:0}}function aj(e){return Object.assign({},sj(),e)}function lj(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Z0e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,aj(typeof t!="number"?t:lj(t,sg))};function J0e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Sa(n.placement),c=gT(a),u=[to,cs].indexOf(a)>=0,d=u?"height":"width";if(!(!o||!s)){var f=Z0e(i.padding,n),h=mT(o),p=c==="y"?eo:to,m=c==="y"?ls:cs,v=n.rects.reference[d]+n.rects.reference[c]-s[c]-n.rects.popper[d],b=s[c]-n.rects.reference[c],x=ag(o),C=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,w=v/2-b/2,S=f[p],T=C-h[d]-f[m],E=C/2-h[d]/2+w,k=s0(S,E,T),_=c;n.modifiersData[r]=(t={},t[_]=k,t.centerOffset=k-E,t)}}function eme(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!oj(t.elements.popper,i)||(t.elements.arrow=i))}const tme={name:"arrow",enabled:!0,phase:"main",fn:J0e,effect:eme,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kf(e){return e.split("-")[1]}var nme={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rme(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Wf(n*i)/i||0,y:Wf(r*i)/i||0}}function eP(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,v=m===void 0?0:m,b=typeof d=="function"?d({x:p,y:v}):{x:p,y:v};p=b.x,v=b.y;var x=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),w=to,S=eo,T=window;if(u){var E=ag(n),k="clientHeight",_="clientWidth";if(E===Do(n)&&(E=Cu(n),Ol(E).position!=="static"&&a==="absolute"&&(k="scrollHeight",_="scrollWidth")),E=E,i===eo||(i===to||i===cs)&&o===hm){S=ls;var O=f&&E===T&&T.visualViewport?T.visualViewport.height:E[k];v-=O-r.height,v*=c?1:-1}if(i===to||(i===eo||i===ls)&&o===hm){w=cs;var D=f&&E===T&&T.visualViewport?T.visualViewport.width:E[_];p-=D-r.width,p*=c?1:-1}}var L=Object.assign({position:a},u&&nme),N=d===!0?rme({x:p,y:v},Do(n)):{x:p,y:v};if(p=N.x,v=N.y,c){var j;return Object.assign({},L,(j={},j[S]=C?"0":"",j[w]=x?"0":"",j.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",j))}return Object.assign({},L,(t={},t[S]=C?v+"px":"",t[w]=x?p+"px":"",t.transform="",t))}function ime(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,c=a===void 0?!0:a,u={placement:Sa(t.placement),variation:Kf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,eP(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,eP(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ome={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ime,data:{}};var E2={passive:!0};function sme(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,c=Do(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,E2)}),a&&c.addEventListener("resize",n.update,E2),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,E2)}),a&&c.removeEventListener("resize",n.update,E2)}}const ame={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:sme,data:{}};var lme={left:"right",right:"left",bottom:"top",top:"bottom"};function Z4(e){return e.replace(/left|right|bottom|top/g,function(t){return lme[t]})}var cme={start:"end",end:"start"};function tP(e){return e.replace(/start|end/g,function(t){return cme[t]})}function vT(e){var t=Do(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function yT(e){return qf(Cu(e)).left+vT(e).scrollLeft}function ume(e,t){var n=Do(e),r=Cu(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;var u=ij();(u||!u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a+yT(e),y:c}}function dme(e){var t,n=Cu(e),r=vT(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=bd(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=bd(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+yT(e),c=-r.scrollTop;return Ol(i||n).direction==="rtl"&&(a+=bd(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}function bT(e){var t=Ol(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function cj(e){return["html","body","#document"].indexOf(Da(e))>=0?e.ownerDocument.body:ns(e)&&bT(e)?e:cj(e6(e))}function a0(e,t){var n;t===void 0&&(t=[]);var r=cj(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Do(r),s=i?[o].concat(o.visualViewport||[],bT(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(a0(e6(s)))}function VC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fme(e,t){var n=qf(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function nP(e,t,n){return t===tj?VC(ume(e,n)):Ld(t)?fme(t,n):VC(dme(Cu(e)))}function hme(e){var t=a0(e6(e)),n=["absolute","fixed"].indexOf(Ol(e).position)>=0,r=n&&ns(e)?ag(e):e;return Ld(r)?t.filter(function(i){return Ld(i)&&oj(i,r)&&Da(i)!=="body"}):[]}function pme(e,t,n,r){var i=t==="clippingParents"?hme(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(c,u){var d=nP(e,u,r);return c.top=bd(d.top,c.top),c.right=N3(d.right,c.right),c.bottom=N3(d.bottom,c.bottom),c.left=bd(d.left,c.left),c},nP(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function uj(e){var t=e.reference,n=e.element,r=e.placement,i=r?Sa(r):null,o=r?Kf(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,c;switch(i){case eo:c={x:s,y:t.y-n.height};break;case ls:c={x:s,y:t.y+t.height};break;case cs:c={x:t.x+t.width,y:a};break;case to:c={x:t.x-n.width,y:a};break;default:c={x:t.x,y:t.y}}var u=i?gT(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case jf:c[u]=c[u]-(t[d]/2-n[d]/2);break;case hm:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function pm(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,c=a===void 0?I0e:a,u=n.rootBoundary,d=u===void 0?tj:u,f=n.elementContext,h=f===void 0?dp:f,p=n.altBoundary,m=p===void 0?!1:p,v=n.padding,b=v===void 0?0:v,x=aj(typeof b!="number"?b:lj(b,sg)),C=h===dp?L0e:dp,w=e.rects.popper,S=e.elements[m?C:h],T=pme(Ld(S)?S:S.contextElement||Cu(e.elements.popper),c,d,s),E=qf(e.elements.reference),k=uj({reference:E,element:w,strategy:"absolute",placement:i}),_=VC(Object.assign({},w,k)),O=h===dp?_:E,D={top:T.top-O.top+x.top,bottom:O.bottom-T.bottom+x.bottom,left:T.left-O.left+x.left,right:O.right-T.right+x.right},L=e.modifiersData.offset;if(h===dp&&L){var N=L[i];Object.keys(D).forEach(function(j){var G=[cs,ls].indexOf(j)>=0?1:-1,X=[eo,ls].indexOf(j)>=0?"y":"x";D[j]+=N[X]*G})}return D}function mme(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?nj:c,d=Kf(r),f=d?a?ZO:ZO.filter(function(m){return Kf(m)===d}):sg,h=f.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,v){return m[v]=pm(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Sa(v)],m},{});return Object.keys(p).sort(function(m,v){return p[m]-p[v]})}function gme(e){if(Sa(e)===hT)return[];var t=Z4(e);return[tP(e),t,tP(t)]}function vme(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,v=n.allowedAutoPlacements,b=t.options.placement,x=Sa(b),C=x===b,w=c||(C||!m?[Z4(b)]:gme(b)),S=[b].concat(w).reduce(function(me,Se){return me.concat(Sa(Se)===hT?mme(t,{placement:Se,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):Se)},[]),T=t.rects.reference,E=t.rects.popper,k=new Map,_=!0,O=S[0],D=0;D<S.length;D++){var L=S[D],N=Sa(L),j=Kf(L)===jf,G=[eo,ls].indexOf(N)>=0,X=G?"width":"height",re=pm(t,{placement:L,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),oe=G?j?cs:to:j?ls:eo;T[X]>E[X]&&(oe=Z4(oe));var U=Z4(oe),H=[];if(o&&H.push(re[N]<=0),a&&H.push(re[oe]<=0,re[U]<=0),H.every(function(me){return me})){O=L,_=!1;break}k.set(L,H)}if(_)for(var R=m?3:1,se=function(Se){var pe=S.find(function(ye){var _e=k.get(ye);if(_e)return _e.slice(0,Se).every(function($e){return $e})});if(pe)return O=pe,"break"},ee=R;ee>0;ee--){var I=se(ee);if(I==="break")break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}}const yme={name:"flip",enabled:!0,phase:"main",fn:vme,requiresIfExists:["offset"],data:{_skip:!1}};function rP(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function iP(e){return[eo,cs,ls,to].some(function(t){return e[t]>=0})}function bme(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=pm(t,{elementContext:"reference"}),a=pm(t,{altBoundary:!0}),c=rP(s,r),u=rP(a,i,o),d=iP(c),f=iP(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const xme={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bme};function Cme(e,t,n){var r=Sa(e),i=[to,eo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[to,cs].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function wme(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=nj.reduce(function(d,f){return d[f]=Cme(f,t.rects,o),d},{}),a=s[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const Sme={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wme};function Eme(e){var t=e.state,n=e.name;t.modifiersData[n]=uj({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Tme={name:"popperOffsets",enabled:!0,phase:"read",fn:Eme,data:{}};function kme(e){return e==="x"?"y":"x"}function _me(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,v=m===void 0?0:m,b=pm(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),x=Sa(t.placement),C=Kf(t.placement),w=!C,S=gT(x),T=kme(S),E=t.modifiersData.popperOffsets,k=t.rects.reference,_=t.rects.popper,O=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,D=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(!!E){if(o){var j,G=S==="y"?eo:to,X=S==="y"?ls:cs,re=S==="y"?"height":"width",oe=E[S],U=oe+b[G],H=oe-b[X],R=p?-_[re]/2:0,se=C===jf?k[re]:_[re],ee=C===jf?-_[re]:-k[re],I=t.elements.arrow,me=p&&I?mT(I):{width:0,height:0},Se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:sj(),pe=Se[G],ye=Se[X],_e=s0(0,k[re],me[re]),$e=w?k[re]/2-R-_e-pe-D.mainAxis:se-_e-pe-D.mainAxis,J=w?-k[re]/2+R+_e+ye+D.mainAxis:ee+_e+ye+D.mainAxis,fe=t.elements.arrow&&ag(t.elements.arrow),we=fe?S==="y"?fe.clientTop||0:fe.clientLeft||0:0,Le=(j=L==null?void 0:L[S])!=null?j:0,He=oe+$e-Le-we,Ge=oe+J-Le,Pe=s0(p?N3(U,He):U,oe,p?bd(H,Ge):H);E[S]=Pe,N[S]=Pe-oe}if(a){var rt,ft=S==="x"?eo:to,vt=S==="x"?ls:cs,We=E[T],De=T==="y"?"height":"width",Vt=We+b[ft],bn=We-b[vt],$r=[eo,to].indexOf(x)!==-1,Lo=(rt=L==null?void 0:L[T])!=null?rt:0,Xs=$r?Vt:We-k[De]-_[De]-Lo+D.altAxis,K=$r?We+k[De]+_[De]-Lo-D.altAxis:bn,V=p&&$r?X0e(Xs,We,K):s0(p?Xs:Vt,We,p?K:bn);E[T]=V,N[T]=V-We}t.modifiersData[r]=N}}const Ame={name:"preventOverflow",enabled:!0,phase:"main",fn:_me,requiresIfExists:["offset"]};function $me(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Dme(e){return e===Do(e)||!ns(e)?vT(e):$me(e)}function Ome(e){var t=e.getBoundingClientRect(),n=Wf(t.width)/e.offsetWidth||1,r=Wf(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Pme(e,t,n){n===void 0&&(n=!1);var r=ns(t),i=ns(t)&&Ome(t),o=Cu(t),s=qf(e,i,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Da(t)!=="body"||bT(o))&&(a=Dme(t)),ns(t)?(c=qf(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=yT(o))),{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Rme(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var c=t.get(a);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Mme(e){var t=Rme(e);return q0e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ime(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Lme(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var oP={placement:"bottom",modifiers:[],strategy:"absolute"};function sP(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Nme(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?oP:i;return function(a,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},oP,o),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},f=[],h=!1,p={state:d,setOptions:function(x){var C=typeof x=="function"?x(d.options):x;v(),d.options=Object.assign({},o,d.options,C),d.scrollParents={reference:Ld(a)?a0(a):a.contextElement?a0(a.contextElement):[],popper:a0(c)};var w=Mme(Lme([].concat(r,d.options.modifiers)));return d.orderedModifiers=w.filter(function(S){return S.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var x=d.elements,C=x.reference,w=x.popper;if(!!sP(C,w)){d.rects={reference:Pme(C,ag(w),d.options.strategy==="fixed"),popper:mT(w)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var T=d.orderedModifiers[S],E=T.fn,k=T.options,_=k===void 0?{}:k,O=T.name;typeof E=="function"&&(d=E({state:d,options:_,name:O,instance:p})||d)}}}},update:Ime(function(){return new Promise(function(b){p.forceUpdate(),b(d)})}),destroy:function(){v(),h=!0}};if(!sP(a,c))return p;p.setOptions(u).then(function(b){!h&&u.onFirstUpdate&&u.onFirstUpdate(b)});function m(){d.orderedModifiers.forEach(function(b){var x=b.name,C=b.options,w=C===void 0?{}:C,S=b.effect;if(typeof S=="function"){var T=S({state:d,name:x,instance:p,options:w}),E=function(){};f.push(T||E)}})}function v(){f.forEach(function(b){return b()}),f=[]}return p}}var Fme=[ame,Tme,ome,rj,Sme,yme,Ame,tme,xme],Bme=Nme({defaultModifiers:Fme}),Hme="tippy-box",dj="tippy-content",zme="tippy-backdrop",fj="tippy-arrow",hj="tippy-svg-arrow",Uu={passive:!0,capture:!0},pj=function(){return document.body};function q8(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function xT(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function mj(e,t){return typeof e=="function"?e.apply(void 0,t):e}function aP(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Ume(e){return e.split(/\s+/).filter(Boolean)}function k1(e){return[].concat(e)}function lP(e,t){e.indexOf(t)===-1&&e.push(t)}function Vme(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function jme(e){return e.split("-")[0]}function F3(e){return[].slice.call(e)}function cP(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function l0(){return document.createElement("div")}function t6(e){return["Element","Fragment"].some(function(t){return xT(e,t)})}function Wme(e){return xT(e,"NodeList")}function qme(e){return xT(e,"MouseEvent")}function Kme(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Gme(e){return t6(e)?[e]:Wme(e)?F3(e):Array.isArray(e)?e:F3(document.querySelectorAll(e))}function K8(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function uP(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Yme(e){var t,n=k1(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Qme(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,c=a.interactiveBorder,u=jme(s.placement),d=s.modifiersData.offset;if(!d)return!0;var f=u==="bottom"?d.top.y:0,h=u==="top"?d.bottom.y:0,p=u==="right"?d.left.x:0,m=u==="left"?d.right.x:0,v=o.top-r+f>c,b=r-o.bottom-h>c,x=o.left-n+p>c,C=n-o.right-m>c;return v||b||x||C})}function G8(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function dP(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var aa={isTouch:!1},fP=0;function Xme(){aa.isTouch||(aa.isTouch=!0,window.performance&&document.addEventListener("mousemove",gj))}function gj(){var e=performance.now();e-fP<20&&(aa.isTouch=!1,document.removeEventListener("mousemove",gj)),fP=e}function Zme(){var e=document.activeElement;if(Kme(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Jme(){document.addEventListener("touchstart",Xme,Uu),window.addEventListener("blur",Zme)}var ege=typeof window<"u"&&typeof document<"u",tge=ege?!!window.msCrypto:!1,nge={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},rge={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ns=Object.assign({appendTo:pj,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},nge,rge),ige=Object.keys(Ns),oge=function(t){var n=Object.keys(t);n.forEach(function(r){Ns[r]=t[r]})};function vj(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=e[o]!==void 0?e[o]:(a=Ns[o])!=null?a:s}return r},{});return Object.assign({},e,n)}function sge(e,t){var n=t?Object.keys(vj(Object.assign({},Ns,{plugins:t}))):ige,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function hP(e,t){var n=Object.assign({},t,{content:mj(t.content,[e])},t.ignoreAttributes?{}:sge(e,t.plugins));return n.aria=Object.assign({},Ns.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var age=function(){return"innerHTML"};function jC(e,t){e[age()]=t}function pP(e){var t=l0();return e===!0?t.className=fj:(t.className=hj,t6(e)?t.appendChild(e):jC(t,e)),t}function mP(e,t){t6(t.content)?(jC(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?jC(e,t.content):e.textContent=t.content)}function WC(e){var t=e.firstElementChild,n=F3(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(dj)}),arrow:n.find(function(r){return r.classList.contains(fj)||r.classList.contains(hj)}),backdrop:n.find(function(r){return r.classList.contains(zme)})}}function yj(e){var t=l0(),n=l0();n.className=Hme,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=l0();r.className=dj,r.setAttribute("data-state","hidden"),mP(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var a=WC(t),c=a.box,u=a.content,d=a.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&mP(u,e.props),s.arrow?d?o.arrow!==s.arrow&&(c.removeChild(d),c.appendChild(pP(s.arrow))):c.appendChild(pP(s.arrow)):d&&c.removeChild(d)}return{popper:t,onUpdate:i}}yj.$$tippy=!0;var lge=1,T2=[],Y8=[];function cge(e,t){var n=hP(e,Object.assign({},Ns,vj(cP(t)))),r,i,o,s=!1,a=!1,c=!1,u=!1,d,f,h,p=[],m=aP(He,n.interactiveDebounce),v,b=lge++,x=null,C=Vme(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},S={id:b,reference:e,popper:l0(),popperInstance:x,props:n,state:w,plugins:C,clearDelayTimeouts:Xs,setProps:K,setContent:V,show:le,hide:ge,hideWithInteractivity:qe,enable:$r,disable:Lo,unmount:xt,destroy:Mt};if(!n.render)return S;var T=n.render(S),E=T.popper,k=T.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+S.id,S.popper=E,e._tippy=S,E._tippy=S;var _=C.map(function(B){return B.fn(S)}),O=e.hasAttribute("aria-expanded");return fe(),R(),oe(),U("onCreate",[S]),n.showOnCreate&&Vt(),E.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&S.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){S.props.interactive&&S.props.trigger.indexOf("mouseenter")>=0&&G().addEventListener("mousemove",m)}),S;function D(){var B=S.props.touch;return Array.isArray(B)?B:[B,0]}function L(){return D()[0]==="hold"}function N(){var B;return!!((B=S.props.render)!=null&&B.$$tippy)}function j(){return v||e}function G(){var B=j().parentNode;return B?Yme(B):document}function X(){return WC(E)}function re(B){return S.state.isMounted&&!S.state.isVisible||aa.isTouch||d&&d.type==="focus"?0:q8(S.props.delay,B?0:1,Ns.delay)}function oe(B){B===void 0&&(B=!1),E.style.pointerEvents=S.props.interactive&&!B?"":"none",E.style.zIndex=""+S.props.zIndex}function U(B,ne,xe){if(xe===void 0&&(xe=!0),_.forEach(function(ke){ke[B]&&ke[B].apply(ke,ne)}),xe){var be;(be=S.props)[B].apply(be,ne)}}function H(){var B=S.props.aria;if(!!B.content){var ne="aria-"+B.content,xe=E.id,be=k1(S.props.triggerTarget||e);be.forEach(function(ke){var lt=ke.getAttribute(ne);if(S.state.isVisible)ke.setAttribute(ne,lt?lt+" "+xe:xe);else{var jt=lt&&lt.replace(xe,"").trim();jt?ke.setAttribute(ne,jt):ke.removeAttribute(ne)}})}}function R(){if(!(O||!S.props.aria.expanded)){var B=k1(S.props.triggerTarget||e);B.forEach(function(ne){S.props.interactive?ne.setAttribute("aria-expanded",S.state.isVisible&&ne===j()?"true":"false"):ne.removeAttribute("aria-expanded")})}}function se(){G().removeEventListener("mousemove",m),T2=T2.filter(function(B){return B!==m})}function ee(B){if(!(aa.isTouch&&(c||B.type==="mousedown"))){var ne=B.composedPath&&B.composedPath()[0]||B.target;if(!(S.props.interactive&&dP(E,ne))){if(k1(S.props.triggerTarget||e).some(function(xe){return dP(xe,ne)})){if(aa.isTouch||S.state.isVisible&&S.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[S,B]);S.props.hideOnClick===!0&&(S.clearDelayTimeouts(),S.hide(),a=!0,setTimeout(function(){a=!1}),S.state.isMounted||pe())}}}function I(){c=!0}function me(){c=!1}function Se(){var B=G();B.addEventListener("mousedown",ee,!0),B.addEventListener("touchend",ee,Uu),B.addEventListener("touchstart",me,Uu),B.addEventListener("touchmove",I,Uu)}function pe(){var B=G();B.removeEventListener("mousedown",ee,!0),B.removeEventListener("touchend",ee,Uu),B.removeEventListener("touchstart",me,Uu),B.removeEventListener("touchmove",I,Uu)}function ye(B,ne){$e(B,function(){!S.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&ne()})}function _e(B,ne){$e(B,ne)}function $e(B,ne){var xe=X().box;function be(ke){ke.target===xe&&(G8(xe,"remove",be),ne())}if(B===0)return ne();G8(xe,"remove",f),G8(xe,"add",be),f=be}function J(B,ne,xe){xe===void 0&&(xe=!1);var be=k1(S.props.triggerTarget||e);be.forEach(function(ke){ke.addEventListener(B,ne,xe),p.push({node:ke,eventType:B,handler:ne,options:xe})})}function fe(){L()&&(J("touchstart",Le,{passive:!0}),J("touchend",Ge,{passive:!0})),Ume(S.props.trigger).forEach(function(B){if(B!=="manual")switch(J(B,Le),B){case"mouseenter":J("mouseleave",Ge);break;case"focus":J(tge?"focusout":"blur",Pe);break;case"focusin":J("focusout",Pe);break}})}function we(){p.forEach(function(B){var ne=B.node,xe=B.eventType,be=B.handler,ke=B.options;ne.removeEventListener(xe,be,ke)}),p=[]}function Le(B){var ne,xe=!1;if(!(!S.state.isEnabled||rt(B)||a)){var be=((ne=d)==null?void 0:ne.type)==="focus";d=B,v=B.currentTarget,R(),!S.state.isVisible&&qme(B)&&T2.forEach(function(ke){return ke(B)}),B.type==="click"&&(S.props.trigger.indexOf("mouseenter")<0||s)&&S.props.hideOnClick!==!1&&S.state.isVisible?xe=!0:Vt(B),B.type==="click"&&(s=!xe),xe&&!be&&bn(B)}}function He(B){var ne=B.target,xe=j().contains(ne)||E.contains(ne);if(!(B.type==="mousemove"&&xe)){var be=De().concat(E).map(function(ke){var lt,jt=ke._tippy,Ot=(lt=jt.popperInstance)==null?void 0:lt.state;return Ot?{popperRect:ke.getBoundingClientRect(),popperState:Ot,props:n}:null}).filter(Boolean);Qme(be,B)&&(se(),bn(B))}}function Ge(B){var ne=rt(B)||S.props.trigger.indexOf("click")>=0&&s;if(!ne){if(S.props.interactive){S.hideWithInteractivity(B);return}bn(B)}}function Pe(B){S.props.trigger.indexOf("focusin")<0&&B.target!==j()||S.props.interactive&&B.relatedTarget&&E.contains(B.relatedTarget)||bn(B)}function rt(B){return aa.isTouch?L()!==B.type.indexOf("touch")>=0:!1}function ft(){vt();var B=S.props,ne=B.popperOptions,xe=B.placement,be=B.offset,ke=B.getReferenceClientRect,lt=B.moveTransition,jt=N()?WC(E).arrow:null,Ot=ke?{getBoundingClientRect:ke,contextElement:ke.contextElement||j()}:e,It={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(tn){var Fn=tn.state;if(N()){var fr=X(),ki=fr.box;["placement","reference-hidden","escaped"].forEach(function(xr){xr==="placement"?ki.setAttribute("data-placement",Fn.placement):Fn.attributes.popper["data-popper-"+xr]?ki.setAttribute("data-"+xr,""):ki.removeAttribute("data-"+xr)}),Fn.attributes.popper={}}}},Ut=[{name:"offset",options:{offset:be}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!lt}},It];N()&&jt&&Ut.push({name:"arrow",options:{element:jt,padding:3}}),Ut.push.apply(Ut,(ne==null?void 0:ne.modifiers)||[]),S.popperInstance=Bme(Ot,E,Object.assign({},ne,{placement:xe,onFirstUpdate:h,modifiers:Ut}))}function vt(){S.popperInstance&&(S.popperInstance.destroy(),S.popperInstance=null)}function We(){var B=S.props.appendTo,ne,xe=j();S.props.interactive&&B===pj||B==="parent"?ne=xe.parentNode:ne=mj(B,[xe]),ne.contains(E)||ne.appendChild(E),S.state.isMounted=!0,ft()}function De(){return F3(E.querySelectorAll("[data-tippy-root]"))}function Vt(B){S.clearDelayTimeouts(),B&&U("onTrigger",[S,B]),Se();var ne=re(!0),xe=D(),be=xe[0],ke=xe[1];aa.isTouch&&be==="hold"&&ke&&(ne=ke),ne?r=setTimeout(function(){S.show()},ne):S.show()}function bn(B){if(S.clearDelayTimeouts(),U("onUntrigger",[S,B]),!S.state.isVisible){pe();return}if(!(S.props.trigger.indexOf("mouseenter")>=0&&S.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(B.type)>=0&&s)){var ne=re(!1);ne?i=setTimeout(function(){S.state.isVisible&&S.hide()},ne):o=requestAnimationFrame(function(){S.hide()})}}function $r(){S.state.isEnabled=!0}function Lo(){S.hide(),S.state.isEnabled=!1}function Xs(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function K(B){if(!S.state.isDestroyed){U("onBeforeUpdate",[S,B]),we();var ne=S.props,xe=hP(e,Object.assign({},ne,cP(B),{ignoreAttributes:!0}));S.props=xe,fe(),ne.interactiveDebounce!==xe.interactiveDebounce&&(se(),m=aP(He,xe.interactiveDebounce)),ne.triggerTarget&&!xe.triggerTarget?k1(ne.triggerTarget).forEach(function(be){be.removeAttribute("aria-expanded")}):xe.triggerTarget&&e.removeAttribute("aria-expanded"),R(),oe(),k&&k(ne,xe),S.popperInstance&&(ft(),De().forEach(function(be){requestAnimationFrame(be._tippy.popperInstance.forceUpdate)})),U("onAfterUpdate",[S,B])}}function V(B){S.setProps({content:B})}function le(){var B=S.state.isVisible,ne=S.state.isDestroyed,xe=!S.state.isEnabled,be=aa.isTouch&&!S.props.touch,ke=q8(S.props.duration,0,Ns.duration);if(!(B||ne||xe||be)&&!j().hasAttribute("disabled")&&(U("onShow",[S],!1),S.props.onShow(S)!==!1)){if(S.state.isVisible=!0,N()&&(E.style.visibility="visible"),oe(),Se(),S.state.isMounted||(E.style.transition="none"),N()){var lt=X(),jt=lt.box,Ot=lt.content;K8([jt,Ot],0)}h=function(){var Ut;if(!(!S.state.isVisible||u)){if(u=!0,E.offsetHeight,E.style.transition=S.props.moveTransition,N()&&S.props.animation){var sn=X(),tn=sn.box,Fn=sn.content;K8([tn,Fn],ke),uP([tn,Fn],"visible")}H(),R(),lP(Y8,S),(Ut=S.popperInstance)==null||Ut.forceUpdate(),U("onMount",[S]),S.props.animation&&N()&&_e(ke,function(){S.state.isShown=!0,U("onShown",[S])})}},We()}}function ge(){var B=!S.state.isVisible,ne=S.state.isDestroyed,xe=!S.state.isEnabled,be=q8(S.props.duration,1,Ns.duration);if(!(B||ne||xe)&&(U("onHide",[S],!1),S.props.onHide(S)!==!1)){if(S.state.isVisible=!1,S.state.isShown=!1,u=!1,s=!1,N()&&(E.style.visibility="hidden"),se(),pe(),oe(!0),N()){var ke=X(),lt=ke.box,jt=ke.content;S.props.animation&&(K8([lt,jt],be),uP([lt,jt],"hidden"))}H(),R(),S.props.animation?N()&&ye(be,S.unmount):S.unmount()}}function qe(B){G().addEventListener("mousemove",m),lP(T2,m),m(B)}function xt(){S.state.isVisible&&S.hide(),S.state.isMounted&&(vt(),De().forEach(function(B){B._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),Y8=Y8.filter(function(B){return B!==S}),S.state.isMounted=!1,U("onHidden",[S]))}function Mt(){S.state.isDestroyed||(S.clearDelayTimeouts(),S.unmount(),we(),delete e._tippy,S.state.isDestroyed=!0,U("onDestroy",[S]))}}function gh(e,t){t===void 0&&(t={});var n=Ns.plugins.concat(t.plugins||[]);Jme();var r=Object.assign({},t,{plugins:n}),i=Gme(e),o=i.reduce(function(s,a){var c=a&&cge(a,r);return c&&s.push(c),s},[]);return t6(e)?o[0]:o}gh.defaultProps=Ns;gh.setDefaultProps=oge;gh.currentInput=aa;Object.assign({},rj,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});gh.setDefaultProps({render:yj});class uge{constructor({editor:t,element:n,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:c,from:u,to:d})=>{const{doc:f,selection:h}=c,{empty:p}=h,m=!f.textBetween(u,d).length&&uT(c.selection),v=this.element.contains(document.activeElement);return!(!(a.hasFocus()||v)||p||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var c;if(this.preventHide){this.preventHide=!1;return}(a==null?void 0:a.relatedTarget)&&((c=this.element.parentNode)===null||c===void 0?void 0:c.contains(a.relatedTarget))||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,c)=>{const u=!(c!=null&&c.selection.eq(a.state.selection)),d=!(c!=null&&c.doc.eq(a.state.doc));!u&&!d||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,u,d,c)},this.updateDelay))},this.updateHandler=(a,c,u,d)=>{var f,h,p;const{state:m,composing:v}=a,{selection:b}=m;if(v||!c&&!u)return;this.createTooltip();const{ranges:C}=b,w=Math.min(...C.map(E=>E.$from.pos)),S=Math.max(...C.map(E=>E.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:a,state:m,oldState:d,from:w,to:S}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(e0e(m.selection)){let E=a.nodeDOM(w);const k=E.dataset.nodeViewWrapper?E:E.querySelector("[data-node-view-wrapper]");if(k&&(E=k.firstChild),E)return E.getBoundingClientRect()}return t0e(a,w,S)})}),this.show()},this.editor=t,this.element=n,this.view=r,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=gh(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){const{state:r}=t,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(t,n);return}const o=!(n!=null&&n.selection.eq(t.state.selection)),s=!(n!=null&&n.doc.eq(t.state.doc));this.updateHandler(t,o,s,n)}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;!((t=this.tippy)===null||t===void 0)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const bj=e=>new zr({key:typeof e.pluginKey=="string"?new oi(e.pluginKey):e.pluginKey,view:t=>new uge({view:t,...e})});as.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[bj({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});function dge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xj={exports:{}},Q8={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gP;function fge(){if(gP)return Q8;gP=1;var e=Ae;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(f,h){var p=h(),m=r({inst:{value:p,getSnapshot:h}}),v=m[0].inst,b=m[1];return o(function(){v.value=p,v.getSnapshot=h,c(v)&&b({inst:v})},[f,p,h]),i(function(){return c(v)&&b({inst:v}),f(function(){c(v)&&b({inst:v})})},[f]),s(p),p}function c(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function u(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Q8.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Q8}xj.exports=fge();var CT=xj.exports;const hge=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},pge=({contentComponent:e})=>{const t=CT.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return l(z,{children:Object.values(t)})};function mge(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:mH.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}class gge extends Ae.Component{constructor(t){var n;super(t),this.editorContentRef=Ae.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:Boolean((n=t.editor)===null||n===void 0?void 0:n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=mge(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return g(z,{children:[l("div",{ref:hge(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&l(pge,{contentComponent:t.contentComponent})]})}}const vge=y.exports.forwardRef((e,t)=>{const n=Ae.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return l(gge,{innerRef:t,...e},n)}),Gd=Ae.memo(vge);var yge=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&t.$$typeof)&&!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},bge=dge(yge),Cj={exports:{}},X8={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vP;function xge(){if(vP)return X8;vP=1;var e=Ae,t=CT;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;return X8.useSyncExternalStoreWithSelector=function(u,d,f,h,p){var m=o(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=a(function(){function x(E){if(!C){if(C=!0,w=E,E=h(E),p!==void 0&&v.hasValue){var k=v.value;if(p(k,E))return S=k}return S=E}if(k=S,r(w,E))return k;var _=h(E);return p!==void 0&&p(k,_)?k:(w=E,S=_)}var C=!1,w,S,T=f===void 0?null:f;return[function(){return x(d())},T===null?void 0:function(){return x(T())}]},[d,f,h,p]);var b=i(u,m[0],m[1]);return s(function(){v.hasValue=!0,v.value=b},[b]),c(b),b},X8}Cj.exports=xge();var Cge=Cj.exports;class wge{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(i=>i())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function Sge(e){var t;const[n]=y.exports.useState(()=>new wge(e.editor)),r=Cge.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:bge);return y.exports.useEffect(()=>n.watch(e.editor),[e.editor,n]),y.exports.useDebugValue(r),r}const Ege=!1,qC=typeof window>"u",Tge=qC||Boolean(typeof window<"u"&&window.next);class kge{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return qC||Tge?null:this.createEditor();if(this.options.current.immediatelyRender&&qC&&Ege)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)===null||o===void 0?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)===null||o===void 0?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)===null||o===void 0?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)===null||o===void 0?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)===null||o===void 0?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)===null||o===void 0?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)===null||o===void 0?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)===null||o===void 0?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)===null||o===void 0?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)===null||o===void 0?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)===null||o===void 0?void 0:o.call(i,...r)}};return new O0e(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?this.editor.setOptions(this.options.current):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,i)=>r===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function _ge(e={},t=[]){const n=y.exports.useRef(e);n.current=e;const[r]=y.exports.useState(()=>new kge(n)),i=CT.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return y.exports.useDebugValue(i),y.exports.useEffect(r.onRender(t)),Sge({editor:i,selector:({transactionNumber:o})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&o===0?0:o+1}),i}const wj=y.exports.createContext({editor:null});wj.Consumer;const Age=()=>y.exports.useContext(wj),$ge=e=>{const[t,n]=y.exports.useState(null),{editor:r}=Age();return y.exports.useEffect(()=>{var i;if(!t||((i=e.editor)===null||i===void 0?void 0:i.isDestroyed)||(r==null?void 0:r.isDestroyed))return;const{pluginKey:o="bubbleMenu",editor:s,tippyOptions:a={},updateDelay:c,shouldShow:u=null}=e,d=s||r;if(!d){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const f=bj({updateDelay:c,editor:d,element:t,pluginKey:o,shouldShow:u,tippyOptions:a});return d.registerPlugin(f),()=>{d.unregisterPlugin(o)}},[e.editor,r,t]),l("div",{ref:n,className:e.className,style:{visibility:"hidden"},children:e.children})},Sj=y.exports.createContext({onDragStart:void 0}),Dge=()=>y.exports.useContext(Sj),Ej=Ae.forwardRef((e,t)=>{const{onDragStart:n}=Dge(),r=e.as||"div";return l(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function Oge(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function Pge(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class Tj{constructor(t,{editor:n,props:r={},as:i="div",className:o=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?Lr.exports.flushSync(()=>{this.render()}):this.render()}render(){var t;const n=this.component,r=this.props,i=this.editor;(Oge(n)||Pge(n))&&(r.ref=o=>{this.ref=o}),this.reactElement=l(n,{...r}),(t=i==null?void 0:i.contentComponent)===null||t===void 0||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;const n=this.editor;(t=n==null?void 0:n.contentComponent)===null||t===void 0||t.removeRenderer(this.id)}updateAttributes(t){Object.keys(t).forEach(n=>{this.element.setAttribute(n,t[n])})}}class Rge extends R0e{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(u={})=>this.updateAttributes(u),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const u=d=>d.charAt(0).toUpperCase()+d.substring(1);this.component.displayName=u(this.extension.name)}const i={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:u=>{u&&this.contentDOMElement&&u.firstChild!==this.contentDOMElement&&u.appendChild(this.contentDOMElement)}},o=this.component,s=Ae.memo(u=>l(Sj.Provider,{value:i,children:l(o,{...u})}));s.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:c=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new Tj(s,{editor:this.editor,props:t,as:a,className:`node-${this.node.type.name} ${c}`.trim()}),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(!((t=this.renderer.element.firstElementChild)===null||t===void 0)&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(t<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n,r){const i=o=>{this.renderer.updateProps(o),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const o=this.node,s=this.decorations,a=this.innerDecorations;return this.node=t,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:o,oldDecorations:s,newNode:t,newDecorations:n,oldInnerDecorations:a,innerDecorations:r,updateProps:()=>i({node:t,decorations:n,innerDecorations:r})})}return t===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=t,this.decorations=n,this.innerDecorations=r,i({node:t,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=R3(this.node,n);t=this.options.attrs({node:this.node,HTMLAttributes:r})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}}function kj(e,t){return n=>n.editor.contentComponent?new Rge(e,n,t):{}}/**
 * @remix-run/router v1.9.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function mm(){return mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mm.apply(this,arguments)}var Ic;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ic||(Ic={}));const yP="popstate";function Mge(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return KC("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:B3(i)}return Lge(t,n,null,e)}function dr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ige(){return Math.random().toString(36).substr(2,8)}function bP(e,t){return{usr:e.state,key:e.key,idx:t}}function KC(e,t,n,r){return n===void 0&&(n=null),mm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?vh(t):t,{state:n,key:t&&t.key||r||Ige()})}function B3(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function vh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Lge(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ic.Pop,c=null,u=d();u==null&&(u=0,s.replaceState(mm({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function f(){a=Ic.Pop;let b=d(),x=b==null?null:b-u;u=b,c&&c({action:a,location:v.location,delta:x})}function h(b,x){a=Ic.Push;let C=KC(v.location,b,x);n&&n(C,b),u=d()+1;let w=bP(C,u),S=v.createHref(C);try{s.pushState(w,"",S)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(S)}o&&c&&c({action:a,location:v.location,delta:1})}function p(b,x){a=Ic.Replace;let C=KC(v.location,b,x);n&&n(C,b),u=d();let w=bP(C,u),S=v.createHref(C);s.replaceState(w,"",S),o&&c&&c({action:a,location:v.location,delta:0})}function m(b){let x=i.location.origin!=="null"?i.location.origin:i.location.href,C=typeof b=="string"?b:B3(b);return dr(x,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,x)}let v={get action(){return a},get location(){return e(i,s)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(yP,f),c=b,()=>{i.removeEventListener(yP,f),c=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let x=m(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(b){return s.go(b)}};return v}var xP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xP||(xP={}));function Nge(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?vh(t):t,i=ST(r.pathname||"/",n);if(i==null)return null;let o=_j(e);Fge(o);let s=null;for(let a=0;s==null&&a<o.length;++a)s=Kge(o[a],Qge(i));return s}function _j(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(dr(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=eu([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(dr(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),_j(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Wge(u,o.index),routesMeta:d})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let c of Aj(o.path))i(o,s,c)}),t}function Aj(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=Aj(r.join("/")),a=[];return a.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function Fge(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qge(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Bge=/^:\w+$/,Hge=3,zge=2,Uge=1,Vge=10,jge=-2,CP=e=>e==="*";function Wge(e,t){let n=e.split("/"),r=n.length;return n.some(CP)&&(r+=jge),t&&(r+=zge),n.filter(i=>!CP(i)).reduce((i,o)=>i+(Bge.test(o)?Hge:o===""?Uge:Vge),r)}function qge(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Kge(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s<n.length;++s){let a=n[s],c=s===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=Gge({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},u);if(!d)return null;Object.assign(r,d.params);let f=a.route;o.push({params:r,pathname:eu([i,d.pathname]),pathnameBase:e2e(eu([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=eu([i,d.pathnameBase]))}return o}function Gge(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Yge(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,d,f)=>{if(d==="*"){let h=a[f]||"";s=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}return u[d]=Xge(a[f]||"",d),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Yge(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),wT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Qge(e){try{return decodeURI(e)}catch(t){return wT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Xge(e,t){try{return decodeURIComponent(e)}catch(n){return wT(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function ST(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Zge(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?vh(e):e;return{pathname:n?n.startsWith("/")?n:Jge(n,t):t,search:t2e(r),hash:n2e(i)}}function Jge(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Z8(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ET(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function TT(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=vh(e):(i=mm({},e),dr(!i.pathname||!i.pathname.includes("?"),Z8("?","pathname","search",i)),dr(!i.pathname||!i.pathname.includes("#"),Z8("#","pathname","hash",i)),dr(!i.search||!i.search.includes("#"),Z8("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let f=t.length-1;if(s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=Zge(i,a),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const eu=e=>e.join("/").replace(/\/\/+/g,"/"),e2e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),t2e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,n2e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function r2e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const i2e=["post","put","patch","delete"];[...i2e];/**
 * React Router v6.16.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function H3(){return H3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H3.apply(this,arguments)}const kT=y.exports.createContext(null),o2e=y.exports.createContext(null),yh=y.exports.createContext(null),n6=y.exports.createContext(null),La=y.exports.createContext({outlet:null,matches:[],isDataRoute:!1}),$j=y.exports.createContext(null);function s2e(e,t){let{relative:n}=t===void 0?{}:t;bh()||dr(!1);let{basename:r,navigator:i}=y.exports.useContext(yh),{hash:o,pathname:s,search:a}=Oj(e,{relative:n}),c=s;return r!=="/"&&(c=s==="/"?r:eu([r,s])),i.createHref({pathname:c,search:a,hash:o})}function bh(){return y.exports.useContext(n6)!=null}function ao(){return bh()||dr(!1),y.exports.useContext(n6).location}function Dj(e){y.exports.useContext(yh).static||y.exports.useLayoutEffect(e)}function ar(){let{isDataRoute:e}=y.exports.useContext(La);return e?C2e():a2e()}function a2e(){bh()||dr(!1);let e=y.exports.useContext(kT),{basename:t,navigator:n}=y.exports.useContext(yh),{matches:r}=y.exports.useContext(La),{pathname:i}=ao(),o=JSON.stringify(ET(r).map(c=>c.pathnameBase)),s=y.exports.useRef(!1);return Dj(()=>{s.current=!0}),y.exports.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let d=TT(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:eu([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,o,i,e])}const l2e=y.exports.createContext(null);function c2e(e){let t=y.exports.useContext(La).outlet;return t&&l(l2e.Provider,{value:e,children:t})}function Na(){let{matches:e}=y.exports.useContext(La),t=e[e.length-1];return t?t.params:{}}function Oj(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=y.exports.useContext(La),{pathname:i}=ao(),o=JSON.stringify(ET(r).map(s=>s.pathnameBase));return y.exports.useMemo(()=>TT(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function u2e(e,t){return d2e(e,t)}function d2e(e,t,n){bh()||dr(!1);let{navigator:r}=y.exports.useContext(yh),{matches:i}=y.exports.useContext(La),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let c=ao(),u;if(t){var d;let v=typeof t=="string"?vh(t):t;a==="/"||((d=v.pathname)==null?void 0:d.startsWith(a))||dr(!1),u=v}else u=c;let f=u.pathname||"/",h=a==="/"?f:f.slice(a.length)||"/",p=Nge(e,{pathname:h}),m=g2e(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:eu([a,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:eu([a,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n);return t&&m?l(n6.Provider,{value:{location:H3({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ic.Pop},children:m}):m}function f2e(){let e=x2e(),t=r2e(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return g(z,{children:[l("h2",{children:"Unexpected Application Error!"}),l("h3",{style:{fontStyle:"italic"},children:t}),n?l("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:n}):null,null]})}const h2e=l(f2e,{});class p2e extends y.exports.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?l(La.Provider,{value:this.props.routeContext,children:l($j.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function m2e(e){let{routeContext:t,match:n,children:r}=e,i=y.exports.useContext(kT);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),l(La.Provider,{value:t,children:r})}function g2e(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));a>=0||dr(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,c,u)=>{let d=c.route.id?s==null?void 0:s[c.route.id]:null,f=null;n&&(f=c.route.errorElement||h2e);let h=t.concat(o.slice(0,u+1)),p=()=>{let m;return d?m=f:c.route.Component?m=y.exports.createElement(c.route.Component,null):c.route.element?m=c.route.element:m=a,l(m2e,{match:c,routeContext:{outlet:a,matches:h,isDataRoute:n!=null},children:m})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?l(p2e,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:p(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):p()},null)}var Pj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pj||{}),z3=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(z3||{});function v2e(e){let t=y.exports.useContext(kT);return t||dr(!1),t}function y2e(e){let t=y.exports.useContext(o2e);return t||dr(!1),t}function b2e(e){let t=y.exports.useContext(La);return t||dr(!1),t}function Rj(e){let t=b2e(),n=t.matches[t.matches.length-1];return n.route.id||dr(!1),n.route.id}function x2e(){var e;let t=y.exports.useContext($j),n=y2e(z3.UseRouteError),r=Rj(z3.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function C2e(){let{router:e}=v2e(Pj.UseNavigateStable),t=Rj(z3.UseNavigateStable),n=y.exports.useRef(!1);return Dj(()=>{n.current=!0}),y.exports.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,H3({fromRouteId:t},o)))},[e,t])}const w2e="startTransition";D0[w2e];function xh(e){let{to:t,replace:n,state:r,relative:i}=e;bh()||dr(!1);let{matches:o}=y.exports.useContext(La),{pathname:s}=ao(),a=ar(),c=TT(t,ET(o).map(d=>d.pathnameBase),s,i==="path"),u=JSON.stringify(c);return y.exports.useEffect(()=>a(JSON.parse(u),{replace:n,state:r,relative:i}),[a,u,i,n,r]),null}function Mj(e){return c2e(e.context)}function Nt(e){dr(!1)}function S2e(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ic.Pop,navigator:o,static:s=!1}=e;bh()&&dr(!1);let a=t.replace(/^\/*/,"/"),c=y.exports.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=vh(r));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,m=y.exports.useMemo(()=>{let v=ST(u,a);return v==null?null:{location:{pathname:v,search:d,hash:f,state:h,key:p},navigationType:i}},[a,u,d,f,h,p,i]);return m==null?null:l(yh.Provider,{value:c,children:l(n6.Provider,{children:n,value:m})})}function Ij(e){let{children:t,location:n}=e;return u2e(GC(t),n)}new Promise(()=>{});function GC(e,t){t===void 0&&(t=[]);let n=[];return y.exports.Children.forEach(e,(r,i)=>{if(!y.exports.isValidElement(r))return;let o=[...t,i];if(r.type===y.exports.Fragment){n.push.apply(n,GC(r.props.children,o));return}r.type!==Nt&&dr(!1),!r.props.index||!r.props.children||dr(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=GC(r.props.children,o)),n.push(s)}),n}function Nd(e){return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}function E2e(e,t){if(Nd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Nd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lj(e){var t=E2e(e,"string");return Nd(t)==="symbol"?t:String(t)}function nf(e,t,n){return t=Lj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(n),!0).forEach(function(r){nf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lj(r.key),r)}}function k2e(e,t,n){return t&&SP(e.prototype,t),n&&SP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YC(e,t){return YC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YC(e,t)}function _2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YC(e,t)}function U3(e){return U3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},U3(e)}function A2e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D2e(e,t){if(t&&(Nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $2e(e)}function O2e(e){var t=A2e();return function(){var r=U3(e),i;if(t){var o=U3(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return D2e(this,i)}}function QC(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}function P2e(e){if(Array.isArray(e))return QC(e)}function R2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nj(e,t){if(!!e){if(typeof e=="string")return QC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QC(e,t)}}function M2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fj(e){return P2e(e)||R2e(e)||Nj(e)||M2e()}function I2e(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function L2e(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var N2e=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(L2e(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=I2e(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ui="-ms-",V3="-moz-",cn="-webkit-",Bj="comm",_T="rule",AT="decl",F2e="@import",Hj="@keyframes",B2e="@layer",H2e=Math.abs,r6=String.fromCharCode,z2e=Object.assign;function U2e(e,t){return Qr(e,0)^45?(((t<<2^Qr(e,0))<<2^Qr(e,1))<<2^Qr(e,2))<<2^Qr(e,3):0}function zj(e){return e.trim()}function V2e(e,t){return(e=t.exec(e))?e[0]:e}function dn(e,t,n){return e.replace(t,n)}function XC(e,t){return e.indexOf(t)}function Qr(e,t){return e.charCodeAt(t)|0}function gm(e,t,n){return e.slice(t,n)}function la(e){return e.length}function $T(e){return e.length}function k2(e,t){return t.push(e),e}function j2e(e,t){return e.map(t).join("")}var i6=1,Gf=1,Uj=0,ro=0,gr=0,Ch="";function o6(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:i6,column:Gf,length:s,return:""}}function fp(e,t){return z2e(o6("",null,null,"",null,null,0),e,{length:-e.length},t)}function W2e(){return gr}function q2e(){return gr=ro>0?Qr(Ch,--ro):0,Gf--,gr===10&&(Gf=1,i6--),gr}function Eo(){return gr=ro<Uj?Qr(Ch,ro++):0,Gf++,gr===10&&(Gf=1,i6++),gr}function Ea(){return Qr(Ch,ro)}function J4(){return ro}function lg(e,t){return gm(Ch,e,t)}function vm(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Vj(e){return i6=Gf=1,Uj=la(Ch=e),ro=0,[]}function jj(e){return Ch="",e}function e5(e){return zj(lg(ro-1,ZC(e===91?e+2:e===40?e+1:e)))}function K2e(e){for(;(gr=Ea())&&gr<33;)Eo();return vm(e)>2||vm(gr)>3?"":" "}function G2e(e,t){for(;--t&&Eo()&&!(gr<48||gr>102||gr>57&&gr<65||gr>70&&gr<97););return lg(e,J4()+(t<6&&Ea()==32&&Eo()==32))}function ZC(e){for(;Eo();)switch(gr){case e:return ro;case 34:case 39:e!==34&&e!==39&&ZC(gr);break;case 40:e===41&&ZC(e);break;case 92:Eo();break}return ro}function Y2e(e,t){for(;Eo()&&e+gr!==47+10;)if(e+gr===42+42&&Ea()===47)break;return"/*"+lg(t,ro-1)+"*"+r6(e===47?e:Eo())}function Q2e(e){for(;!vm(Ea());)Eo();return lg(e,ro)}function X2e(e){return jj(t5("",null,null,null,[""],e=Vj(e),0,[0],e))}function t5(e,t,n,r,i,o,s,a,c){for(var u=0,d=0,f=s,h=0,p=0,m=0,v=1,b=1,x=1,C=0,w="",S=i,T=o,E=r,k=w;b;)switch(m=C,C=Eo()){case 40:if(m!=108&&Qr(k,f-1)==58){XC(k+=dn(e5(C),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:k+=e5(C);break;case 9:case 10:case 13:case 32:k+=K2e(m);break;case 92:k+=G2e(J4()-1,7);continue;case 47:switch(Ea()){case 42:case 47:k2(Z2e(Y2e(Eo(),J4()),t,n),c);break;default:k+="/"}break;case 123*v:a[u++]=la(k)*x;case 125*v:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+d:x==-1&&(k=dn(k,/\f/g,"")),p>0&&la(k)-f&&k2(p>32?TP(k+";",r,n,f-1):TP(dn(k," ","")+";",r,n,f-2),c);break;case 59:k+=";";default:if(k2(E=EP(k,t,n,u,d,i,a,w,S=[],T=[],f),o),C===123)if(d===0)t5(k,t,E,E,S,o,f,a,T);else switch(h===99&&Qr(k,3)===110?100:h){case 100:case 108:case 109:case 115:t5(e,E,E,r&&k2(EP(e,E,E,0,0,i,a,w,i,S=[],f),T),i,T,f,a,r?S:T);break;default:t5(k,E,E,E,[""],T,0,a,T)}}u=d=p=0,v=x=1,w=k="",f=s;break;case 58:f=1+la(k),p=m;default:if(v<1){if(C==123)--v;else if(C==125&&v++==0&&q2e()==125)continue}switch(k+=r6(C),C*v){case 38:x=d>0?1:(k+="\f",-1);break;case 44:a[u++]=(la(k)-1)*x,x=1;break;case 64:Ea()===45&&(k+=e5(Eo())),h=Ea(),d=f=la(w=k+=Q2e(J4())),C++;break;case 45:m===45&&la(k)==2&&(v=0)}}return o}function EP(e,t,n,r,i,o,s,a,c,u,d){for(var f=i-1,h=i===0?o:[""],p=$T(h),m=0,v=0,b=0;m<r;++m)for(var x=0,C=gm(e,f+1,f=H2e(v=s[m])),w=e;x<p;++x)(w=zj(v>0?h[x]+" "+C:dn(C,/&\f/g,h[x])))&&(c[b++]=w);return o6(e,t,n,i===0?_T:a,c,u,d)}function Z2e(e,t,n){return o6(e,t,n,Bj,r6(W2e()),gm(e,2,-2),0)}function TP(e,t,n,r){return o6(e,t,n,AT,gm(e,0,r),gm(e,r+1,-1),r)}function Cf(e,t){for(var n="",r=$T(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function J2e(e,t,n,r){switch(e.type){case B2e:if(e.children.length)break;case F2e:case AT:return e.return=e.return||e.value;case Bj:return"";case Hj:return e.return=e.value+"{"+Cf(e.children,r)+"}";case _T:e.value=e.props.join(",")}return la(n=Cf(e.children,r))?e.return=e.value+"{"+n+"}":""}function e4e(e){var t=$T(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function t4e(e){return function(t){t.root||(t=t.return)&&e(t)}}function n4e(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var r4e=function(t,n,r){for(var i=0,o=0;i=o,o=Ea(),i===38&&o===12&&(n[r]=1),!vm(o);)Eo();return lg(t,ro)},i4e=function(t,n){var r=-1,i=44;do switch(vm(i)){case 0:i===38&&Ea()===12&&(n[r]=1),t[r]+=r4e(ro-1,n,r);break;case 2:t[r]+=e5(i);break;case 4:if(i===44){t[++r]=Ea()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=r6(i)}while(i=Eo());return t},o4e=function(t,n){return jj(i4e(Vj(t),n))},kP=new WeakMap,s4e=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!kP.get(r))&&!i){kP.set(t,!0);for(var o=[],s=o4e(n,o),a=r.props,c=0,u=0;c<s.length;c++)for(var d=0;d<a.length;d++,u++)t.props[u]=o[c]?s[c].replace(/&\f/g,a[d]):a[d]+" "+s[c]}}},a4e=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Wj(e,t){switch(U2e(e,t)){case 5103:return cn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return cn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return cn+e+V3+e+ui+e+e;case 6828:case 4268:return cn+e+ui+e+e;case 6165:return cn+e+ui+"flex-"+e+e;case 5187:return cn+e+dn(e,/(\w+).+(:[^]+)/,cn+"box-$1$2"+ui+"flex-$1$2")+e;case 5443:return cn+e+ui+"flex-item-"+dn(e,/flex-|-self/,"")+e;case 4675:return cn+e+ui+"flex-line-pack"+dn(e,/align-content|flex-|-self/,"")+e;case 5548:return cn+e+ui+dn(e,"shrink","negative")+e;case 5292:return cn+e+ui+dn(e,"basis","preferred-size")+e;case 6060:return cn+"box-"+dn(e,"-grow","")+cn+e+ui+dn(e,"grow","positive")+e;case 4554:return cn+dn(e,/([^-])(transform)/g,"$1"+cn+"$2")+e;case 6187:return dn(dn(dn(e,/(zoom-|grab)/,cn+"$1"),/(image-set)/,cn+"$1"),e,"")+e;case 5495:case 3959:return dn(e,/(image-set\([^]*)/,cn+"$1$`$1");case 4968:return dn(dn(e,/(.+:)(flex-)?(.*)/,cn+"box-pack:$3"+ui+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+cn+e+e;case 4095:case 3583:case 4068:case 2532:return dn(e,/(.+)-inline(.+)/,cn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(la(e)-1-t>6)switch(Qr(e,t+1)){case 109:if(Qr(e,t+4)!==45)break;case 102:return dn(e,/(.+:)(.+)-([^]+)/,"$1"+cn+"$2-$3$1"+V3+(Qr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~XC(e,"stretch")?Wj(dn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qr(e,t+1)!==115)break;case 6444:switch(Qr(e,la(e)-3-(~XC(e,"!important")&&10))){case 107:return dn(e,":",":"+cn)+e;case 101:return dn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cn+(Qr(e,14)===45?"inline-":"")+"box$3$1"+cn+"$2$3$1"+ui+"$2box$3")+e}break;case 5936:switch(Qr(e,t+11)){case 114:return cn+e+ui+dn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return cn+e+ui+dn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return cn+e+ui+dn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return cn+e+ui+e+e}return e}var l4e=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case AT:t.return=Wj(t.value,t.length);break;case Hj:return Cf([fp(t,{value:dn(t.value,"@","@"+cn)})],i);case _T:if(t.length)return j2e(t.props,function(o){switch(V2e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cf([fp(t,{props:[dn(o,/:(read-\w+)/,":"+V3+"$1")]})],i);case"::placeholder":return Cf([fp(t,{props:[dn(o,/:(plac\w+)/,":"+cn+"input-$1")]}),fp(t,{props:[dn(o,/:(plac\w+)/,":"+V3+"$1")]}),fp(t,{props:[dn(o,/:(plac\w+)/,ui+"input-$1")]})],i)}return""})}},c4e=[l4e],u4e=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||c4e,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),x=1;x<b.length;x++)o[b[x]]=!0;a.push(v)});var c,u=[s4e,a4e];{var d,f=[J2e,t4e(function(v){d.insert(v)})],h=e4e(u.concat(i,f)),p=function(b){return Cf(X2e(b),h)};c=function(b,x,C,w){d=C,p(b?b+"{"+x.styles+"}":x.styles),w&&(m.inserted[x.name]=!0)}}var m={key:n,sheet:new N2e({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return m.sheet.hydrate(a),m},qj={exports:{}},vn={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ur=typeof Symbol=="function"&&Symbol.for,DT=Ur?Symbol.for("react.element"):60103,OT=Ur?Symbol.for("react.portal"):60106,s6=Ur?Symbol.for("react.fragment"):60107,a6=Ur?Symbol.for("react.strict_mode"):60108,l6=Ur?Symbol.for("react.profiler"):60114,c6=Ur?Symbol.for("react.provider"):60109,u6=Ur?Symbol.for("react.context"):60110,PT=Ur?Symbol.for("react.async_mode"):60111,d6=Ur?Symbol.for("react.concurrent_mode"):60111,f6=Ur?Symbol.for("react.forward_ref"):60112,h6=Ur?Symbol.for("react.suspense"):60113,d4e=Ur?Symbol.for("react.suspense_list"):60120,p6=Ur?Symbol.for("react.memo"):60115,m6=Ur?Symbol.for("react.lazy"):60116,f4e=Ur?Symbol.for("react.block"):60121,h4e=Ur?Symbol.for("react.fundamental"):60117,p4e=Ur?Symbol.for("react.responder"):60118,m4e=Ur?Symbol.for("react.scope"):60119;function Mo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case DT:switch(e=e.type,e){case PT:case d6:case s6:case l6:case a6:case h6:return e;default:switch(e=e&&e.$$typeof,e){case u6:case f6:case m6:case p6:case c6:return e;default:return t}}case OT:return t}}}function Kj(e){return Mo(e)===d6}vn.AsyncMode=PT;vn.ConcurrentMode=d6;vn.ContextConsumer=u6;vn.ContextProvider=c6;vn.Element=DT;vn.ForwardRef=f6;vn.Fragment=s6;vn.Lazy=m6;vn.Memo=p6;vn.Portal=OT;vn.Profiler=l6;vn.StrictMode=a6;vn.Suspense=h6;vn.isAsyncMode=function(e){return Kj(e)||Mo(e)===PT};vn.isConcurrentMode=Kj;vn.isContextConsumer=function(e){return Mo(e)===u6};vn.isContextProvider=function(e){return Mo(e)===c6};vn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===DT};vn.isForwardRef=function(e){return Mo(e)===f6};vn.isFragment=function(e){return Mo(e)===s6};vn.isLazy=function(e){return Mo(e)===m6};vn.isMemo=function(e){return Mo(e)===p6};vn.isPortal=function(e){return Mo(e)===OT};vn.isProfiler=function(e){return Mo(e)===l6};vn.isStrictMode=function(e){return Mo(e)===a6};vn.isSuspense=function(e){return Mo(e)===h6};vn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===s6||e===d6||e===l6||e===a6||e===h6||e===d4e||typeof e=="object"&&e!==null&&(e.$$typeof===m6||e.$$typeof===p6||e.$$typeof===c6||e.$$typeof===u6||e.$$typeof===f6||e.$$typeof===h4e||e.$$typeof===p4e||e.$$typeof===m4e||e.$$typeof===f4e)};vn.typeOf=Mo;(function(e){e.exports=vn})(qj);var Gj=qj.exports,g4e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},v4e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yj={};Yj[Gj.ForwardRef]=g4e;Yj[Gj.Memo]=v4e;var y4e=!0;function b4e(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var Qj=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||y4e===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},x4e=function(t,n,r){Qj(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function C4e(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var w4e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},S4e=/[A-Z]|^ms/g,E4e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xj=function(t){return t.charCodeAt(1)===45},_P=function(t){return t!=null&&typeof t!="boolean"},J8=n4e(function(e){return Xj(e)?e:e.replace(S4e,"-$&").toLowerCase()}),AP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(E4e,function(r,i,o){return ca={name:i,styles:o,next:ca},i})}return w4e[t]!==1&&!Xj(t)&&typeof n=="number"&&n!==0?n+"px":n};function ym(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ca={name:n.name,styles:n.styles,next:ca},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ca={name:r.name,styles:r.styles,next:ca},r=r.next;var i=n.styles+";";return i}return T4e(e,t,n)}case"function":{if(e!==void 0){var o=ca,s=n(e);return ca=o,ym(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function T4e(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ym(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":_P(s)&&(r+=J8(o)+":"+AP(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var a=0;a<s.length;a++)_P(s[a])&&(r+=J8(o)+":"+AP(o,s[a])+";");else{var c=ym(e,t,s);switch(o){case"animation":case"animationName":{r+=J8(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var $P=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ca,Zj=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";ca=void 0;var s=t[0];s==null||s.raw===void 0?(i=!1,o+=ym(r,n,s)):o+=s[0];for(var a=1;a<t.length;a++)o+=ym(r,n,t[a]),i&&(o+=s[a]);$P.lastIndex=0;for(var c="",u;(u=$P.exec(o))!==null;)c+="-"+u[1];var d=C4e(o)+c;return{name:d,styles:o,next:ca}},k4e=function(t){return t()},_4e=D0["useInsertionEffect"]?D0["useInsertionEffect"]:!1,A4e=_4e||k4e,RT={}.hasOwnProperty,Jj=y.exports.createContext(typeof HTMLElement<"u"?u4e({key:"css"}):null);Jj.Provider;var $4e=function(t){return y.exports.forwardRef(function(n,r){var i=y.exports.useContext(Jj);return t(n,i,r)})},D4e=y.exports.createContext({}),JC="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",O4e=function(t,n){var r={};for(var i in n)RT.call(n,i)&&(r[i]=n[i]);return r[JC]=t,r},P4e=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Qj(n,r,i),A4e(function(){return x4e(n,r,i)}),null},R4e=$4e(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[JC],o=[r],s="";typeof e.className=="string"?s=b4e(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=Zj(o,void 0,y.exports.useContext(D4e));s+=t.key+"-"+a.name;var c={};for(var u in e)RT.call(e,u)&&u!=="css"&&u!==JC&&(c[u]=e[u]);return c.ref=n,c.className=s,g(z,{children:[l(P4e,{cache:t,serialized:a,isStringTag:typeof i=="string"}),l(i,{...c})]})}),M4e=R4e,At=function(t,n){var r=arguments;if(n==null||!RT.call(n,"css"))return y.exports.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=M4e,o[1]=O4e(t,n);for(var s=2;s<i;s++)o[s]=r[s];return y.exports.createElement.apply(null,o)};function MT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zj(t)}var I4e=function(){var t=MT.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function L4e(e){if(Array.isArray(e))return e}function N4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function F4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Or(e,t){return L4e(e)||N4e(e,t)||Nj(e,t)||F4e()}function B4e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Fa(e,t){if(e==null)return{};var n=B4e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function H4e(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const z4e=["top","right","bottom","left"],uu=Math.min,mo=Math.max,j3=Math.round,_2=Math.floor,du=e=>({x:e,y:e}),U4e={left:"right",right:"left",bottom:"top",top:"bottom"},V4e={start:"end",end:"start"};function ew(e,t,n){return mo(e,uu(t,n))}function Pl(e,t){return typeof e=="function"?e(t):e}function Rl(e){return e.split("-")[0]}function wh(e){return e.split("-")[1]}function IT(e){return e==="x"?"y":"x"}function LT(e){return e==="y"?"height":"width"}function Sh(e){return["top","bottom"].includes(Rl(e))?"y":"x"}function NT(e){return IT(Sh(e))}function j4e(e,t,n){n===void 0&&(n=!1);const r=wh(e),i=NT(e),o=LT(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=W3(s)),[s,W3(s)]}function W4e(e){const t=W3(e);return[tw(e),t,tw(t)]}function tw(e){return e.replace(/start|end/g,t=>V4e[t])}function q4e(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function K4e(e,t,n,r){const i=wh(e);let o=q4e(Rl(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(tw)))),o}function W3(e){return e.replace(/left|right|bottom|top/g,t=>U4e[t])}function G4e(e){return{top:0,right:0,bottom:0,left:0,...e}}function eW(e){return typeof e!="number"?G4e(e):{top:e,right:e,bottom:e,left:e}}function q3(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function DP(e,t,n){let{reference:r,floating:i}=e;const o=Sh(t),s=NT(t),a=LT(s),c=Rl(t),u=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(wh(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const Y4e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=DP(u,r,c),h=r,p={},m=0;for(let v=0;v<a.length;v++){const{name:b,fn:x}=a[v],{x:C,y:w,data:S,reset:T}=await x({x:d,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});if(d=C!=null?C:d,f=w!=null?w:f,p={...p,[b]:{...p[b],...S}},T&&m<=50){m++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(u=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:d,y:f}=DP(u,h,c)),v=-1;continue}}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function bm(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Pl(t,e),m=eW(p),b=a[h?f==="floating"?"reference":"floating":f],x=q3(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),C=f==="floating"?{...s.floating,x:r,y:i}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},T=q3(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:C,offsetParent:w,strategy:c}):C);return{top:(x.top-T.top+m.top)/S.y,bottom:(T.bottom-x.bottom+m.bottom)/S.y,left:(x.left-T.left+m.left)/S.x,right:(T.right-x.right+m.right)/S.x}}const OP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Pl(e,t)||{};if(u==null)return{};const f=eW(d),h={x:n,y:r},p=NT(i),m=LT(p),v=await s.getDimensions(u),b=p==="y",x=b?"top":"left",C=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[p]-h[p]-o.floating[m],T=h[p]-o.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=E?E[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(E)))&&(k=a.floating[w]||o.floating[m]);const _=S/2-T/2,O=k/2-v[m]/2-1,D=uu(f[x],O),L=uu(f[C],O),N=D,j=k-v[m]-L,G=k/2-v[m]/2+_,X=ew(N,G,j),re=!c.arrow&&wh(i)!=null&&G!=X&&o.reference[m]/2-(G<N?D:L)-v[m]/2<0,oe=re?G<N?G-N:G-j:0;return{[p]:h[p]+oe,data:{[p]:X,centerOffset:G-X-oe,...re&&{alignmentOffset:oe}},reset:re}}}),Q4e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...b}=Pl(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Rl(i),C=Rl(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=h||(C||!v?[W3(a)]:W4e(a));!h&&m!=="none"&&S.push(...K4e(a,v,m,w));const T=[a,...S],E=await bm(t,b),k=[];let _=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&k.push(E[x]),f){const N=j4e(i,s,w);k.push(E[N[0]],E[N[1]])}if(_=[..._,{placement:i,overflows:k}],!k.every(N=>N<=0)){var O,D;const N=(((O=o.flip)==null?void 0:O.index)||0)+1,j=T[N];if(j)return{data:{index:N,overflows:_},reset:{placement:j}};let G=(D=_.filter(X=>X.overflows[0]<=0).sort((X,re)=>X.overflows[1]-re.overflows[1])[0])==null?void 0:D.placement;if(!G)switch(p){case"bestFit":{var L;const X=(L=_.map(re=>[re.placement,re.overflows.filter(oe=>oe>0).reduce((oe,U)=>oe+U,0)]).sort((re,oe)=>re[1]-oe[1])[0])==null?void 0:L[0];X&&(G=X);break}case"initialPlacement":G=a;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function PP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RP(e){return z4e.some(t=>e[t]>=0)}const X4e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Pl(e,t);switch(r){case"referenceHidden":{const o=await bm(t,{...i,elementContext:"reference"}),s=PP(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:RP(s)}}}case"escaped":{const o=await bm(t,{...i,altBoundary:!0}),s=PP(o,n.floating);return{data:{escapedOffsets:s,escaped:RP(s)}}}default:return{}}}}};async function Z4e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Rl(n),a=wh(n),c=Sh(n)==="y",u=["left","top"].includes(s)?-1:1,d=o&&c?-1:1,f=Pl(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const J4e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Z4e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},e5e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x,y:C}=b;return{x,y:C}}},...c}=Pl(e,t),u={x:n,y:r},d=await bm(t,c),f=Sh(Rl(i)),h=IT(f);let p=u[h],m=u[f];if(o){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",C=p+d[b],w=p-d[x];p=ew(C,p,w)}if(s){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",C=m+d[b],w=m-d[x];m=ew(C,m,w)}const v=a.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},t5e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Pl(e,t),d={x:n,y:r},f=Sh(i),h=IT(f);let p=d[h],m=d[f];const v=Pl(a,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=h==="y"?"height":"width",S=o.reference[h]-o.floating[w]+b.mainAxis,T=o.reference[h]+o.reference[w]-b.mainAxis;p<S?p=S:p>T&&(p=T)}if(u){var x,C;const w=h==="y"?"width":"height",S=["top","left"].includes(Rl(i)),T=o.reference[f]-o.floating[w]+(S&&((x=s.offset)==null?void 0:x[f])||0)+(S?0:b.crossAxis),E=o.reference[f]+o.reference[w]+(S?0:((C=s.offset)==null?void 0:C[f])||0)-(S?b.crossAxis:0);m<T?m=T:m>E&&(m=E)}return{[h]:p,[f]:m}}}},n5e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:s=()=>{},...a}=Pl(e,t),c=await bm(t,a),u=Rl(n),d=wh(n),f=Sh(n)==="y",{width:h,height:p}=r.floating;let m,v;u==="top"||u==="bottom"?(m=u,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=u,m=d==="end"?"top":"bottom");const b=p-c[m],x=h-c[v],C=!t.middlewareData.shift;let w=b,S=x;if(f){const E=h-c.left-c.right;S=d||C?uu(x,E):E}else{const E=p-c.top-c.bottom;w=d||C?uu(b,E):E}if(C&&!d){const E=mo(c.left,0),k=mo(c.right,0),_=mo(c.top,0),O=mo(c.bottom,0);f?S=h-2*(E!==0||k!==0?E+k:mo(c.left,c.right)):w=p-2*(_!==0||O!==0?_+O:mo(c.top,c.bottom))}await s({...t,availableWidth:S,availableHeight:w});const T=await i.getDimensions(o.floating);return h!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function fu(e){return tW(e)?(e.nodeName||"").toLowerCase():"#document"}function To(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jl(e){var t;return(t=(tW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tW(e){return e instanceof Node||e instanceof To(e).Node}function Ml(e){return e instanceof Element||e instanceof To(e).Element}function Oa(e){return e instanceof HTMLElement||e instanceof To(e).HTMLElement}function MP(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof To(e).ShadowRoot}function cg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=us(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function r5e(e){return["table","td","th"].includes(fu(e))}function FT(e){const t=BT(),n=us(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function i5e(e){let t=Yf(e);for(;Oa(t)&&!g6(t);){if(FT(t))return t;t=Yf(t)}return null}function BT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function g6(e){return["html","body","#document"].includes(fu(e))}function us(e){return To(e).getComputedStyle(e)}function v6(e){return Ml(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Yf(e){if(fu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MP(e)&&e.host||jl(e);return MP(t)?t.host:t}function nW(e){const t=Yf(e);return g6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oa(t)&&cg(t)?t:nW(t)}function xm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=nW(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=To(i);return o?t.concat(s,s.visualViewport||[],cg(i)?i:[],s.frameElement&&n?xm(s.frameElement):[]):t.concat(i,xm(i,[],n))}function rW(e){const t=us(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Oa(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=j3(n)!==o||j3(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function HT(e){return Ml(e)?e:e.contextElement}function wf(e){const t=HT(e);if(!Oa(t))return du(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=rW(t);let s=(o?j3(n.width):n.width)/r,a=(o?j3(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const o5e=du(0);function iW(e){const t=To(e);return!BT()||!t.visualViewport?o5e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function s5e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==To(e)?!1:t}function Fd(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=HT(e);let s=du(1);t&&(r?Ml(r)&&(s=wf(r)):s=wf(e));const a=s5e(o,n,r)?iW(o):du(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const h=To(o),p=r&&Ml(r)?To(r):r;let m=h.frameElement;for(;m&&r&&p!==h;){const v=wf(m),b=m.getBoundingClientRect(),x=us(m),C=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,w=b.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=C,u+=w,m=To(m).frameElement}}return q3({width:d,height:f,x:c,y:u})}function a5e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Oa(n),o=jl(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a=du(1);const c=du(0);if((i||!i&&r!=="fixed")&&((fu(n)!=="body"||cg(o))&&(s=v6(n)),Oa(n))){const u=Fd(n);a=wf(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function l5e(e){return Array.from(e.getClientRects())}function oW(e){return Fd(jl(e)).left+v6(e).scrollLeft}function c5e(e){const t=jl(e),n=v6(e),r=e.ownerDocument.body,i=mo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=mo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+oW(e);const a=-n.scrollTop;return us(r).direction==="rtl"&&(s+=mo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function u5e(e,t){const n=To(e),r=jl(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const u=BT();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function d5e(e,t){const n=Fd(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Oa(e)?wf(e):du(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=r*o.y;return{width:s,height:a,x:c,y:u}}function IP(e,t,n){let r;if(t==="viewport")r=u5e(e,n);else if(t==="document")r=c5e(jl(e));else if(Ml(t))r=d5e(t,n);else{const i=iW(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return q3(r)}function sW(e,t){const n=Yf(e);return n===t||!Ml(n)||g6(n)?!1:us(n).position==="fixed"||sW(n,t)}function f5e(e,t){const n=t.get(e);if(n)return n;let r=xm(e,[],!1).filter(a=>Ml(a)&&fu(a)!=="body"),i=null;const o=us(e).position==="fixed";let s=o?Yf(e):e;for(;Ml(s)&&!g6(s);){const a=us(s),c=FT(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||cg(s)&&!c&&sW(e,s))?r=r.filter(d=>d!==s):i=a,s=Yf(s)}return t.set(e,r),r}function h5e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?f5e(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,d)=>{const f=IP(t,d,i);return u.top=mo(f.top,u.top),u.right=uu(f.right,u.right),u.bottom=uu(f.bottom,u.bottom),u.left=mo(f.left,u.left),u},IP(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function p5e(e){return rW(e)}function m5e(e,t,n){const r=Oa(t),i=jl(t),o=n==="fixed",s=Fd(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=du(0);if(r||!r&&!o)if((fu(t)!=="body"||cg(i))&&(a=v6(t)),r){const u=Fd(t,!0,o,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else i&&(c.x=oW(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function LP(e,t){return!Oa(e)||us(e).position==="fixed"?null:t?t(e):e.offsetParent}function aW(e,t){const n=To(e);if(!Oa(e))return n;let r=LP(e,t);for(;r&&r5e(r)&&us(r).position==="static";)r=LP(r,t);return r&&(fu(r)==="html"||fu(r)==="body"&&us(r).position==="static"&&!FT(r))?n:r||i5e(e)||n}const g5e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||aW,o=this.getDimensions;return{reference:m5e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function v5e(e){return us(e).direction==="rtl"}const y5e={convertOffsetParentRelativeRectToViewportRelativeRect:a5e,getDocumentElement:jl,getClippingRect:h5e,getOffsetParent:aW,getElementRects:g5e,getClientRects:l5e,getDimensions:p5e,getScale:wf,isElement:Ml,isRTL:v5e};function b5e(e,t){let n=null,r;const i=jl(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=_2(d),m=_2(i.clientWidth-(u+f)),v=_2(i.clientHeight-(d+h)),b=_2(u),C={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:mo(0,uu(1,c))||1};let w=!0;function S(T){const E=T[0].intersectionRatio;if(E!==c){if(!w)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return s(!0),o}function lW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=HT(e),d=i||o?[...u?xm(u):[],...xm(t)]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const f=u&&a?b5e(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(x=>{let[C]=x;C&&C.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,v=c?Fd(e):null;c&&b();function b(){const x=Fd(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,m=requestAnimationFrame(b)}return n(),()=>{d.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const x5e=(e,t,n)=>{const r=new Map,i={platform:y5e,...n},o={...i.platform,_c:r};return Y4e(e,t,{...i,platform:o})};var nw=y.exports.useLayoutEffect,C5e=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],K3=function(){};function w5e(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function S5e(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(w5e(e,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var NP=function(t){return R5e(t)?t.filter(Boolean):Nd(t)==="object"&&t!==null?[t]:[]},cW=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Fa(t,C5e);return bt({},n)},ir=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,a=t.className;return{css:o(n,t),className:i(r!=null?r:{},s(n,t),a)}};function E5e(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function y6(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function T5e(e){return y6(e)?window.innerHeight:e.clientHeight}function uW(e){return y6(e)?window.pageYOffset:e.scrollTop}function G3(e,t){if(y6(e)){window.scrollTo(0,t);return}e.scrollTop=t}function k5e(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function _5e(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function A2(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:K3,i=uW(e),o=t-i,s=10,a=0;function c(){a+=s;var u=_5e(a,i,o,n);G3(e,u),a<n?window.requestAnimationFrame(c):r(e)}c()}function FP(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?G3(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&G3(e,Math.max(t.offsetTop-i,0))}function A5e(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function BP(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function $5e(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var dW=!1,D5e={get passive(){return dW=!0}},$2=typeof window<"u"?window:{};$2.addEventListener&&$2.removeEventListener&&($2.addEventListener("p",K3,D5e),$2.removeEventListener("p",K3,!1));var O5e=dW;function P5e(e){return e!=null}function R5e(e){return Array.isArray(e)}function D2(e,t,n){return e?t:n}var M5e=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(s){var a=Or(s,1),c=a[0];return!r.includes(c)});return o.reduce(function(s,a){var c=Or(a,2),u=c[0],d=c[1];return s[u]=d,s},{})},I5e=["children","innerProps"],L5e=["children","innerProps"];function N5e(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,c=k5e(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,m=h.height,v=h.top,b=n.offsetParent.getBoundingClientRect(),x=b.top,C=s?window.innerHeight:T5e(c),w=uW(c),S=parseInt(getComputedStyle(n).marginBottom,10),T=parseInt(getComputedStyle(n).marginTop,10),E=x-T,k=C-v,_=E+w,O=f-w-v,D=p-C+w+S,L=w+v-T,N=160;switch(i){case"auto":case"bottom":if(k>=m)return{placement:"bottom",maxHeight:t};if(O>=m&&!s)return o&&A2(c,D,N),{placement:"bottom",maxHeight:t};if(!s&&O>=r||s&&k>=r){o&&A2(c,D,N);var j=s?k-S:O-S;return{placement:"bottom",maxHeight:j}}if(i==="auto"||s){var G=t,X=s?E:_;return X>=r&&(G=Math.min(X-S-a,t)),{placement:"top",maxHeight:G}}if(i==="bottom")return o&&G3(c,D),{placement:"bottom",maxHeight:t};break;case"top":if(E>=m)return{placement:"top",maxHeight:t};if(_>=m&&!s)return o&&A2(c,L,N),{placement:"top",maxHeight:t};if(!s&&_>=r||s&&E>=r){var re=t;return(!s&&_>=r||s&&E>=r)&&(re=s?E-T:_-T),o&&A2(c,L,N),{placement:"top",maxHeight:re}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function F5e(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var fW=function(t){return t==="auto"?"bottom":t},B5e=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,a=o.spacing,c=o.colors;return bt((r={label:"menu"},nf(r,F5e(i),"100%"),nf(r,"position","absolute"),nf(r,"width","100%"),nf(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},hW=y.exports.createContext(null),H5e=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,c=t.theme,u=y.exports.useContext(hW)||{},d=u.setPortalPlacement,f=y.exports.useRef(null),h=y.exports.useState(i),p=Or(h,2),m=p[0],v=p[1],b=y.exports.useState(null),x=Or(b,2),C=x[0],w=x[1],S=c.spacing.controlHeight;return nw(function(){var T=f.current;if(!!T){var E=s==="fixed",k=a&&!E,_=N5e({maxHeight:i,menuEl:T,minHeight:r,placement:o,shouldScroll:k,isFixedPosition:E,controlHeight:S});v(_.maxHeight),w(_.placement),d==null||d(_.placement)}},[i,o,s,a,r,d,S]),n({ref:f,placerProps:bt(bt({},t),{},{placement:C||fW(o),maxHeight:m})})},z5e=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return At("div",ue({},ir(t,"menu",{menu:!0}),{ref:r},i),n)},U5e=z5e,V5e=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return bt({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},j5e=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return At("div",ue({},ir(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},pW=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return bt({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},W5e=pW,q5e=pW,K5e=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Fa(t,I5e);return At("div",ue({},ir(bt(bt({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},G5e=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Fa(t,L5e);return At("div",ue({},ir(bt(bt({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},Y5e=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},Q5e=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,a=t.menuPosition,c=y.exports.useRef(null),u=y.exports.useRef(null),d=y.exports.useState(fW(s)),f=Or(d,2),h=f[0],p=f[1],m=y.exports.useMemo(function(){return{setPortalPlacement:p}},[]),v=y.exports.useState(null),b=Or(v,2),x=b[0],C=b[1],w=y.exports.useCallback(function(){if(!!i){var k=A5e(i),_=a==="fixed"?0:window.pageYOffset,O=k[h]+_;(O!==(x==null?void 0:x.offset)||k.left!==(x==null?void 0:x.rect.left)||k.width!==(x==null?void 0:x.rect.width))&&C({offset:O,rect:k})}},[i,a,h,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);nw(function(){w()},[w]);var S=y.exports.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&c.current&&(u.current=lW(i,c.current,w,{elementResize:"ResizeObserver"in window}))},[i,w]);nw(function(){S()},[S]);var T=y.exports.useCallback(function(k){c.current=k,S()},[S]);if(!n&&a!=="fixed"||!x)return null;var E=At("div",ue({ref:T},ir(bt(bt({},t),{},{offset:x.offset,position:a,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return At(hW.Provider,{value:m},n?Lr.exports.createPortal(E,n):E)},X5e=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Z5e=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return At("div",ue({},ir(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},J5e=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return bt({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},e3e=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return At("div",ue({},ir(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},t3e=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},n3e=function(t){var n=t.children,r=t.innerProps;return At("div",ue({},ir(t,"indicatorsContainer",{indicators:!0}),r),n)},HP,r3e=["size"],i3e=["innerProps","isRtl","size"],o3e={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},mW=function(t){var n=t.size,r=Fa(t,r3e);return At("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:o3e},r))},zT=function(t){return At(mW,ue({size:20},t),At("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},gW=function(t){return At(mW,ue({size:20},t),At("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},vW=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return bt({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},s3e=vW,a3e=function(t){var n=t.children,r=t.innerProps;return At("div",ue({},ir(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||At(gW,null))},l3e=vW,c3e=function(t){var n=t.children,r=t.innerProps;return At("div",ue({},ir(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||At(zT,null))},u3e=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return bt({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},d3e=function(t){var n=t.innerProps;return At("span",ue({},n,ir(t,"indicatorSeparator",{"indicator-separator":!0})))},f3e=I4e(HP||(HP=H4e([`
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
`]))),h3e=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,s=o.colors,a=o.spacing.baseUnit;return bt({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},eb=function(t){var n=t.delay,r=t.offset;return At("span",{css:MT({animation:"".concat(f3e," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},p3e=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,s=Fa(t,i3e);return At("div",ue({},ir(bt(bt({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),At(eb,{delay:0,offset:r}),At(eb,{delay:160,offset:!0}),At(eb,{delay:320,offset:!r}))},m3e=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,s=o.colors,a=o.borderRadius,c=o.spacing;return bt({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},g3e=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return At("div",ue({ref:o},ir(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),s),n)},v3e=g3e,y3e=["data"],b3e=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},x3e=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,s=t.Heading,a=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return At("div",ue({},ir(t,"group",{group:!0}),c),At(s,ue({},a,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),u),At("div",null,n))},C3e=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return bt({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},w3e=function(t){var n=cW(t);n.data;var r=Fa(n,y3e);return At("div",ue({},ir(t,"groupHeading",{"group-heading":!0}),r))},S3e=x3e,E3e=["innerRef","isDisabled","isHidden","inputClassName"],T3e=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,s=o.spacing,a=o.colors;return bt(bt({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},k3e),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},yW={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},k3e={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":bt({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},yW)},_3e=function(t){return bt({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},yW)},A3e=function(t){var n=t.cx,r=t.value,i=cW(t),o=i.innerRef,s=i.isDisabled,a=i.isHidden,c=i.inputClassName,u=Fa(i,E3e);return At("div",ue({},ir(t,"input",{"input-container":!0}),{"data-value":r||""}),At("input",ue({className:n({input:!0},c),ref:o,style:_3e(a),disabled:s},u)))},$3e=A3e,D3e=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return bt({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},O3e=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,s=t.cropWithEllipsis;return bt({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},P3e=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors,a=t.isFocused;return bt({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},bW=function(t){var n=t.children,r=t.innerProps;return At("div",r,n)},R3e=bW,M3e=bW;function I3e(e){var t=e.children,n=e.innerProps;return At("div",ue({role:"button"},n),t||At(zT,{size:14}))}var L3e=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,s=t.isDisabled,a=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return At(u,{data:i,innerProps:bt(bt({},ir(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:c},At(d,{data:i,innerProps:bt({},ir(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),At(f,{data:i,innerProps:bt(bt({},ir(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:c}))},N3e=L3e,F3e=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.theme,a=s.spacing,c=s.colors;return bt({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?c.primary:i?c.primary25:"transparent",color:r?c.neutral20:o?c.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?c.primary:c.primary50}})},B3e=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.innerRef,a=t.innerProps;return At("div",ue({},ir(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},a),n)},H3e=B3e,z3e=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return bt({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},U3e=function(t){var n=t.children,r=t.innerProps;return At("div",ue({},ir(t,"placeholder",{placeholder:!0}),r),n)},V3e=U3e,j3e=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,s=i.colors;return bt({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},W3e=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return At("div",ue({},ir(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},q3e=W3e,K3e={ClearIndicator:c3e,Control:v3e,DropdownIndicator:a3e,DownChevron:gW,CrossIcon:zT,Group:S3e,GroupHeading:w3e,IndicatorsContainer:n3e,IndicatorSeparator:d3e,Input:$3e,LoadingIndicator:p3e,Menu:U5e,MenuList:j5e,MenuPortal:Q5e,LoadingMessage:G5e,NoOptionsMessage:K5e,MultiValue:N3e,MultiValueContainer:R3e,MultiValueLabel:M3e,MultiValueRemove:I3e,Option:H3e,Placeholder:V3e,SelectContainer:Z5e,SingleValue:q3e,ValueContainer:e3e},G3e=function(t){return bt(bt({},K3e),t.components)},zP=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Y3e(e,t){return!!(e===t||zP(e)&&zP(t))}function Q3e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Y3e(e[n],t[n]))return!1;return!0}function X3e(e,t){t===void 0&&(t=Q3e);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}var Z3e={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},J3e=function(t){return At("span",ue({css:Z3e},t))},UP=J3e,eve={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.isDisabled,o=t.tabSelectsValue,s=t.context;switch(s){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,s=o===void 0?"":o,a=t.selectValue,c=t.isDisabled,u=t.isSelected,d=function(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,r),".");if(n==="menu"){var f=c?" disabled":"",h="".concat(u?"selected":"focused").concat(f);return"option ".concat(s," ").concat(h,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},tve=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,s=t.isFocused,a=t.selectValue,c=t.selectProps,u=t.id,d=c.ariaLiveMessages,f=c.getOptionLabel,h=c.inputValue,p=c.isMulti,m=c.isOptionDisabled,v=c.isSearchable,b=c.menuIsOpen,x=c.options,C=c.screenReaderStatus,w=c.tabSelectsValue,S=c["aria-label"],T=c["aria-live"],E=y.exports.useMemo(function(){return bt(bt({},eve),d||{})},[d]),k=y.exports.useMemo(function(){var G="";if(n&&E.onChange){var X=n.option,re=n.options,oe=n.removedValue,U=n.removedValues,H=n.value,R=function(ye){return Array.isArray(ye)?null:ye},se=oe||X||R(H),ee=se?f(se):"",I=re||U||void 0,me=I?I.map(f):[],Se=bt({isDisabled:se&&m(se,a),label:ee,labels:me},n);G=E.onChange(Se)}return G},[n,E,m,a,f]),_=y.exports.useMemo(function(){var G="",X=r||i,re=!!(r&&a&&a.includes(r));if(X&&E.onFocus){var oe={focused:X,label:f(X),isDisabled:m(X,a),isSelected:re,options:o,context:X===r?"menu":"value",selectValue:a};G=E.onFocus(oe)}return G},[r,i,f,m,E,o,a]),O=y.exports.useMemo(function(){var G="";if(b&&x.length&&E.onFilter){var X=C({count:o.length});G=E.onFilter({inputValue:h,resultsMessage:X})}return G},[o,h,b,E,x,C]),D=y.exports.useMemo(function(){var G="";if(E.guidance){var X=i?"value":b?"menu":"input";G=E.guidance({"aria-label":S,context:X,isDisabled:r&&m(r,a),isMulti:p,isSearchable:v,tabSelectsValue:w})}return G},[S,r,i,p,m,v,b,E,a,w]),L="".concat(_," ").concat(O," ").concat(D),N=At(y.exports.Fragment,null,At("span",{id:"aria-selection"},k),At("span",{id:"aria-context"},L)),j=(n==null?void 0:n.action)==="initial-input-focus";return At(y.exports.Fragment,null,At(UP,{id:u},j&&N),At(UP,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text"},s&&!j&&N))},nve=tve,rw=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],rve=new RegExp("["+rw.map(function(e){return e.letters}).join("")+"]","g"),xW={};for(var tb=0;tb<rw.length;tb++)for(var nb=rw[tb],rb=0;rb<nb.letters.length;rb++)xW[nb.letters[rb]]=nb.base;var CW=function(t){return t.replace(rve,function(n){return xW[n]})},ive=X3e(CW),VP=function(t){return t.replace(/^\s+|\s+$/g,"")},ove=function(t){return"".concat(t.label," ").concat(t.value)},sve=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=bt({ignoreCase:!0,ignoreAccents:!0,stringify:ove,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,s=i.ignoreAccents,a=i.stringify,c=i.trim,u=i.matchFrom,d=c?VP(r):r,f=c?VP(a(n)):a(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),s&&(d=ive(d),f=CW(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},ave=["innerRef"];function lve(e){var t=e.innerRef,n=Fa(e,ave),r=M5e(n,"onExited","in","enter","exit","appear");return At("input",ue({ref:t},r,{css:MT({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var cve=function(t){t.preventDefault(),t.stopPropagation()};function uve(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=y.exports.useRef(!1),a=y.exports.useRef(!1),c=y.exports.useRef(0),u=y.exports.useRef(null),d=y.exports.useCallback(function(b,x){if(u.current!==null){var C=u.current,w=C.scrollTop,S=C.scrollHeight,T=C.clientHeight,E=u.current,k=x>0,_=S-T-w,O=!1;_>x&&s.current&&(r&&r(b),s.current=!1),k&&a.current&&(o&&o(b),a.current=!1),k&&x>_?(n&&!s.current&&n(b),E.scrollTop=S,O=!0,s.current=!0):!k&&-x>w&&(i&&!a.current&&i(b),E.scrollTop=0,O=!0,a.current=!0),O&&cve(b)}},[n,r,i,o]),f=y.exports.useCallback(function(b){d(b,b.deltaY)},[d]),h=y.exports.useCallback(function(b){c.current=b.changedTouches[0].clientY},[]),p=y.exports.useCallback(function(b){var x=c.current-b.changedTouches[0].clientY;d(b,x)},[d]),m=y.exports.useCallback(function(b){if(!!b){var x=O5e?{passive:!1}:!1;b.addEventListener("wheel",f,x),b.addEventListener("touchstart",h,x),b.addEventListener("touchmove",p,x)}},[p,h,f]),v=y.exports.useCallback(function(b){!b||(b.removeEventListener("wheel",f,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",p,!1))},[p,h,f]);return y.exports.useEffect(function(){if(!!t){var b=u.current;return m(b),function(){v(b)}}},[t,m,v]),function(b){u.current=b}}var jP=["boxSizing","height","overflow","paddingRight","position"],WP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function qP(e){e.preventDefault()}function KP(e){e.stopPropagation()}function GP(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function YP(){return"ontouchstart"in window||navigator.maxTouchPoints}var QP=!!(typeof window<"u"&&window.document&&window.document.createElement),hp=0,g1={capture:!1,passive:!1};function dve(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=y.exports.useRef({}),o=y.exports.useRef(null),s=y.exports.useCallback(function(c){if(!!QP){var u=document.body,d=u&&u.style;if(r&&jP.forEach(function(m){var v=d&&d[m];i.current[m]=v}),r&&hp<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(WP).forEach(function(m){var v=WP[m];d&&(d[m]=v)}),d&&(d.paddingRight="".concat(p,"px"))}u&&YP()&&(u.addEventListener("touchmove",qP,g1),c&&(c.addEventListener("touchstart",GP,g1),c.addEventListener("touchmove",KP,g1))),hp+=1}},[r]),a=y.exports.useCallback(function(c){if(!!QP){var u=document.body,d=u&&u.style;hp=Math.max(hp-1,0),r&&hp<1&&jP.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),u&&YP()&&(u.removeEventListener("touchmove",qP,g1),c&&(c.removeEventListener("touchstart",GP,g1),c.removeEventListener("touchmove",KP,g1)))}},[r]);return y.exports.useEffect(function(){if(!!t){var c=o.current;return s(c),function(){a(c)}}},[t,s,a]),function(c){o.current=c}}var fve=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},hve={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function pve(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,c=e.onTopLeave,u=uve({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:c}),d=dve({isEnabled:n}),f=function(p){u(p),d(p)};return At(y.exports.Fragment,null,n&&At("div",{onClick:fve,css:hve}),t(f))}var mve={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},gve=function(t){var n=t.name,r=t.onFocus;return At("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:mve,value:"",onChange:function(){}})},vve=gve,yve=function(t){return t.label},bve=function(t){return t.label},xve=function(t){return t.value},Cve=function(t){return!!t.isDisabled},wve={clearIndicator:l3e,container:X5e,control:m3e,dropdownIndicator:s3e,group:b3e,groupHeading:C3e,indicatorsContainer:t3e,indicatorSeparator:u3e,input:T3e,loadingIndicator:h3e,loadingMessage:q5e,menu:B5e,menuList:V5e,menuPortal:Y5e,multiValue:D3e,multiValueLabel:O3e,multiValueRemove:P3e,noOptionsMessage:W5e,option:F3e,placeholder:z3e,singleValue:j3e,valueContainer:J5e},Sve={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Eve=4,wW=4,Tve=38,kve=wW*2,_ve={baseUnit:wW,controlHeight:Tve,menuGutter:kve},ib={borderRadius:Eve,colors:Sve,spacing:_ve},Ave={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:BP(),captureMenuScroll:!BP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:sve(),formatGroupLabel:yve,getOptionLabel:bve,getOptionValue:xve,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Cve,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!$5e(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function XP(e,t,n,r){var i=kW(e,t,n),o=_W(e,t,n),s=TW(e,t),a=Y3(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:s,value:a,index:r}}function SW(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,a){return XP(e,s,t,a)}).filter(function(s){return ZP(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=XP(e,n,t,r);return ZP(e,o)?o:void 0}).filter(P5e)}function EW(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Fj(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function $ve(e,t){return EW(SW(e,t))}function ZP(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,s=t.label,a=t.value;return(!$W(e)||!o)&&AW(e,{label:s,value:a,data:i},r)}function Dve(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function Ove(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var TW=function(t,n){return t.getOptionLabel(n)},Y3=function(t,n){return t.getOptionValue(n)};function kW(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function _W(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Y3(e,t);return n.some(function(i){return Y3(e,i)===r})}function AW(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var $W=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Pve=1,UT=function(e){_2e(n,e);var t=O2e(n);function n(r){var i;if(T2e(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(a){i.controlRef=a},i.focusedOptionRef=null,i.getFocusedOptionRef=function(a){i.focusedOptionRef=a},i.menuListRef=null,i.getMenuListRef=function(a){i.menuListRef=a},i.inputRef=null,i.getInputRef=function(a){i.inputRef=a},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(a,c){var u=i.props,d=u.onChange,f=u.name;c.name=f,i.ariaOnChange(a,c),d(a,c)},i.setValue=function(a,c,u){var d=i.props,f=d.closeMenuOnSelect,h=d.isMulti,p=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),f&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(a,{action:c,option:u})},i.selectOption=function(a){var c=i.props,u=c.blurInputOnSelect,d=c.isMulti,f=c.name,h=i.state.selectValue,p=d&&i.isOptionSelected(a,h),m=i.isOptionDisabled(a,h);if(p){var v=i.getOptionValue(a);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==v}),"deselect-option",a)}else if(!m)d?i.setValue([].concat(Fj(h),[a]),"select-option",a):i.setValue(a,"select-option");else{i.ariaOnChange(a,{action:"select-option",option:a,name:f});return}u&&i.blurInput()},i.removeValue=function(a){var c=i.props.isMulti,u=i.state.selectValue,d=i.getOptionValue(a),f=u.filter(function(p){return i.getOptionValue(p)!==d}),h=D2(c,f,f[0]||null);i.onChange(h,{action:"remove-value",removedValue:a}),i.focusInput()},i.clearValue=function(){var a=i.state.selectValue;i.onChange(D2(i.props.isMulti,[],null),{action:"clear",removedValues:a})},i.popValue=function(){var a=i.props.isMulti,c=i.state.selectValue,u=c[c.length-1],d=c.slice(0,c.length-1),f=D2(a,d,d[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];return S5e.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(a){return TW(i.props,a)},i.getOptionValue=function(a){return Y3(i.props,a)},i.getStyles=function(a,c){var u=i.props.unstyled,d=wve[a](c,u);d.boxSizing="border-box";var f=i.props.styles[a];return f?f(d,c):d},i.getClassNames=function(a,c){var u,d;return(u=(d=i.props.classNames)[a])===null||u===void 0?void 0:u.call(d,c)},i.getElementId=function(a){return"".concat(i.instancePrefix,"-").concat(a)},i.getComponents=function(){return G3e(i.props)},i.buildCategorizedOptions=function(){return SW(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return EW(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(a,c){i.setState({ariaSelection:bt({value:a},c)})},i.onMenuMouseDown=function(a){a.button===0&&(a.stopPropagation(),a.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(a){i.blockOptionHover=!1},i.onControlMouseDown=function(a){if(!a.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.preventDefault()}},i.onDropdownIndicatorMouseDown=function(a){if(!(a&&a.type==="mousedown"&&a.button!==0)&&!i.props.isDisabled){var c=i.props,u=c.isMulti,d=c.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),a.preventDefault()}},i.onClearIndicatorMouseDown=function(a){a&&a.type==="mousedown"&&a.button!==0||(i.clearValue(),a.preventDefault(),i.openAfterFocus=!1,a.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(a){typeof i.props.closeMenuOnScroll=="boolean"?a.target instanceof HTMLElement&&y6(a.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(a)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(a){var c=a.touches,u=c&&c.item(0);!u||(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(a){var c=a.touches,u=c&&c.item(0);if(!!u){var d=Math.abs(u.clientX-i.initialTouchX),f=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=d>h||f>h}},i.onTouchEnd=function(a){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(a.target)&&i.menuListRef&&!i.menuListRef.contains(a.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(a){i.userIsDragging||i.onControlMouseDown(a)},i.onClearIndicatorTouchEnd=function(a){i.userIsDragging||i.onClearIndicatorMouseDown(a)},i.onDropdownIndicatorTouchEnd=function(a){i.userIsDragging||i.onDropdownIndicatorMouseDown(a)},i.handleInputChange=function(a){var c=i.props.inputValue,u=a.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(a){i.props.onFocus&&i.props.onFocus(a),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(a){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(a),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(a){i.blockOptionHover||i.state.focusedOption===a||i.setState({focusedOption:a})},i.shouldHideSelectedOptions=function(){return $W(i.props)},i.onValueInputFocus=function(a){a.preventDefault(),a.stopPropagation(),i.focus()},i.onKeyDown=function(a){var c=i.props,u=c.isMulti,d=c.backspaceRemovesValue,f=c.escapeClearsValue,h=c.inputValue,p=c.isClearable,m=c.isDisabled,v=c.menuIsOpen,b=c.onKeyDown,x=c.tabSelectsValue,C=c.openMenuOnFocus,w=i.state,S=w.focusedOption,T=w.focusedValue,E=w.selectValue;if(!m&&!(typeof b=="function"&&(b(a),a.defaultPrevented))){switch(i.blockOptionHover=!0,a.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(T)i.removeValue(T);else{if(!d)return;u?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||a.shiftKey||!v||!x||!S||C&&i.isOptionSelected(S,E))return;i.selectOption(S);break;case"Enter":if(a.keyCode===229)break;if(v){if(!S||i.isComposing)return;i.selectOption(S);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&f&&i.clearValue();break;case" ":if(h)return;if(!v){i.openMenu("first");break}if(!S)return;i.selectOption(S);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}a.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++Pve),i.state.selectValue=NP(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[s]}return i}return k2e(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&FP(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&i.isDisabled||c&&a&&!i.menuIsOpen)&&this.focusInput(),c&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(FP(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,a=s.selectValue,c=s.isFocused,u=this.buildFocusableOptions(),d=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(a[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,a=o.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var c=s.indexOf(a);a||(c=-1);var u=s.length-1,d=-1;if(!!s.length){switch(i){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:s[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(!!a.length){var c=0,u=a.indexOf(s);s||(u=-1),i==="up"?c=u>0?u-1:a.length-1:i==="down"?c=(u+1)%a.length:i==="pageup"?(c=u-o,c<0&&(c=0)):i==="pagedown"?(c=u+o,c>a.length-1&&(c=a.length-1)):i==="last"&&(c=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[c],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(ib):bt(bt({},ib),this.props.theme):ib}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,a=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,v=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:a,getValue:c,hasValue:v,isMulti:h,isRtl:p,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return kW(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return _W(this.props,i,o)}},{key:"filterOption",value:function(i,o){return AW(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,a=i.inputId,c=i.inputValue,u=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,v=this.state,b=v.inputIsHidden,x=v.ariaSelection,C=this.commonProps,w=a||this.getElementId("input"),S=bt(bt(bt({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?l(m,{...C,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c,...S}):l(lve,{id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:K3,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:d,value:"",...S})}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,c=o.MultiValueLabel,u=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,v=p.isDisabled,b=p.isMulti,x=p.inputValue,C=p.placeholder,w=this.state,S=w.selectValue,T=w.focusedValue,E=w.isFocused;if(!this.hasValue()||!m)return x?null:y.exports.createElement(f,{...h,key:"placeholder",isDisabled:v,isFocused:E,innerProps:{id:this.getElementId("placeholder")}},C);if(b)return S.map(function(_,O){var D=_===T,L="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return y.exports.createElement(s,{...h,components:{Container:a,Label:c,Remove:u},isFocused:D,isDisabled:v,key:L,index:O,removeProps:{onClick:function(){return i.removeValue(_)},onTouchEnd:function(){return i.removeValue(_)},onMouseDown:function(j){j.preventDefault()}},data:_},i.formatOptionLabel(_,"value"))});if(x)return null;var k=S[0];return l(d,{...h,data:k,isDisabled:v,children:this.formatOptionLabel(k,"value")})}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,a=this.props,c=a.isDisabled,u=a.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return l(o,{...s,innerProps:f,isFocused:d})}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,a=this.props,c=a.isDisabled,u=a.isLoading,d=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return l(o,{...s,innerProps:f,isDisabled:c,isFocused:d})}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return l(s,{...a,isDisabled:c,isFocused:u})}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return l(o,{...s,innerProps:u,isDisabled:a,isFocused:c})}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,c=o.Menu,u=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,v=this.state.focusedOption,b=this.props,x=b.captureMenuScroll,C=b.inputValue,w=b.isLoading,S=b.loadingMessage,T=b.minMenuHeight,E=b.maxMenuHeight,k=b.menuIsOpen,_=b.menuPlacement,O=b.menuPosition,D=b.menuPortalTarget,L=b.menuShouldBlockScroll,N=b.menuShouldScrollIntoView,j=b.noOptionsMessage,G=b.onMenuScrollToTop,X=b.onMenuScrollToBottom;if(!k)return null;var re=function(I,me){var Se=I.type,pe=I.data,ye=I.isDisabled,_e=I.isSelected,$e=I.label,J=I.value,fe=v===pe,we=ye?void 0:function(){return i.onOptionHover(pe)},Le=ye?void 0:function(){return i.selectOption(pe)},He="".concat(i.getElementId("option"),"-").concat(me),Ge={id:He,onClick:Le,onMouseMove:we,onMouseOver:we,tabIndex:-1};return y.exports.createElement(p,{...m,innerProps:Ge,data:pe,isDisabled:ye,isSelected:_e,key:He,label:$e,type:Se,value:J,isFocused:fe,innerRef:fe?i.getFocusedOptionRef:void 0},i.formatOptionLabel(I.data,"menu"))},oe;if(this.hasOptions())oe=this.getCategorizedOptions().map(function(ee){if(ee.type==="group"){var I=ee.data,me=ee.options,Se=ee.index,pe="".concat(i.getElementId("group"),"-").concat(Se),ye="".concat(pe,"-heading");return y.exports.createElement(s,{...m,key:pe,data:I,options:me,Heading:a,headingProps:{id:ye,data:ee.data},label:i.formatGroupLabel(ee.data)},ee.options.map(function(_e){return re(_e,"".concat(Se,"-").concat(_e.index))}))}else if(ee.type==="option")return re(ee,"".concat(ee.index))});else if(w){var U=S({inputValue:C});if(U===null)return null;oe=l(f,{...m,children:U})}else{var H=j({inputValue:C});if(H===null)return null;oe=l(h,{...m,children:H})}var R={minMenuHeight:T,maxMenuHeight:E,menuPlacement:_,menuPosition:O,menuShouldScrollIntoView:N},se=l(H5e,{...m,...R,children:function(ee){var I=ee.ref,me=ee.placerProps,Se=me.placement,pe=me.maxHeight;return l(c,{...m,...R,innerRef:I,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:w,placement:Se,children:l(pve,{captureEnabled:x,onTopArrive:G,onBottomArrive:X,lockEnabled:L,children:function(ye){return l(u,{...m,innerRef:function($e){i.getMenuListRef($e),ye($e)},isLoading:w,maxHeight:pe,focusedOption:v,children:oe})}})})}});return D||O==="fixed"?l(d,{...m,appendTo:D,controlElement:this.controlRef,menuPlacement:_,menuPosition:O,children:se}):se}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,a=o.isDisabled,c=o.isMulti,u=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!a)return l(vve,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(c)if(s){var h=f.map(function(v){return i.getOptionValue(v)}).join(s);return l("input",{name:u,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(v,b){return l("input",{name:u,type:"hidden",value:i.getOptionValue(v)},"i-".concat(b))}):l("input",{name:u,type:"hidden",value:""});return l("div",{children:p})}else{var m=f[0]?this.getOptionValue(f[0]):"";return l("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,c=o.focusedValue,u=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return l(nve,{...i,id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f})}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,a=i.SelectContainer,c=i.ValueContainer,u=this.props,d=u.className,f=u.id,h=u.isDisabled,p=u.menuIsOpen,m=this.state.isFocused,v=this.commonProps=this.getCommonProps();return g(a,{...v,className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m,children:[this.renderLiveRegion(),g(o,{...v,innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p,children:[g(c,{...v,isDisabled:h,children:[this.renderPlaceholderOrValue(),this.renderInput()]}),g(s,{...v,isDisabled:h,children:[this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator()]})]}),this.renderMenu(),this.renderFormField()]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,c=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=i.options,p=i.value,m=i.menuIsOpen,v=i.inputValue,b=i.isMulti,x=NP(p),C={};if(s&&(p!==s.value||h!==s.options||m!==s.menuIsOpen||v!==s.inputValue)){var w=m?$ve(i,x):[],S=a?Dve(o,x):null,T=Ove(o,w);C={selectValue:x,focusedOption:T,focusedValue:S,clearFocusValueOnUpdate:!1}}var E=c!=null&&i!==s?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=u,_=d&&f;return d&&!_&&(k={value:D2(b,x,x[0]||null),options:x,action:"initial-input-focus"},_=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(k=null),bt(bt(bt({},C),E),{},{prevProps:i,ariaSelection:k,prevWasFocused:_})}}]),n}(y.exports.Component);UT.defaultProps=Ave;var Rve=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function DW(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,a=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Fa(e,Rve),v=y.exports.useState(a!==void 0?a:n),b=Or(v,2),x=b[0],C=b[1],w=y.exports.useState(c!==void 0?c:i),S=Or(w,2),T=S[0],E=S[1],k=y.exports.useState(p!==void 0?p:s),_=Or(k,2),O=_[0],D=_[1],L=y.exports.useCallback(function(U,H){typeof u=="function"&&u(U,H),D(U)},[u]),N=y.exports.useCallback(function(U,H){var R;typeof d=="function"&&(R=d(U,H)),C(R!==void 0?R:U)},[d]),j=y.exports.useCallback(function(){typeof h=="function"&&h(),E(!0)},[h]),G=y.exports.useCallback(function(){typeof f=="function"&&f(),E(!1)},[f]),X=a!==void 0?a:x,re=c!==void 0?c:T,oe=p!==void 0?p:O;return bt(bt({},m),{},{inputValue:X,menuIsOpen:re,onChange:L,onInputChange:N,onMenuClose:G,onMenuOpen:j,value:oe})}var Mve=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function Ive(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,i=r===void 0?!1:r,o=e.loadOptions;e.options;var s=e.isLoading,a=s===void 0?!1:s,c=e.onInputChange,u=e.filterOption,d=u===void 0?null:u,f=Fa(e,Mve),h=f.inputValue,p=y.exports.useRef(void 0),m=y.exports.useRef(!1),v=y.exports.useState(Array.isArray(n)?n:void 0),b=Or(v,2),x=b[0],C=b[1],w=y.exports.useState(typeof h<"u"?h:""),S=Or(w,2),T=S[0],E=S[1],k=y.exports.useState(n===!0),_=Or(k,2),O=_[0],D=_[1],L=y.exports.useState(void 0),N=Or(L,2),j=N[0],G=N[1],X=y.exports.useState([]),re=Or(X,2),oe=re[0],U=re[1],H=y.exports.useState(!1),R=Or(H,2),se=R[0],ee=R[1],I=y.exports.useState({}),me=Or(I,2),Se=me[0],pe=me[1],ye=y.exports.useState(void 0),_e=Or(ye,2),$e=_e[0],J=_e[1],fe=y.exports.useState(void 0),we=Or(fe,2),Le=we[0],He=we[1];i!==Le&&(pe({}),He(i)),n!==$e&&(C(Array.isArray(n)?n:void 0),J(n)),y.exports.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var Ge=y.exports.useCallback(function(ft,vt){if(!o)return vt();var We=o(ft,vt);We&&typeof We.then=="function"&&We.then(vt,function(){return vt()})},[o]);y.exports.useEffect(function(){n===!0&&Ge(T,function(ft){!m.current||(C(ft||[]),D(!!p.current))})},[]);var Pe=y.exports.useCallback(function(ft,vt){var We=E5e(ft,vt,c);if(!We){p.current=void 0,E(""),G(""),U([]),D(!1),ee(!1);return}if(i&&Se[We])E(We),G(We),U(Se[We]),D(!1),ee(!1);else{var De=p.current={};E(We),D(!0),ee(!j),Ge(We,function(Vt){!m||De===p.current&&(p.current=void 0,D(!1),G(We),U(Vt||[]),ee(!1),pe(Vt?bt(bt({},Se),{},nf({},We,Vt)):Se))})}},[i,Ge,j,Se,c]),rt=se?[]:T&&j?oe:x||[];return bt(bt({},f),{},{options:rt,isLoading:O||a,onInputChange:Pe,filterOption:d})}var Lve=y.exports.forwardRef(function(e,t){var n=Ive(e),r=DW(n);return l(UT,{ref:t,...r})}),OW=Lve;let O2;const Nve=new Uint8Array(16);function Fve(){if(!O2&&(O2=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!O2))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O2(Nve)}const Vr=[];for(let e=0;e<256;++e)Vr.push((e+256).toString(16).slice(1));function Bve(e,t=0){return Vr[e[t+0]]+Vr[e[t+1]]+Vr[e[t+2]]+Vr[e[t+3]]+"-"+Vr[e[t+4]]+Vr[e[t+5]]+"-"+Vr[e[t+6]]+Vr[e[t+7]]+"-"+Vr[e[t+8]]+Vr[e[t+9]]+"-"+Vr[e[t+10]]+Vr[e[t+11]]+Vr[e[t+12]]+Vr[e[t+13]]+Vr[e[t+14]]+Vr[e[t+15]]}const Hve=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),JP={randomUUID:Hve};function b6(e,t,n){if(JP.randomUUID&&!t&&!e)return JP.randomUUID();e=e||{};const r=e.random||(e.rng||Fve)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Bve(r)}function Q3({name:e}){return g(M,{css:{alignItems:"center",gap:"$2",minWidth:0},title:e,children:[l(W,{icon:Iy,css:{color:"orange",width:16,marginLeft:"$1"}}),l(ce,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})]})}const zve=de("div",{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,height:500,boxShadow:"$xsmall"}),Uve=de("h2",{px:"$4",py:"$3"}),io=de("hr",{width:"100%",height:1,backgroundColor:"$hrColor",variants:{separator:{true:{width:"50%",mx:"auto",my:"$4"}}}});function ob({title:e=null,children:t=null,css:n=null}){return g(zve,{css:n,children:[e&&g(z,{children:[l(Uve,{children:e}),l(io,{})]}),l(P,{css:{pb:"$4",overflow:"auto"},children:l(P,{children:t})})]})}const Vve=de("span",{color:"$neutral400",fontWeight:"$normal",fontSize:"$pmedium"}),jve=de("h4",{mr:"$1"});function Wve({title:e,date:t}){return l(ce,{css:{display:"flex",alignItems:"center",mb:"$1"},children:g(jve,{children:[e,g(Vve,{children:[" \u2022 ",Z(t).format("MM/D/YYYY")]})]})})}const qve=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?OP({element:r.current,padding:i}).fn(n):{}:r?OP({element:r,padding:i}).fn(n):{}}}};var n5=typeof document<"u"?y.exports.useLayoutEffect:y.exports.useEffect;function X3(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,i;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(!X3(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!X3(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function PW(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eR(e,t){const n=PW(e);return Math.round(t*n)/n}function tR(e){const t=y.exports.useRef(e);return n5(()=>{t.current=e}),t}function Kve(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=y.exports.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.exports.useState(r);X3(h,r)||p(r);const[m,v]=y.exports.useState(null),[b,x]=y.exports.useState(null),C=y.exports.useCallback(re=>{re!=E.current&&(E.current=re,v(re))},[v]),w=y.exports.useCallback(re=>{re!==k.current&&(k.current=re,x(re))},[x]),S=o||m,T=s||b,E=y.exports.useRef(null),k=y.exports.useRef(null),_=y.exports.useRef(d),O=tR(c),D=tR(i),L=y.exports.useCallback(()=>{if(!E.current||!k.current)return;const re={placement:t,strategy:n,middleware:h};D.current&&(re.platform=D.current),x5e(E.current,k.current,re).then(oe=>{const U={...oe,isPositioned:!0};N.current&&!X3(_.current,U)&&(_.current=U,Lr.exports.flushSync(()=>{f(U)}))})},[h,t,n,D]);n5(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(re=>({...re,isPositioned:!1})))},[u]);const N=y.exports.useRef(!1);n5(()=>(N.current=!0,()=>{N.current=!1}),[]),n5(()=>{if(S&&(E.current=S),T&&(k.current=T),S&&T){if(O.current)return O.current(S,T,L);L()}},[S,T,L,O]);const j=y.exports.useMemo(()=>({reference:E,floating:k,setReference:C,setFloating:w}),[C,w]),G=y.exports.useMemo(()=>({reference:S,floating:T}),[S,T]),X=y.exports.useMemo(()=>{const re={position:n,left:0,top:0};if(!G.floating)return re;const oe=eR(G.floating,d.x),U=eR(G.floating,d.y);return a?{...re,transform:"translate("+oe+"px, "+U+"px)",...PW(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:U}},[n,a,G.floating,d.x,d.y]);return y.exports.useMemo(()=>({...d,update:L,refs:j,elements:G,floatingStyles:X}),[d,L,j,G,X])}const RW="Popper",[MW,wu]=ii(RW),[Gve,IW]=MW(RW),Yve=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.exports.useState(null);return y.exports.createElement(Gve,{scope:t,anchor:r,onAnchorChange:i},n)},Qve="PopperAnchor",Xve=y.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IW(Qve,n),s=y.exports.useRef(null),a=zt(t,s);return y.exports.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:y.exports.createElement(Pt.div,ue({},i,{ref:a}))}),LW="PopperContent",[Zve,LGe]=MW(LW),Jve=y.exports.forwardRef((e,t)=>{var n,r,i,o,s,a,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:x=[],collisionPadding:C=0,sticky:w="partial",hideWhenDetached:S=!1,updatePositionStrategy:T="optimized",onPlaced:E,...k}=e,_=IW(LW,d),[O,D]=y.exports.useState(null),L=zt(t,Ge=>D(Ge)),[N,j]=y.exports.useState(null),G=eg(N),X=(n=G==null?void 0:G.width)!==null&&n!==void 0?n:0,re=(r=G==null?void 0:G.height)!==null&&r!==void 0?r:0,oe=f+(p!=="center"?"-"+p:""),U=typeof C=="number"?C:{top:0,right:0,bottom:0,left:0,...C},H=Array.isArray(x)?x:[x],R=H.length>0,se={padding:U,boundary:H.filter(eye),altBoundary:R},{refs:ee,floatingStyles:I,placement:me,isPositioned:Se,middlewareData:pe}=Kve({strategy:"fixed",placement:oe,whileElementsMounted:(...Ge)=>lW(...Ge,{animationFrame:T==="always"}),elements:{reference:_.anchor},middleware:[J4e({mainAxis:h+re,alignmentAxis:m}),b&&e5e({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?t5e():void 0,...se}),b&&Q4e({...se}),n5e({...se,apply:({elements:Ge,rects:Pe,availableWidth:rt,availableHeight:ft})=>{const{width:vt,height:We}=Pe.reference,De=Ge.floating.style;De.setProperty("--radix-popper-available-width",`${rt}px`),De.setProperty("--radix-popper-available-height",`${ft}px`),De.setProperty("--radix-popper-anchor-width",`${vt}px`),De.setProperty("--radix-popper-anchor-height",`${We}px`)}}),N&&qve({element:N,padding:v}),tye({arrowWidth:X,arrowHeight:re}),S&&X4e({strategy:"referenceHidden",...se})]}),[ye,_e]=NW(me),$e=Ao(E);ri(()=>{Se&&($e==null||$e())},[Se,$e]);const J=(i=pe.arrow)===null||i===void 0?void 0:i.x,fe=(o=pe.arrow)===null||o===void 0?void 0:o.y,we=((s=pe.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Le,He]=y.exports.useState();return ri(()=>{O&&He(window.getComputedStyle(O).zIndex)},[O]),y.exports.createElement("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:Se?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(a=pe.transformOrigin)===null||a===void 0?void 0:a.x,(c=pe.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},y.exports.createElement(Zve,{scope:d,placedSide:ye,onArrowChange:j,arrowX:J,arrowY:fe,shouldHideArrow:we},y.exports.createElement(Pt.div,ue({"data-side":ye,"data-align":_e},k,{ref:L,style:{...k.style,animation:Se?void 0:"none",opacity:(u=pe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function eye(e){return e!==null}const tye=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[m,v]=NW(a),b={start:"0%",center:"50%",end:"100%"}[v],x=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+h/2,C=((o=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+p/2;let w="",S="";return m==="bottom"?(w=f?b:`${x}px`,S=`${-p}px`):m==="top"?(w=f?b:`${x}px`,S=`${c.floating.height+p}px`):m==="right"?(w=`${-p}px`,S=f?b:`${C}px`):m==="left"&&(w=`${c.floating.width+p}px`,S=f?b:`${C}px`),{data:{x:w,y:S}}}});function NW(e){const[t,n="center"]=e.split("-");return[t,n]}const ug=Yve,x6=Xve,C6=Jve;let sb;const FW="HoverCard",[BW,NGe]=ii(FW,[wu]),VT=wu(),[nye,w6]=BW(FW),rye=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:s=700,closeDelay:a=300}=e,c=VT(t),u=y.exports.useRef(0),d=y.exports.useRef(0),f=y.exports.useRef(!1),h=y.exports.useRef(!1),[p=!1,m]=$o({prop:r,defaultProp:i,onChange:o}),v=y.exports.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>m(!0),s)},[s,m]),b=y.exports.useCallback(()=>{clearTimeout(u.current),!f.current&&!h.current&&(d.current=window.setTimeout(()=>m(!1),a))},[a,m]),x=y.exports.useCallback(()=>m(!1),[m]);return y.exports.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),y.exports.createElement(nye,{scope:t,open:p,onOpenChange:m,onOpen:v,onClose:b,onDismiss:x,hasSelectionRef:f,isPointerDownOnContentRef:h},y.exports.createElement(ug,c,n))},iye="HoverCardTrigger",oye=y.exports.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=w6(iye,n),o=VT(n);return y.exports.createElement(x6,ue({asChild:!0},o),y.exports.createElement(Pt.a,ue({"data-state":i.open?"open":"closed"},r,{ref:t,onPointerEnter:Ue(e.onPointerEnter,Z3(i.onOpen)),onPointerLeave:Ue(e.onPointerLeave,Z3(i.onClose)),onFocus:Ue(e.onFocus,i.onOpen),onBlur:Ue(e.onBlur,i.onClose),onTouchStart:Ue(e.onTouchStart,s=>s.preventDefault())})))}),HW="HoverCardPortal",[sye,aye]=BW(HW,{forceMount:void 0}),lye=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=w6(HW,t);return y.exports.createElement(sye,{scope:t,forceMount:n},y.exports.createElement(Hi,{present:n||o.open},y.exports.createElement(Ny,{asChild:!0,container:i},r)))},iw="HoverCardContent",cye=y.exports.forwardRef((e,t)=>{const n=aye(iw,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=w6(iw,e.__scopeHoverCard);return y.exports.createElement(Hi,{present:r||o.open},y.exports.createElement(uye,ue({"data-state":o.open?"open":"closed"},i,{onPointerEnter:Ue(e.onPointerEnter,Z3(o.onOpen)),onPointerLeave:Ue(e.onPointerLeave,Z3(o.onClose)),ref:t})))}),uye=y.exports.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,...a}=e,c=w6(iw,n),u=VT(n),d=y.exports.useRef(null),f=zt(t,d),[h,p]=y.exports.useState(!1);return y.exports.useEffect(()=>{if(h){const m=document.body;return sb=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=sb,m.style.webkitUserSelect=sb}}},[h]),y.exports.useEffect(()=>{if(d.current){const m=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var v;((v=document.getSelection())===null||v===void 0?void 0:v.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),y.exports.useEffect(()=>{d.current&&dye(d.current).forEach(v=>v.setAttribute("tabindex","-1"))}),y.exports.createElement(Zm,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:Ue(o,m=>{m.preventDefault()}),onDismiss:c.onDismiss},y.exports.createElement(C6,ue({},u,a,{onPointerDown:Ue(a.onPointerDown,m=>{m.currentTarget.contains(m.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:f,style:{...a.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))});function Z3(e){return t=>t.pointerType==="touch"?void 0:e()}function dye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const S6=rye,E6=oye,T6=lye,k6=cye;function Ba(){return g("svg",{fill:"none",viewBox:"0 0 64 57",width:"100%",height:"100%",children:[l("defs",{children:g("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"sky",children:[l("stop",{offset:"0",stopColor:"#0A7AFF",stopOpacity:"1"}),l("stop",{offset:"1",stopColor:"#59B9FF",stopOpacity:"1"})]})}),l("path",{fill:"url(#sky)",d:"M13.873 3.805C21.21 9.332 29.103 20.537 32 26.55v15.882c0-.338-.13.044-.41.867-1.512 4.456-7.418 21.847-20.923 7.944-7.111-7.32-3.819-14.64 9.125-16.85-7.405 1.264-15.73-.825-18.014-9.015C1.12 23.022 0 8.51 0 6.55 0-3.268 8.579-.182 13.873 3.805ZM50.127 3.805C42.79 9.332 34.897 20.537 32 26.55v15.882c0-.338.13.044.41.867 1.512 4.456 7.418 21.847 20.923 7.944 7.111-7.32 3.819-14.64-9.125-16.85 7.405 1.264 15.73-.825 18.014-9.015C62.88 23.022 64 8.51 64 6.55c0-9.818-8.578-6.732-13.873-2.745Z"})]})}function Ha(){return l("svg",{width:"100%",height:"100%",viewBox:"0 0 128 207",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("path",{d:"M127.768 -2.83852e-05H90.2427L86.496 3.77729L68.784 37.5306L63.2147 41.2893H0V92.8373H34.7533L37.848 96.5813L0 168.904V206.441H0.0106667H37.536L41.2827 202.664L58.9947 168.909L64.564 165.152H127.78V113.605H93.0267L89.9347 109.835L127.78 37.536V-2.83852e-05H127.768Z",fill:"#05CC47"})})}function za(){return g("svg",{width:"100%",height:"100%",viewBox:"0 0 300 300",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("path",{d:"M281.553 298.004C290.635 298.004 298 290.639 298 281.557V16.4496C298 7.36421 290.635 0.00167829 281.553 0.00167829H16.4468C7.36142 0.00167829 0 7.36421 0 16.4496V281.557C0 290.639 7.36142 298.004 16.4468 298.004H281.553Z",fill:"#3B5998"}),l("path",{d:"M205.614 298.004V182.603H244.35L250.15 137.628H205.614V108.914C205.614 95.8923 209.229 87.0191 227.902 87.0191L251.718 87.0079V46.783C247.598 46.2359 233.462 45.011 217.015 45.011C182.678 45.011 159.171 65.9698 159.171 104.461V137.628H120.336V182.603H159.171V298.004H205.614Z",fill:"white"})]})}function Ua(){return g("svg",{width:"100%",height:"100%",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("path",{d:"M45.9877 10.5117H210.022C229.621 10.5117 245.51 26.4002 245.51 45.9997V210.014C245.51 229.613 229.621 245.502 210.022 245.502H45.9877C26.3882 245.502 10.4998 229.613 10.4998 210.014V45.9997C10.4998 26.4002 26.3882 10.5117 45.9877 10.5117Z",fill:"#ECECEB",stroke:"black",strokeWidth:"0.5",strokeLinecap:"square"}),l("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M183.421 20.5625H72.5909C43.2509 20.5625 19.6309 44.3625 19.6309 73.9425V182.073C20.5809 205.153 24.2309 190.562 31.1909 164.992C39.2709 135.282 65.5809 109.313 97.6309 89.8525C122.091 74.9925 149.471 65.5125 199.311 64.6025C227.581 64.0925 225.081 27.9225 183.421 20.5625Z",fill:"url(#paint0_linear_927_651)"}),l("path",{d:"M115.71 124.572C115.71 146.861 99.0808 164.929 78.5668 164.929C58.0538 164.929 41.4238 146.86 41.4238 124.572C41.4238 102.283 58.0528 84.2148 78.5668 84.2148C99.0798 84.2148 115.71 102.284 115.71 124.572Z",fill:"#0059D4"}),l("path",{d:"M210.709 124.04C210.709 146.033 193.6 163.861 172.495 163.861C151.39 163.861 134.281 146.032 134.281 124.04C134.281 102.047 151.39 84.2188 172.495 84.2188C193.6 84.2188 210.709 102.048 210.709 124.04Z",fill:"#DA1593"}),l("defs",{children:g("linearGradient",{id:"paint0_linear_927_651",x1:"39.9318",y1:"-13.6275",x2:"70.5103",y2:"75.4996",gradientUnits:"userSpaceOnUse",children:[l("stop",{stopColor:"white"}),l("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})})]})}function Va(){return g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 132 132",children:[g("defs",{children:[g("linearGradient",{id:"b",children:[l("stop",{offset:"0",stopColor:"#3771c8"}),l("stop",{stopColor:"#3771c8",offset:".128"}),l("stop",{offset:"1",stopColor:"#60f",stopOpacity:"0"})]}),g("linearGradient",{id:"a",children:[l("stop",{offset:"0",stopColor:"#fd5"}),l("stop",{offset:".1",stopColor:"#fd5"}),l("stop",{offset:".5",stopColor:"#ff543e"}),l("stop",{offset:"1",stopColor:"#c837ab"})]}),l("radialGradient",{id:"c",cx:"158.429",cy:"578.088",r:"65",xlinkHref:"#a",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(0 -1.98198 1.8439 0 -1031.402 454.004)",fx:"158.429",fy:"578.088"}),l("radialGradient",{id:"d",cx:"147.694",cy:"473.455",r:"65",xlinkHref:"#b",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(.17394 .86872 -3.5818 .71718 1648.348 -458.493)",fx:"147.694",fy:"473.455"})]}),l("path",{fill:"url(#c)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),l("path",{fill:"url(#d)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),l("path",{fill:"#fff",d:"M66.004 18c-13.036 0-14.672.057-19.792.29-5.11.234-8.598 1.043-11.65 2.23-3.157 1.226-5.835 2.866-8.503 5.535-2.67 2.668-4.31 5.346-5.54 8.502-1.19 3.053-2 6.542-2.23 11.65C18.06 51.327 18 52.964 18 66s.058 14.667.29 19.787c.235 5.11 1.044 8.598 2.23 11.65 1.227 3.157 2.867 5.835 5.536 8.503 2.667 2.67 5.345 4.314 8.5 5.54 3.054 1.187 6.543 1.996 11.652 2.23 5.12.233 6.755.29 19.79.29 13.037 0 14.668-.057 19.788-.29 5.11-.234 8.602-1.043 11.656-2.23 3.156-1.226 5.83-2.87 8.497-5.54 2.67-2.668 4.31-5.346 5.54-8.502 1.18-3.053 1.99-6.542 2.23-11.65.23-5.12.29-6.752.29-19.788 0-13.036-.06-14.672-.29-19.792-.24-5.11-1.05-8.598-2.23-11.65-1.23-3.157-2.87-5.835-5.54-8.503-2.67-2.67-5.34-4.31-8.5-5.535-3.06-1.187-6.55-1.996-11.66-2.23-5.12-.233-6.75-.29-19.79-.29zm-4.306 8.65c1.278-.002 2.704 0 4.306 0 12.816 0 14.335.046 19.396.276 4.68.214 7.22.996 8.912 1.653 2.24.87 3.837 1.91 5.516 3.59 1.68 1.68 2.72 3.28 3.592 5.52.657 1.69 1.44 4.23 1.653 8.91.23 5.06.28 6.58.28 19.39s-.05 14.33-.28 19.39c-.214 4.68-.996 7.22-1.653 8.91-.87 2.24-1.912 3.835-3.592 5.514-1.68 1.68-3.275 2.72-5.516 3.59-1.69.66-4.232 1.44-8.912 1.654-5.06.23-6.58.28-19.396.28-12.817 0-14.336-.05-19.396-.28-4.68-.216-7.22-.998-8.913-1.655-2.24-.87-3.84-1.91-5.52-3.59-1.68-1.68-2.72-3.276-3.592-5.517-.657-1.69-1.44-4.23-1.653-8.91-.23-5.06-.276-6.58-.276-19.398s.046-14.33.276-19.39c.214-4.68.996-7.22 1.653-8.912.87-2.24 1.912-3.84 3.592-5.52 1.68-1.68 3.28-2.72 5.52-3.592 1.692-.66 4.233-1.44 8.913-1.655 4.428-.2 6.144-.26 15.09-.27zm29.928 7.97c-3.18 0-5.76 2.577-5.76 5.758 0 3.18 2.58 5.76 5.76 5.76 3.18 0 5.76-2.58 5.76-5.76 0-3.18-2.58-5.76-5.76-5.76zm-25.622 6.73c-13.613 0-24.65 11.037-24.65 24.65 0 13.613 11.037 24.645 24.65 24.645C79.617 90.645 90.65 79.613 90.65 66S79.616 41.35 66.003 41.35zm0 8.65c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16 0-8.837 7.163-16 16-16z"})]})}const fye=de("path");function ja(){return l("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l(fye,{d:"M18.2439 2.25H21.5519L14.3249 10.51L22.8269 21.75H16.1699L10.9559 14.933L4.98991 21.75H1.67991L9.40991 12.915L1.25391 2.25H8.07991L12.7929 8.481L18.2439 2.25ZM17.0829 19.77H18.9159L7.08391 4.126H5.11691L17.0829 19.77Z",css:{fill:"$textColor"}})})}/**
 * React Router DOM v6.16.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function hye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function pye(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mye(e,t){return e.button===0&&(!t||t==="_self")&&!pye(e)}function ow(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function gye(e,t){let n=ow(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const vye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],yye="startTransition",nR=D0[yye];function zW(e){let{basename:t,children:n,future:r,window:i}=e,o=y.exports.useRef();o.current==null&&(o.current=Mge({window:i,v5Compat:!0}));let s=o.current,[a,c]=y.exports.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=y.exports.useCallback(f=>{u&&nR?nR(()=>c(f)):c(f)},[c,u]);return y.exports.useLayoutEffect(()=>s.listen(d),[s,d]),l(S2e,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const bye=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xye=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ps=y.exports.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:c,to:u,preventScrollReset:d}=t,f=hye(t,vye),{basename:h}=y.exports.useContext(yh),p,m=!1;if(typeof u=="string"&&xye.test(u)&&(p=u,bye))try{let C=new URL(window.location.href),w=u.startsWith("//")?new URL(C.protocol+u):new URL(u),S=ST(w.pathname,h);w.origin===C.origin&&S!=null?u=S+w.search+w.hash:m=!0}catch{}let v=s2e(u,{relative:i}),b=Cye(u,{replace:s,state:a,target:c,preventScrollReset:d,relative:i});function x(C){r&&r(C),C.defaultPrevented||b(C)}return l("a",{...f,href:p||v,onClick:m||o?r:x,ref:n,target:c})});var rR;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(rR||(rR={}));var iR;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(iR||(iR={}));function Cye(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=ar(),c=ao(),u=Oj(e,{relative:s});return y.exports.useCallback(d=>{if(mye(d,n)){d.preventDefault();let f=r!==void 0?r:B3(c)===B3(u);a(e,{replace:f,state:i,preventScrollReset:o,relative:s})}},[c,a,u,r,i,n,e,o,s])}function Jn(e){let t=y.exports.useRef(ow(e)),n=y.exports.useRef(!1),r=ao(),i=y.exports.useMemo(()=>gye(r.search,n.current?null:t.current),[r.search]),o=ar(),s=y.exports.useCallback((a,c)=>{const u=ow(typeof a=="function"?a(i):a);n.current=!0,o("?"+u,c)},[o,i]);return[i,s]}const ie=de(ps,{overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word",variants:{noStyle:{true:{color:"inherit","&:hover":{color:"inherit","&:after":{backgroundColor:"transparent"}},"&:after":{backgroundColor:"transparent"}}},primfeed:{true:{color:"$linkColor","&:hover":{color:"$linkColorHover","&:after":{backgroundColor:"$linkColorHover"}},"&:after":{backgroundColor:"$linkColor",height:1}}},premium:{true:{color:"$premium400","&:hover":{color:"$premium500","&:after":{backgroundColor:"$premium300"}},"&:after":{backgroundColor:"$premium200"}}}}}),sw="horizontal",wye=["horizontal","vertical"],UW=y.exports.forwardRef((e,t)=>{const{decorative:n,orientation:r=sw,...i}=e,o=VW(r)?r:sw,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return y.exports.createElement(Pt.div,ue({"data-orientation":o},a,i,{ref:t}))});UW.propTypes={orientation(e,t,n){const r=e[t],i=String(r);return r&&!VW(r)?new Error(Sye(i,n)):null}};function Sye(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:
  - horizontal
  - vertical

Defaulting to \`${sw}\`.`}function VW(e){return wye.includes(e)}var jW={exports:{}},jT={exports:{}},WW=function(t,n){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return t.apply(n,i)}},Eye=WW,WT=Object.prototype.toString,qT=function(e){return function(t){var n=WT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function Yd(e){return e=e.toLowerCase(),function(n){return qT(n)===e}}function KT(e){return Array.isArray(e)}function J3(e){return typeof e>"u"}function Tye(e){return e!==null&&!J3(e)&&e.constructor!==null&&!J3(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var qW=Yd("ArrayBuffer");function kye(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qW(e.buffer),t}function _ye(e){return typeof e=="string"}function Aye(e){return typeof e=="number"}function KW(e){return e!==null&&typeof e=="object"}function r5(e){if(qT(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var $ye=Yd("Date"),Dye=Yd("File"),Oye=Yd("Blob"),Pye=Yd("FileList");function GT(e){return WT.call(e)==="[object Function]"}function Rye(e){return KW(e)&&GT(e.pipe)}function Mye(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||WT.call(e)===t||GT(e.toString)&&e.toString()===t)}var Iye=Yd("URLSearchParams");function Lye(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Nye(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function YT(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),KT(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function aw(){var e={};function t(i,o){r5(e[o])&&r5(i)?e[o]=aw(e[o],i):r5(i)?e[o]=aw({},i):KT(i)?e[o]=i.slice():e[o]=i}for(var n=0,r=arguments.length;n<r;n++)YT(arguments[n],t);return e}function Fye(e,t,n){return YT(t,function(i,o){n&&typeof i=="function"?e[o]=Eye(i,n):e[o]=i}),e}function Bye(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Hye(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)}function zye(e,t,n){var r,i,o,s={};t=t||{};do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],s[o]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function Uye(e,t,n){e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return r!==-1&&r===n}function Vye(e){if(!e)return null;var t=e.length;if(J3(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var jye=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),si={isArray:KT,isArrayBuffer:qW,isBuffer:Tye,isFormData:Mye,isArrayBufferView:kye,isString:_ye,isNumber:Aye,isObject:KW,isPlainObject:r5,isUndefined:J3,isDate:$ye,isFile:Dye,isBlob:Oye,isFunction:GT,isStream:Rye,isURLSearchParams:Iye,isStandardBrowserEnv:Nye,forEach:YT,merge:aw,extend:Fye,trim:Lye,stripBOM:Bye,inherits:Hye,toFlatObject:zye,kindOf:qT,kindOfTest:Yd,endsWith:Uye,toArray:Vye,isTypedArray:jye,isFileList:Pye},v1=si;function oR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var GW=function(t,n,r){if(!n)return t;var i;if(r)i=r(n);else if(v1.isURLSearchParams(n))i=n.toString();else{var o=[];v1.forEach(n,function(c,u){c===null||typeof c>"u"||(v1.isArray(c)?u=u+"[]":c=[c],v1.forEach(c,function(f){v1.isDate(f)?f=f.toISOString():v1.isObject(f)&&(f=JSON.stringify(f)),o.push(oR(u)+"="+oR(f))}))}),i=o.join("&")}if(i){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t},Wye=si;function _6(){this.handlers=[]}_6.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};_6.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};_6.prototype.forEach=function(t){Wye.forEach(this.handlers,function(r){r!==null&&t(r)})};var qye=_6,Kye=si,Gye=function(t,n){Kye.forEach(t,function(i,o){o!==n&&o.toUpperCase()===n.toUpperCase()&&(t[n]=i,delete t[o])})},YW=si;function Qf(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}YW.inherits(Qf,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var QW=Qf.prototype,XW={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){XW[e]={value:e}});Object.defineProperties(Qf,XW);Object.defineProperty(QW,"isAxiosError",{value:!0});Qf.from=function(e,t,n,r,i,o){var s=Object.create(QW);return YW.toFlatObject(e,s,function(c){return c!==Error.prototype}),Qf.call(s,e.message,t,n,r,i),s.name=e.name,o&&Object.assign(s,o),s};var Eh=Qf,ZW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ss=si;function Yye(e,t){t=t||new FormData;var n=[];function r(o){return o===null?"":Ss.isDate(o)?o.toISOString():Ss.isArrayBuffer(o)||Ss.isTypedArray(o)?typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function i(o,s){if(Ss.isPlainObject(o)||Ss.isArray(o)){if(n.indexOf(o)!==-1)throw Error("Circular reference detected in "+s);n.push(o),Ss.forEach(o,function(c,u){if(!Ss.isUndefined(c)){var d=s?s+"."+u:u,f;if(c&&!s&&typeof c=="object"){if(Ss.endsWith(u,"{}"))c=JSON.stringify(c);else if(Ss.endsWith(u,"[]")&&(f=Ss.toArray(c))){f.forEach(function(h){!Ss.isUndefined(h)&&t.append(d,r(h))});return}}i(c,d)}}),n.pop()}else t.append(s,r(o))}return i(e),t}var JW=Yye,ab,sR;function Qye(){if(sR)return ab;sR=1;var e=Eh;return ab=function(n,r,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):r(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},ab}var lb,aR;function Xye(){if(aR)return lb;aR=1;var e=si;return lb=e.isStandardBrowserEnv()?function(){return{write:function(r,i,o,s,a,c){var u=[];u.push(r+"="+encodeURIComponent(i)),e.isNumber(o)&&u.push("expires="+new Date(o).toGMTString()),e.isString(s)&&u.push("path="+s),e.isString(a)&&u.push("domain="+a),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),lb}var Zye=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},Jye=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},e6e=Zye,t6e=Jye,eq=function(t,n){return t&&!e6e(n)?t6e(t,n):n},cb,lR;function n6e(){if(lR)return cb;lR=1;var e=si,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return cb=function(r){var i={},o,s,a;return r&&e.forEach(r.split(`
`),function(u){if(a=u.indexOf(":"),o=e.trim(u.substr(0,a)).toLowerCase(),s=e.trim(u.substr(a+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([s]):i[o]=i[o]?i[o]+", "+s:s}}),i},cb}var ub,cR;function r6e(){if(cR)return ub;cR=1;var e=si;return ub=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function o(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=o(window.location.href),function(a){var c=e.isString(a)?o(a):a;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}(),ub}var db,uR;function A6(){if(uR)return db;uR=1;var e=Eh,t=si;function n(r){e.call(this,r==null?"canceled":r,e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),db=n,db}var fb,dR;function i6e(){return dR||(dR=1,fb=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),fb}var hb,fR;function hR(){if(fR)return hb;fR=1;var e=si,t=Qye(),n=Xye(),r=GW,i=eq,o=n6e(),s=r6e(),a=ZW,c=Eh,u=A6(),d=i6e();return hb=function(h){return new Promise(function(m,v){var b=h.data,x=h.headers,C=h.responseType,w;function S(){h.cancelToken&&h.cancelToken.unsubscribe(w),h.signal&&h.signal.removeEventListener("abort",w)}e.isFormData(b)&&e.isStandardBrowserEnv()&&delete x["Content-Type"];var T=new XMLHttpRequest;if(h.auth){var E=h.auth.username||"",k=h.auth.password?unescape(encodeURIComponent(h.auth.password)):"";x.Authorization="Basic "+btoa(E+":"+k)}var _=i(h.baseURL,h.url);T.open(h.method.toUpperCase(),r(_,h.params,h.paramsSerializer),!0),T.timeout=h.timeout;function O(){if(!!T){var N="getAllResponseHeaders"in T?o(T.getAllResponseHeaders()):null,j=!C||C==="text"||C==="json"?T.responseText:T.response,G={data:j,status:T.status,statusText:T.statusText,headers:N,config:h,request:T};t(function(re){m(re),S()},function(re){v(re),S()},G),T=null}}if("onloadend"in T?T.onloadend=O:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(O)},T.onabort=function(){!T||(v(new c("Request aborted",c.ECONNABORTED,h,T)),T=null)},T.onerror=function(){v(new c("Network Error",c.ERR_NETWORK,h,T,T)),T=null},T.ontimeout=function(){var j=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded",G=h.transitional||a;h.timeoutErrorMessage&&(j=h.timeoutErrorMessage),v(new c(j,G.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,h,T)),T=null},e.isStandardBrowserEnv()){var D=(h.withCredentials||s(_))&&h.xsrfCookieName?n.read(h.xsrfCookieName):void 0;D&&(x[h.xsrfHeaderName]=D)}"setRequestHeader"in T&&e.forEach(x,function(j,G){typeof b>"u"&&G.toLowerCase()==="content-type"?delete x[G]:T.setRequestHeader(G,j)}),e.isUndefined(h.withCredentials)||(T.withCredentials=!!h.withCredentials),C&&C!=="json"&&(T.responseType=h.responseType),typeof h.onDownloadProgress=="function"&&T.addEventListener("progress",h.onDownloadProgress),typeof h.onUploadProgress=="function"&&T.upload&&T.upload.addEventListener("progress",h.onUploadProgress),(h.cancelToken||h.signal)&&(w=function(N){!T||(v(!N||N&&N.type?new u:N),T.abort(),T=null)},h.cancelToken&&h.cancelToken.subscribe(w),h.signal&&(h.signal.aborted?w():h.signal.addEventListener("abort",w))),b||(b=null);var L=d(_);if(L&&["http","https","file"].indexOf(L)===-1){v(new c("Unsupported protocol "+L+":",c.ERR_BAD_REQUEST,h));return}T.send(b)})},hb}var pb,pR;function o6e(){return pR||(pR=1,pb=null),pb}var Dr=si,mR=Gye,gR=Eh,s6e=ZW,a6e=JW,l6e={"Content-Type":"application/x-www-form-urlencoded"};function vR(e,t){!Dr.isUndefined(e)&&Dr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function c6e(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=hR()),e}function u6e(e,t,n){if(Dr.isString(e))try{return(t||JSON.parse)(e),Dr.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var $6={transitional:s6e,adapter:c6e(),transformRequest:[function(t,n){if(mR(n,"Accept"),mR(n,"Content-Type"),Dr.isFormData(t)||Dr.isArrayBuffer(t)||Dr.isBuffer(t)||Dr.isStream(t)||Dr.isFile(t)||Dr.isBlob(t))return t;if(Dr.isArrayBufferView(t))return t.buffer;if(Dr.isURLSearchParams(t))return vR(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r=Dr.isObject(t),i=n&&n["Content-Type"],o;if((o=Dr.isFileList(t))||r&&i==="multipart/form-data"){var s=this.env&&this.env.FormData;return a6e(o?{"files[]":t}:t,s&&new s)}else if(r||i==="application/json")return vR(n,"application/json"),u6e(t);return t}],transformResponse:[function(t){var n=this.transitional||$6.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,o=!r&&this.responseType==="json";if(o||i&&Dr.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?gR.from(s,gR.ERR_BAD_RESPONSE,this,null,this.response):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:o6e()},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Dr.forEach(["delete","get","head"],function(t){$6.headers[t]={}});Dr.forEach(["post","put","patch"],function(t){$6.headers[t]=Dr.merge(l6e)});var QT=$6,d6e=si,f6e=QT,h6e=function(t,n,r){var i=this||f6e;return d6e.forEach(r,function(s){t=s.call(i,t,n)}),t},mb,yR;function tq(){return yR||(yR=1,mb=function(t){return!!(t&&t.__CANCEL__)}),mb}var bR=si,gb=h6e,p6e=tq(),m6e=QT,g6e=A6();function vb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new g6e}var v6e=function(t){vb(t),t.headers=t.headers||{},t.data=gb.call(t,t.data,t.headers,t.transformRequest),t.headers=bR.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),bR.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||m6e.adapter;return n(t).then(function(i){return vb(t),i.data=gb.call(t,i.data,i.headers,t.transformResponse),i},function(i){return p6e(i)||(vb(t),i&&i.response&&(i.response.data=gb.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},co=si,nq=function(t,n){n=n||{};var r={};function i(d,f){return co.isPlainObject(d)&&co.isPlainObject(f)?co.merge(d,f):co.isPlainObject(f)?co.merge({},f):co.isArray(f)?f.slice():f}function o(d){if(co.isUndefined(n[d])){if(!co.isUndefined(t[d]))return i(void 0,t[d])}else return i(t[d],n[d])}function s(d){if(!co.isUndefined(n[d]))return i(void 0,n[d])}function a(d){if(co.isUndefined(n[d])){if(!co.isUndefined(t[d]))return i(void 0,t[d])}else return i(void 0,n[d])}function c(d){if(d in n)return i(t[d],n[d]);if(d in t)return i(void 0,t[d])}var u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return co.forEach(Object.keys(t).concat(Object.keys(n)),function(f){var h=u[f]||o,p=h(f);co.isUndefined(p)&&h!==c||(r[f]=p)}),r},yb,xR;function rq(){return xR||(xR=1,yb={version:"0.27.2"}),yb}var y6e=rq().version,yc=Eh,XT={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){XT[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var CR={};XT.transitional=function(t,n,r){function i(o,s){return"[Axios v"+y6e+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return function(o,s,a){if(t===!1)throw new yc(i(s," has been removed"+(n?" in "+n:"")),yc.ERR_DEPRECATED);return n&&!CR[s]&&(CR[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function b6e(e,t,n){if(typeof e!="object")throw new yc("options must be an object",yc.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new yc("option "+o+" must be "+c,yc.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new yc("Unknown option "+o,yc.ERR_BAD_OPTION)}}var x6e={assertOptions:b6e,validators:XT},iq=si,C6e=GW,wR=qye,SR=v6e,D6=nq,w6e=eq,oq=x6e,y1=oq.validators;function Xf(e){this.defaults=e,this.interceptors={request:new wR,response:new wR}}Xf.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D6(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&oq.assertOptions(r,{silentJSONParsing:y1.transitional(y1.boolean),forcedJSONParsing:y1.transitional(y1.boolean),clarifyTimeoutError:y1.transitional(y1.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(o=o&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});var s=[];this.interceptors.response.forEach(function(p){s.push(p.fulfilled,p.rejected)});var a;if(!o){var c=[SR,void 0];for(Array.prototype.unshift.apply(c,i),c=c.concat(s),a=Promise.resolve(n);c.length;)a=a.then(c.shift(),c.shift());return a}for(var u=n;i.length;){var d=i.shift(),f=i.shift();try{u=d(u)}catch(h){f(h);break}}try{a=SR(u)}catch(h){return Promise.reject(h)}for(;s.length;)a=a.then(s.shift(),s.shift());return a};Xf.prototype.getUri=function(t){t=D6(this.defaults,t);var n=w6e(t.baseURL,t.url);return C6e(n,t.params,t.paramsSerializer)};iq.forEach(["delete","get","head","options"],function(t){Xf.prototype[t]=function(n,r){return this.request(D6(r||{},{method:t,url:n,data:(r||{}).data}))}});iq.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(D6(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Xf.prototype[t]=n(),Xf.prototype[t+"Form"]=n(!0)});var S6e=Xf,bb,ER;function E6e(){if(ER)return bb;ER=1;var e=A6();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var i=this;this.promise.then(function(o){if(!!i._listeners){var s,a=i._listeners.length;for(s=0;s<a;s++)i._listeners[s](o);i._listeners=null}}),this.promise.then=function(o){var s,a=new Promise(function(c){i.subscribe(c),s=c}).then(o);return a.cancel=function(){i.unsubscribe(s)},a},n(function(s){i.reason||(i.reason=new e(s),r(i.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},t.prototype.unsubscribe=function(r){if(!!this._listeners){var i=this._listeners.indexOf(r);i!==-1&&this._listeners.splice(i,1)}},t.source=function(){var r,i=new t(function(s){r=s});return{token:i,cancel:r}},bb=t,bb}var xb,TR;function T6e(){return TR||(TR=1,xb=function(t){return function(r){return t.apply(null,r)}}),xb}var Cb,kR;function k6e(){if(kR)return Cb;kR=1;var e=si;return Cb=function(n){return e.isObject(n)&&n.isAxiosError===!0},Cb}var _R=si,_6e=WW,i5=S6e,A6e=nq,$6e=QT;function sq(e){var t=new i5(e),n=_6e(i5.prototype.request,t);return _R.extend(n,i5.prototype,t),_R.extend(n,t),n.create=function(i){return sq(A6e(e,i))},n}var oo=sq($6e);oo.Axios=i5;oo.CanceledError=A6();oo.CancelToken=E6e();oo.isCancel=tq();oo.VERSION=rq().version;oo.toFormData=JW;oo.AxiosError=Eh;oo.Cancel=oo.CanceledError;oo.all=function(t){return Promise.all(t)};oo.spread=T6e();oo.isAxiosError=k6e();jT.exports=oo;jT.exports.default=oo;(function(e){e.exports=jT.exports})(jW);const D6e=Nm(jW.exports);function O6e(e){return e.split(" ",2)[0]}function Rt(e){var t,n,r,i;(n=(t=e.response)==null?void 0:t.data)!=null&&n.error?F({type:"error",title:(r=e.response.data)==null?void 0:r.error.title,message:(i=e.response.data)==null?void 0:i.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}function O6(e){return e.replace(/-([a-z])/g,function(t,n){return n.toUpperCase()})}function P6(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function aq(){const{hostname:e}=window.location;return e==="web.kynno.app"||e==="kynno-app.localhost"?"https://api.kynno.app":"https://api.primfeed.com"}const P6e=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=e});function lq(e){return e*Math.PI/180}function R6e(e,t,n){const r=lq(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}async function M6e(e,t,n=0,r={horizontal:!1,vertical:!1}){const i=await P6e(e),o=document.createElement("canvas"),s=o.getContext("2d");if(!s)return null;const a=lq(n),{width:c,height:u}=R6e(i.width,i.height,n);o.width=c,o.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-i.width/2,-i.height/2),s.drawImage(i,0,0);const d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(h=>{d.toBlob(p=>{h(URL.createObjectURL(p))},"image/jpeg")})):null}function wb({uuid:e=null,size:t}){return kn(e?{uuid:e,size:t}:{uuid:"product",size:t})}function kn({uuid:e,size:t}){return aq()+"/assets/texture/"+e+"/"+t+".jpg"}const Ne=de("span");function I6e({url:e}){if(e===null)return null;const t=e.match(/secondlife\/(.+?)\/(\d+)\/(\d+)\/(\d+)/),n=e.match(/marketplace\.secondlife\.com\/(de-DE\/)?stores\/(\d+)/);if(t){const[,r,i,o,s]=t,a=decodeURIComponent(r);return g(Ne,{children:["Region:"," ",l(ie,{to:e,target:"_blank",rel:"noopener",children:`${a} (${i}, ${o}, ${s})`})]})}else if(n){const r=n[2];return g(Ne,{children:["Marketplace:"," ",l(ie,{to:e,target:"_blank",rel:"noopener",children:`Store #${r}`})]})}return l(Ne,{children:l(ie,{to:e,target:"_blank",rel:"noopener",children:e})})}function L6e(e){y.exports.useEffect(()=>{const t=document.title;return document.title=e,()=>{document.title=t}})}function N6e(e){y.exports.useEffect(()=>{let t=document.querySelector("link[rel~='icon']");t||(t=document.createElement("link"),t.rel="icon",document.getElementsByTagName("head")[0].appendChild(t)),t.href=e},[e])}function F6e(e){y.exports.useEffect(()=>{let t=document.querySelector("link[rel~='apple-touch-icon']");t||(t=document.createElement("link"),t.rel="apple-touch-icon",document.getElementsByTagName("head")[0].appendChild(t)),t.href=e},[e])}function B6e(e){y.exports.useEffect(()=>{let t=document.querySelector("meta[name~='description']");t||(t=document.createElement("meta"),t.name="description",t.content=e,document.getElementsByTagName("head")[0].appendChild(t))},[e])}function H6e(e){y.exports.useEffect(()=>{let t=document.querySelector("meta[property~='og:image']");t||(t=document.createElement("meta"),t.setAttribute("property","og:image"),t.content=e,document.getElementsByTagName("head")[0].appendChild(t))},[e])}const z6e=/maps\.secondlife\.com\/secondlife\/([^/]+)\/(\d+)\/(\d+)\/(\d+)$/,U6e=(e,t=!1)=>{const n=e.match(z6e);if(n)try{const[r,i,o,s,a]=n,c=decodeURIComponent(i).replace("%20"," ");return t?`${c} (${o}, ${s}, ${a})`:c}catch{return null}return null};function cq(e){if(e<60)return`${e} minute${e!==1?"s":""}`;if(e%60===0){const t=e/60;return`${t} hour${t!==1?"s":""}`}else return`${(e/60).toFixed(1)} hours`}function uq(e,t=1024,n=1024,r){const i=new Image,o=new FileReader;o.onload=s=>{if(s.target&&s.target.result instanceof ArrayBuffer){const a=new Blob([new Uint8Array(s.target.result)]);i.src=URL.createObjectURL(a)}},i.onload=function(){const s=document.createElement("canvas"),a=s.getContext("2d");let c=i.width,u=i.height;c>u?c>t&&(u=Math.round(u*=t/c),c=t):u>n&&(c=Math.round(c*=n/u),u=n),s.width=c,s.height=u,a.drawImage(i,0,0,c,u);const d=s.toDataURL(e.type);URL.revokeObjectURL(i.src),r(d)},e instanceof Blob&&o.readAsArrayBuffer(e)}const o5=D6e.create({baseURL:aq(),headers:{"Content-Type":"application/json"}}),dq=y.exports.createContext(o5);function V6e({children:e}){return y.exports.useMemo(()=>(o5.interceptors.request.use(t=>{const n=localStorage.getItem("token"),r=localStorage.getItem("selectedStore");return n&&(t.headers.Authorization=`Bearer ${n}`,t.headers["kynno-selected-store"]=r),t}),o5),[]),l(dq.Provider,{value:o5,children:e})}function te(){return y.exports.useContext(dq)}function ms(){const e=te(),t=hs();return _t(["me",t.token],async()=>await e.get("/me").then(n=>(window.localStorage.setItem("serverVersion",n.data.version),n.data)).catch(function(n){return n.response.status===403&&t.signout(),null}))}const fq=y.exports.forwardRef((e,t)=>y.exports.createElement(Pt.span,ue({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),j6e=fq,[R6,FGe]=ii("Tooltip",[wu]),ZT=wu(),W6e="TooltipProvider",q6e=700,lw="tooltip.open",[K6e,JT]=R6(W6e),G6e=e=>{const{__scopeTooltip:t,delayDuration:n=q6e,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[s,a]=y.exports.useState(!0),c=y.exports.useRef(!1),u=y.exports.useRef(0);return y.exports.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),y.exports.createElement(K6e,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:y.exports.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.exports.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.exports.useCallback(d=>{c.current=d},[]),disableHoverableContent:i},o)},ek="Tooltip",[Y6e,dg]=R6(ek),Q6e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,c=JT(ek,e.__scopeTooltip),u=ZT(t),[d,f]=y.exports.useState(null),h=es(),p=y.exports.useRef(0),m=s!=null?s:c.disableHoverableContent,v=a!=null?a:c.delayDuration,b=y.exports.useRef(!1),[x=!1,C]=$o({prop:r,defaultProp:i,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(lw))):c.onClose(),o==null||o(k)}}),w=y.exports.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),S=y.exports.useCallback(()=>{window.clearTimeout(p.current),b.current=!1,C(!0)},[C]),T=y.exports.useCallback(()=>{window.clearTimeout(p.current),C(!1)},[C]),E=y.exports.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,C(!0)},v)},[v,C]);return y.exports.useEffect(()=>()=>window.clearTimeout(p.current),[]),y.exports.createElement(ug,u,y.exports.createElement(Y6e,{scope:t,contentId:h,open:x,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:y.exports.useCallback(()=>{c.isOpenDelayed?E():S()},[c.isOpenDelayed,E,S]),onTriggerLeave:y.exports.useCallback(()=>{m?T():window.clearTimeout(p.current)},[T,m]),onOpen:S,onClose:T,disableHoverableContent:m},n))},AR="TooltipTrigger",X6e=y.exports.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=dg(AR,n),o=JT(AR,n),s=ZT(n),a=y.exports.useRef(null),c=zt(t,a,i.onTriggerChange),u=y.exports.useRef(!1),d=y.exports.useRef(!1),f=y.exports.useCallback(()=>u.current=!1,[]);return y.exports.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),y.exports.createElement(x6,ue({asChild:!0},s),y.exports.createElement(Pt.button,ue({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:Ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ue(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ue(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Ue(e.onBlur,i.onClose),onClick:Ue(e.onClick,i.onClose)})))}),hq="TooltipPortal",[Z6e,J6e]=R6(hq,{forceMount:void 0}),e9e=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=dg(hq,t);return y.exports.createElement(Z6e,{scope:t,forceMount:n},y.exports.createElement(Hi,{present:n||o.open},y.exports.createElement(Ny,{asChild:!0,container:i},r)))},Cm="TooltipContent",t9e=y.exports.forwardRef((e,t)=>{const n=J6e(Cm,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=dg(Cm,e.__scopeTooltip);return y.exports.createElement(Hi,{present:r||s.open},s.disableHoverableContent?y.exports.createElement(pq,ue({side:i},o,{ref:t})):y.exports.createElement(n9e,ue({side:i},o,{ref:t})))}),n9e=y.exports.forwardRef((e,t)=>{const n=dg(Cm,e.__scopeTooltip),r=JT(Cm,e.__scopeTooltip),i=y.exports.useRef(null),o=zt(t,i),[s,a]=y.exports.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,h=y.exports.useCallback(()=>{a(null),f(!1)},[f]),p=y.exports.useCallback((m,v)=>{const b=m.currentTarget,x={x:m.clientX,y:m.clientY},C=i9e(x,b.getBoundingClientRect()),w=o9e(x,C),S=s9e(v.getBoundingClientRect()),T=l9e([...w,...S]);a(T),f(!0)},[f]);return y.exports.useEffect(()=>()=>h(),[h]),y.exports.useEffect(()=>{if(c&&d){const m=b=>p(b,d),v=b=>p(b,c);return c.addEventListener("pointerleave",m),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",v)}}},[c,d,p,h]),y.exports.useEffect(()=>{if(s){const m=v=>{const b=v.target,x={x:v.clientX,y:v.clientY},C=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),w=!a9e(x,s);C?h():w&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,d,s,u,h]),y.exports.createElement(pq,ue({},e,{ref:o}))}),[r9e,BGe]=R6(ek,{isInside:!1}),pq=y.exports.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,c=dg(Cm,n),u=ZT(n),{onClose:d}=c;return y.exports.useEffect(()=>(document.addEventListener(lw,d),()=>document.removeEventListener(lw,d)),[d]),y.exports.useEffect(()=>{if(c.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),y.exports.createElement(Zm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d},y.exports.createElement(C6,ue({"data-state":c.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),y.exports.createElement(aU,null,r),y.exports.createElement(r9e,{scope:n,isInside:!0},y.exports.createElement(j6e,{id:c.contentId,role:"tooltip"},i||r))))});function i9e(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function o9e(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function s9e(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function a9e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,u=t[s].x,d=t[s].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(i=!i)}return i}function l9e(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),c9e(t)}function c9e(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const u9e=G6e,d9e=Q6e,f9e=X6e,h9e=e9e,p9e=t9e;function Et({children:e,content:t,enabled:n=!0,delayDuration:r=0,small:i=!1,side:o="top"}){const[s,a]=y.exports.useState(!1);if(!n)return e;let c=mq;return i&&(c=b9e),l(u9e,{delayDuration:r,children:g(d9e,{open:s,onOpenChange:a,children:[l(f9e,{asChild:!0,onClick:()=>a(u=>!u),onFocus:()=>setTimeout(()=>a(!0),0),onBlur:()=>a(!1),children:e}),l(h9e,{children:l(c,{side:o,css:{maxHeight:"var(--radix-tooltip-content-available-height)",maxWidth:300,borderRadius:i?4:12,fontSize:i?12:14,padding:i?"$1 $2":"$3 $4",zIndex:1e4,fontWeight:"$medium","@media (max-width: 767px)":{maxWidth:"var(--radix-popper-available-width)"}},sideOffset:10,collisionPadding:8,children:t})})]})})}const m9e=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),g9e=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),v9e=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),y9e=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),mq=wi(p9e,{lineHeight:1.3,color:"white",backgroundColor:"#0d0d0d",boxShadow:"0px 0px 0px 2px #191815",border:"1px solid rgb(255 255 255 / 20%)",animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:v9e},'&[data-side="right"]':{animationName:y9e},'&[data-side="bottom"]':{animationName:m9e},'&[data-side="left"]':{animationName:g9e}}}),b9e=wi(mq,{borderRadius:6,fontSize:13,backgroundColor:"$yellowBlack",border:"1px solid rgb(255 255 255 / 20%)"});function x9e({children:e}){const[t,n]=Ae.useState(localStorage.getItem("token")),o={token:t,signin:(s,a)=>{if(localStorage.setItem("token",s.token),localStorage.setItem("selectedStore",s.selectedStore?s.selectedStore:"none"),n(s.token),a)return a()},signout:s=>{if(n(null),localStorage.removeItem("token"),localStorage.removeItem("selectedStore"),s)return s()}};return l(RE.Provider,{value:o,children:e})}function C9e(){const e=te(),t=hs();return _t(["me"],async()=>await e.get("/pf/me").then(n=>(window.localStorage.setItem("serverVersion",n.data.version),n.data)).catch(function(n){return(n.response.status===403||n.response.status===401)&&t.signout(),null}))}const $R=de(hh,{marginRight:"$2",width:24,color:"$textColor"}),DR={cursor:"pointer",backgroundColor:"$hoveringItem",color:"$gray",transition:"0.2s background-color"},cw=de(ps,{display:"block",px:"$2",marginTop:"$1",height:30,fontWeight:"$medium",borderRadius:8,flex:"0 0 100%","&:hover":DR,transition:"0.2s background-color",variants:{active:{true:DR}}}),OR={users:eU,management:Ile,gears:iU,gear:mce,icons:Rle,cameraRetro:rce,mailbox:tU,"envelopes-bulk":Nle,"hard-drive":VE,"people-group":Vle,boxOpenFull:Iy,"house-blank":dce,server:Xle,inbox:kce,messageImage:Ule,envelope:Xm,book:Nce,fileLines:Xz,comments:Ble,explore:jE,store:Dce,"user-group-simple":Oce};function PR({path:e,notificationsType:t,badge:n,title:r,icon:i,active:o,tooltip:s=null}){const a=Ee(),c=!e.startsWith("/"),u=te();function d(){n!==null&&u.patch("/notifications",{types:t}).then(()=>{a.invalidateQueries({queryKey:["me"]}),a.invalidateQueries({queryKey:["notifications"]})})}return s?l(Et,{enabled:!0,side:"right",content:l(A,{children:s}),delayDuration:300,small:!0,children:g(cw,{to:e,active:o,target:c?"_blank":"",onClick:d,css:{display:"flex",alignItems:"center"},children:[g(M,{css:{display:"inline-flex",position:"relative"},children:[l(RR,{label:n}),l($R,{icon:OR[i]})]}),r]})}):g(cw,{to:e,active:o,target:c?"_blank":"",onClick:d,css:{display:"flex",alignItems:"center"},children:[g(M,{css:{display:"inline-flex",position:"relative"},children:[l(RR,{label:n}),l($R,{icon:OR[i]})]}),r]})}function w9e({path:e,title:t,icon:n,active:r}){const i=!e.startsWith("/");return l(cw,{to:e,active:r,target:i?"_blank":"",css:{display:"flex",alignItems:"center",marginLeft:"$3"},children:g(M,{css:{alignItems:"center",overflow:"hidden"},children:[l(Dt,{css:{borderRadius:4,display:"block",marginRight:"$2"},alt:"",width:24,height:24,src:kn({uuid:n||"store",size:128})}),l(A,{text:"ellipsis",children:t})]})})}function RR({label:e}){return e===null?l(z,{}):l(M,{css:{position:"absolute",top:-8,right:6,minWidth:14,height:14,backgroundColor:"$destructive500",px:"$1",color:"white",borderRadius:100,fontSize:9,alignItems:"center",justifyContent:"center"},children:e})}const S9e=de("div",{"&:not(:last-child)":{marginBottom:"$6"},variants:{bottom:{true:{display:"flex",flexGrow:1,alignItems:"flex-end"}}}}),E9e=de("div",{fontFamily:"$redHatDisplay",fontWeight:"$bold",color:"$gray400",marginBottom:"$2",marginLeft:"$1"});function MR({title:e,badge:t,children:n,bottom:r}){return l(S9e,{bottom:r,children:g(ce,{css:{width:"100%"},children:[e&&g(E9e,{children:[e,t]}),n]})})}function T9e(){const{selectedStore:e}=st(),t=[{links:[{label:"Settings",path:"/settings",icon:"gears"}]},{category:{label:"Explore"},links:[{label:"Events & Stores",path:"/explore/events-stores",icon:"store",tooltip:"Search for events and stores to apply to"},{label:"Users",path:"/explore/users",icon:"user-group-simple",tooltip:e!==null?"Browse the users and manually invite them to your store or event":null}]},{category:{label:"EasyBloggers"},links:[{label:"Dashboard",path:"/dashboard",icon:"house-blank"},{label:"Invitations",notificationType:["blogger_invited","event_invite_store"],path:"/invitations",icon:"inbox",tooltip:"Personal invitation sent by stores or events"},{label:"Members",notificationType:["blogger_accepted_invitation","blogger_joined"],path:"/bloggers/bloggers",icon:"users",permission:"members"},{label:"Bloggers App",notificationType:["new_application"],path:"/bloggers/applications",icon:"fileLines",permission:"bloggers_applications",tooltip:"Review the bloggers applications you have received"},{label:"Designers App",notificationType:["new_designers_application"],path:"/designers/applications",icon:"fileLines",permission:"designers_applications",tooltip:"Review the designers applications you have received for your event"},{label:"Products",notificationType:["new_product"],path:"/bloggers/products",icon:"boxOpenFull",permission:"products"},{label:"Posts",notificationType:["new_post_completed"],path:"/bloggers/posts",icon:"messageImage",permission:"posts"},{label:"Mailbox",notificationType:["new_mail"],path:"/bloggers/mailbox",icon:"envelope",permission:"mailbox"}]},{category:{label:"EasySubscribers",permission:"easy_subscribers"},links:[{label:"Subscribers",path:"/subscribers/subscribers",icon:"people-group"},{label:"Newsletters",path:"/subscribers/newsletters",icon:"envelopes-bulk"}]},{category:{label:"Kynno",permission:"dropboxes"},links:[{label:"Dropboxes",path:"/bloggers/dropboxes",icon:"hard-drive",permission:"dropboxes"}]},{category:{type:"bottom"},links:[{label:"Documentation",path:"https://docs.kynno.app/easybloggers/getting-started",icon:"book"},{label:"Send feedback",path:"https://forms.gle/NzzvJcaZ8mViznZz7",icon:"comments",tooltip:"Is there anything we could do better? Let me know."}]}],{isLoading:n,data:r}=ms(),i=ao(),o=i.pathname+decodeURI(i.search);if(n)return l(z,{});const s=r.permissions;return l(z,{children:t.map((a,c)=>{var u,d,f,h,p;return((u=a.category)==null?void 0:u.type)!=="bottom"?((d=a.category)==null?void 0:d.permission)===void 0||((h=s.features[(f=a.category)==null?void 0:f.permission])==null?void 0:h.view)===!0?l(MR,{title:(p=a.category)==null?void 0:p.label,children:a.links.map(m=>{var v;if(m.permission===void 0||((v=s.features[m.permission])==null?void 0:v.view)===!0){let b=null;m.notificationType&&m.notificationType.map(w=>{w in r.notifications&&(b+=r.notifications[w])});const x=[];x.push(l(PR,{path:m.path,title:m.label,icon:m.icon,badge:b>0?b:null,notificationsType:m.notificationType,active:o.startsWith(m.path),tooltip:m==null?void 0:m.tooltip},"link-"+m.path));const C=r.productsSubCategory;return m.permission==="products"&&C&&C.length>0&&C.forEach((w,S)=>{x.push(l(w9e,{path:w.path,title:w.name,icon:w.pictureUuid,badge:b>0?b:null,notificationsType:m.notificationType,active:o.startsWith(w.path)},"subcategorylink-"+S))}),x}})},"category-"+c):l(z,{}):l(MR,{bottom:!0,title:a.category.label,children:a.links.map(m=>{var v;if(m.permission===void 0||((v=s.features[m.permission])==null?void 0:v.view)===!0)return l(PR,{path:m.path,title:m.label,icon:m.icon,badge:null,notificationsType:null,active:o.startsWith(m.path),tooltip:m==null?void 0:m.tooltip},"link-"+m.path)})},"category-"+c)})})}const gq="Avatar",[k9e,HGe]=ii(gq),[_9e,vq]=k9e(gq),A9e=y.exports.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.exports.useState("idle");return y.exports.createElement(_9e,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},y.exports.createElement(Pt.span,ue({},r,{ref:t})))}),$9e="AvatarImage",D9e=y.exports.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,s=vq($9e,n),a=R9e(r),c=Ao(u=>{i(u),s.onImageLoadingStatusChange(u)});return ri(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?y.exports.createElement(Pt.img,ue({},o,{ref:t,src:r})):null}),O9e="AvatarFallback",P9e=y.exports.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=vq(O9e,n),[s,a]=y.exports.useState(r===void 0);return y.exports.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&o.imageLoadingStatus!=="loaded"?y.exports.createElement(Pt.span,ue({},i,{ref:t})):null});function R9e(e){const[t,n]=y.exports.useState("idle");return ri(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=s=>()=>{!r||n(s)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}const M9e=de(A9e,{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",borderRadius:8,variants:{round:{true:{borderRadius:1e4}}}}),yq=de(D9e,{});yq.defaultProps={loading:"lazy"};const I9e=de(P9e,{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"$cardBackgroundColor",lineHeight:1,fontWeight:"$medium",borderRadius:8});function bi({pictureUuid:e=null,profileMedia:t=null,profileMediaSize:n=256,css:r=null,size:i=null,round:o=!1,onClick:s=null}){const a=e||"avatar",c=i||34;let u=t+`_x${n}.webp`;return t===null&&(u=kn({uuid:a,size:Math.min(c*2,512)})),g(M9e,{css:{flexShrink:0,height:c,width:c,...r},round:o,onClick:s,children:[l(yq,{css:{maxHeight:"100%",userSelect:"none"},width:c,height:c,src:u}),l(I9e,{children:l(Dt,{css:{userSelect:"none",maxHeight:"100%"},src:u})})]})}function IR({canChangeStores:e}){var n;const t=st();return g(M,{css:{p:"$2",borderRadius:8,alignItems:"center",transition:"0.3s background-color",overflow:"auto","&:hover, &:active":e?{cursor:"pointer",transition:"0.3s background-color",fontWeight:"bold",backgroundColor:"$hoveringItem"}:{}},children:[t.selectedStore&&g(z,{children:[l(Dn,{store:{id:t.selectedStore.id,pictureUuid:t.selectedStore.pictureUuid},showHoverCard:!1,pictureSize:24}),l(ce,{type:"textEllipsis",css:{mx:"$1",fontWeight:"$medium",flexGrow:1},children:l(A,{css:{fontSize:"0.9rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(n=t.selectedStore)==null?void 0:n.name})})]}),t.selectedStore===null&&g(z,{children:[l(bi,{pictureUuid:t.user.profilePictureUuid,size:24,round:!0}),l(ce,{css:{marginLeft:"$3",fontWeight:"$medium",flexGrow:1},children:l(A,{css:{fontSize:"0.9rem"},children:t.user.name})})]}),e&&g(P,{children:[l(W,{icon:WH,css:{height:12,color:"$gray400"}}),l(W,{icon:Sy,css:{height:12,marginTop:"-$1",color:"$gray400"}})]})]})}function L9e(){const{availableStores:e,blogger:t}=st(),n=e.length>1||e.length===1&&t.countStores>0;return n?l(M,{css:{marginBottom:"$4"},children:l(Gbe,{children:l(IR,{canChangeStores:n})})}):l(M,{css:{marginBottom:"$4"},children:l(IR,{canChangeStores:n})})}const N9e=de(UW,{backgroundColor:"$borderColor",height:1}),F9e=de("div",{padding:"0 $4",overflow:"auto",flexGrow:1,display:"flex",flexDirection:"column",my:"$4"}),B9e=de("div",{backgroundColor:"$cardBackgroundColor",minWidth:240,maxWidth:240,width:240,height:"100vh",borderRight:"1px solid $borderColor",display:"flex",flexDirection:"column",transition:"transform 0.3s",willChange:"transform","& a":{textDecoration:"none"},variants:{mobile:{true:{position:"absolute",zIndex:100}},hide:{true:{transform:"translateX(-260px)",transition:"transform 0.3s"}}}});function H9e({hideSidebar:e=!1,isMobile:t=!1}){return g(B9e,{mobile:t,hide:!e,children:[g(F9e,{children:[l(L9e,{}),l(T9e,{})]}),l(N9e,{})]})}function M6(e){const t=e+"CollectionProvider",[n,r]=ii(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:v}=p,b=Ae.useRef(null),x=Ae.useRef(new Map).current;return Ae.createElement(i,{scope:m,itemMap:x,collectionRef:b},v)},a=e+"CollectionSlot",c=Ae.forwardRef((p,m)=>{const{scope:v,children:b}=p,x=o(a,v),C=zt(m,x.collectionRef);return Ae.createElement(Pd,{ref:C},b)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Ae.forwardRef((p,m)=>{const{scope:v,children:b,...x}=p,C=Ae.useRef(null),w=zt(m,C),S=o(u,v);return Ae.useEffect(()=>(S.itemMap.set(C,{ref:C,...x}),()=>void S.itemMap.delete(C))),Ae.createElement(Pd,{[d]:"",ref:w},b)});function h(p){const m=o(e+"CollectionConsumer",p);return Ae.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((S,T)=>x.indexOf(S.ref.current)-x.indexOf(T.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},h,r]}const z9e=y.exports.createContext(void 0);function fg(e){const t=y.exports.useContext(z9e);return e||t||"ltr"}const Sb="rovingFocusGroup.onEntryFocus",U9e={bubbles:!1,cancelable:!0},tk="RovingFocusGroup",[uw,bq,V9e]=M6(tk),[j9e,I6]=ii(tk,[V9e]),[W9e,q9e]=j9e(tk),K9e=y.exports.forwardRef((e,t)=>y.exports.createElement(uw.Provider,{scope:e.__scopeRovingFocusGroup},y.exports.createElement(uw.Slot,{scope:e.__scopeRovingFocusGroup},y.exports.createElement(G9e,ue({},e,{ref:t}))))),G9e=y.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=y.exports.useRef(null),h=zt(t,f),p=fg(o),[m=null,v]=$o({prop:s,defaultProp:a,onChange:c}),[b,x]=y.exports.useState(!1),C=Ao(u),w=bq(n),S=y.exports.useRef(!1),[T,E]=y.exports.useState(0);return y.exports.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(Sb,C),()=>k.removeEventListener(Sb,C)},[C]),y.exports.createElement(W9e,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:m,onItemFocus:y.exports.useCallback(k=>v(k),[v]),onItemShiftTab:y.exports.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.exports.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:y.exports.useCallback(()=>E(k=>k-1),[])},y.exports.createElement(Pt.div,ue({tabIndex:b||T===0?-1:0,"data-orientation":r},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:Ue(e.onMouseDown,()=>{S.current=!0}),onFocus:Ue(e.onFocus,k=>{const _=!S.current;if(k.target===k.currentTarget&&_&&!b){const O=new CustomEvent(Sb,U9e);if(k.currentTarget.dispatchEvent(O),!O.defaultPrevented){const D=w().filter(X=>X.focusable),L=D.find(X=>X.active),N=D.find(X=>X.id===m),G=[L,N,...D].filter(Boolean).map(X=>X.ref.current);xq(G)}}S.current=!1}),onBlur:Ue(e.onBlur,()=>x(!1))})))}),Y9e="RovingFocusGroupItem",Q9e=y.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=es(),c=o||a,u=q9e(Y9e,n),d=u.currentTabStopId===c,f=bq(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return y.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),y.exports.createElement(uw.ItemSlot,{scope:n,id:c,focusable:r,active:i},y.exports.createElement(Pt.span,ue({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:t,onMouseDown:Ue(e.onMouseDown,m=>{r?u.onItemFocus(c):m.preventDefault()}),onFocus:Ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ue(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=J9e(m,u.orientation,u.dir);if(v!==void 0){m.preventDefault();let x=f().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const C=x.indexOf(m.currentTarget);x=u.loop?e8e(x,C+1):x.slice(C+1)}setTimeout(()=>xq(x))}})})))}),X9e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z9e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function J9e(e,t,n){const r=Z9e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return X9e[r]}function xq(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e8e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Cq=K9e,wq=Q9e,dw=["Enter"," "],t8e=["ArrowDown","PageUp","Home"],Sq=["ArrowUp","PageDown","End"],n8e=[...t8e,...Sq],r8e={ltr:[...dw,"ArrowRight"],rtl:[...dw,"ArrowLeft"]},i8e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},L6="Menu",[wm,o8e,s8e]=M6(L6),[Qd,Eq]=ii(L6,[s8e,wu,I6]),N6=wu(),Tq=I6(),[kq,Su]=Qd(L6),[a8e,hg]=Qd(L6),l8e=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=N6(t),[c,u]=y.exports.useState(null),d=y.exports.useRef(!1),f=Ao(o),h=fg(i);return y.exports.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),y.exports.createElement(ug,a,y.exports.createElement(kq,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u},y.exports.createElement(a8e,{scope:t,onClose:y.exports.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:s},r)))},_q=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=N6(n);return y.exports.createElement(x6,ue({},i,r,{ref:t}))}),Aq="MenuPortal",[c8e,$q]=Qd(Aq,{forceMount:void 0}),u8e=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Su(Aq,t);return y.exports.createElement(c8e,{scope:t,forceMount:n},y.exports.createElement(Hi,{present:n||o.open},y.exports.createElement(Ny,{asChild:!0,container:i},r)))},Us="MenuContent",[d8e,nk]=Qd(Us),f8e=y.exports.forwardRef((e,t)=>{const n=$q(Us,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Su(Us,e.__scopeMenu),s=hg(Us,e.__scopeMenu);return y.exports.createElement(wm.Provider,{scope:e.__scopeMenu},y.exports.createElement(Hi,{present:r||o.open},y.exports.createElement(wm.Slot,{scope:e.__scopeMenu},s.modal?y.exports.createElement(h8e,ue({},i,{ref:t})):y.exports.createElement(p8e,ue({},i,{ref:t})))))}),h8e=y.exports.forwardRef((e,t)=>{const n=Su(Us,e.__scopeMenu),r=y.exports.useRef(null),i=zt(t,r);return y.exports.useEffect(()=>{const o=r.current;if(o)return GE(o)},[]),y.exports.createElement(rk,ue({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),p8e=y.exports.forwardRef((e,t)=>{const n=Su(Us,e.__scopeMenu);return y.exports.createElement(rk,ue({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),rk=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=Su(Us,n),x=hg(Us,n),C=N6(n),w=Tq(n),S=o8e(n),[T,E]=y.exports.useState(null),k=y.exports.useRef(null),_=zt(t,k,b.onContentChange),O=y.exports.useRef(0),D=y.exports.useRef(""),L=y.exports.useRef(0),N=y.exports.useRef(null),j=y.exports.useRef("right"),G=y.exports.useRef(0),X=m?KE:y.exports.Fragment,re=m?{as:Pd,allowPinchZoom:!0}:void 0,oe=H=>{var R,se;const ee=D.current+H,I=S().filter($e=>!$e.disabled),me=document.activeElement,Se=(R=I.find($e=>$e.ref.current===me))===null||R===void 0?void 0:R.textValue,pe=I.map($e=>$e.textValue),ye=O8e(pe,ee,Se),_e=(se=I.find($e=>$e.textValue===ye))===null||se===void 0?void 0:se.ref.current;(function $e(J){D.current=J,window.clearTimeout(O.current),J!==""&&(O.current=window.setTimeout(()=>$e(""),1e3))})(ee),_e&&setTimeout(()=>_e.focus())};y.exports.useEffect(()=>()=>window.clearTimeout(O.current),[]),qE();const U=y.exports.useCallback(H=>{var R,se;return j.current===((R=N.current)===null||R===void 0?void 0:R.side)&&R8e(H,(se=N.current)===null||se===void 0?void 0:se.area)},[]);return y.exports.createElement(d8e,{scope:n,searchRef:D,onItemEnter:y.exports.useCallback(H=>{U(H)&&H.preventDefault()},[U]),onItemLeave:y.exports.useCallback(H=>{var R;U(H)||((R=k.current)===null||R===void 0||R.focus(),E(null))},[U]),onTriggerLeave:y.exports.useCallback(H=>{U(H)&&H.preventDefault()},[U]),pointerGraceTimerRef:L,onPointerGraceIntentChange:y.exports.useCallback(H=>{N.current=H},[])},y.exports.createElement(X,re,y.exports.createElement(WE,{asChild:!0,trapped:i,onMountAutoFocus:Ue(o,H=>{var R;H.preventDefault(),(R=k.current)===null||R===void 0||R.focus()}),onUnmountAutoFocus:s},y.exports.createElement(Zm,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p},y.exports.createElement(Cq,ue({asChild:!0},w,{dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:Ue(c,H=>{x.isUsingKeyboardRef.current||H.preventDefault()})}),y.exports.createElement(C6,ue({role:"menu","aria-orientation":"vertical","data-state":Iq(b.open),"data-radix-menu-content":"",dir:x.dir},C,v,{ref:_,style:{outline:"none",...v.style},onKeyDown:Ue(v.onKeyDown,H=>{const se=H.target.closest("[data-radix-menu-content]")===H.currentTarget,ee=H.ctrlKey||H.altKey||H.metaKey,I=H.key.length===1;se&&(H.key==="Tab"&&H.preventDefault(),!ee&&I&&oe(H.key));const me=k.current;if(H.target!==me||!n8e.includes(H.key))return;H.preventDefault();const pe=S().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);Sq.includes(H.key)&&pe.reverse(),$8e(pe)}),onBlur:Ue(e.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(O.current),D.current="")}),onPointerMove:Ue(e.onPointerMove,Sm(H=>{const R=H.target,se=G.current!==H.clientX;if(H.currentTarget.contains(R)&&se){const ee=H.clientX>G.current?"right":"left";j.current=ee,G.current=H.clientX}}))})))))))}),m8e=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.exports.createElement(Pt.div,ue({},r,{ref:t}))}),fw="MenuItem",LR="menu.itemSelect",ik=y.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.exports.useRef(null),s=hg(fw,e.__scopeMenu),a=nk(fw,e.__scopeMenu),c=zt(t,o),u=y.exports.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(LR,{bubbles:!0,cancelable:!0});f.addEventListener(LR,p=>r==null?void 0:r(p),{once:!0}),lU(f,h),h.defaultPrevented?u.current=!1:s.onClose()}};return y.exports.createElement(Dq,ue({},i,{ref:c,disabled:n,onClick:Ue(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),u.current=!0},onPointerUp:Ue(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Ue(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||dw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Dq=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=nk(fw,n),a=Tq(n),c=y.exports.useRef(null),u=zt(t,c),[d,f]=y.exports.useState(!1),[h,p]=y.exports.useState("");return y.exports.useEffect(()=>{const m=c.current;if(m){var v;p(((v=m.textContent)!==null&&v!==void 0?v:"").trim())}},[o.children]),y.exports.createElement(wm.ItemSlot,{scope:n,disabled:r,textValue:i!=null?i:h},y.exports.createElement(wq,ue({asChild:!0},a,{focusable:!r}),y.exports.createElement(Pt.div,ue({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Ue(e.onPointerMove,Sm(m=>{r?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus())})),onPointerLeave:Ue(e.onPointerLeave,Sm(m=>s.onItemLeave(m))),onFocus:Ue(e.onFocus,()=>f(!0)),onBlur:Ue(e.onBlur,()=>f(!1))}))))}),g8e=y.exports.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return y.exports.createElement(Pq,{scope:e.__scopeMenu,checked:n},y.exports.createElement(ik,ue({role:"menuitemcheckbox","aria-checked":ev(n)?"mixed":n},i,{ref:t,"data-state":ok(n),onSelect:Ue(i.onSelect,()=>r==null?void 0:r(ev(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),v8e="MenuRadioGroup",[zGe,y8e]=Qd(v8e,{value:void 0,onValueChange:()=>{}}),b8e="MenuRadioItem",x8e=y.exports.forwardRef((e,t)=>{const{value:n,...r}=e,i=y8e(b8e,e.__scopeMenu),o=n===i.value;return y.exports.createElement(Pq,{scope:e.__scopeMenu,checked:o},y.exports.createElement(ik,ue({role:"menuitemradio","aria-checked":o},r,{ref:t,"data-state":ok(o),onSelect:Ue(r.onSelect,()=>{var s;return(s=i.onValueChange)===null||s===void 0?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})))}),Oq="MenuItemIndicator",[Pq,C8e]=Qd(Oq,{checked:!1}),w8e=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=C8e(Oq,n);return y.exports.createElement(Hi,{present:r||ev(o.checked)||o.checked===!0},y.exports.createElement(Pt.span,ue({},i,{ref:t,"data-state":ok(o.checked)})))}),S8e=y.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.exports.createElement(Pt.div,ue({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Rq="MenuSub",[E8e,Mq]=Qd(Rq),T8e=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=Su(Rq,t),s=N6(t),[a,c]=y.exports.useState(null),[u,d]=y.exports.useState(null),f=Ao(i);return y.exports.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),y.exports.createElement(ug,s,y.exports.createElement(kq,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d},y.exports.createElement(E8e,{scope:t,contentId:es(),triggerId:es(),trigger:a,onTriggerChange:c},n)))},P2="MenuSubTrigger",k8e=y.exports.forwardRef((e,t)=>{const n=Su(P2,e.__scopeMenu),r=hg(P2,e.__scopeMenu),i=Mq(P2,e.__scopeMenu),o=nk(P2,e.__scopeMenu),s=y.exports.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=y.exports.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return y.exports.useEffect(()=>d,[d]),y.exports.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),y.exports.createElement(_q,ue({asChild:!0},u),y.exports.createElement(Dq,ue({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Iq(n.open)},e,{ref:Ly(t,i.onTriggerChange),onClick:f=>{var h;(h=e.onClick)===null||h===void 0||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ue(e.onPointerMove,Sm(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Ue(e.onPointerLeave,Sm(f=>{var h;d();const p=(h=n.content)===null||h===void 0?void 0:h.getBoundingClientRect();if(p){var m;const v=(m=n.content)===null||m===void 0?void 0:m.dataset.side,b=v==="right",x=b?-5:5,C=p[b?"left":"right"],w=p[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:C,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:C,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ue(e.onKeyDown,f=>{const h=o.searchRef.current!=="";if(!(e.disabled||h&&f.key===" ")&&r8e[r.dir].includes(f.key)){var p;n.onOpenChange(!0),(p=n.content)===null||p===void 0||p.focus(),f.preventDefault()}})})))}),_8e="MenuSubContent",A8e=y.exports.forwardRef((e,t)=>{const n=$q(Us,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Su(Us,e.__scopeMenu),s=hg(Us,e.__scopeMenu),a=Mq(_8e,e.__scopeMenu),c=y.exports.useRef(null),u=zt(t,c);return y.exports.createElement(wm.Provider,{scope:e.__scopeMenu},y.exports.createElement(Hi,{present:r||o.open},y.exports.createElement(wm.Slot,{scope:e.__scopeMenu},y.exports.createElement(rk,ue({id:a.contentId,"aria-labelledby":a.triggerId},i,{ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;s.isUsingKeyboardRef.current&&((f=c.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:Ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ue(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:Ue(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=i8e[s.dir].includes(d.key);if(f&&h){var p;o.onOpenChange(!1),(p=a.trigger)===null||p===void 0||p.focus(),d.preventDefault()}})})))))});function Iq(e){return e?"open":"closed"}function ev(e){return e==="indeterminate"}function ok(e){return ev(e)?"indeterminate":e?"checked":"unchecked"}function $8e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function D8e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function O8e(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=D8e(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function P8e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,u=t[s].x,d=t[s].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(i=!i)}return i}function R8e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return P8e(n,t)}function Sm(e){return t=>t.pointerType==="mouse"?e(t):void 0}const M8e=l8e,I8e=_q,L8e=u8e,N8e=f8e,F8e=m8e,B8e=ik,H8e=g8e,z8e=x8e,U8e=w8e,V8e=S8e,j8e=T8e,W8e=k8e,q8e=A8e,Lq="DropdownMenu",[K8e,UGe]=ii(Lq,[Eq]),Io=Eq(),[G8e,Nq]=K8e(Lq),Y8e=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,c=Io(t),u=y.exports.useRef(null),[d=!1,f]=$o({prop:i,defaultProp:o,onChange:s});return y.exports.createElement(G8e,{scope:t,triggerId:es(),triggerRef:u,contentId:es(),open:d,onOpenChange:f,onOpenToggle:y.exports.useCallback(()=>f(h=>!h),[f]),modal:a},y.exports.createElement(M8e,ue({},c,{open:d,onOpenChange:f,dir:r,modal:a}),n))},Q8e="DropdownMenuTrigger",X8e=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Nq(Q8e,n),s=Io(n);return y.exports.createElement(I8e,ue({asChild:!0},s),y.exports.createElement(Pt.button,ue({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:Ly(t,o.triggerRef),onPointerDown:Ue(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:Ue(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),Z8e=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Io(t);return y.exports.createElement(L8e,ue({},r,n))},J8e="DropdownMenuContent",ebe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nq(J8e,n),o=Io(n),s=y.exports.useRef(!1);return y.exports.createElement(N8e,ue({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:t,onCloseAutoFocus:Ue(e.onCloseAutoFocus,a=>{var c;s.current||(c=i.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Ue(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),tbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(F8e,ue({},i,r,{ref:t}))}),nbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(B8e,ue({},i,r,{ref:t}))}),rbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(H8e,ue({},i,r,{ref:t}))}),ibe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(z8e,ue({},i,r,{ref:t}))}),obe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(U8e,ue({},i,r,{ref:t}))}),sbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(V8e,ue({},i,r,{ref:t}))}),abe=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:o}=e,s=Io(t),[a=!1,c]=$o({prop:r,defaultProp:o,onChange:i});return y.exports.createElement(j8e,ue({},s,{open:a,onOpenChange:c}),n)},lbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(W8e,ue({},i,r,{ref:t}))}),cbe=y.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Io(n);return y.exports.createElement(q8e,ue({},i,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),ube=Y8e,dbe=X8e,sk=Z8e,fbe=ebe,hbe=tbe,pbe=nbe,mbe=rbe,gbe=ibe,vbe=obe,ybe=sbe,bbe=abe,xbe=lbe,Cbe=cbe,wbe=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),Sbe=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),Ebe=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),Tbe=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),Th=de(M,{marginLeft:"auto",paddingLeft:20,alignItems:"center",justifyContent:"center"}),Fq={display:"flex",flexDirection:"column",gap:"$1",minWidth:200,backgroundColor:"$cardBackgroundColor",borderRadius:12,fontWeight:600,padding:"$1",boxShadow:"$xsmall",border:"1px solid $borderColor","@media (prefers-reduced-motion: no-preference)":{animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:Ebe},'&[data-side="right"]':{animationName:Tbe},'&[data-side="bottom"]':{animationName:wbe},'&[data-side="left"]':{animationName:Sbe}}}},kbe=de(fbe,{...Fq,marginBottom:"$4",marginLeft:"$2"});function _be({children:e,...t}){return l(sk,{children:l(kbe,{...t,children:e})})}const Abe=de(Cbe,{...Fq});function $be(e){return l(sk,{children:l(Abe,{...e})})}const F6={all:"unset",cursor:"pointer",lineHeight:1,borderRadius:8,display:"flex",position:"relative",userSelect:"none",transition:"0.3s","&[data-disabled]":{color:"$disabledColor",pointerEvents:"none"},gap:"$2",alignItems:"stretch",padding:"$2 $3","&:hover":{borderRadius:8,cursor:"pointer",backgroundColor:"$hoveringItem"},"> svg":{width:16}},Dbe=de(pbe,{...F6,variants:{type:{noInteraction:{"&:hover":{cursor:"inherit !important",backgroundColor:"transparent !important"}},loading:{color:"$gray200 !important"},bottom:{fontSize:"0.70rem",color:"$gray400",justifyContent:"inherit",alignItems:"end",padding:"0 $2",my:"$2",height:10,"&:hover":{backgroundColor:"inherit",fontWeight:"inherit",color:"$gray400"}},socials:{color:"$gray400",alignItems:"center",justifyContent:"center",padding:"0 $2",my:"$2","&:hover":{backgroundColor:"inherit",fontWeight:"inherit",color:"$gray400",cursor:"inherit"}},danger:{"&:hover, &:active, &[data-highlighted]":{backgroundColor:"$dropdownDangerBackgroundColor",color:"$dropdownDangerColor"}}}}});de(mbe,{...F6});de(gbe,{...F6});const Obe=de(xbe,{'&[data-state="open"]':{backgroundColor:"$hoveringItem"},...F6});de(hbe,{fontFamily:"$redHatDisplay",fontWeight:"$bold",paddingLeft:"$2",fontSize:"0.8rem",color:"$gray400",fontStyle:"inherit"});const Pbe=de(ybe,{height:1,backgroundColor:"$borderColor",mx:"auto",my:"$1",textAlign:"center",width:"90%",flexShrink:0});de(vbe,{position:"absolute",left:0,width:25,display:"inline-flex",alignItems:"center",justifyContent:"center"});const Rbe=de(dbe,{cursor:"pointer",borderRadius:8,color:"$textColor",'&[data-state="open"]':{backgroundColor:"$hoveringItem"}}),gs=ube,vs=Rbe,ys=_be,Xt=Dbe,Em=Pbe,kh=bbe,_h=Obe,Ah=$be,$h=sk;function Mbe({children:e}){const t=st(),n=hs(),r=Tn.exports.useMediaQuery({maxWidth:992}),i=ar(),o=s=>{var a;(s==null?void 0:s.id)!==((a=t.selectedStore)==null?void 0:a.id)&&(localStorage.setItem("selectedStore",s==null?void 0:s.id),window.location.reload())};return g(gs,{children:[l(vs,{css:{width:"100%"},children:e}),g(ys,{side:r?"top":"right",css:{zIndex:101,marginRight:"$4",marginTop:"$3",minWidth:200,maxWidth:300,fontSize:14,fontWeight:"$medium"},children:[t.availableStores.map((s,a)=>l(Xt,{onSelect:()=>o(s),css:{position:"relative",alignItems:"center",display:"block"},children:l(en,{css:{borderRadius:4,display:"block",marginRight:"$1"},sizePicture:30,showHoverCard:!1,profileMediaSize:64,entity:s,link:!1})},"store-"+a)),t.availableStores.length>0&&l(Xt,{onSelect:()=>o(null),css:{position:"relative",alignItems:"center"},children:l(en,{css:{borderRadius:4,display:"block"},sizePicture:30,showHoverCard:!1,profileMediaSize:64,entity:t.user,link:!1})}),r&&g(Xt,{onSelect:()=>i("/settings"),css:{position:"relative",alignItems:"center",height:20},children:[l(W,{icon:yE,css:{display:"block",minWidth:30,height:16,marginRight:"$1"}}),l(P,{css:{justifyContent:"space-around"},children:l(A,{css:{fontWeight:"$medium",color:"$textColor"},children:"Settings"})})]}),g(Xt,{onSelect:()=>n.signout(),css:{position:"relative",alignItems:"center",height:20,fontSize:14,fontWeight:"$medium"},children:[l(W,{icon:Qie,css:{display:"block",minWidth:30,height:16}}),l(P,{css:{justifyContent:"space-around"},children:l(A,{css:{fontWeight:"$medium",color:"$textColor"},children:"Signout"})})]})]})]})}function Ibe(){var t;const e=st();return g(M,{css:{p:"$2",borderRadius:8,alignItems:"center",transition:"0.3s background-color",overflow:"auto",flexGrow:1,"&:hover, &:active":{cursor:"pointer",transition:"0.3s background-color",fontWeight:"bold",backgroundColor:"$hoveringItem"}},children:[e.selectedStore&&g(z,{children:[l(en,{sizePicture:30,showName:!1,showHoverCard:!1,profileMediaSize:64,entity:e.selectedStore}),l(ce,{type:"textEllipsis",css:{marginLeft:"$3",fontWeight:"$medium",alignItems:"center",flexDirection:"row","@md":{display:"none"}},children:l(A,{css:{fontSize:"0.9rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline"},children:(t=e.selectedStore)==null?void 0:t.name})}),l(ce,{css:{"@md":{display:"none"}},children:e.selectedEntity.verified&&l(Bl,{isUser:e.selectedEntity.isUser})})]}),e.selectedStore===null&&g(z,{children:[l(en,{sizePicture:30,showName:!1,showHoverCard:!1,profileMediaSize:64,entity:e.user}),l(ce,{type:"textEllipsis",css:{marginLeft:"$2",fontWeight:"$medium",alignItems:"center",flexDirection:"row","@md":{display:"none"}},children:l(A,{css:{fontSize:"0.9rem",display:"inline"},children:e.user.displayName})}),l(ce,{css:{"@md":{display:"none"}},children:e.user.verified&&l(Bl,{isUser:!0})})]}),g(P,{css:{marginLeft:"auto",paddingLeft:"$2","@md":{display:"none"}},children:[l(W,{icon:WH,css:{height:12,color:"$gray400"}}),l(W,{icon:Sy,css:{height:12,marginTop:"-$1",color:"$gray400"}})]})]})}function Bq(){return l(M,{children:l(Mbe,{children:l(Ibe,{})})})}var Lbe={prefix:"fab",iconName:"discord",icon:[640,512,[],"f392","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"]},Nbe={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"]},Fbe={prefix:"fab",iconName:"twitter",icon:[512,512,[],"f099","M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]};function Bbe({children:e,user:t,openDelay:n=200}){const[r,i]=y.exports.useState(!1),o=VQ({id:t.id}),s=t.pictureUuid!==null&&t.pictureUuid!==void 0?t.pictureUuid:"avatar";return g(S6,{openDelay:n,open:r,onOpenChange:a=>{a&&t.id&&!o.isFetched&&o.refetch(),i(a)},children:[l(E6,{asChild:!0,onClick:a=>{a.preventDefault(),i(c=>!c)},onFocus:()=>setTimeout(()=>i(!0),0),onBlur:()=>i(!1),children:e}),l(T6,{container:document.body,children:l(Wbe,{sideOffset:5,onClick:a=>a.stopPropagation(),children:g(P,{css:{gap:"$2"},children:[g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center",justifyContent:"space-between"},children:[l(Dt,{css:{borderRadius:100,display:"block",marginRight:"$2"},alt:"",width:48,height:48,src:kn({uuid:o.isFetched?s:"avatar",size:128})}),o.isFetched&&l(Hbe,{socials:o.data.socials})]}),o.isFetched&&l(ie,{to:"/user/"+o.data.id,css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:16,"&:hover":{cursor:"pointer",textDecoration:"underline"}},children:o.data.name}),!o.isFetched&&l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:16},children:"Loading\u2026"})]}),o.isFetched&&o.data.ebAbout&&l(A,{children:o.data.ebAbout.split(`
`).map((a,c)=>g(Ae.Fragment,{children:[a,l("br",{})]},c))})]})})})]})}function Hbe({socials:e}){return(e.flickrUrl||e.deviantArtUrl||e.blueskyUrl||e.facebookUrl||e.instagramUrl||e.xUrl||e.personalUrl)&&g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[e.flickrUrl&&l(ie,{to:e.flickrUrl,target:"_blank",children:l(Ua,{})}),e.deviantArtUrl&&l(ie,{to:e.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.blueskyUrl&&l(ie,{to:e.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.facebookUrl&&l(ie,{to:e.facebookUrl,target:"_blank",children:l(za,{})}),e.instagramUrl&&l(ie,{to:e.instagramUrl,target:"_blank",children:l(Va,{})}),e.xUrl&&l(ie,{to:e.xUrl,target:"_blank",children:l(ja,{})}),e.personalUrl&&l(ie,{to:e.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})}const zbe=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),Ube=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),Vbe=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),jbe=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),Wbe=wi(k6,{borderRadius:12,padding:"$4",width:300,zIndex:1e3,backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",boxShadow:"$large",animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:Vbe},'&[data-side="right"]':{animationName:jbe},'&[data-side="bottom"]':{animationName:zbe},'&[data-side="left"]':{animationName:Ube}}});function Be({user:e,showPicture:t=!0,showName:n=!0,inline:r=!1,nameBold:i=!1,css:o=null,sizePicture:s=24,openDelay:a=100}){const c=ar(),u=e.pictureUuid!==null&&e.pictureUuid!==void 0?e.pictureUuid:"avatar",d=r?null:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return l(Bbe,{user:e,openDelay:a,children:g(M,{css:{...o,display:r?"inline":"flex",position:"relative",alignItems:"center",justifyContent:"center",minWidth:0,width:"fit-content",whiteSpace:"nowrap","&:hover":{cursor:"pointer",textDecoration:"underline"}},onClick:()=>{c("/user/"+e.id)},children:[t&&l(Dt,{css:{position:r?"absolute":"relative",borderRadius:100,marginRight:n?"$2":0},alt:"",width:s,height:s,src:kn({uuid:u,size:128})}),n&&l(Ne,{css:{...d,marginLeft:r&&t?s+4:0,fontWeight:i?"$bold":"inherit"},children:e.name})]})})}const Eb=de("svg",{}),qbe=de("rect",{fill:"$logoColor"}),ec=de("path",{variants:{type:{stroke:{stroke:"$logoColor"},fill:{fill:"$logoColor"}}}});function ak({width:e=null,variant:t="full",color:n=null,hoverColor:r=null,...i}){const o=r?{transition:"fill 200ms, stroke 200ms","&:hover > path":{transition:"fill 200ms, stroke 200ms",fill:r||"inherit",stroke:r||"inherit"}}:{};return g(M,{css:{gap:"$4"},children:[t==="text"&&l(Eb,{css:{...i,flexShrink:0,height:"100%"},width:e,height:"52",viewBox:"0 0 286 52",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l(ec,{d:"M0.860111 51V4.28772H23.7491C32.8914 4.28772 39.2976 10.2936 39.2976 18.7685C39.2976 27.11 32.8247 33.0491 23.7491 33.0491H9.80218V51H0.860111ZM9.80218 25.5752H22.7482C27.2859 25.5752 30.2888 22.9059 30.2888 18.8353C30.2888 14.6979 27.2859 12.0286 22.7482 12.0286H9.80218V25.5752ZM45.0918 51V16.4329H53.5668V20.4368C55.7689 17.3672 58.9721 15.6989 62.8425 15.6989C64.6443 15.6989 65.5785 15.8991 66.5795 16.3662V23.8401C65.2449 23.3063 63.6433 22.9726 62.1085 22.9726C58.3715 22.9726 55.3685 24.9079 53.5668 28.3779V51H45.0918ZM75.9511 11.8951C73.2151 11.8951 71.013 9.693 71.013 7.02372C71.013 4.28772 73.2151 2.1523 75.9511 2.1523C78.6204 2.1523 80.8226 4.28772 80.8226 7.02372C80.8226 9.693 78.6204 11.8951 75.9511 11.8951ZM71.6803 51V16.4329H80.1552V51H71.6803ZM87.5161 51V16.4329H95.991V19.3024C98.4601 16.9668 101.596 15.7656 105.2 15.7656C109.738 15.7656 113.408 17.7675 115.677 21.1041C118.546 17.6341 122.417 15.7656 127.155 15.7656C134.896 15.7656 140.301 21.4378 140.301 29.5123V51H131.893V30.7803C131.893 26.0423 129.157 23.1061 124.953 23.1061C122.016 23.1061 119.614 24.374 117.946 26.8431C118.013 27.7106 118.146 28.5781 118.146 29.5123V51H109.671V30.7803C109.671 26.0423 107.002 23.1061 102.798 23.1061C99.9282 23.1061 97.5926 24.2405 95.991 26.5761V51H87.5161ZM151.765 51V23.5065H144.024V16.4329H151.765V12.6292C151.765 5.02177 156.303 0.817664 164.511 0.817664C166.379 0.817664 168.381 1.08459 169.782 1.48498V8.62529C168.181 8.2249 166.98 8.09143 165.578 8.09143C161.975 8.09143 160.24 9.55953 160.24 12.8294V16.4329H169.782V23.5065H160.24V51H151.765ZM189.965 51.6673C179.554 51.6673 171.547 43.793 171.547 33.7165C171.547 23.7067 179.287 15.8991 189.164 15.8991C198.907 15.8991 206.18 23.7734 206.18 34.317V36.5192H180.088C181.223 41.1904 185.227 44.527 190.365 44.527C193.501 44.527 196.371 43.4593 198.239 41.6575L203.778 46.7959C199.574 50.1325 195.37 51.6673 189.965 51.6673ZM180.022 30.4466H197.839C196.838 26.0423 193.301 22.9059 188.964 22.9059C184.493 22.9059 181.089 25.8421 180.022 30.4466ZM229.065 51.6673C218.655 51.6673 210.647 43.793 210.647 33.7165C210.647 23.7067 218.388 15.8991 228.264 15.8991C238.007 15.8991 245.281 23.7734 245.281 34.317V36.5192H219.189C220.323 41.1904 224.327 44.527 229.466 44.527C232.602 44.527 235.471 43.4593 237.34 41.6575L242.879 46.7959C238.675 50.1325 234.471 51.6673 229.065 51.6673ZM219.122 30.4466H236.94C235.939 26.0423 232.402 22.9059 228.064 22.9059C223.593 22.9059 220.19 25.8421 219.122 30.4466ZM267.232 51.4671C257.422 51.4671 249.748 43.6595 249.748 33.7165C249.748 23.7067 257.489 15.9658 267.499 15.9658C270.969 15.9658 274.372 16.9668 277.175 18.902V4.28772L285.65 2.81962V51H277.241V47.9971C274.505 50.2659 271.035 51.4671 267.232 51.4671ZM268.566 44.2601C272.036 44.2601 275.039 42.9922 277.175 40.6566V26.6429C275.106 24.4407 271.97 23.1728 268.566 23.1728C262.627 23.1728 258.023 27.7106 258.023 33.6497C258.023 39.6556 262.627 44.2601 268.566 44.2601Z",type:"fill"})}),t==="logo"&&g(Eb,{css:{...i,...o,flexShrink:0,height:"100%"},width:e,height:e,viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l(ec,{d:"M512.574 939.219L512.577 470.394L136.33 275.242V751.097L512.574 939.219Z",css:{stroke:"transparent !important",fill:n||"$logoColor"}}),l(ec,{d:"M512.577 470.394L512.574 939.219M512.577 470.394L136.33 275.242M512.577 470.394L888.818 275.242M512.574 939.219L136.33 751.097V275.242M512.574 939.219L888.818 751.097V275.242M136.33 275.242L512.574 82.3789L888.818 275.242",css:{fill:"transparent !important",stroke:n||"$logoColor"},"stroke-width":"77.2959"})]}),t==="full"&&g(Eb,{css:{...i,flexShrink:0,height:"100%"},width:e,height:"40",viewBox:"0 0 439 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l(ec,{d:"M149.86 68V21.2877H172.749C181.891 21.2877 188.298 27.2936 188.298 35.7685C188.298 44.11 181.825 50.0491 172.749 50.0491H158.802V68H149.86ZM158.802 42.5752H171.748C176.286 42.5752 179.289 39.9059 179.289 35.8353C179.289 31.6979 176.286 29.0286 171.748 29.0286H158.802V42.5752ZM194.092 68V33.4329H202.567V37.4368C204.769 34.3672 207.972 32.6989 211.843 32.6989C213.644 32.6989 214.579 32.8991 215.579 33.3662V40.8401C214.245 40.3063 212.643 39.9726 211.108 39.9726C207.371 39.9726 204.369 41.9079 202.567 45.3779V68H194.092ZM224.951 28.8951C222.215 28.8951 220.013 26.693 220.013 24.0237C220.013 21.2877 222.215 19.1523 224.951 19.1523C227.62 19.1523 229.823 21.2877 229.823 24.0237C229.823 26.693 227.62 28.8951 224.951 28.8951ZM220.68 68V33.4329H229.155V68H220.68ZM236.516 68V33.4329H244.991V36.3024C247.46 33.9668 250.596 32.7656 254.2 32.7656C258.738 32.7656 262.408 34.7675 264.677 38.1041C267.546 34.6341 271.417 32.7656 276.155 32.7656C283.896 32.7656 289.301 38.4378 289.301 46.5123V68H280.893V47.7803C280.893 43.0423 278.157 40.1061 273.953 40.1061C271.016 40.1061 268.614 41.374 266.946 43.8431C267.013 44.7106 267.146 45.5781 267.146 46.5123V68H258.671V47.7803C258.671 43.0423 256.002 40.1061 251.798 40.1061C248.928 40.1061 246.593 41.2405 244.991 43.5761V68H236.516ZM300.765 68V40.5065H293.024V33.4329H300.765V29.6292C300.765 22.0218 305.303 17.8177 313.511 17.8177C315.379 17.8177 317.381 18.0846 318.782 18.485V25.6253C317.181 25.2249 315.98 25.0914 314.578 25.0914C310.975 25.0914 309.24 26.5595 309.24 29.8294V33.4329H318.782V40.5065H309.24V68H300.765ZM338.965 68.6673C328.554 68.6673 320.547 60.793 320.547 50.7165C320.547 40.7067 328.287 32.8991 338.164 32.8991C347.907 32.8991 355.18 40.7734 355.18 51.317V53.5192H329.088C330.223 58.1904 334.227 61.527 339.365 61.527C342.501 61.527 345.371 60.4593 347.239 58.6575L352.778 63.7959C348.574 67.1325 344.37 68.6673 338.965 68.6673ZM329.022 47.4466H346.839C345.838 43.0423 342.301 39.9059 337.964 39.9059C333.493 39.9059 330.089 42.8421 329.022 47.4466ZM378.065 68.6673C367.655 68.6673 359.647 60.793 359.647 50.7165C359.647 40.7067 367.388 32.8991 377.264 32.8991C387.007 32.8991 394.281 40.7734 394.281 51.317V53.5192H368.189C369.323 58.1904 373.327 61.527 378.466 61.527C381.602 61.527 384.471 60.4593 386.34 58.6575L391.879 63.7959C387.675 67.1325 383.471 68.6673 378.065 68.6673ZM368.122 47.4466H385.94C384.939 43.0423 381.402 39.9059 377.064 39.9059C372.593 39.9059 369.19 42.8421 368.122 47.4466ZM416.232 68.4671C406.422 68.4671 398.748 60.6595 398.748 50.7165C398.748 40.7067 406.489 32.9658 416.499 32.9658C419.969 32.9658 423.372 33.9668 426.175 35.902V21.2877L434.65 19.8196V68H426.241V64.9971C423.505 67.2659 420.035 68.4671 416.232 68.4671ZM417.566 61.2601C421.036 61.2601 424.039 59.9922 426.175 57.6566V43.6429C424.106 41.4407 420.97 40.1728 417.566 40.1728C411.627 40.1728 407.023 44.7106 407.023 50.6497C407.023 56.6556 411.627 61.2601 417.566 61.2601Z",type:"fill"}),l(qbe,{x:"110",y:"21",width:"5",height:"47"}),l(ec,{d:"M39.0936 38.9351V82.733",type:"stroke",strokeWidth:"6.97386",strokeMiterlimit:"10"}),l(ec,{d:"M4.80518 24.1948L39.0933 41.3389L73.3815 24.1948",type:"stroke",strokeWidth:"6.97386",strokeMiterlimit:"10"}),l(ec,{d:"M73.0372 66.6638V23.3048L39.0927 6.33252L5.14819 23.3048V66.6638L39.0927 83.636L73.0372 66.6638Z",type:"stroke",strokeWidth:"6.76405",strokeMiterlimit:"10"}),l(ec,{d:"M4.80518 67.6127L4.81891 26.2979L36.9409 41.9362L36.7296 81.2434L4.80518 67.6127Z",type:"fill"})]})]})}function Kbe({children:e}){const t=st(),n=hs(),r=Ee(),i=te(),[o,s]=y.exports.useState(!1),a=ve({mutationFn:()=>i.get("/user/request-package").then(()=>{F({type:"success",title:"Delivery successful",message:"You should have received your package, check your inventory."}),r.invalidateQueries({queryKey:["bloggers"]})}).catch(function(c){var u,d,f,h;(d=(u=c.response)==null?void 0:u.data)!=null&&d.error?F({type:"error",title:(f=c.response.data)==null?void 0:f.error.title,message:(h=c.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})});return g(gs,{children:[l(vs,{asChild:!0,children:e}),g(ys,{side:"bottom",css:{marginRight:"$4",marginTop:"$3",minWidth:230},children:[l(M,{css:{alignItems:"center",px:"$2",py:"$2"},children:l(Be,{user:{id:t.user.id,name:t.user.name,pictureUuid:t.user.profilePictureUuid},openDelay:500,sizePicture:32,css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",color:"$titleColor",fontSize:16}})}),l(Em,{}),g(Xt,{disabled:a.isLoading,onSelect:c=>c.preventDefault(),onClick:()=>{a.isLoading||a.mutate()},type:a.isLoading?"loading":null,css:{position:"relative"},children:[l(W,{icon:Od}),l(A,{children:"Request package"}),a.isLoading&&l(W,{css:{position:"absolute",top:"50%",left:"50%",color:"$neutral700",transform:"translate(-50%, -50%)"},icon:My})]}),l(KBe,{open:o,setOpen:s,children:g(Xt,{onSelect:c=>{c.preventDefault(),s(!0)},children:[l(W,{icon:Uie}),l(A,{children:"Update your status"})]})}),g(Xt,{onClick:()=>n.signout(),children:[l(W,{icon:Ple}),l(A,{children:"Logout"})]}),l(Em,{}),g(Xt,{type:"socials",css:{marginTop:0,cursor:"inherit",marginBottom:0},children:[l(R2,{link:"https://twitter.com/lukerowley_sl",children:l(W,{icon:Fbe,css:{height:20,width:20}})}),l(R2,{link:"https://discord.gg/sy2RbEXx4R",children:l(W,{icon:Lbe,css:{height:22,width:22}})}),l(R2,{link:"https://www.facebook.com/KynnoSystems.sl",children:l(W,{icon:Nbe,css:{height:18,width:18}})}),l(R2,{link:"https://www.primfeed.com/easybloggers",children:l(ak,{width:18,variant:"logo",color:"$gray400",hoverColor:"$gray700"})})]}),l(Xt,{disabled:!0,type:"bottom",css:{justifyContent:"flex-end",marginTop:"$4"},children:"v2024.11.10.0"})]})]})}function R2({children:e,link:t}){return l(ie,{to:t,target:"_blank",css:{transition:"color 200ms",p:"$1","&:hover":{transition:"color 200ms",color:"$gray700"}},children:e})}function Gbe({children:e}){const t=st(),n=ar(),r=Tn.exports.useMediaQuery({maxWidth:992}),i=o=>{var s;if((o==null?void 0:o.id)===((s=t.selectedStore)==null?void 0:s.id)){n("/store/"+o.id,{replace:!0});return}localStorage.setItem("selectedStore",o==null?void 0:o.id),window.location.reload()};return g(gs,{children:[l(vs,{css:{width:"100%"},children:e}),g(ys,{side:r?"top":"right",css:{zIndex:101,marginRight:"$4",marginTop:"$3",minWidth:300,maxWidth:450},children:[t.availableStores.map((o,s)=>g(Xt,{onSelect:()=>i(o),css:{position:"relative"},children:[l(Dt,{css:{borderRadius:4,display:"block",marginRight:"$2"},alt:"",width:36,height:36,src:kn({uuid:o.pictureUuid!==null?o.pictureUuid:"store",size:128})}),g(P,{css:{justifyContent:"space-around"},children:[l(A,{css:{fontWeight:"$medium",color:"$textColor"},children:o.name}),o.countMembers&&g(A,{css:{fontSize:"0.75rem",color:"$gray400"},children:[g(Ne,{css:{textTransform:"capitalize"},children:[o.plan," plan"]})," ","\u2022 ",o.countMembers," member",o.countMembers>1?"s":""]}),o.countMembers===null&&l(A,{css:{fontSize:"0.75rem"},children:o.role})]})]},"store-"+s)),t.blogger.countStores>0&&g(Xt,{onSelect:()=>i(null),css:{position:"relative"},children:[l(Dt,{css:{borderRadius:1e3,display:"block",marginRight:"$2"},alt:"",width:36,height:36,src:kn({uuid:t.user.profilePictureUuid!==null?t.user.profilePictureUuid:"store",size:128})}),g(P,{css:{justifyContent:"space-around"},children:[l(A,{css:{fontWeight:"$medium",color:"$textColor"},children:t.user.name}),g(A,{css:{color:"$gray400",fontSize:"0.75rem"},children:["Member of ",t.blogger.countStores," store",t.blogger.countStores>1?"s":""]})]})]})]})]})}const Ybe=de("div",{height:80,width:"100%",padding:"$6",display:"flex",alignItems:"center",backgroundColor:"$cardBackgroundColor",borderBottom:"1px solid $borderColor"}),Qbe=de("div",{lineHeight:0}),Xbe=de(M,{marginLeft:"auto",alignItems:"center",gap:"$8"}),Zbe=de("h2",{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:24});function Jbe({isSmall:e=!1,toggleSidebar:t,setToggleSidebar:n}){const{pageTitle:r}=Ar(),{content:i}=Si(),[o,s]=y.exports.useState(0),a=st();return navigator.setAppBadge&&(o>0?navigator.setAppBadge(o):navigator.clearAppBadge()),g(Ybe,{children:[e&&l(Qbe,{onClick:()=>n(!t),children:l(W,{css:{fontSize:"1.3rem"},icon:Kie})}),e===!1&&l(Zbe,{children:r}),g(Xbe,{css:{gap:e?"$4":"$8"},children:[i!==null&&l(M,{children:i}),i!==null&&l(ce,{css:{width:2,backgroundColor:"$borderColor",height:24,borderRadius:64}}),l(O7e,{setNotificationCount:s,children:g(M,{css:{display:"inline-flex",position:"relative",alignItems:"center",gap:"$2",cursor:"pointer"},children:[l(e7e,{label:o}),l(W,{icon:Ece,css:{color:"$textColor"}})]})}),l(Kbe,{children:g(M,{css:{alignItems:"center",gap:"$2",cursor:"pointer"},children:[l(bi,{pictureUuid:a.user.profilePictureUuid,round:!0}),l(W,{icon:coe,css:{color:"$gray400"}})]})})]})]})}function e7e({label:e}){return e===null||e<=0?l(z,{}):l(M,{css:{position:"absolute",top:-8,left:6,minWidth:14,height:14,backgroundColor:"$destructive500",px:"$1",color:"white",borderRadius:100,fontSize:9,alignItems:"center",justifyContent:"center"},children:e})}const Wl=de("h1"),Qn=de("h2"),br=de("h3"),Tt=de("h4");function t7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["You have been added as a co-owner for the store"," ",l("strong",{children:e.store.name}),"."]})}function n7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["You have been added as a friend for the store ",l("strong",{children:e.store.name}),". \u{1F451}"]})}function r7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["You have been added as a manager for the store"," ",l("strong",{children:e.store.name}),". \u{1F46E}"]})}function i7e({notification:e,setPictureUuid:t}){return t(e.blogger.profilePictureUuid),g(z,{children:["Good news! ",l("strong",{children:e.blogger.name})," accepted your invitation and has joined the store ",l("strong",{children:e.store.name})," as a new blogger. \u{1F525}"]})}function o7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," accepted your application to join their team. \u{1F973}"]})}function s7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," cancelled your invitation to join their bloggers team."]})}function a7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["You've received an invitation to join the blogger team at"," ",l("strong",{children:e.store.name}),"."]})}function l7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["Good news! ",l("strong",{children:e.blogger.name})," has joined the store"," ",l("strong",{children:e.store.name})," as a new blogger. \u{1F525}"]})}function c7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["We are sorry, but ",l("strong",{children:e.blogger.name})," refused to join your store ",l("strong",{children:e.store.name}),"."]})}function u7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["We are sorry, but the store ",l("strong",{children:e.store.name})," rejected your application. \u{1F616}"]})}function d7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The team at ",l("strong",{children:e.store.name})," decided to remove you from their bloggers team. \u{1F616}"]})}function f7e({notification:e,setPictureUuid:t}){return t(e.event.pictureUuid),g(z,{children:["The event ",l("strong",{children:e.event.name})," accepted your application to join their team. \u{1F973}"]})}function h7e({notification:e,setPictureUuid:t}){return t(e.event.pictureUuid),g(z,{children:["We are sorry, but the event ",l("strong",{children:e.event.name})," rejected your application."]})}function p7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:[l("strong",{children:e.event.name})," invited your store"," ",l("strong",{children:e.store.name})," to join their event."]})}function m7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," applied to your event."]})}function g7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The event ",l("strong",{children:e.event.name})," removed your product"," ",e.product.name," from their listing."]})}function v7e({notification:e,setPictureUuid:t}){return t(e.avatar.profilePicture),g(z,{children:[l("strong",{children:e.avatar.name})," filled an application to join your store. \u{1F525}"]})}function y7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:[l("strong",{children:e.store.name})," posted a new mail:"," ",l("strong",{children:e.mail.title}),"."]})}function b7e({notification:e,setPictureUuid:t}){return t(e.blogger.profilePictureUuid),g(z,{children:[l("strong",{children:e.blogger.name})," created a new post for the product"," ",l("strong",{children:e.product.name}),"."]})}function x7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:[l("strong",{children:e.store.name})," created a new product for you to blog:"," ",l("strong",{children:e.product.name}),"."]})}function C7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["Great news! Your post for ",l("strong",{children:e.product.name})," has been accepted. \u{1F60D}"]})}function w7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["Your post for ",l("strong",{children:e.product.name})," has been cancelled."]})}function S7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["Apologies, but your post for ",l("strong",{children:e.product.name})," has been rejected. \u{1F616}"]})}function E7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The deadline for the post about the product ",l("strong",{children:e.product.name})," ","has been removed."]})}function T7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," decided to remove you from their co-owner list."]})}function NR({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," decided to remove you from their friends list."]})}function k7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:[l("strong",{children:e.store.name})," accepted your invitation to join"," ",l("strong",{children:e.event.name})," as a new designer."]})}function _7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:["The store ",l("strong",{children:e.store.name})," joined your event."]})}function A7e({notification:e,setPictureUuid:t}){return t(e.store.pictureUuid),g(z,{children:[l("strong",{children:e.store.name})," rejected your invitation to join"," ",l("strong",{children:e.event.name})," as a designer."]})}function $7e({notification:e,setPictureUuid:t}){return t(e.event.pictureUuid),g(z,{children:["The event ",l("strong",{children:e.event.name})," decided to remove your store from their event."]})}function D7e({notification:e}){const[t,n]=y.exports.useState(null),{mutate:r,isLoading:i}=P7e();Z.extend(Pn),Z.extend(On);const o=e==null?void 0:e.storeLabel;return g(Xt,{type:e.read||i?"noInteraction":null,onClick:s=>{s.preventDefault(),r(e)},css:{color:"$textColor",alignItems:"center",backgroundColor:e.read?"inherit":"$hoveringItem"},children:[l(bi,{pictureUuid:t}),g(M,{css:{flexDirection:"column",marginLeft:"$2",fontSize:"0.875rem",fontWeight:"$medium",gap:"$1"},children:[g(A,{css:{lineHeight:"1.05rem"},children:[e.type==="added_as_friend"&&l(n7e,{notification:e,setPictureUuid:n}),e.type==="added_as_manager"&&l(r7e,{notification:e,setPictureUuid:n}),e.type==="added_as_co_owner"&&l(t7e,{notification:e,setPictureUuid:n}),e.type==="removed_from_co_owners"&&l(T7e,{notification:e,setPictureUuid:n}),e.type==="blogger_accepted_invitation"&&l(i7e,{notification:e,setPictureUuid:n}),e.type==="blogger_invited"&&l(a7e,{notification:e,setPictureUuid:n}),e.type==="blogger_joined"&&l(l7e,{notification:e,setPictureUuid:n}),e.type==="event_invite_store"&&l(p7e,{notification:e,setPictureUuid:n}),e.type==="store_accepted_invitation"&&l(k7e,{notification:e,setPictureUuid:n}),e.type==="store_rejected_invitation"&&l(A7e,{notification:e,setPictureUuid:n}),e.type==="blogger_rejected_invitation"&&l(c7e,{notification:e,setPictureUuid:n}),e.type==="blogger_rejected"&&l(u7e,{notification:e,setPictureUuid:n}),e.type==="blogger_removed_from_store"&&l(d7e,{notification:e,setPictureUuid:n}),e.type==="new_application"&&l(v7e,{notification:e,setPictureUuid:n}),e.type==="new_mail"&&l(y7e,{notification:e,setPictureUuid:n}),e.type==="new_post_completed"&&l(b7e,{notification:e,setPictureUuid:n}),e.type==="new_product"&&l(x7e,{notification:e,setPictureUuid:n}),e.type==="post_accepted"&&l(C7e,{notification:e,setPictureUuid:n}),e.type==="post_cancelled"&&l(w7e,{notification:e,setPictureUuid:n}),e.type==="post_rejected"&&l(S7e,{notification:e,setPictureUuid:n}),e.type==="removed_from_friends"&&l(NR,{notification:e,setPictureUuid:n}),e.type==="removed_from_managers"&&l(NR,{notification:e,setPictureUuid:n}),e.type==="removed_deadline_from_post"&&l(E7e,{notification:e,setPictureUuid:n}),e.type==="blogger_invitation_cancelled"&&l(s7e,{notification:e,setPictureUuid:n}),e.type==="blogger_application_accepted"&&l(o7e,{notification:e,setPictureUuid:n}),e.type==="store_removed_from_event"&&l($7e,{notification:e,setPictureUuid:n}),e.type==="event_removed_product"&&l(g7e,{notification:e,setPictureUuid:n}),e.type==="event_received_designer_application"&&l(m7e,{notification:e,setPictureUuid:n}),e.type==="store_joined_event"&&l(_7e,{notification:e,setPictureUuid:n}),e.type==="designer_application_accepted"&&l(f7e,{notification:e,setPictureUuid:n}),e.type==="designer_application_rejected"&&l(h7e,{notification:e,setPictureUuid:n})]}),g(A,{css:{fontSize:"0.75rem",color:"$gray400"},children:[Z(e.createdAt).fromNow()," ",o?" \u2022 "+o:null]})]})]})}function O7e({children:e,setNotificationCount:t}){const n=te(),r=Ee(),{isLoading:i,data:o}=_t(["notifications"],()=>n.get("/notifications").then(a=>a.data));function s(){o.unreadCount>0&&n.patch("/notifications/all").then(()=>{r.invalidateQueries({queryKey:["notifications"]}),r.invalidateQueries({queryKey:["me"]})})}return i?l(z,{}):(t(o.unreadCount),g(gs,{children:[l(vs,{asChild:!0,children:e}),g(ys,{side:"bottom",css:{zIndex:101,marginRight:"$4",marginTop:"$3",width:350,maxHeight:500},children:[g(M,{css:{alignItems:"center",px:"$3",py:"$3",justifyContent:"space-between"},children:[l(Tt,{children:"Notifications"}),l(A,{css:{textDecoration:"underline",fontSize:12,color:"$gray500","&:hover":{color:"$textColor",cursor:"pointer"}},onClick:s,children:"Mark all as read"})]}),l(io,{css:{height:2}}),l(P,{css:{overflow:"auto"},children:o.notifications.map((a,c)=>g(z,{children:[l(D7e,{notification:a},"notification-"+c),l(Em,{})]}))})]})]}))}function P7e(){const e=te(),t=Ee();return ve(n=>e.patch("/notifications/"+n.id),{onError:n=>Rt(n),onSuccess:()=>t.invalidateQueries({queryKey:["notifications"]})})}const R7e=de("div",{display:"flex",flexGrow:1,flexDirection:"column",transition:"0.3s",backgroundColor:"$backgroundColor",height:"100vh",width:"100vw",overflow:"auto"}),M7e=de("div",{transition:"0.3s",position:"absolute",width:"100%",height:"100%",display:"none",zIndex:-1,variants:{show:{true:{display:"block",zIndex:10,transition:"0.3s",backgroundColor:"rgba(0, 0, 0, 0.5)",width:"100%",height:"100vh"}}}});function I7e(){const[e,t]=y.exports.useState("sync"),[n,r]=y.exports.useState(!1),[i,o]=y.exports.useState("default"),[s,a]=y.exports.useState(null),{isLoading:c,data:u}=ms(),d=Tn.exports.useMediaQuery({maxWidth:992}),f=!d||d&&n,h=ao();y.exports.useEffect(()=>{if(u===void 0)return;const m=window.localStorage.getItem("serverVersion");m&&m!=="v2024.11.10.0"&&F({type:"update",title:"A new version of EasyBloggers is available",message:"To ensure the best experience possible, please refresh your page to get the latest version."});const b=window.matchMedia("(prefers-color-scheme: dark)");u.theme==="dark"?t(fa):u.theme==="light"?t("light"):u.theme==="sync"&&t(b.matches?fa:"");const x=C=>{u.theme==="sync"&&t(C.matches?fa:"")};return b.addEventListener("change",x),()=>b.removeEventListener("change",x)},[u]),y.exports.useEffect(()=>{document.body.className=e},[e,t]),y.exports.useEffect(()=>{let m=document.querySelector("meta[name~='theme-color']");m?(m.setAttribute("name","theme-color"),e===fa?m.content="#0d0d0d":m.content="#ffffff"):(m=document.createElement("meta"),m.setAttribute("name","theme-color"),e===fa?m.content="#0d0d0d":m.content="#ffffff",document.getElementsByTagName("head")[0].appendChild(m))},[e]),y.exports.useEffect(()=>{r(!1)},[h,d]);const p=y.exports.useCallback(()=>{f&&r(!f)},[f]);return c?l(z,{}):l(ce,{css:{display:"flex"},children:g($y.Provider,{value:u,children:[l(H9e,{hideSidebar:f,isMobile:d}),l(ME.Provider,{value:{content:s,setContent:a},children:g(R7e,{onClick:p,children:[l(M7e,{show:d&&n}),g(IE.Provider,{value:{pageTitle:i,setPageTitle:o},children:[l(Jbe,{isSmall:d,setToggleSidebar:r,toggleSidebar:n}),l(Mj,{})]})]})})]})})}const Hq=de("div",{display:"flex",flexDirection:"column",padding:"$6",gap:"$6",overflow:"auto",maxHeight:"100%","@sm":{padding:"$3"}}),FR=de("div",{display:"flex",width:"100%",justifyContent:"space-between",gap:"$6","@lg":{flexDirection:"column"}});function ql({children:e,css:t=null}){return l(Hq,{css:t,children:e})}function Kl({children:e,css:t=null}){const n=Tn.exports.useMediaQuery({maxWidth:767});return l(Hq,{css:{gap:n?"$6":"$2","@media (min-width: 1400px)":{maxWidth:1400,width:"100%",mx:"auto"},...t},children:e})}function L7e({companyID:e,redirect:t}){const n=te(),r=hs(),i=ar(),o=ao(),{t:s}=Ks();return ve(({username:u,password:d})=>n.post("/pf/login",{username:u,password:d,companyID:e,redirect:t}),{onError:u=>{var d;((d=u.response)==null?void 0:d.status)===401?F({type:"error",title:s("translation:login.toast.error.title"),message:s("translation:login.toast.error.unrecognized_username_or_password")}):u.response.data?F({type:"error",title:s("translation:login.toast.error.title"),message:u.response.data.error.title}):F({type:"error",title:s("translation:login.toast.error.title"),message:s("translation:login.toast.error.unexpected_error")}),i("/login",{replace:!0})},onSuccess:u=>{var d;u.data.token&&r.signin({token:u.data.token,selectedStore:(d=u.data)==null?void 0:d.selectedStore},()=>{var f;u.data.redirect.startsWith("http")?window.location.assign(u.data.redirect):(f=o.state)!=null&&f.from?i(o.state.from,{replace:!0}):i("/",{replace:!0})})}})}function N7e(){const e=te(),t=hs(),n=ar(),{t:r}=Ks();return ve(({username:s,password:a})=>e.post("/login",{username:s,password:a}),{onError:s=>{var a;((a=s.response)==null?void 0:a.status)===401?F({type:"error",title:r("translation:login.toast.error.title"),message:r("translation:login.toast.error.unrecognized_username_or_password")}):s.response.data?F({type:"error",title:r("translation:login.toast.error.title"),message:s.response.data.error.title}):F({type:"error",title:r("translation:login.toast.error.title"),message:r("translation:login.toast.error.unexpected_error")}),n("/login",{replace:!0})},onSuccess:s=>{var a;s.data.token&&t.signin({token:s.data.token,selectedStore:(a=s.data)==null?void 0:a.selectedStore},()=>{n("/dashboard",{replace:!0})})}})}function zq(){const e=te(),t=hs(),n=ar(),{t:r}=Ks();return ve(({token:s})=>e.post("/login-passwordless",{token:s}),{onError:s=>{var a;((a=s.response)==null?void 0:a.status)===401?F({type:"error",title:r("translation:login.toast.error.title"),message:r("translation:login.toast.error.bad_token")}):s.response.data?F({type:"error",title:r("translation:login.toast.error.title"),message:s.response.data.error.title}):F({type:"error",title:r("translation:login.toast.error.title"),message:r("translation:login.toast.error.unexpected_error")}),n("/login",{replace:!0})},onSuccess:s=>{var a;s.data.token&&t.signin({token:s.data.token,selectedStore:(a=s.data)==null?void 0:a.selectedStore},()=>{n("/dashboard",{replace:!0})})}})}const dt=de("form",{display:"flex",flexDirection:"column",gap:"$4",height:"100%"}),Ke=de("input",{border:"1px solid $borderColor",px:"$3",py:"$2",borderRadius:8,boxShadow:"$xsmall",backgroundColor:"$inputBackgroundColor","&::placeholder":{color:"$placeholderColor"},"&[readonly]":{cursor:"not-allowed",backgroundColor:"$inputBackgroundColorDisabled","&::placeholder":{color:"$gray400"}},variants:{style:{false:{boxShadow:"none",backgroundColor:"inherit",border:"none"}}}}),ae=de("label",{fontFamily:"$redHatDisplay",fontWeight:"$bold",color:"$titleColor",marginBottom:"$1",variants:{type:{groupChoice:{fontFamily:"$inter",fontWeight:"$medium",color:"$textColor",marginBottom:0},help:{marginTop:0,marginBottom:"$2",color:"$gray500",fontSize:13,fontFamily:"$inter",fontWeight:"$normal"}}}}),Uq=de("label",{marginBottom:"$1",color:"$gray500",fontSize:"0.875rem"}),F7e=de("textarea",{color:"$titleColor",width:"100%",resize:"vertical",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word",backgroundColor:"$inputBackgroundColor","&::placeholder":{color:"$placeholderColor"},"&[readonly]":{cursor:"not-allowed",backgroundColor:"$disabledBackgroundColor","&::placeholder":{color:"$placeholderColor"}}});function Ti({maximumCharacters:e=null,defaultValue:t=null,onChange:n=null,ref:r=null,error:i=!1,...o}){const[s,a]=y.exports.useState(t||o.value||""),[c,u]=y.exports.useState(e?e-(t||o.value||"").length:null),d=f=>{a(f.target.value||""),n&&n(f)};return y.exports.useEffect(()=>{a(o.value),e&&s!==void 0&&u(e?e-((s==null?void 0:s.length)||0):null)},[s,o.value]),g(ce,{css:{position:c!==null?"relative":"inherit",display:"inline-block",borderRadius:8,border:i?"1px solid $destructive800":"1px solid $borderColor",boxShadow:"$xsmall",paddingLeft:"$3",paddingTop:"$2"},children:[l(F7e,{value:s,onChange:d,ref:r,...o}),c!==null&&g(M,{css:{position:"absolute",bottom:12,right:16,backgroundColor:"$backgroundColor",px:"$2",py:"$1",borderRadius:4,border:"1px solid $borderColor",boxShadow:"$xsmall",fontSize:"0.75rem",color:"$textColor"},children:[c," character",c>1?"s":""," left"]})]})}function Zf(){return l(Ne,{css:{color:"$destructive800",marginLeft:"$1"},children:"*"})}const B7e=de("svg",{circle:{stroke:"$primary700"}});function Vq({width:e=null,...t}){return g(B7e,{xmlns:"http://www.w3.org/2000/svg",css:{...t,mx:"auto",flexShrink:0,height:"100%"},width:e,viewBox:"0 0 1990 372",children:[l("path",{d:"M254.699 277.998C252.505 277.998 251.232 280.456 252.509 282.225L281.69 320.644C283.21 322.75 285.661 323.999 288.271 323.999L333.301 323.999C335.495 323.999 336.768 321.541 335.491 319.772L306.752 281.353C305.232 279.248 302.781 277.999 300.171 277.999L254.699 277.998Z",fill:"#191815"}),l("path",{d:"M78.0121 164C77.1786 164 76.7018 164.946 77.1996 165.612L185.82 310.966C191.948 319.167 201.609 324 211.87 324L270.937 324C274.271 324 276.178 320.216 274.187 317.552L169.181 177.034C163.052 168.833 153.392 164 143.13 164L78.0121 164Z",fill:"#191815"}),l("path",{d:"M78.0121 160C77.1786 160 76.7018 159.054 77.1996 158.388L185.82 13.0339C191.948 4.83345 201.609 -3.05176e-05 211.87 0L270.937 0.000198364C274.271 0.000213623 276.178 3.78372 274.187 6.44827L169.181 146.966C163.052 155.167 153.392 160 143.13 160L78.0121 160Z",fill:"#191815"}),l("path",{d:"M59.912 0H12.0885C5.41233 0 0.000244141 5.41208 0.000244141 12.0882V311.912C0.000244141 318.588 5.41233 324 12.0885 324H59.912C66.5882 324 72.0002 318.588 72.0002 311.912V12.0882C72.0002 5.41209 66.5882 0 59.912 0Z",fill:"#191815"}),l("path",{d:"M567.632 324V168.812H685.353V194.751H597.339V233.104H655.202V258.156H597.339V298.061H686.24V324H567.632ZM743.798 325.995C718.968 325.995 701.897 311.585 701.897 290.745C701.897 269.019 719.189 256.161 748.453 256.161C758.651 256.161 768.628 257.713 777.496 261.038V251.727C777.496 237.538 768.849 230.444 752.222 230.444C742.468 230.444 731.604 233.326 717.194 239.977L706.996 219.137C724.732 210.935 740.694 206.944 756.878 206.944C787.694 206.944 805.208 222.241 805.208 249.066V324H777.496V315.354C767.741 322.67 756.878 325.995 743.798 325.995ZM728.501 290.302C728.501 299.613 737.369 305.599 750.892 305.599C761.312 305.599 770.18 302.939 777.496 297.175V279.882C769.736 276.335 761.533 274.783 752.001 274.783C737.369 274.783 728.501 280.547 728.501 290.302ZM871.014 326.217C850.174 326.217 831.995 320.453 818.915 310.033L833.103 291.411C846.184 300.5 858.155 304.934 870.57 304.934C884.759 304.934 894.07 299.392 894.07 291.411C894.07 284.76 889.414 280.991 878.773 279.439L857.047 276.335C834.212 272.788 822.462 261.482 822.462 243.081C822.462 221.354 840.641 207.166 869.462 207.166C886.089 207.166 902.051 212.043 916.24 221.576L902.495 239.977C890.08 232.218 878.773 228.449 866.801 228.449C855.273 228.449 847.514 233.548 847.514 240.864C847.514 247.958 852.169 251.283 863.919 253.057L885.646 256.161C908.259 259.486 920.674 270.793 920.674 288.75C920.674 310.255 899.391 326.217 871.014 326.217ZM944.309 371.665C939.21 371.665 934.332 371.221 931.228 370.556V346.17C934.554 346.835 937.214 347.056 941.648 347.056C952.511 347.056 960.049 341.736 964.483 331.094L967.143 324.887L922.139 209.161H953.176L983.106 289.859L1016.8 209.161H1047.18L993.304 334.42C981.775 361.467 968.474 371.665 944.309 371.665ZM1062.12 324V168.812H1133.28C1164.32 168.812 1185.38 185.883 1185.38 210.935C1185.38 225.123 1177.62 236.651 1165.21 243.967C1180.95 250.618 1190.7 263.477 1190.7 279.217C1190.7 306.043 1169.2 324 1136.61 324H1062.12ZM1091.83 232.883H1131.51C1146.36 232.883 1155.68 225.345 1155.68 213.152C1155.68 201.18 1146.36 193.421 1131.51 193.421H1091.83V232.883ZM1091.83 299.392H1134.39C1150.35 299.392 1160.77 290.745 1160.77 277.665C1160.77 264.585 1150.35 256.161 1134.39 256.161H1091.83V299.392ZM1211.66 324V168.812L1239.82 163.935V324H1211.66ZM1319.92 326.217C1285.78 326.217 1259.18 300.057 1259.18 266.802C1259.18 233.326 1285.78 207.166 1319.92 207.166C1354.06 207.166 1380.89 233.326 1380.89 266.802C1380.89 300.057 1354.06 326.217 1319.92 326.217ZM1319.92 301.83C1338.76 301.83 1353.4 286.312 1353.4 266.802C1353.4 246.85 1338.54 231.552 1319.92 231.552C1301.3 231.552 1286.67 246.85 1286.67 266.802C1286.67 286.312 1301.3 301.83 1319.92 301.83ZM1457.66 371.443C1440.15 371.443 1423.52 367.674 1410.22 360.802L1420.19 338.854C1433.05 345.283 1444.8 348.165 1457 348.165C1475.4 348.165 1485.15 339.962 1485.15 324V313.802C1475.84 320.896 1464.76 324.665 1452.78 324.665C1420.42 324.665 1394.92 298.948 1394.92 265.915C1394.92 233.104 1420.64 207.388 1453.67 207.388C1465.2 207.388 1476.28 210.935 1485.37 217.364V209.161H1513.31V324.222C1513.31 354.594 1493.58 371.443 1457.66 371.443ZM1457 300.722C1468.52 300.722 1478.28 296.731 1485.15 289.415V242.859C1478.28 235.765 1468.3 231.552 1457.22 231.552C1437.49 231.552 1422.41 246.406 1422.41 265.915C1422.41 285.646 1437.49 300.722 1457 300.722ZM1595.36 371.443C1577.84 371.443 1561.21 367.674 1547.91 360.802L1557.89 338.854C1570.75 345.283 1582.5 348.165 1594.69 348.165C1613.09 348.165 1622.85 339.962 1622.85 324V313.802C1613.53 320.896 1602.45 324.665 1590.48 324.665C1558.11 324.665 1532.62 298.948 1532.62 265.915C1532.62 233.104 1558.33 207.388 1591.37 207.388C1602.89 207.388 1613.98 210.935 1623.07 217.364V209.161H1651V324.222C1651 354.594 1631.27 371.443 1595.36 371.443ZM1594.69 300.722C1606.22 300.722 1615.97 296.731 1622.85 289.415V242.859C1615.97 235.765 1606 231.552 1594.91 231.552C1575.18 231.552 1560.11 246.406 1560.11 265.915C1560.11 285.646 1575.18 300.722 1594.69 300.722ZM1731.5 326.217C1696.91 326.217 1670.31 300.057 1670.31 266.581C1670.31 233.326 1696.03 207.388 1728.84 207.388C1761.21 207.388 1785.37 233.548 1785.37 268.576V275.892H1698.69C1702.46 291.411 1715.76 302.495 1732.83 302.495C1743.25 302.495 1752.78 298.948 1758.99 292.962L1777.39 310.033C1763.42 321.118 1749.46 326.217 1731.5 326.217ZM1698.47 255.717H1757.66C1754.33 241.085 1742.58 230.666 1728.17 230.666C1713.32 230.666 1702.01 240.42 1698.47 255.717ZM1804.66 324V209.161H1832.82V222.463C1840.13 212.265 1850.77 206.722 1863.63 206.722C1869.62 206.722 1872.72 207.388 1876.05 208.939V233.769C1871.61 231.996 1866.29 230.887 1861.19 230.887C1848.78 230.887 1838.8 237.317 1832.82 248.845V324H1804.66ZM1935.98 326.217C1915.14 326.217 1896.96 320.453 1883.88 310.033L1898.07 291.411C1911.15 300.5 1923.12 304.934 1935.54 304.934C1949.73 304.934 1959.04 299.392 1959.04 291.411C1959.04 284.76 1954.38 280.991 1943.74 279.439L1922.01 276.335C1899.18 272.788 1887.43 261.482 1887.43 243.081C1887.43 221.354 1905.61 207.166 1934.43 207.166C1951.06 207.166 1967.02 212.043 1981.21 221.576L1967.46 239.977C1955.05 232.218 1943.74 228.449 1931.77 228.449C1920.24 228.449 1912.48 233.548 1912.48 240.864C1912.48 247.958 1917.14 251.283 1928.89 253.057L1950.61 256.161C1973.23 259.486 1985.64 270.793 1985.64 288.75C1985.64 310.255 1964.36 326.217 1935.98 326.217Z",fill:"#191815"}),l("rect",{x:"436",y:"162",width:"17",height:"162",fill:"#191815"})]})}function H7e(){const e=hs(),[t]=Jn(),n=t.get("token"),{t:r}=Ks(),{isLoading:i,mutate:o}=N7e(),{isLoading:s,mutate:a}=zq();y.exports.useEffect(()=>{n&&a({token:n})},[]);const c=u=>{u.preventDefault();const d=new FormData(u.target),f=d.get("username"),h=d.get("password");o({username:f,password:h})};return e!=null&&e.token?l(xh,{to:"/dashboard",state:{from:"/dashboard"},replace:!0}):l(M,{css:{minHeight:"100svh",alignItems:"center",justifyContent:"center",py:"$10"},children:g(P,{css:{width:360,backgroundColor:"white",border:"1px solid $borderColor",justifyContent:"center",px:"$8",py:"$10",borderRadius:12},children:[l(M,{css:{mx:"auto",height:40,marginBottom:"$10"},children:l(Vq,{})}),g(dt,{css:{height:"inherit"},onSubmit:c,children:[g(P,{children:[l(ae,{children:r("translation:login.username")}),l(Ke,{name:"username",type:"text",placeholder:"Luke Rowley"})]}),g(P,{children:[g(M,{css:{justifyContent:"space-between"},children:[l(ae,{children:r("translation:login.password")}),l(z7e,{})]}),l(Ke,{name:"password",type:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"})]}),l(Y,{disabled:i||s,variant:"primary",type:"submit",css:{marginTop:"$4",width:"100%"},children:r("translation:login.sign_in")})]})]})})}function z7e(){const{t:e}=Ks();return l(Et,{delayDuration:200,content:g(P,{css:{gap:"$2"},children:[l(A,{children:e("translation:login.forgot_password.help1")}),l(A,{children:e("translation:login.forgot_password.help2")})]}),children:l(ae,{css:{color:"$gray400",userSelect:"none","&:hover":{cursor:"pointer",color:"$gray500"}},children:e("translation:login.forgot_password.label")})})}const jq="Checkbox",[U7e,VGe]=ii(jq),[V7e,j7e]=U7e(jq),W7e=y.exports.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=y.exports.useState(null),p=zt(t,w=>h(w)),m=y.exports.useRef(!1),v=f?Boolean(f.closest("form")):!0,[b=!1,x]=$o({prop:i,defaultProp:o,onChange:u}),C=y.exports.useRef(b);return y.exports.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const S=()=>x(C.current);return w.addEventListener("reset",S),()=>w.removeEventListener("reset",S)}},[f,x]),y.exports.createElement(V7e,{scope:n,state:b,disabled:a},y.exports.createElement(Pt.button,ue({type:"button",role:"checkbox","aria-checked":xd(b)?"mixed":b,"aria-required":s,"data-state":Wq(b),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onKeyDown:Ue(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ue(e.onClick,w=>{x(S=>xd(S)?!0:!S),v&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})),v&&y.exports.createElement(G7e,{control:f,bubbles:!m.current,name:r,value:c,checked:b,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),q7e="CheckboxIndicator",K7e=y.exports.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=j7e(q7e,n);return y.exports.createElement(Hi,{present:r||xd(o.state)||o.state===!0},y.exports.createElement(Pt.span,ue({"data-state":Wq(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:t,style:{pointerEvents:"none",...e.style}})))}),G7e=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.exports.useRef(null),s=Jm(n),a=eg(t);return y.exports.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});c.indeterminate=xd(n),f.call(c,xd(n)?!1:n),c.dispatchEvent(h)}},[s,n,r]),y.exports.createElement("input",ue({type:"checkbox","aria-hidden":!0,defaultChecked:xd(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function xd(e){return e==="indeterminate"}function Wq(e){return xd(e)?"indeterminate":e?"checked":"unchecked"}const Y7e=W7e,Q7e=K7e,Xd=de(Y7e,{all:"unset",backgroundColor:"$cardBackgroundColor",width:25,height:25,borderRadius:4,display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center",border:"1px solid $borderColor",transition:"backgroundColor 200ms","&:disabled":{backgroundColor:"$gray200"},variants:{small:{true:{width:16,height:16}}}}),Zd=de(Q7e,{color:"$textColor",variants:{small:{true:{verticalAlign:0,width:12,height:15}}}}),X7e=fn({"0%":{opacity:0},"100%":{opacity:1}}),Z7e=fn({"0%":{opacity:0,transform:"translate(-50%, -48%) scale(.96)"},"100%":{opacity:1,transform:"translate(-50%, -50%) scale(1)"}}),wt=de(M,{marginTop:"$2",justifyContent:"flex-end",gap:"$6"}),Xe=de(ude,{backgroundColor:"$overlayDialog",backdropFilter:"blur(1px)",position:"fixed",inset:0,animation:`${X7e} 150ms cubic-bezier(0.16, 1, 0.3, 1)`}),Ze=de(dde,{backgroundColor:"$cardBackgroundColor",borderRadius:12,boxShadow:"hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"90vw",maxHeight:"85vh",p:25,animation:`${Z7e} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,"&:focus":{outline:"none"},overflow:"auto","@sm":{width:"96vw",px:"$4"},variants:{size:{large:{maxWidth:1200},medium:{maxWidth:1e3},regular:{maxWidth:600},small:{maxWidth:450}}},defaultVariants:{size:"regular"}}),nt=de(fde,{display:"flex",alignItems:"center",fontFamily:"$header",fontWeight:700,color:"$textColor",fontSize:"1.4rem",marginBottom:"$4"}),ht=de(hde,{display:"flex",flexDirection:"column",marginBottom:"$8",gap:"$4"}),et=de(Y,{all:"unset",fontFamily:"inherit",borderRadius:"100%",height:25,width:25,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"$textColor",position:"absolute",top:"$3",right:"$3",transition:"0.3s background-color","&:hover":{backgroundColor:"$gray100",transition:"0.3s background-color"}}),J7e=de(M,{justifyContent:"center",width:"100%"});function exe(){var v;const[e,t]=y.exports.useState("sync"),[n,r]=y.exports.useState(!1),[i,o]=y.exports.useState(null),[s,a]=y.exports.useState(null),[c,u]=y.exports.useState([]),{isLoading:d,data:f}=C9e(),h=ao(),p=nxe(),{mutate:m}=vqe();return y.exports.useEffect(()=>{const b=["/","/feed","/events"];p.host!==""&&b.includes(window.location.pathname)&&m({...p,pathname:window.location.pathname,currentUrl:window.location.href})},[p,h,m]),y.exports.useEffect(()=>{if(f===void 0)return;const b=window.localStorage.getItem("serverVersion");b&&b!=="v2024.11.10.0"&&F({type:"update",title:"A new version of Primfeed is available",message:"To ensure the best experience possible, please refresh your page to get the latest version."});const C=window.matchMedia("(prefers-color-scheme: dark)");f.theme==="dark"?t(fa):f.theme==="light"?t("light"):f.theme==="sync"&&t(C.matches?fa:"");const w=S=>{f.theme==="sync"&&t(S.matches?fa:"")};return C.addEventListener("change",w),()=>C.removeEventListener("change",w)},[f]),y.exports.useEffect(()=>{document.body.className=e},[e,t]),y.exports.useEffect(()=>{let b=document.querySelector("meta[name~='theme-color']");b?(b.setAttribute("name","theme-color"),e===fa?b.content="#0d0d0d":b.content="#ffffff"):(b=document.createElement("meta"),b.setAttribute("name","theme-color"),e===fa?b.content="#0d0d0d":b.content="#ffffff",document.getElementsByTagName("head")[0].appendChild(b))},[e]),d?l(z,{}):l(ce,{css:{display:"flex"},children:l($y.Provider,{value:f,children:l(FE.Provider,{value:{postsOpened:c,setPostsOpened:u},children:g(NE.Provider,{value:{viewingMedia:s,setViewingMedia:a},children:[l(LE.Provider,{value:{createPost:n,setCreatePost:r},children:g(Oy.Provider,{value:{sharingPost:i,setSharingPost:o},children:[i!==null&&l(QX,{}),n!==null&&l(sje,{}),l(J7e,{children:l(Mj,{})})]})}),((v=f==null?void 0:f.user)==null?void 0:v.tosAccepted)===!1?l(txe,{}):null]})})})})}function txe(){const[e,t]=y.exports.useState(!0),[n,r]=y.exports.useState(!1),{isLoading:i,mutate:o}=pqe();return l(Ye,{open:e,onOpenChange:t,children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),onPointerDownOutside:s=>s.preventDefault(),onEscapeKeyDown:s=>s.preventDefault(),onInteractOutside:s=>s.preventDefault(),children:[l(nt,{children:"Updated Terms of Service"}),g(ht,{children:[g(A,{children:["Primfeed's"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service",target:"_blank",primfeed:!0,children:"Terms of Service"})," ","have changed, and to continue using the service you must read and accept them."]}),l(A,{children:"These changes aims to allow commercial events to publish flyers and vendor ads from products sold at their event."}),l(Tt,{children:"Summary"}),l(A,{css:{fontWeight:"bold"},children:"Public Gallery"}),g("ul",{children:[l("li",{children:"The Public Gallery is now the default page."}),l("li",{children:"Youtube thumbnail for a Second Life\u2122 themed video are now allowed."}),l("li",{children:"Commercial events can post a flyer for their event once a week, and they can post vendor ads from products sold at their event."})]}),l(A,{css:{fontWeight:"bold"},children:"Feeds"}),g("ul",{children:[l("li",{children:"The Discovery and the old Home page has been replaced by Feeds"}),l("li",{children:"In Feeds, you have two tabs: Following and Discovery."}),l("li",{children:"Discovery will display every posts on Primfeed."}),l("li",{children:"Using the filters above the first post, choose to display posts with pictures and text, text only or pictures only."})]}),l(A,{css:{fontWeight:"bold"},children:"Events"}),g("ul",{children:[l("li",{children:"Premium members can now create Events in the new dedicated section"}),l("li",{children:"An event is any group activity organized by a host, taking place on land owned by the host or a group they are part of. Examples include but are not limited to discussions, group meetings, dances, classes, tours, competitions, and music events."})]}),l(A,{children:"If you do not want to accept these Terms of Service, you can send a notecard to Luke Rowley in-world, requesting the deletion of your account."}),g(M,{css:{marginTop:"$6",cursor:"pointer",alignItems:"center",gap:"$2"},children:[l(Xd,{id:"tos",checked:n,onCheckedChange:()=>r(!n),css:{border:"2px solid $borderColor"},children:l(Zd,{children:l(W,{icon:Pa})})}),g("label",{htmlFor:"tos",children:["I agree to the new"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service",target:"_blank",primfeed:!0,children:"Terms of Service"}),"."]})]})]}),l(dt,{onSubmit:s=>{s.preventDefault(),o(null,{onSuccess:()=>t(!1)})},children:l(wt,{children:l(Et,{enabled:!n,small:!0,content:l(P,{css:{gap:"$2"},children:l(A,{children:"You must agree to the new Terms of Service to continue using Primfeed."})}),children:l(Y,{disabled:!n||i,variant:"primary",children:"Continue to Primfeed"})})})})]})]})})}function nxe(){const[e,t]=y.exports.useState({type:"$pageview",deviceType:"",browser:"",host:"",pathname:"",version:"",os:"",geoipTimeZone:"",data:[]});return y.exports.useEffect(()=>{const n=()=>{const s=navigator.userAgent;return/mobile/i.test(s)?"Mobile":/tablet/i.test(s)?"Tablet":"Desktop"},r=()=>{const s=navigator.userAgent;return s.indexOf("Chrome")>-1?"Chrome":s.indexOf("Safari")>-1&&s.indexOf("Chrome")===-1?"Safari":s.indexOf("Firefox")>-1?"Firefox":s.indexOf("MSIE")>-1||s.indexOf("Trident/")>-1?"IE":"Unknown"},i=()=>localStorage.getItem("serverVersion")||"Unknown",o=()=>{const s=navigator.platform;return/Win/i.test(s)?"Windows":/Mac/i.test(s)?"Mac OS X":/Linux/i.test(s)?"Linux":/Android/i.test(navigator.userAgent)?"Android":/iPhone|iPad|iPod/i.test(navigator.userAgent)?"iOS":"Unknown"};t({...e,deviceType:n(),browser:r(),host:window.location.hostname,version:i(),os:o(),geoipTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})},[]),e}const qq="Progress",B6=100,[rxe,jGe]=ii(qq),[ixe,WGe]=rxe(qq),Kq=y.exports.forwardRef((e,t)=>{const{__scopeProgress:n,value:r,max:i,getValueLabel:o=oxe,...s}=e,a=hw(i)?i:B6,c=Gq(r,a)?r:null,u=tv(c)?o(c,a):void 0;return y.exports.createElement(ixe,{scope:n,value:c,max:a},y.exports.createElement(Pt.div,ue({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":tv(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":sxe(c,a),"data-value":c!=null?c:void 0,"data-max":a},s,{ref:t})))});Kq.propTypes={max(e,t,n){const r=e[t],i=String(r);return r&&!hw(r)?new Error(axe(i,n)):null},value(e,t,n){const r=e[t],i=String(r),o=hw(e.max)?e.max:B6;return r!=null&&!Gq(r,o)?new Error(lxe(i,n)):null}};function oxe(e,t){return`${Math.round(e/t*100)}%`}function sxe(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function tv(e){return typeof e=="number"}function hw(e){return tv(e)&&!isNaN(e)&&e>0}function Gq(e,t){return tv(e)&&!isNaN(e)&&e<=t&&e>=0}function axe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${B6}\`.`}function lxe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${B6} if no \`max\` prop is set)
  - \`null\` if the progress is indeterminate.

Defaulting to \`null\`.`}const cxe=Kq,uxe=de(cxe,{position:"relative",overflow:"hidden",background:"$progressBackground",borderRadius:"99999px",width:300,height:8,transform:"translateZ(0)"});function pw({currentPercentage:e,color:t}){return l(ce,{css:{position:"absolute",backgroundColor:t,width:"100%",height:"100%",transition:"transform 660ms cubic-bezier(0.65, 0, 0.35, 1)",transform:`translateX(-${100-e}%)`}})}function Yq({countProducts:e,countRequestedProducts:t,countBloggedProduct:n}){const r=n/e*100,i=t/e*100;return g(M,{css:{flex:1,alignItems:"center",gap:"$4"},children:[g(ce,{css:{width:"100%",overflow:"hidden",background:"$progressBackground",borderRadius:"99999px",height:4,transform:"translateZ(0)"},children:[l(pw,{currentPercentage:i,color:"$amber400"}),l(pw,{currentPercentage:r,color:"$success500"})]}),g(Ne,{css:{flexShrink:0,fontSize:"0.75rem"},children:[n," / ",t," / ",e]})]})}function no({title:e,content:t}){return g(ce,{css:{marginTop:"$10",flex:1,textAlign:"center"},children:[l(Qn,{children:e}),l(A,{css:{marginTop:"$2",maxWidth:600,mx:"auto"},children:t})]})}const dxe=de("div",{width:"100%",backgroundColor:"$destructive500",textAlign:"center",padding:"$4",color:"white",borderRadius:4,marginTop:"$4"});function Dh({title:e,children:t}){return g(M,{children:[l(M,{css:{backgroundColor:"$cardBackgroundColor",borderRadius:100,width:50,height:50,marginRight:"$5",justifyContent:"center",alignItems:"center",flexShrink:0},children:l(W,{icon:ZH,css:{height:24,color:"$premium300"}})}),g(P,{css:{gap:"$2"},children:[l(Tt,{css:{marginBottom:"$2"},children:e}),g(P,{css:{gap:"$2"},children:[t,l(A,{css:{marginLeft:"auto",marginTop:"$4"},children:l(ie,{to:"/settings/billing/subscription",premium:!0,children:"Go to your subscription"})})]})]})]})}function fxe(){return g(Dh,{title:"Not available in your plan",children:[g(A,{children:["The Deadline feature is only available on ",l("strong",{children:"premium plans"}),"."]}),g(A,{children:["Consider upgrading your plan to unlock and use the ",l("strong",{children:"auto-deadline"})," ","and the ",l("strong",{children:"deadline-in-days"})," features."]})]})}function hxe(){const{isLoading:e,data:t}=ms();return e?l(z,{}):g(Dh,{title:"Quota reached",children:[g(A,{children:["You are limited to ",e?0:t.subscription.maximumBloggersAndFriends," ","members in your ",g("strong",{children:[e?"free":t.subscription.type," plan"]}),"."]}),l(A,{children:"Consider upgrading your plan to unlock more members."})]})}function pxe(){const{quota:e,subscription:t}=st();return g(Dh,{title:"Quota reached",children:[g(A,{children:["You are limited to ",e.locations.quota," location",e.locations.quota>1?"s":""," with your"," ",g("strong",{children:[t.type," plan"]}),"."]}),l(A,{children:"Consider upgrading your plan to unlock more locations, or you can archive old locations to free up space."})]})}function BR(){const{isLoading:e,data:t}=ms();return e?l(z,{}):g(Dh,{title:"Quota reached",children:[g(A,{children:["You are limited to ",e?5:t.subscription.maximumProducts," products with your ",g("strong",{children:[e?"free":t.subscription.type," plan"]}),"."]}),l(A,{children:"Consider upgrading your plan to unlock more products, or you can delete old products to free up space."})]})}function Qq({children:e,content:t,openDelay:n=500}){return g(S6,{openDelay:n,children:[l(E6,{asChild:!0,children:e}),l(T6,{children:l(bxe,{sideOffset:5,side:"top",children:t})})]})}const mxe=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),gxe=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),vxe=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),yxe=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),bxe=wi(k6,{borderRadius:12,padding:20,width:500,backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",boxShadow:"$large",animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:vxe},'&[data-side="right"]':{animationName:yxe},'&[data-side="bottom"]':{animationName:mxe},'&[data-side="left"]':{animationName:gxe}}});function xxe({title:e=null,children:t}){return l(Qq,{content:t,children:l("div",{children:g(ce,{css:{marginLeft:"$2",cursor:"pointer",display:"inline-flex",backgroundColor:"inherit",px:0,gap:"$1",fontWeight:"$bold",fontFamily:"$redHatDisplay",color:"$premium300",borderRadius:8},children:[e||"Upgrade",l(ae,{children:l(W,{icon:ZH,css:{color:"$premium300",height:14}})})]})})})}function Tm({disabled:e=!1,content:t,children:n,openDelay:r=500}){return e?n:l(Qq,{content:t,openDelay:r,children:n})}function Tb({label:e="Invite blogger",css:t={}}){const[n,r]=y.exports.useState(null),[i,o]=y.exports.useState(!1),s=Ee(),a=te(),{isLoading:c,data:u}=ms(),d=ve({mutationFn:h=>{h.preventDefault();const m=new FormData(h.target).get("username");return r(null),a.post("/bloggers/invite",{username:m}).then(()=>{o(!1),F({type:"success",title:"Invitation has been successfully sent",message:m+" received an invitation and will soon respond to your invitation."}),s.invalidateQueries({queryKey:["bloggers"]})}).catch(function(v){v.response?r(v.response.data.error.title):r("An unexpected error occured. Please try again.")})}});if(c)return l(z,{});const f=u.quota.countBloggersAndFriends<u.subscription.maximumBloggersAndFriends;return g(Ye,{open:i,onOpenChange:o,children:[l(pt,{children:l(Tm,{content:l(hxe,{}),openDelay:0,disabled:f,children:g(Y,{variant:"primary",disabled:!f,css:{...t,marginLeft:"auto"},children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:Xm}),e]})})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:h=>h.preventDefault(),children:[l(nt,{children:e}),g(ht,{children:[l(A,{children:"You're about to send an invitation to a blogger, inviting them to join your store. If they accept the invitation, they'll gain access to your latest releases on EasyBloggers."}),g(A,{css:{marginTop:"$2",fontStyle:"italic",fontSize:"0.875rem"},children:["Note: If the user does not exist, the system will automatically create them an account and send the Blogger Package directly, so they can connect and accept your invitation.",l("br",{}),"Make sure the user receiving this invitation is expecting the package."]})]}),g(dt,{onSubmit:d.mutate,children:[g(ce,{css:{display:"flex",flexDirection:"column",marginBottom:"$4"},children:[l(ae,{children:"Avatar name"}),l(Ke,{name:"username",type:"text"})]}),n&&l(dxe,{children:n}),l(M,{css:{marginTop:25,justifyContent:"flex-end"},children:l(Y,{disabled:d.isLoading,type:"submit",variant:"primary",children:"Send the invitation"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Cxe(){const e=te(),{pageTitle:t,setPageTitle:n}=Ar(),{setContent:r}=Si(),{isLoading:i,error:o,data:s}=_t(["bloggers"],()=>e.get("/bloggers").then(u=>u.data)),a=st(),c=s&&s.bloggers.length===0&&s.stores.length===0&&s.friends.length===0&&s.invitations.length===0;return Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{r(!c&&!i?l(Tb,{}):null)},[r,c,i]),y.exports.useEffect(()=>{n("Members")},[t,n]),i?l(z,{}):o?g(z,{children:["An error has occurred: ",o.message]}):g(ql,{children:[s.bloggers.length>0&&g(z,{children:[g(br,{children:["Blogger",s.bloggers.length>1?"s":""," - ",s.bloggers.length]}),l(HR,{children:s.bloggers.map((u,d)=>l(kb,{type:"blogger",blogger:u,countProducts:s.countProducts},`blogger-card-${d}`))})]}),s.stores.length>0&&g(z,{children:[g(br,{children:["Store",s.stores.length>1?"s":""," - ",s.stores.length]}),l(HR,{children:s.stores.map((u,d)=>l(kb,{type:"store",blogger:u},`store-card-${d}`))})]}),s.friends.length>0&&g(z,{children:[g(br,{children:["Friend",s.friends.length>1?"s":""," - ",s.friends.length]}),l(zR,{children:s.friends.map((u,d)=>l(kb,{type:"friend",blogger:u,countProducts:s.countProducts},`friend-card-${d}`))})]}),s.invitations.length>0&&g(z,{children:[g(br,{children:["Invitation",s.invitations.length>1?"s":""," -"," ",s.invitations.length]}),l(zR,{children:s.invitations.map((u,d)=>l(Exe,{invitation:u},`invitation-card-${d}`))})]}),a.selectedStore.type==="store"&&c&&l(no,{title:"Gather your team of bloggers",content:g(z,{children:[g(A,{children:["To get started with EasyBloggers, invite your first blogger using the button below, or customize your"," ",l(ie,{to:"/settings/store/bloggers-application",children:"Application Form"})," ","in the Settings of your store and share it on your socials media for your bloggers search."]}),l(Tb,{label:"Invite your first blogger",css:{marginTop:"$6"}})]})}),a.selectedStore.type==="event"&&c&&l(no,{title:"Gather your team of bloggers and designers",content:g(z,{children:[g(P,{css:{gap:"$4"},children:[g(A,{children:["To get started with EasyBloggers, invite your first blogger using the button below, or customize your"," ",l(ie,{to:"/settings/store/bloggers-application",children:"Application Form"})," ","in the Settings of your store and share it on your socials media for your bloggers search."]}),l(A,{children:"Your designers part of your event will be shown here as well."}),g(A,{children:["Customize your"," ",l(ie,{to:"/settings/store/bloggers-application",children:"Designers Application Form"})," ","in the Settings of your store, and share it to your designers for them to apply."]})]}),l(Tb,{label:"Invite your first blogger",css:{marginTop:"$6"}})]})})]})}const HR=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}}),zR=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}});function kb({blogger:e,type:t,countProducts:n=0,status:r="Active"}){const i=Ee(),o=te(),[s,a]=y.exports.useState(!1),c=r==="Active",u=ar(),d=y.exports.useRef(null),{selectedStore:f}=st(),h=e.personalUrl||e.deviantArtUrl||e.blueskyUrl||e.flickrUrl||e.facebookUrl||e.xUrl||e.instagramUrl,p=s?{cursor:"pointer",boxShadow:"$small",border:"1px solid $gray300",transition:"all 200ms"}:{};let m="active";e.activeStatus!==null?m="away":e.countPostsMissedDeadline>0?m="missed_deadline":f.minimumPostPerMonth>0&&e.countPostsCompletedThisMonth<f.minimumPostPerMonth&&(m="missed_monthly_posts_quota");const v=ve({mutationFn:async C=>{var S,T,E,k;let w="/user/send-package/"+C.id;t=="store"&&(w="/user/send-package-store/"+C.id);try{await o.get(w),F({type:"success",title:"Package on its way",message:"In a few seconds, they should receive their package."}),i.invalidateQueries({queryKey:["bloggers"]})}catch(_){(T=(S=_.response)==null?void 0:S.data)!=null&&T.error?F({type:"error",title:(E=_.response.data)==null?void 0:E.error.title,message:(k=_.response.data)==null?void 0:k.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}}});function b(C){for(;C;){if(C.tagName.toLowerCase()==="a"||C.hasAttribute("data-prevent-card-actions"))return!0;C=C.parentElement}return!1}const x=!0;return y.exports.useEffect(()=>{function C(w){b(w.target)||a(!(d.current&&!d.current.contains(w.target)))}return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[s,x]),g(M,{ref:d,onClick:C=>{["friend","blogger"].includes(t)&&x&&!b(C.target)&&u("/user/"+e.id),["store"].includes(t)&&x&&!b(C.target)&&u("/store/"+e.id)},css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:12,transition:"all 200ms",position:"relative",...p,"&:hover":{cursor:"pointer",boxShadow:"$small",border:"1px solid $hoveringCard",transition:"all 200ms"}},children:[g(P,{"data-prevent-close":"true",css:{position:"absolute",width:"100%",height:"100%",backdropFilter:"blur(2px)",alignItems:"center",justifyContent:"center",zIndex:s?1:0,borderRadius:8,gap:"$2",px:"$10",textAlign:"center",transition:s?"all 200ms":"none",opacity:s?1:0,pointerEvents:s?"inherit":"none"},children:[g(Y,{css:{width:"100%"},variant:"gray",onClick:()=>{v.isLoading||v.mutate(e)},disabled:v.isLoading,children:[l(W,{icon:Od}),l(A,{children:"Deliver package"})]}),t==="store"&&l(wxe,{store:e,children:g(Y,{css:{width:"100%"},variant:"softDanger",onClick:()=>a(!1),children:[l(W,{icon:so}),l(A,{children:"Remove the store"})]})}),t==="friend"&&l(ie,{to:"/settings/store/friends",css:{width:"100%"},children:g(Y,{css:{width:"100%"},variant:"gray",onClick:()=>a(!1),children:[l(W,{icon:v3}),l(A,{children:"Manage friends"})]})})]}),g(P,{css:{px:"$6",paddingTop:"$6",paddingBottom:"$9",gap:"$4",width:"100%",justifyContent:"space-between",position:"relative",fontWeight:"$medium"},children:[t==="blogger"&&m==="missed_monthly_posts_quota"&&l(ce,{css:{position:"absolute",bottom:0,left:0,backgroundColor:"$memberStatusMissedRequirement",width:"100%",borderBottomLeftRadius:8,borderBottomRightRadius:8,textAlign:"center",color:"white",fontSize:12},children:"Missing required posts quota this month"}),t==="blogger"&&m==="away"&&l(Et,{content:l(P,{children:l(A,{children:e.activeStatus.status})}),small:!0,children:g(ce,{css:{position:"absolute",bottom:0,left:0,width:"100%",borderBottomLeftRadius:8,borderBottomRightRadius:8,textAlign:"center",backgroundColor:"$memberStatusAway",color:"$memberStatusAwayColor",fontSize:12},children:["Away until ",Z(e.activeStatus.expirationDate).format("LL")]})}),t==="blogger"&&m==="missed_deadline"&&l(ce,{css:{position:"absolute",bottom:0,left:0,backgroundColor:"$memberStatusMissedDeadline",width:"100%",borderBottomLeftRadius:12,borderBottomRightRadius:12,textAlign:"center",color:"white",fontSize:12},children:"Missed deadline"}),t==="blogger"&&m==="active"&&l(ce,{css:{position:"absolute",bottom:0,left:0,backgroundColor:"$memberStatusActive",width:"100%",borderBottomLeftRadius:12,borderBottomRightRadius:12,textAlign:"center",color:"white",fontSize:12},children:"Active"}),g(P,{css:{gap:"$4"},children:[g(M,{css:{alignItems:"center",justifyContent:"space-between"},children:[l(bi,{pictureUuid:e.profilePicture?e.profilePicture:e.pictureUuid,round:!0,size:60}),h&&g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:18,width:18},"& a":{lineHeight:1,p:"$1"}},children:[e.flickrUrl&&l(ie,{to:e.flickrUrl,target:"_blank",children:l(Ua,{})}),e.deviantArtUrl&&l(ie,{to:e.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.blueskyUrl&&l(ie,{to:e.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.facebookUrl&&l(ie,{to:e.facebookUrl,target:"_blank",children:l(za,{})}),e.instagramUrl&&l(ie,{to:e.instagramUrl,target:"_blank",children:l(Va,{})}),e.xUrl&&l(ie,{to:e.xUrl,target:"_blank",children:l(ja,{})}),e.personalUrl&&l(ie,{to:e.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})]}),g(ce,{children:[g(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:[t!=="store"&&l(Be,{showPicture:!1,inline:!0,user:{id:e.id,name:e.name,pictureUuid:e.profilePicture}}),t==="store"&&l(z,{children:e.name}),l(Et,{enabled:!0,content:l("span",{children:"Copy the name"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{px:"$1"},onClick:()=>{navigator.clipboard.writeText(e.name).then(()=>F({type:"success",title:"The blogger name "+e.name+" has been copied to your clipboard"}))},children:l(W,{icon:y3,css:{color:"$gray400",width:12}})})})]}),c&&g(A,{css:{color:"$gray500",fontSize:"0.75rem"},children:["Joined on ",Z(e.createdAt).format("LL")]})]})]}),t==="blogger"&&g(M,{css:{gap:"$4"},children:[g(P,{children:[l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:"This month"}),l(M,{css:{gap:"$3"},children:l(Et,{enabled:!0,content:g(z,{children:[g(A,{children:["Minimum posts required per month:"," ",f.minimumPostPerMonth]}),g(A,{children:[e.countPostsCompletedThisMonth," accepted post",e.countPostsCompletedThisMonth>1?"s":""," ","in ",Z().format("MMMM")]})]}),small:!0,children:g(ce,{children:[e.countPostsCompletedThisMonth>0&&e.countPostsCompletedThisMonth<f.minimumPostPerMonth&&l(W,{icon:Zp,css:{color:"$amber500"}}),e.countPostsCompletedThisMonth===0&&l(W,{icon:Zp,css:{color:"$gray400"}}),e.countPostsCompletedThisMonth>0&&e.countPostsCompletedThisMonth>=f.minimumPostPerMonth&&l(W,{icon:X0,css:{color:"$success600"}})," ",e.countPostsCompletedThisMonth]})})})]}),g(P,{css:{flex:1},children:[l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:"Total"}),l(Yq,{countProducts:n,countBloggedProduct:e.countPostsCompleted,countRequestedProducts:e.countProductsRequested})]})]})]})]})}function wxe({children:e,store:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("bloggerId");return o.delete("/events/"+u).then(()=>{r(!1),F({type:"success",title:"The store has been removed from your event."}),i.invalidateQueries({queryKey:["bloggers"]}),i.invalidateQueries({queryKey:["me"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Remove a store"}),g(ht,{children:[g("p",{children:["You are about to remove the store ",l("strong",{children:t.name})," from your event."]}),l("p",{children:"Do you wish to continue?"})]}),g(dt,{onSubmit:s.mutate,children:[l("input",{name:"bloggerId",defaultValue:t.id,hidden:!0}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Remove the store"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Sxe({children:e,invitation:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("invitationId");return o.delete("/store/blogger/invite/"+u).then(()=>{r(!1),F({type:"success",title:"The invitation has been cancelled."}),i.invalidateQueries({queryKey:["bloggers"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Cancel this invitation"}),g(ht,{children:[g("p",{children:["You are about to cancel the invitation for the blogger"," ",l("strong",{children:t.name}),"."]}),l("p",{children:"Do you wish to continue?"})]}),g(dt,{onSubmit:s.mutate,children:[l("input",{name:"invitationId",defaultValue:t.id,hidden:!0}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Cancel the invitation"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Exe({invitation:e=null}){const t=Ee(),n=te(),[r,i]=y.exports.useState(!1),o=y.exports.useRef(null),s=r?{cursor:"pointer",boxShadow:"$small",border:"1px solid $gray300",transition:"all 200ms"}:{},a=ve({mutationFn:async u=>{var d,f,h,p;try{await n.get("/user/send-package/"+u),F({type:"success",title:"Package on its way",message:"In a few seconds, they should receive their blogger package."}),t.invalidateQueries({queryKey:["bloggers"]})}catch(m){(f=(d=m.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=m.response.data)==null?void 0:h.error.title,message:(p=m.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}}}),c=!0;return y.exports.useEffect(()=>{function u(f){for(;f;){if(f.tagName.toLowerCase()==="a")return!0;f=f.parentElement}return!1}function d(f){u(f.target)||i(!(o.current&&!o.current.contains(f.target)))}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[r,c]),g(M,{ref:o,css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,transition:"all 200ms",position:"relative",...s,"&:hover":{cursor:"pointer",boxShadow:"$small",border:"1px solid $hoveringCard",transition:"all 200ms"}},children:[g(P,{"data-prevent-close":"true",css:{position:"absolute",width:"100%",height:"100%",backdropFilter:"blur(2px)",alignItems:"center",justifyContent:"center",zIndex:r?1:0,borderRadius:8,gap:"$2",px:"$10",textAlign:"center",transition:r?"all 200ms":"none",opacity:r?1:0,pointerEvents:r?"inherit":"none"},children:[g(Y,{css:{width:"100%"},variant:"gray",onClick:()=>{a.isLoading||a.mutate(e.bloggerId)},disabled:a.isLoading,children:[l(W,{icon:Od}),l(A,{children:"Deliver package"})]}),l(Sxe,{invitation:e,children:g(Y,{css:{width:"100%"},variant:"softDanger",onClick:()=>i(!1),children:[l(W,{icon:so}),l(A,{children:"Cancel"})]})})]}),l(P,{css:{p:"$6",gap:"$4",width:"100%",justifyContent:"space-between"},children:g(P,{css:{gap:"$4"},children:[l(M,{css:{alignItems:"center",justifyContent:"space-between"},children:l(bi,{pictureUuid:e.profilePicture,round:!0,size:60})}),l(ce,{children:l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:e.name})})]})})]})}const Pi=de("span",{px:"$2",py:"$1",fontSize:13,fontFamily:"$inter",borderRadius:6,height:"fit-content",whiteSpace:"nowrap",userSelect:"none",variants:{round:{true:{borderRadius:9999}},size:{small:{fontSize:12}},badge:{gray:{backgroundColor:"$badgeGrayBackgroundColor",border:"1px solid $badgeGrayBorderColor",color:"$badgeGrayTextColor"},ultra:{backgroundColor:"$sky50",border:"1px solid $sky200",color:"$sky700"},pro:{backgroundColor:"$amber100",border:"1px solid $amber200",color:"$amber700"},starter:{backgroundColor:"$destructive100",border:"1px solid $destructive200",color:"$destructive700"},free:{backgroundColor:"$gray50",border:"1px solid $gray200",color:"$gray700"},blogger:{backgroundColor:"$primary50",border:"1px solid $primary200",color:"$primary700"},Active:{backgroundColor:"$badgeSuccessBackgroundColor",border:"1px solid $badgeSuccessBorderColor",color:"$badgeSuccessTextColor"},Cancelled:{backgroundColor:"$gray50",border:"1px solid $gray200",color:"$gray700"},Accepted:{backgroundColor:"$badgeSuccessBackgroundColor",border:"1px solid $badgeSuccessBorderColor",color:"$badgeSuccessTextColor"},Late:{backgroundColor:"$destructive100",border:"1px solid $destructive200",color:"$destructive700"},Closed:{backgroundColor:"$badgeDangerBackgroundColor",border:"1px solid $badgeDangerBorderColor",color:"$badgeDangerTextColor"},Paused:{backgroundColor:"$badgeYellowBackgroundColor",border:"1px solid $badgeYellowBorderColor",color:"$badgeYellowTextColor"},Pending:{backgroundColor:"$badgeYellowBackgroundColor",border:"1px solid $badgeYellowBorderColor",color:"$badgeYellowTextColor"},WaitingForReview:{backgroundColor:"$badgeYellowBackgroundColor",border:"1px solid $badgeYellowBorderColor",color:"$badgeYellowTextColor"},InProgress:{backgroundColor:"$badgeYellowBackgroundColor",border:"1px solid $badgeYellowBorderColor",color:"$badgeYellowTextColor"},Declined:{backgroundColor:"$badgeDangerBackgroundColor",border:"1px solid $badgeDangerBorderColor",color:"$badgeDangerTextColor"},Rejected:{backgroundColor:"$badgeDangerBackgroundColor",border:"1px solid $badgeDangerBorderColor",color:"$badgeDangerTextColor"},MissedDeadline:{backgroundColor:"$badgeDangerBackgroundColor",border:"1px solid $badgeDangerBorderColor",color:"$badgeDangerTextColor"}}}});function Wa({onClick:e=null}){return l(M,{onClick:e,css:{width:32,height:32,cursor:"pointer",color:"$actionTextColor",transition:"0.3s color",justifyContent:"center",alignItems:"center","&:hover, &:active, &:focus":{transition:"0.3s color",color:"$actionHoverColor"}},children:l(W,{icon:Hie})})}const hu=de("tbody",{}),Il=de("tr",{borderBottom:"1px solid $borderColor"}),Jt=de("td",{verticalAlign:"middle",whiteSpace:"nowrap",py:"$3",px:"$4"}),Yt=de("th",{verticalAlign:"middle",px:"$4"});function UR({children:e,active:t,order:n,onClick:r,date:i=!1}){return g(Yt,{onClick:r,css:{userSelect:"none",cursor:"pointer",transition:"background-color 200ms","&:hover":{transition:"background-color 200ms",backgroundColor:"$gray100"}},children:[e," ",t?n==="asc"?i?l(W,{icon:Sce}):l(W,{icon:hce}):i?l(W,{icon:xce}):l(W,{icon:Lce}):l(W,{icon:roe,css:{color:"$neutral300"}})]})}const pg=de(Jt,{width:10,paddingRight:32}),Ll=de("table",{width:"100%",overflow:"auto"}),pu=de("thead",{fontFamily:"$redHatDisplay",fontWeight:"$bold",textTransform:"uppercase",width:"100%",fontSize:"0.94rem",backgroundColor:"$cardBackgroundColor",textAlign:"left",letterSpacing:2,borderBottom:"1px solid $borderColor","& th":{py:"$4"},variants:{sticky:{true:{position:"sticky",top:0}}}});function Txe(){const e=te();return _t(["dashboard"],async()=>await e.get("/dashboard").then(t=>t.data))}function kxe(){const{setContent:e}=Si(),{pageTitle:t,setPageTitle:n}=Ar(),{isLoading:r,data:i}=Txe(),{isLoading:o,data:s}=ms(),a=ar();if(Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{n("Dashboard")},[t,n]),y.exports.useEffect(()=>{e(null)},[e]),r)return l(z,{});const c=()=>a({pathname:"/bloggers/bloggers"}),u=i.news.length;return g(ql,{children:[g(FR,{children:[l(ob,{title:o?"Welcome \u{1F44B}":"Welcome "+O6e(s.user.name)+" \u{1F44B}",children:i.news.map((d,f)=>g(z,{children:[g(ce,{css:{px:"$4",py:"$2"},children:[l(Wve,{title:d.title,date:d.date}),l(A,{dangerouslySetInnerHTML:{__html:d.content}})]},"news-"+f),f+1!==u&&l(io,{separator:!0})]}))}),i.pendingInvitations&&l(ob,{title:"Pending invitations",children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Blogger"}),l(Yt,{children:"Status"}),l(Yt,{children:"Link"})]}),l(hu,{children:i.pendingInvitations.map((d,f)=>g(Il,{children:[l(Jt,{children:l(Be,{sizePicture:32,user:{id:d.bloggerId,name:d.name,pictureUuid:d.profilePicture}})}),l(Jt,{children:l(Pi,{badge:d.status.name,children:d.status.label})}),l(Jt,{children:l(Y,{variant:"primary",onClick:c,children:l(W,{css:{marginRight:"0 !important"},icon:v3})})})]},"blogger-"+f))})]})})]}),i.posts&&l(FR,{children:l(ob,{title:"Recently submitted posts",children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Blogger"}),l(Yt,{children:"Product"}),l(Yt,{children:"Link"}),l(Yt,{children:"Created"}),l(Yt,{})]}),l(hu,{children:i.posts.map(d=>{var f;return g(Il,{children:[l(Jt,{children:l(Be,{sizePicture:32,user:{id:d.owner.id,name:d.owner.name,pictureUuid:d.owner.profilePictureUuid}})}),g(Jt,{children:[l(bi,{pictureUuid:d.product.textureUuid,round:!1}),l(ce,{css:{display:"inline",marginLeft:"$2"},children:d.product.name})]}),l(Jt,{children:d.links.map(function(h,p){return l(ie,{to:h,target:"_blank",rel:"noopener",css:{p:"$2"},children:l(W,{css:{width:16,height:16},icon:v3})},`recently-post-${p}`)})}),l(Jt,{title:Z(d.createdAt).format("LLL"),children:Z(d.createdAt).fromNow()}),l(pg,{children:(d.status.name==="WaitingForReview"||d.status.name==="Accepted"||d.status.name==="Rejected"||((f=d.extendDeadlineStatus)==null?void 0:f.name)==="Pending")&&g(gs,{modal:!1,children:[l(vs,{children:l(Wa,{})}),l(ys,{side:"left",sideOffset:16,children:l(dK,{post:d})})]})})]},"post-"+d.id)})})]})})})]})}var _xe=y.exports.forwardRef(function(e,t){var n=DW(e);return l(UT,{ref:t,...n})}),mg=_xe;const Axe=de("svg");function qa({size:e=16,color:t="$primary700",css:n=null}){return l(Axe,{xmlns:"http://www.w3.org/2000/svg",css:{...n,width:e,height:e,flexShrink:0,stroke:t},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:l("circle",{cx:"50",cy:"50",fill:"none",strokeWidth:"10",r:"35",strokeDasharray:"164.93361431346415 56.97787143782138",children:l("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"})})})}const Oh={menuPortal:e=>({...e,pointerEvents:"auto",color:"var(--colors-textColor)"}),placeholder:e=>({...e,marginLeft:"auto",marginRight:"auto"}),control:e=>({...e,cursor:"pointer",borderRadius:"8px",borderColor:"var(--colors-borderColor)",backgroundColor:"var(--colors-cardBackgroundColor)",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05);","&:hover":{borderColor:"var(--colors-borderColor)"}}),menuList:e=>({...e,borderRadius:"8px",backgroundColor:"var(--colors-backgroundColor)",color:"var(--colors-textColor)"}),menu:e=>({...e,borderRadius:"8px",backgroundColor:"var(--colors-backgroundColor)",border:"1px solid var(--colors-borderColor)",color:"var(--colors-textColor)"}),valueContainer:e=>({...e,padding:"4px",borderColor:"var(--colors-borderColor)",color:"var(--colors-textColor)"}),clearIndicator:e=>({...e,paddingLeft:"4px"}),indicatorSeparator:e=>({...e,backgroundColor:"var(--colors-borderColor)"}),option:e=>({...e,cursor:"pointer",borderRadius:"8px",backgroundColor:"var(--colors-cardBackgroundColor)","&:hover":{backgroundColor:"var(--colors-hoverItem)",fontWeight:"bold"}}),multiValue:e=>({...e,cursor:"pointer",backgroundColor:"var(--colors-cardBackgroundColor)",border:"1px solid var(--colors-borderColor)","&:hover":{backgroundColor:"var(--colors-hoverItem)"}}),multiValueLabel:e=>({...e,color:"var(--colors-textColor)"}),singleValue:e=>({...e,color:"var(--colors-textColor)"})},Xq=de(mg);function Gl({options:e,firstLoad:t=!1,isDisabled:n=!1,width:r="300px",onChange:i=null,value:o=null,placeholder:s=null,placement:a="auto",isClearable:c=!1,menuPortalTarget:u=null,name:d=null,css:f={}}){if(t)return l($xe,{width:r,css:f});const h=e.map(p=>({...p,...mw(p)}));return l(Ne,{title:o?o.name:null,css:{...f},children:l(Xq,{name:d,blurInputOnSelect:!0,isDisabled:n,getOptionValue:p=>JSON.stringify({type:p.type,name:p.value}),value:o?mw(o,n):null,onChange:i,options:h,menuPortalTarget:u,placeholder:s||"- No delivery selected -",isSearchable:!0,isClearable:c,menuPlacement:a,components:{Option:eK},styles:Oh,css:{width:r}})})}function $xe({width:e,css:t=null}){return l(Xq,{css:{...t,width:e},isDisabled:!0,defaultValue:mw({type:-1,name:"Loading\u2026"}),components:{Option:eK}})}function Zq(e,t,n,r){const i=Jq.find(s=>s.type===e),o=i?{"[data-icon-hover]":{color:i.color}}:{};return g(M,{css:{gap:"$2",alignItems:"center",width:"100%",...o},children:[i&&l(W,{css:{width:16,height:16,flexShrink:0},icon:i.icon,"data-icon-hover":!0})," ",l(ce,{css:r?{}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,flexShrink:1,flexBasis:0},children:t}),n&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}})]})}const Jq=[{name:"object",type:6,icon:Qm,color:"$slIconInventoryObject"},{name:"texture",type:0,icon:rU,color:"$slIconInventoryTexture"},{name:"landmark",type:3,icon:UE,color:"$slIconInventoryLandmark"},{name:"notecard",type:7,icon:Jz,color:"$slIconInventoryNotecard"}],mw=(e,t=!1)=>({type:e.type,value:e.name,label:Zq(e.type,e.name,t,!1)}),eK=e=>{const{innerProps:t,innerRef:n,data:r}=e,i=Jq.find(c=>c.type===r.type),o={px:"$2",py:"$2",mx:"$1",borderRadius:8,alignItems:"center",color:"$textColor",transition:"0.1s background-color",cursor:"pointer","&:not(:last-child)":{marginBottom:"$1"},"[data-icon-hover]":{color:i.color}},s={transition:"0.1s background-color",backgroundColor:"$hoveringItem"},a=e.isFocused?{...s}:null;return l(M,{ref:n,...t,css:e.isSelected?{...o,fontWeight:"$bold",backgroundColor:"$hoveringItem",...a}:{...o,...a},children:Zq(r.type,r.value,!1,!0)})},tK=de(mg);function Dxe({options:e,firstLoad:t=!1,isDisabled:n=!1,width:r="300px",onChange:i=null,value:o=null,placeholder:s=null,placement:a="auto",isClearable:c=!1,menuPortalTarget:u=null,name:d=null,css:f={}}){if(t)return l(Oxe,{width:r});const h=e.map(p=>({...p,...gw(p)}));return l(Ne,{title:o?o.name:null,css:{...f},children:l(tK,{name:d,blurInputOnSelect:!0,isDisabled:n,getOptionValue:p=>JSON.stringify({name:p.value}),value:o?gw(o,n):null,onChange:i,options:h,menuPortalTarget:u,placeholder:s||"- No status selected -",isSearchable:!0,isClearable:c,menuPlacement:a,components:{Option:rK},styles:Oh})})}function Oxe({width:e}){return l(tK,{css:{width:e},isDisabled:!0,defaultValue:gw({name:"Loading\u2026",text:"Loading\u2026"}),components:{Option:rK}})}function nK(e,t,n){return g(M,{css:{gap:"$2",alignItems:"center",width:"100%"},children:[l(ce,{css:{...n?{}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,flexShrink:1,flexBasis:0},width:"100%",textAlign:"center"},children:l(Pi,{badge:e.name,css:{display:"block"},children:e.text})}),t&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}})]})}const gw=(e,t=!1)=>({value:e.name,text:e.text,label:nK(e,t,!1)}),rK=e=>{const{innerProps:t,innerRef:n,data:r}=e,i={px:"$2",py:"$2",mx:"$1",borderRadius:8,alignItems:"center",color:"$textColor",transition:"0.1s background-color",cursor:"pointer","&:not(:last-child)":{marginBottom:"$1"}},o={transition:"0.1s background-color",backgroundColor:"$hoveringItem"},s=e.isFocused?{...o}:null;return l(M,{ref:n,...t,css:e.isSelected?{...i,fontWeight:"$bold",backgroundColor:"$hoveringItem",...s}:{...i,...s},children:nK(r,!1,!0)})},iK=de(mg);function Pxe({options:e,firstLoad:t=!1,isDisabled:n=!1,width:r="300px",onChange:i=null,value:o=null,placeholder:s=null,placement:a="auto",isClearable:c=!1,menuPortalTarget:u=null,name:d=null,css:f={}}){if(t)return l(Rxe,{width:r});const h=e.map(p=>({...p,...vw(p)}));return l(Ne,{title:o?o.name:null,css:{...f},children:l(iK,{name:d,blurInputOnSelect:!0,isDisabled:n,getOptionValue:p=>JSON.stringify({profileUuid:p.profileUuid,name:p.value}),value:o?vw(o,n):null,onChange:i,options:h,menuPortalTarget:u,placeholder:s||"- No avatar selected -",isSearchable:!0,isClearable:c,menuPlacement:a,components:{Option:sK},styles:Oh})})}function Rxe({width:e}){return l(iK,{css:{width:e},isDisabled:!0,defaultValue:vw({profileUuid:null,name:"Loading\u2026"}),components:{Option:sK}})}function oK(e,t,n,r){return g(M,{css:{gap:"$2",alignItems:"center",width:"100%"},children:[l(Dt,{css:{borderRadius:100},width:24,height:24,src:kn({uuid:e||"avatar",size:128})}),l(ce,{css:r?{}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,flexShrink:1,flexBasis:0},children:t}),n&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}})]})}const vw=(e,t=!1)=>({profileUuid:e.profileUuid,value:e.name,label:oK(e.profileUuid,e.name,t,!1)}),sK=e=>{const{innerProps:t,innerRef:n,data:r}=e,i={px:"$2",py:"$2",mx:"$1",borderRadius:8,alignItems:"center",color:"$textColor",transition:"0.1s background-color",cursor:"pointer","&:not(:last-child)":{marginBottom:"$1"}},o={transition:"0.1s background-color",backgroundColor:"$hoveringItem"},s=e.isFocused?{...o}:null;return l(M,{ref:n,...t,css:e.isSelected?{...i,fontWeight:"$bold",backgroundColor:"$hoveringItem",...s}:{...i,...s},children:oK(r.profileUuid,r.value,!1,!0)})},aK=de(mg);function lK({options:e,firstLoad:t=!1,isDisabled:n=!1,width:r="300px",onChange:i=null,value:o=null,placeholder:s=null,placement:a="auto",isClearable:c=!1,menuPortalTarget:u=null,name:d=null,required:f=!1,css:h={}}){if(t)return l(Mxe,{width:r});const p=e.map(m=>({...m,...yw(m)}));return l(Ne,{title:o?o.name:null,css:{...h},children:l(aK,{required:f,name:d,blurInputOnSelect:!0,isDisabled:n,getOptionValue:m=>JSON.stringify({type:m.type,name:m.value}),value:o?yw(o,n):null,onChange:i,options:p,menuPortalTarget:u,placeholder:s||"- No store selected -",isSearchable:!0,isClearable:c,menuPlacement:a,components:{Option:uK},styles:Oh})})}function Mxe({width:e}){return l(aK,{css:{width:e},isDisabled:!0,defaultValue:yw({id:null,pictureUuid:null,name:"Loading\u2026"}),components:{Option:uK}})}function cK(e,t,n,r){return g(M,{css:{gap:"$2",alignItems:"center",width:"100%"},children:[l(Dt,{css:{borderRadius:4,display:"block"},alt:"",width:24,height:24,src:kn({uuid:e||"store",size:128})}),l(ce,{css:r?{}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,flexShrink:1,flexBasis:0},children:t}),n&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}})]})}const yw=(e,t=!1)=>({id:e.id,value:e.name,label:cK(e.pictureUuid,e.name,t,!1)}),uK=e=>{const{innerProps:t,innerRef:n,data:r}=e,i={px:"$2",py:"$2",mx:"$1",borderRadius:8,alignItems:"center",color:"$textColor",transition:"0.1s background-color",cursor:"pointer","&:not(:last-child)":{marginBottom:"$1"}},o={transition:"0.1s background-color",backgroundColor:"$hoveringItem"},s=e.isFocused?{...o}:null;return l(M,{ref:n,...t,css:e.isSelected?{...i,fontWeight:"$bold",backgroundColor:"$hoveringItem",...s}:{...i,...s},children:cK(r.pictureUuid,r.value,!1,!0)})};function Ixe({filters:e,setFilters:t}){return l(Dxe,{placement:"bottom",width:"240px",isClearable:!0,isDisabled:!1,firstLoad:!1,options:[{status:"waiting_for_review",name:"WaitingForReview",text:"Waiting for review"},{status:"in_progress",name:"InProgress",text:"In progress"},{status:"missed_deadline",name:"MissedDeadline",text:"Missed deadline"},{status:"accepted",name:"Accepted",text:"Accepted"},{status:"rejected",name:"Rejected",text:"Rejected"}],placeholder:"- Filter by status -",value:e.status,onChange:r=>{const i=r===null?null:{name:r.name,text:r.text,status:r.status};t({...e,status:i})}})}function Lxe({filters:e,setFilters:t}){const{isLoading:n,isFetching:r,data:i}=EBe();return l(Pxe,{css:{flex:1},placement:"bottom",width:"100%",firstLoad:n,isDisabled:r,isClearable:!0,options:n?null:i,placeholder:"- Filter by avatar -",value:e.blogger,onChange:o=>{const s=o===null?null:{profileUuid:o.profileUuid,name:o.name};t({...e,blogger:s})}})}function Nxe({filters:e,setFilters:t}){const{isLoading:n,isFetching:r,data:i}=bBe();return l(lK,{css:{flex:1,"@sm":{minWidth:"100%"}},placement:"bottom",width:"100%",firstLoad:n,isDisabled:r,isClearable:!0,options:n?null:i,placeholder:"- Filter by store -",value:e.store,onChange:o=>{const s=o===null?null:{pictureUuid:o.pictureUuid,name:o.name};t({...e,store:s})}})}function Fxe({filters:e,setFilters:t}){const{isLoading:n,isFetching:r,data:i}=SBe();return l(Gl,{css:{flex:1},placement:"bottom",width:"100%",firstLoad:n,isDisabled:r,isClearable:!0,options:n?null:i,placeholder:"- Filter by product -",value:e.productName,onChange:o=>{const s=o===null?null:{type:o.type,name:o.name};t({...e,productName:s})}})}function Bxe({filters:e,setFilters:t,isBlogger:n,isEvent:r}){return g(M,{css:{minWidth:"100%",gap:"$4",marginBottom:"$4","@sm":{flexDirection:"column"}},children:[l(Ixe,{filters:e,setFilters:t}),(n||r)&&l(Nxe,{filters:e,setFilters:t}),n===!1&&l(Lxe,{filters:e,setFilters:t}),n===!1&&r===!1&&l(Fxe,{filters:e,setFilters:t})]})}function Hxe(){var x;const[e,t]=y.exports.useState(null),{pageTitle:n,setPageTitle:r}=Ar(),{setContent:i}=Si(),[o,s]=y.exports.useState({blogger:null,productName:null,store:null,status:null}),a=te(),c=st(),u=Tn.exports.useMediaQuery({maxWidth:767}),{isLoading:d,error:f,data:h,refetch:p}=_t(["posts"],()=>{let C={};return o.blogger&&(C={bloggerName:o.blogger.name}),o.store&&(C={storeName:o.store.name}),o.productName&&(C={...C,productName:o.productName.name}),o.status&&(C={...C,status:o.status.status}),a.get("/posts?"+new URLSearchParams(C).toString()).then(w=>w.data)}),{permissions:m}=st();if(Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{r("Posts")},[n,r]),y.exports.useEffect(()=>{p()},[o,p]),y.exports.useEffect(()=>{(m==null?void 0:m.features.posts.create)===!0&&!d?i(l(Vxe,{})):i(null)},[m==null?void 0:m.features.posts.create,i,d,h]),d||!m)return l(z,{});if(f)return g(z,{children:["An error has occurred: ",f.message]});const v=m.features.posts.event,b=m.features.posts.blogger===!0;return g(Kl,{children:[l(Bxe,{filters:o,setFilters:s,isBlogger:b,isEvent:v}),h.map(C=>l(zxe,{post:C,isOpen:e===C.id||u,setIsOpen:t,showStore:v||b,isBlogger:b},"post-"+C.id)),!b&&((x=c.selectedStore)==null?void 0:x.type)!==null&&h.length===0&&l(no,{title:"There is no post yet",content:l(z,{children:"Wait for your first products to be blogged by your bloggers, or change your filters if you have any."})}),b&&h.length===0&&l(no,{title:"You have no post",content:g(z,{children:["If you are part of a store, you can request a product, and it will automatically create a"," ",l(Pi,{badge:"InProgress",children:"In progress"})," post. From there, you can fill the post, and the store will then review it."]})})]})}const zxe=Ae.memo(({post:e,isOpen:t,setIsOpen:n,showStore:r,isBlogger:i})=>{var p,m,v,b;const o=e.status.name==="InProgress"||e.status.name==="MissedDeadline"||e.status.name==="InProgress"&&e.canModifyDeadline===!0,s=e.event===null&&e.deadline,a=e.event===null&&(e.status.name==="InProgress"||e.status.name==="MissedDeadline"),c=Tn.exports.useMediaQuery({maxWidth:767}),u=c?"fit-content":160,d=e.event===null&&(e.status.name==="WaitingForReview"||((p=e.extendDeadlineStatus)==null?void 0:p.name)==="Pending");let f="$textColor",h="$medium";if(e.deadline){const C=Z(e.deadline).diff(Z());C<=0?(h="$bold",f="$destructive600"):C>0&&C<864e5*2&&(f="$amber600")}return g(P,{css:{p:"$3",background:"$cardBackgroundColor",boxShadow:t?"$medium":"$xsmall",borderRadius:12,maxWidth:"100%",border:"1px solid $borderColor",transition:"box-shadow 0.1s","&:hover":{transition:"box-shadow 0.1s",boxShadow:"$medium"}},children:[g(M,{onClick:()=>{c||n(t?null:e.id)},css:{maxWidth:"100%",gap:"$2",cursor:c?"inherit":"pointer"},children:[c===!1&&l(Pi,{badge:e.status.name,css:{width:140,minWidth:140,textAlign:"center"},children:e.status.label}),g(M,{css:{alignItems:"center",flexShrink:0,gap:"$2",width:c?"100%":"fit-content"},children:[r&&l(Dn,{store:{id:e.store.id,name:e.store.name,pictureUuid:e.store.pictureUuid},css:{width:u,justifyContent:"flex-start"}}),i===!1&&l(Be,{user:{id:e.owner.id,name:e.owner.name,pictureUuid:e.owner.profilePictureUuid},css:{width:i===!1&&e.event!==null?136:u}}),i===!1&&e.event!==null&&l(Et,{enabled:!0,small:!0,content:g("span",{children:["This blogger is part of the event"," ",l("strong",{children:e.event})]}),children:l(W,{icon:Nf,css:{color:"$textColor",width:16}})})]}),c===!1&&l(Q3,{name:e.product.name}),i&&c===!1&&e.deadline&&l(_b,{css:{marginLeft:"auto"},deadline:e.deadline,color:f,fontWeight:h}),i===!1&&c===!1&&e.deadline&&((m=e.extendDeadlineStatus)==null?void 0:m.name)!=="Pending"&&l(_b,{css:{marginLeft:"auto"},deadline:e.deadline,color:f,fontWeight:h}),i===!1&&c===!1&&((v=e.extendDeadlineStatus)==null?void 0:v.name)==="Pending"&&g(M,{css:{marginLeft:"auto",alignItems:"center",flexShrink:0,color:f,fontWeight:h},title:Z(e.deadline).format("LLL"),children:[l(W,{icon:Yie,css:{marginRight:"$1",width:16}}),l(Ne,{children:"Extension requested"})]}),c===!1&&l(M,{css:{alignItems:"center",marginLeft:e.deadline?"inherit":"auto"},children:l(W,{icon:Sy,css:{transition:"transform 0.2s",transform:t?"rotate(180deg)":"rotate(0deg)",width:16}})})]}),t&&g(P,{css:{paddingTop:"$4"},children:[c===!0&&g(P,{css:{paddingBottom:"$4",gap:"$2",textAlign:"center"},children:[l(Pi,{badge:e.status.name,children:e.status.label}),e.extendDeadlineStatus!==null&&g(Pi,{badge:e.extendDeadlineStatus.name,children:["Deadline extension: ",e.extendDeadlineStatus.name]})]}),g(M,{children:[l(Tt,{children:"Product"}),c===!1&&e.extendDeadlineStatus!==null&&l(z,{children:g(Pi,{size:"small",css:{width:"fit-content",marginLeft:"auto"},badge:e.extendDeadlineStatus.name,children:["Deadline extension: ",e.extendDeadlineStatus.name]})})]}),l(Q3,{name:e.product.name}),e.links.length>0&&g(P,{css:{marginTop:"$4"},children:[l(Tt,{children:"Links"}),l(A,{css:{minWidth:0},children:e.links.map((x,C)=>l(ce,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l(ie,{to:x,target:"_blank",rel:"noopener",children:x})},"post-link"+C))})]}),e.bloggerComment&&g(P,{css:{marginTop:"$4"},children:[l(Tt,{children:"Blogger comment"}),l(Ne,{children:e.bloggerComment})]}),e.comment&&g(P,{css:{marginTop:"$4"},children:[l(Tt,{children:"Store comment"}),l(Ne,{children:e.comment})]}),g(M,{css:{py:"$4",gap:"$2",marginLeft:"auto",flexDirection:c?"column":"row",width:c?"100%":"inherit"},children:[i&&o&&(e.status.name==="InProgress"||e.status.name==="MissedDeadline")&&l(jxe,{post:e}),i&&o&&e.canModifyDeadline===!0&&l(Uxe,{post:e}),i===!1&&d&&l(dK,{post:e}),i===!1&&s&&l(Wxe,{post:e}),i===!1&&a&&l(qxe,{post:e})]}),l(M,{children:(c&&e.deadline||c===!1&&e.deadline&&((b=e.extendDeadlineStatus)==null?void 0:b.name)==="Pending")&&l(_b,{deadline:e.deadline,color:f,fontWeight:h})})]}),g(ce,{css:{marginLeft:"auto",color:"$gray300",fontSize:11,textAlign:"right",alignItems:"end"},title:Z(e.createdAt).format("LLL"),children:[g(Ne,{title:Z(e.createdAt).format("LLL"),children:["Created ",Z(e.createdAt).fromNow()]}),e.updatedAt&&g(Ne,{title:Z(e.updatedAt).format("LLL"),children:[", updated ",Z(e.updatedAt).fromNow()]})]})]})});function _b({deadline:e,color:t="$textColor",fontWeight:n="$medium",css:r={}}){return g(M,{css:{alignItems:"center",flexShrink:0,color:t,fontWeight:n,...r},title:Z(e).format("LLL"),children:[l(W,{icon:My,css:{marginRight:"$1",width:16}}),l(Ne,{children:Z().to(e)})]})}function dK({post:e}){var p,m,v,b,x,C;const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(e.comment),o=Ee(),s=te(),a=Tn.exports.useMediaQuery({maxWidth:767}),c=ve({mutationFn:()=>s.patch("/posts/"+e.id,{status:"rejected",comment:r}).then(()=>{n(!1),F({type:"success",title:"Post rejected"}),o.invalidateQueries({queryKey:["posts"]})}).catch(function(w){var S,T,E,k;(T=(S=w.response)==null?void 0:S.data)!=null&&T.error?F({type:"error",title:(E=w.response.data)==null?void 0:E.error.title,message:(k=w.response.data)==null?void 0:k.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),u=ve({mutationFn:()=>s.patch("/posts/"+e.id,{status:"accepted",comment:r}).then(()=>{n(!1),F({type:"success",title:"Post accepted"}),o.invalidateQueries({queryKey:["posts"]})}).catch(function(w){var S,T,E,k;(T=(S=w.response)==null?void 0:S.data)!=null&&T.error?F({type:"error",title:(E=w.response.data)==null?void 0:E.error.title,message:(k=w.response.data)==null?void 0:k.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),d=ve({mutationFn:w=>s.patch("/posts/extension-deadline/"+w,{status:"decline"}).then(()=>{n(!1),F({type:"success",title:"Extension of deadline rejected",message:"The blogger has been notified, and the deadline for the post remains unchanged."}),o.invalidateQueries({queryKey:["posts"]})}).catch(function(S){var T,E,k,_;(E=(T=S.response)==null?void 0:T.data)!=null&&E.error?F({type:"error",title:(k=S.response.data)==null?void 0:k.error.title,message:(_=S.response.data)==null?void 0:_.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),f=ve({mutationFn:w=>s.patch("/posts/extension-deadline/"+w,{status:"accepted"}).then(()=>{n(!1),F({type:"success",title:"Extension of deadline accepted",message:"The blogger has been notified, and the deadline has been extended to the "+Z(e.extendDeadlineStatus.newDeadline).format("LLL")+"."}),o.invalidateQueries({queryKey:["posts"]})}).catch(function(S){var T,E,k,_;(E=(T=S.response)==null?void 0:T.data)!=null&&E.error?F({type:"error",title:(k=S.response.data)==null?void 0:k.error.title,message:(_=S.response.data)==null?void 0:_.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),h=e.status.name==="Rejected"||e.status.name==="Accepted";return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Y,{variant:"white",center:a,css:{width:a?"100%":"inherit"},children:[l(W,{icon:jE}),l("p",{children:"Review"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:w=>w.preventDefault(),children:[g(nt,{children:[((p=e.extendDeadlineStatus)==null?void 0:p.name)==="Pending"&&l(z,{children:"Review the extension of deadline"}),((m=e.extendDeadlineStatus)==null?void 0:m.name)!=="Pending"&&l(z,{children:"Review the post"})]}),g(ht,{children:[((v=e.extendDeadlineStatus)==null?void 0:v.name)==="Pending"&&g(z,{children:[g(A,{children:[e.owner.name," has requested to extend the deadline for this post."]}),g(A,{children:["They would like to delay the deadline by"," ",g("strong",{children:[e.extendDeadlineStatus.daysRequested," days"]}),", making the new deadline"," ",l("strong",{children:Z(e.extendDeadlineStatus.newDeadline).format("LLL")})]}),e.extendDeadlineStatus.comment!==null&&g(z,{children:[l(Tt,{children:"Comment"}),l(A,{children:e.extendDeadlineStatus.comment})]})]}),((b=e.extendDeadlineStatus)==null?void 0:b.name)!=="Pending"&&g(z,{children:[g(P,{css:{gap:"$4"},children:[g(A,{children:["You are currently reviewing the post for"," ",l(W,{icon:Qm,css:{color:"orange",marginRight:"$2"}}),l("strong",{children:e.product.name})," from blogger"," ",l("strong",{children:e.owner.name})]}),g(P,{children:[l(ae,{children:"Blogger comment"}),l(A,{children:e.bloggerComment?e.bloggerComment:"None"})]}),g(P,{children:[l(ae,{children:"Links"}),l(P,{css:{gap:"$2",overflow:"hidden"},children:e.links.map((w,S)=>l(A,{children:l(ps,{to:w,target:"_blank",rel:"noopener",children:w})},"post-"+S))})]})]}),!h&&g(ce,{css:{display:"flex",flexDirection:"column",my:"$4"},children:[l(ae,{children:"Comment"}),l(Ke,{name:"comment",type:"text",value:r,onChange:w=>i(w.target.value)})]}),h&&g(z,{children:[l(Tt,{children:"Comment:"}),l(A,{children:r})]})]})]}),g(wt,{children:[h===!1&&((x=e.extendDeadlineStatus)==null?void 0:x.name)==="Pending"&&g(z,{children:[l(Y,{disabled:d.isLoading||f.isLoading,variant:"danger",onClick:()=>d.mutate(e.id),children:"Reject the request"}),l(Y,{disabled:d.isLoading||f.isLoading,variant:"emerald",onClick:()=>f.mutate(e.id),children:"Accept the request"})]}),!h&&((C=e.extendDeadlineStatus)==null?void 0:C.name)!=="Pending"&&g(z,{children:[l(Y,{disabled:c.isLoading||u.isLoading,variant:"danger",onClick:()=>c.mutate(),children:"Mark as Rejected"}),l(Y,{disabled:c.isLoading||u.isLoading,variant:"emerald",onClick:()=>u.mutate(),children:"Mark as Accepted"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Uxe({post:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(14),o=Ee(),s=te(),a=Tn.exports.useMediaQuery({maxWidth:767}),c=d=>{i(parseInt(d.target.value))},u=ve({mutationFn:d=>{d.preventDefault();const f=new FormData(d.target),h=f.get("postId"),p=f.get("comment"),m=f.get("countDaysToAddToTheDeadline");return s.patch("/posts/extension-deadline/request/"+h,{countDaysToAddToTheDeadline:m,comment:p}).then(()=>{n(!1),F({type:"success",title:"Request created",message:"The store has been notified of your request, they will review it and answer later on."}),o.invalidateQueries({queryKey:["posts"]})}).catch(function(v){var b,x,C,w;(x=(b=v.response)==null?void 0:b.data)!=null&&x.error?F({type:"error",title:(C=v.response.data)==null?void 0:C.error.title,message:(w=v.response.data)==null?void 0:w.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Y,{variant:"white",center:a,css:{width:a?"100%":"inherit"},children:[l(W,{icon:uce}),l("p",{children:"Request extension"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:d=>d.preventDefault(),children:[l(nt,{children:"Request an extension of deadline"}),l(ht,{children:g("p",{children:["How much day(s) would you like for your extension? Currently, the deadline is set for"," ",l("strong",{children:Z(e.deadline).format("LLL")})]})}),g(dt,{onSubmit:u.mutate,children:[l("input",{name:"postId",value:e.id,hidden:!0}),g(P,{children:[l(ae,{children:"Number in days"}),l(Ke,{name:"countDaysToAddToTheDeadline",type:"number",value:r,onChange:c})]}),g(P,{children:[l(ae,{children:"Comment"}),l(Ti,{name:"comment"})]}),l("p",{children:r>0&&g(z,{children:["If your request is accepted, the deadline will be updated to the"," ",l("strong",{children:Z(e.deadline).add(r,"days").format("LLL")})]})}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:u.isLoading,variant:"primary",children:"Request the extension"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Vxe(){const[e,t]=y.exports.useState(null),[n,r]=y.exports.useState(!1),[i,o]=y.exports.useState([]),s=Ee(),a=te();function c(f){return a.get("/products/bloggers?q="+encodeURIComponent(f)).then(h=>h.data)}const u=f=>{o(f)},d=ve({mutationFn:f=>{f.preventDefault();const h=new FormData(f.target),p=h.get("product"),m=h.get("bloggerComment");return t(null),a.post("/posts",{product:p,bloggerComment:m,links:i}).then(()=>{r(!1),F({type:"success",title:"Post created",message:"The store has been notified of your new Post and will review it."}),s.invalidateQueries({queryKey:["posts"]})}).catch(function(v){v.response.data.error?t(v.response.data.error.title):t("An unexpected error occured. Please try again.")})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:g(Y,{variant:"primary",css:{marginLeft:"auto"},children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:nU}),"New post"]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:f=>f.preventDefault(),children:[l(nt,{children:"Create a post"}),l(ht,{children:"You are about to create a post for a product, please properly fill the fields below. Once you submitted your post, the store owner or manager will review your post and they will accept or deny it."}),g(dt,{onSubmit:d.mutate,children:[g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Product:"}),l(OW,{name:"product",defaultOptions:!0,loadOptions:c})]}),g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Links:"}),l(fK,{onInputsChange:u})]}),g(P,{children:[l(ae,{children:"Comment (optional)"}),l(Ti,{name:"bloggerComment",maximumCharacters:1024,css:{height:150}})]}),e&&l(hK,{children:e}),l(wt,{children:l(Y,{disabled:d.isLoading,variant:"primary",type:"submit",children:"Create the post"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function jxe({post:e}){const[t,n]=y.exports.useState(null),[r,i]=y.exports.useState(!1),[o,s]=y.exports.useState([]),a=Tn.exports.useMediaQuery({maxWidth:767}),c=Ee(),u=te(),d=h=>{s(h)},f=ve({mutationFn:h=>{h.preventDefault(),h.preventDefault();const m=new FormData(h.target).get("bloggerComment");return n(null),u.patch("/posts/complete/"+e.id,{links:o,bloggerComment:m}).then(()=>{i(!1),F({type:"success",title:"Congratulation \u{1F973}",message:"You successfully completely the post for the product "+e.product.name+" and the store has been notified. "}),c.invalidateQueries({queryKey:["posts"]})}).catch(function(v){v.response?n(v.response.data.error.title):n("An unexpected error occured. Please try again.")})}});return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{asChild:!0,children:g(Y,{variant:"white",center:a,css:{width:a?"100%":"inherit"},children:[l(W,{icon:$ce}),l("p",{children:"Fill the post"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:h=>h.preventDefault(),children:[l(nt,{children:"Fill the post"}),l(ht,{children:l(A,{children:"Please fill the links for this product."})}),g(dt,{onSubmit:f.mutate,children:[g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Product:"}),l(A,{children:e.product.name})]}),g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Links:"}),l(fK,{onInputsChange:d})]}),g(P,{children:[l(ae,{children:"Comment (optional)"}),l(Ti,{name:"bloggerComment",maximumCharacters:1024,css:{height:150}})]}),t&&l(hK,{children:t}),l(wt,{children:l(Y,{disabled:f.isLoading,variant:"primary",type:"submit",children:"Fill the post"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function fK({onInputsChange:e}){const[t,n]=y.exports.useState([""]);y.exports.useEffect(()=>{e(t)},[t,e]);const r=(s,a)=>{const c=[...t];c[s]=a.target.value,s===c.length-1&&s<4&&a.target.value!==""&&c.push(""),n(c)},i=(s,a)=>{const c=[...t];a.target.value===""&&s!==c.length-1&&(c.splice(s,1),c[0]===""&&c.length>1&&c.splice(0,1),n(c))};return l(P,{css:{gap:"$4"},children:(()=>t.map((s,a)=>l(Ke,{value:s,onChange:c=>r(a,c),onBlur:c=>i(a,c)},a)))()})}function Wxe({post:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=Tn.exports.useMediaQuery({maxWidth:767}),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("postId");return i.delete("/posts/deadline/"+u).then(()=>{n(!1),F({type:"success",title:"The deadline has been removed."}),r.invalidateQueries({queryKey:["posts"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Y,{variant:"white",center:o,css:{width:o?"100%":"inherit"},children:[l(W,{icon:so}),l("p",{children:"Remove the deadline"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Remove the deadline"}),g(ht,{children:[g("p",{children:["You are about the remove the deadline for this post, by"," ",l("strong",{children:e.owner.name}),"."]}),l("p",{children:"Do you wish to continue? If it's a missed deadline, they will be able to request products from your store again."})]}),g(dt,{onSubmit:s.mutate,children:[l("input",{name:"postId",defaultValue:e.id,hidden:!0}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Remove the deadline"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function qxe({post:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=Tn.exports.useMediaQuery({maxWidth:767}),s=ve({mutationFn:a=>{a.preventDefault();const c=new FormData(a.target),u=c.get("postId"),d=c.get("comment");return i.patch("/posts/"+u+"/cancel",{comment:d}).then(()=>{n(!1),F({type:"success",title:"The post has been cancelled."}),r.invalidateQueries({queryKey:["posts"]})}).catch(function(f){var h,p,m,v;(p=(h=f.response)==null?void 0:h.data)!=null&&p.error?F({type:"error",title:(m=f.response.data)==null?void 0:m.error.title,message:(v=f.response.data)==null?void 0:v.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Y,{variant:"white",center:o,css:{width:o?"100%":"inherit"},children:[l(W,{icon:Ul}),l("p",{children:"Cancel"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Cancel the post"}),g(ht,{children:[g("p",{children:["You are about the cancel this post, by"," ",l("strong",{children:e.owner.name}),"."]}),l("p",{children:"Do you wish to continue?"})]}),g(dt,{onSubmit:s.mutate,children:[l("input",{name:"postId",defaultValue:e.id,hidden:!0}),g(P,{children:[l(ae,{children:"Comment (optional)"}),l(Ti,{name:"comment"})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Cancel the post"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const hK=de("div",{width:"100%",backgroundColor:"$destructive500",textAlign:"center",padding:"$4",color:"white",borderRadius:4,marginTop:"$4"});function Kxe(){const{pageTitle:e,setPageTitle:t}=Ar(),{isLoading:n,data:r}=_Be();return y.exports.useEffect(()=>{t("Products")},[e,t]),n?l(z,{}):l(ql,{children:l(Gxe,{products:r})})}function Gxe({products:e}){const t=ar(),n=ao(),r={store:null,event:null,deadline:null,postStatus:null,priority:null,role:null,optionalBlogging:null},i=()=>{const _=new URLSearchParams(n.search),O={...r};for(const D of Object.keys(r))_.has(D)&&(O[D]=_.get(D));return O},{selectedStore:o,permissions:s,roleForStore:a}=st(),{setContent:c}=Si(),[u,d]=y.exports.useState(!1),[f,h]=y.exports.useState(null),[p,m]=y.exports.useState(e),[v,b]=y.exports.useState(i()),[x,C]=y.exports.useState({stores:[],events:[],deadline:["Auto-deadline","Deadline once","Optional Blogging","None"],priority:["Very High","High","Normal"],roles:["Blogger","Friend"],statusPost:["Accepted","Rejected","Waiting for review","In progress","Missing post","Missed deadline"]}),w=_=>{S({key:_,value:null})},S=(_,O=!1)=>{const D={...v};_.key!==void 0&&(O?D[_.key]=_.value:D[_.key]=v[_.key]===_.value?null:_.value),b(D)};function T(_){return Object.keys(_).filter(O=>_[O]!==null&&_[O]!==void 0).map(O=>`${encodeURIComponent(O)}=${encodeURIComponent(_[O])}`).join("&")}y.exports.useEffect(()=>{const _=[],O=[];e.map(D=>{_.includes(D.store.name)||_.push(D.store.name),D.eventName&&!O.includes(D.eventName)&&O.push(D.eventName)}),_.sort((D,L)=>D.localeCompare(L)),O.sort((D,L)=>D.localeCompare(L)),C({...x,stores:_,events:O}),b(r),m(e)},[e]),y.exports.useEffect(()=>{S(v),c(null)},[]),y.exports.useEffect(()=>{let _=[...e];const O={...v};O.deadline&&(O.deadline==="Deadline-once"&&(_=_.filter(D=>D.deadlineInDays>0)),O.deadline==="Auto-deadline"&&(_=_.filter(D=>D.autoDeadline>0)),O.deadline==="Optional Blogging"&&(_=_.filter(D=>D.optionalBlogging===!0)),O.deadline==="None"&&(_=_.filter(D=>D.autoDeadline<=0&&D.deadlineInDays<=0||D.isFriend===!0))),O.store&&(_=_.filter(D=>D.store.name===O.store)),O.event&&(_=_.filter(D=>D.eventName===O.event)),O.role&&(O.role==="Blogger"?_=_.filter(D=>D.isBlogger===!0):O.role==="Friend"&&(_=_.filter(D=>D.isFriend===!0))),O.priority&&(O.priority==="Very High"?_=_.filter(D=>D.priority===30):O.priority==="High"?_=_.filter(D=>D.priority===20):O.priority==="Normal"&&(_=_.filter(D=>D.priority===10))),O.postStatus&&(O.postStatus==="Missing post"?_=_.filter(D=>D.latestPostStatus===null):_=_.filter(D=>D.latestPostStatus&&D.latestPostStatus.label===O.postStatus)),m(_),t(`${n.pathname}?${T(O)}`)},[v]),y.exports.useEffect(()=>{JSON.stringify(v)!==JSON.stringify(i())&&b(i())},[n]);const E=_=>_.reduce((O,D)=>{const L=D.eventName||"Products";return O[L]||(O[L]=[]),O[L].push(D),O},{});y.exports.useEffect(()=>{s.features.products.actions.removeProductsFromEvent===!0&&e&&e.length>0?c(l(nCe,{setOpen:d})):c(null)},[s.features.products.actions.removeProductsFromEvent,c,e]);const k=E(p);return g(z,{children:[s.features.products.actions.create&&u&&l(lze,{product:f,open:u,setOpen:d}),s.features.products.actions.request&&u&&(o==null?void 0:o.type)!=="event"&&l(tHe,{product:f,open:u,setOpen:d}),s.features.products.actions.request&&u&&(o==null?void 0:o.type)==="event"&&l(iHe,{product:f,open:u,setOpen:d}),e.length===0&&(o==null?void 0:o.type)==="store"&&l(no,{title:"No products yet",content:g(z,{children:[g(A,{children:["Make your products available to your team of bloggers. When you create your products, your team will receive a notification in their local chat. You can configure to send a notecard through your"," ",l(ie,{to:"/settings/store/notifications",children:"Notifications settings"})," ","for your store."]}),l(b7,{style:"button",product:null,onClick:()=>{h(null),d(!0)}})]})}),e.length===0&&(o==null?void 0:o.plan)==="event"&&l(no,{title:"No products available for your bloggers",content:l(z,{children:l(A,{children:"Wait for your designers to assign their products to your event."})})}),e.length===0&&o===null&&l(no,{title:"No products available to request",content:l(z,{children:l(A,{children:"When you will be part of a store or event with products to request, they will appear in a list here."})})}),e.length>0&&(o==null?void 0:o.plan)!=="event"&&g(z,{children:[l(ce,{children:g(gs,{modal:!1,children:[l(vs,{children:g(Y,{variant:"gray",children:[l(W,{icon:moe})," Filter"]})}),g(ys,{sideOffset:16,children:[(a==="Blogger"||a==="Friend")&&g(z,{children:[l(Qxe,{filters:v,applyFilters:S,availableFilters:x}),x.events.length>0&&l(Xxe,{filters:v,applyFilters:S,availableFilters:x}),l(eCe,{filters:v,applyFilters:S,availableFilters:x}),l(tCe,{filters:v,applyFilters:S,availableFilters:x})]}),l(Zxe,{filters:v,applyFilters:S,availableFilters:x}),l(Jxe,{filters:v,applyFilters:S,availableFilters:x})]})]})}),l(M,{css:{gap:"$4"},children:Object.keys(v).map(_=>v[_]===null?null:l(Yxe,{filter:_,filters:v,clearFilter:w},"filter-"+_))})]}),e.length>0&&s.features.products.actions.create&&l(b7,{product:null,onClick:()=>{h(null),d(!0)}}),Object.entries(k).map(([_,O])=>g(z,{children:[g(Qn,{children:[_," - ",k[_].length]}),l(ce,{css:{display:"grid",gridGap:"24px",width:"100%",gridTemplateColumns:"repeat(auto-fill, minmax(230px, 1fr))"},children:O.map(D=>l(b7,{product:D,onClick:()=>{h({...D}),d(!0)}},D.id))})]}))]})}function Yxe({filter:e,filters:t,clearFilter:n}){return g(M,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,px:"$3",py:"$1",gap:"$1",alignItems:"center"},children:[l(Ne,{children:{store:"Store is",event:"Event is",deadline:"Deadline is",priority:"Priority is",postStatus:"Post Status is",role:"Role is"}[e]}),l(Ne,{css:{fontWeight:"$bold"},children:t[e]}),l(W,{icon:Ul,onClick:()=>n(e),css:{cursor:"pointer",marginLeft:"$2"}})]})}function Qxe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Stores",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.stores.map(r=>g(Xt,{onClick:()=>n({key:"store",value:r}),children:[t.store===r&&l(W,{icon:Vd}),t.store!==r&&l(W,{icon:Ud}),r]},"filter-store-"+r))})})]})}function Xxe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Event",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.events.map(r=>g(Xt,{onClick:()=>n({key:"event",value:r}),children:[t.event===r&&l(W,{icon:Vd}),t.event!==r&&l(W,{icon:Ud}),r]},"filter-event-"+r))})})]})}function Zxe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Priority",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.priority.map(r=>g(Xt,{onClick:()=>n({key:"priority",value:r}),children:[t.priority===r&&l(W,{icon:Vd}),t.priority!==r&&l(W,{icon:Ud}),r]},"filter-priority-"+r))})})]})}function Jxe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Deadlines",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.deadline.map(r=>g(Xt,{onClick:()=>n({key:"deadline",value:r}),children:[t.deadline===r&&l(W,{icon:Vd}),t.deadline!==r&&l(W,{icon:Ud}),r]},"filter-deadline-"+r))})})]})}function eCe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Post status",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.statusPost.map(r=>g(Xt,{onClick:()=>n({key:"postStatus",value:r}),children:[t.postStatus===r&&l(W,{icon:Vd}),t.postStatus!==r&&l(W,{icon:Ud}),r]},"filter-status-"+r))})})]})}function tCe({availableFilters:e,filters:t,applyFilters:n}){return g(kh,{children:[g(_h,{children:["Role",l(Th,{children:l(W,{icon:jd,css:{height:10}})})]}),l($h,{children:l(Ah,{sideOffset:2,alignOffset:-5,children:e.roles.map(r=>g(Xt,{onClick:()=>n({key:"role",value:r}),children:[t.role===r&&l(W,{icon:Vd}),t.role!==r&&l(W,{icon:Ud}),r]},"filter-roles-"+r))})})]})}function nCe({setOpen:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=ve({mutationFn:s=>(s.preventDefault(),i.delete("/products/remove-all-from-event").then(()=>{n(!1),F({type:"success",title:"Your event has no longer any products linked to it"}),r.invalidateQueries({queryKey:["products"]}),r.invalidateQueries({queryKey:["me"]})}).catch(function(a){var c,u,d,f;(u=(c=a.response)==null?void 0:c.data)!=null&&u.error?F({type:"error",title:(d=a.response.data)==null?void 0:d.error.title,message:(f=a.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{children:l(Y,{variant:"primary",css:{marginLeft:"auto"},children:"Remove products"})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Remove products from events"}),g(ht,{children:[l("p",{children:"You are about to remove all products from your event, the bloggers won't be able to blog it anymore."}),l("p",{children:"Are you sure?"})]}),l(dt,{onSubmit:s=>{o.mutate(s,{onSuccess:()=>{e(!1)}}),s.stopPropagation()},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",type:"submit",children:"Cancel"})}),l(Y,{disabled:o.isLoading,variant:"danger",type:"submit",children:"Remove the products"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const rCe=de("div",{backgroundColor:"$cardBackgroundColor",width:"100%",border:"1px solid $borderColor",borderRadius:8,height:"100%",boxShadow:"$xsmall",overflow:"auto"});function Jd({children:e=null,css:t=null}){return l(rCe,{css:{...t},children:e})}function iCe({invitation:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("invitationId"),u=s.nativeEvent.submitter.value;return i.patch("/store/blogger/invite/"+c,{action:u}).then(()=>{n(!1),r.invalidateQueries({queryKey:["invitation-store"]}),r.invalidateQueries({queryKey:["me"]}),F({type:"success",title:u==="join"?"You have joined the store "+e.store.name:"You have refused to join the store "+e.store.name})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(Wa,{})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Review an invitation"}),g(ht,{children:[g(A,{children:["The team at ",l(Dn,{store:e.store,inline:!0})," ","invited you to join them."]}),g(P,{children:[l(ae,{children:"Comment"}),e.comment&&l(A,{children:e.comment}),!e.comment&&l(A,{children:"None"})]})]}),g(dt,{onSubmit:o.mutate,children:[l("input",{name:"invitationId",value:e.id,hidden:!0}),g(wt,{children:[l(Y,{disabled:o.isLoading,variant:"soft",type:"submit",value:"refuse",children:"Refuse"}),l(Y,{disabled:o.isLoading,variant:"primary",type:"submit",value:"join",children:"Join their team"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function oCe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),r=te(),{isLoading:i,error:o,data:s}=_t(["invitations"],()=>r.get("/invitations").then(a=>a.data));return y.exports.useEffect(()=>{t("Invitations")},[e,t]),y.exports.useEffect(()=>{n(null)},[n]),i?l(z,{}):o?g(z,{children:["An error has occurred: ",o.message]}):(Z.extend(Pn),Z.extend(On),g(ql,{children:[s.blogger.length===0&&s.events.length===0&&l(no,{title:"Personal invitations",content:l(A,{children:"Receive personal invitations from stores or events, and join their team."})}),s.blogger.length>0&&l(sCe,{bloggerInvitations:s.blogger}),s.events.length>0&&l(aCe,{eventInvitations:s.events})]}))}function sCe({bloggerInvitations:e}){return l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Store"}),l(Yt,{children:"Invitation received at"}),l(Yt,{children:"Status"}),l(Yt,{})]}),l(hu,{children:e.map((t,n)=>g(Il,{children:[l(Jt,{children:l(Dn,{store:{id:t.store.id,name:t.store.name,pictureUuid:t.store.pictureUuid}})}),l(Jt,{title:Z(t.receivedAt).format("LLL"),children:Z().to(t.receivedAt)}),l(Jt,{children:l(Pi,{badge:t.status.name,children:t.status.label})}),l(Jt,{children:t.status.name==="Pending"&&l(iCe,{invitation:t})})]},"invitation-"+n))})]})})}function aCe({eventInvitations:e}){return l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Event"}),l(Yt,{children:"Store"}),l(Yt,{children:"Invitation received at"}),l(Yt,{children:"Status"}),l(Yt,{})]}),l(hu,{children:e.map((t,n)=>g(Il,{children:[l(Jt,{children:l(Dn,{store:{id:t.event.id,name:t.event.name,pictureUuid:t.event.pictureUuid}})}),l(Jt,{children:l(Dn,{store:{id:t.store.id,name:t.store.name,pictureUuid:t.store.pictureUuid}})}),l(Jt,{title:Z(t.receivedAt).format("LLL"),children:Z().to(t.receivedAt)}),l(Jt,{children:l(Pi,{badge:t.status.name,children:t.status.label})}),l(Jt,{children:t.status.name==="Pending"&&l(lCe,{invitation:t})})]},"invitation-event-"+n))})]})})}function lCe({invitation:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("invitationId"),u=s.nativeEvent.submitter.value;return i.patch("/invitations/event/"+c,{action:u}).then(()=>{n(!1),r.invalidateQueries({queryKey:["invitations"]}),r.invalidateQueries({queryKey:["me"]}),F({type:"success",title:"Your store have joined the event "+e.event.name})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(Wa,{})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Review an invitation"}),g(ht,{children:[g(A,{children:[l(Dn,{store:e.event,inline:!0,nameBold:!0})," ","invited your store"," ",l(Dn,{store:e.store,inline:!0,nameBold:!0})," ","to their team of designers."]}),g(P,{children:[l(ae,{children:"Comment"}),e.comment&&l(A,{children:e.comment}),!e.comment&&l(A,{children:"None"})]})]}),g(dt,{onSubmit:o.mutate,children:[l("input",{name:"invitationId",value:e.id,hidden:!0}),g(wt,{children:[l(Y,{disabled:o.isLoading,variant:"soft",type:"submit",value:"refuse",children:"Refuse"}),l(Y,{disabled:o.isLoading,variant:"primary",type:"submit",value:"join",children:"Join their team"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function cCe(){const[e,t]=y.exports.useState("asc"),[n,r]=y.exports.useState("name"),{pageTitle:i,setPageTitle:o}=Ar(),{setContent:s}=Si(),a=te(),{isLoading:c,error:u,data:d}=_t(["dropboxes"],()=>a.get("/dropboxes").then(p=>p.data));if(Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{o("Dropboxes")},[i,o]),y.exports.useEffect(()=>{s(null)},[s]),c)return l(z,{});if(u)return g(z,{children:["An error has occurred: ",u.message]});const f=p=>{let m="asc";n===p&&e==="asc"&&(m="desc"),t(m),r(p)},h=[...d.dropboxes].sort((p,m)=>{if(n==="lastSuccessfulRequest"){const v=new Date(p.lastSuccessfulRequest),b=new Date(m.lastSuccessfulRequest);return e==="desc"?v-b:b-v}else return e==="asc"?p[n]>m[n]?1:-1:p[n]>m[n]?-1:1});return g(ql,{children:[g(M,{css:{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,p:"$4",boxShadow:"$xsmall"},children:[l(br,{css:{mb:"$4"},children:"Dropbox Storage Facility"}),g(P,{css:{gap:"$1"},children:[l(A,{children:"Move your dropboxes from your personal store or skybox to their new place, the EasyBloggers Dropbox Storage Facility."}),g(A,{children:["Every designer can come and rez their dropbox to store their products to use on EasyBloggers. It\u2019s free, and included on your plan, more info on"," ",l(ie,{to:"https://docs.kynno.app/easybloggers/dropbox-storage-facility",target:"_blank",children:"the documentation"}),"."]})]})]}),l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(UR,{onClick:()=>f("name"),active:n==="name",order:e,children:"Name"}),l(Yt,{children:"Location"}),l(Yt,{children:"Inventory"}),l(Yt,{children:"Version"}),l(Yt,{children:"Status"}),l(UR,{onClick:()=>f("lastSuccessfulRequest"),active:n==="lastSuccessfulRequest",order:e,date:!0,children:"Last Seen"}),l(Yt,{})]}),l(hu,{children:h.map(p=>g(Il,{children:[g(Jt,{children:[p.name,p.type==="system"&&l(W,{icon:ioe,css:{marginLeft:"$2",color:"$primary600"}}),p.debitPermission&&l(Et,{small:!0,content:l(A,{children:"Debit permission accorded, this dropbox can be used to auto-renew your subscription."}),children:l(ie,{to:"/settings/billing/auto-renew",children:l(W,{icon:loe,css:{marginLeft:"$2",color:"$success600"}})})})]}),l(Jt,{children:l("p",{children:l(ps,{to:p.position.slurl,target:"_blank",rel:"noopener",children:p.position.regionName})})}),l(Jt,{children:p.countInventory+" items"}),g(Jt,{children:["v",p.version]}),l(Jt,{children:l(Pi,{badge:p.isActive?"Active":"gray",children:p.isActive?"Online":"Offline"})}),l(Jt,{title:Z(p.lastSuccessfulRequest).format("LLL"),children:Z(p.lastSuccessfulRequest).fromNow()}),l(pg,{children:g(gs,{modal:!1,children:[l(vs,{children:l(Wa,{})}),g(ys,{side:"left",sideOffset:16,children:[l(uCe,{dropbox:p,stores:d.stores}),l(Em,{}),l(dCe,{dropbox:p})]})]})})]},"dropbox-"+p.id))})]})})]})}function uCe({dropbox:e,stores:t}){const[n,r]=y.exports.useState(!1),[i,o]=y.exports.useState(!1),[s,a]=y.exports.useState(e.name),[c,u]=y.exports.useState(!1),d=te(),f=Ee(),{isLoading:h,error:p,data:m}=_t(["dropbox",e.id],()=>d.get("/dropboxes/"+e.id).then(T=>T.data)),[v,b]=y.exports.useState(t.reduce((T,E)=>({...T,[E.id]:e.stores.some(k=>k===E.id)}),{})),x=()=>{u(!0)},C=()=>{u(!1),S()};y.exports.useEffect(()=>{n===!0&&f.invalidateQueries(["dropboxes"])},[n,e.id,f]);const w=ve({mutationFn:T=>(b({...v,[T]:!v[T]}),d.patch("/dropboxes/"+e.id+"/store",{storeId:T,value:!v[T]}).then(()=>{F({type:"success",title:"Dropbox updated."})}).catch(function(E){var k,_,O,D;b({...v,[T]:!v[T]}),(_=(k=E.response)==null?void 0:k.data)!=null&&_.error?F({type:"error",title:(O=E.response.data)==null?void 0:O.error.title,message:(D=E.response.data)==null?void 0:D.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});if(h)return l(z,{});if(p)return g(z,{children:["An error has occurred: ",p.message]});function S(){d.patch("/dropboxes/"+e.id,{name:s}).then(()=>{F({type:"success",title:"Dropbox has been successfully renamed"}),f.invalidateQueries({queryKey:["dropboxes"]})}).catch(function(T){var E,k,_,O;(k=(E=T.response)==null?void 0:E.data)!=null&&k.error?F({type:"error",title:(_=T.response.data)==null?void 0:_.error.title,message:(O=T.response.data)==null?void 0:O.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{children:g(Xt,{onSelect:T=>T.preventDefault(),children:[l(W,{icon:jE}),l("p",{children:"Show"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:T=>T.preventDefault(),children:[g(nt,{children:["Dropbox"," ",g(Ye,{open:i,onOpenChange:o,children:[l(pt,{asChild:!0,title:"Click to open the help",children:l(W,{css:{marginLeft:"$4",width:16,height:16,cursor:"pointer"},icon:cce})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:T=>T.preventDefault(),children:[l(nt,{children:"Help Guide on Dropbox"}),g(ht,{children:[l(A,{children:"Each icons represents a type of object in the content of your dropbox. This is what each icons means:"}),g(A,{children:[l(M,{children:pp(6,"\u2192 This represent an object.")}),l(M,{children:pp(0,"\u2192 This represent a texture.")}),l(M,{children:pp(3,"\u2192 This represent a landmark.")}),l(M,{children:pp(7,"\u2192 This represent a notecard.")})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})]}),g(ht,{children:[g(P,{children:[l(ae,{children:"Name"}),c?l(Ke,{type:"text",value:s,onBlur:C,onChange:T=>a(T.target.value),autoFocus:!0}):l("div",{onClick:x,children:s})]}),g(P,{children:[l(ae,{children:"Location"}),l("p",{children:l(ps,{to:e.position.slurl,target:"_blank",rel:"noopener",children:e.position.regionName})})]}),g(P,{children:[l(ae,{children:"Last seen"}),l("div",{title:Z(e.lastSuccessfulRequest).format("LLL"),children:Z(e.lastSuccessfulRequest).fromNow()})]}),g(P,{css:{gap:"$1"},children:[l(ae,{children:"Stores"}),g(P,{css:{gap:"$3"},children:[l(A,{css:{fontSize:"$pmedium",fontStyle:"italic",color:"$gray500 !important"},children:"Select the stores you want your Dropboxes to be assigned to."}),t.map((T,E)=>g(M,{css:{cursor:w.isLoading?"inherit":"pointer"},children:[l(Xd,{checked:v[T.id],id:"checkbox-"+T.id,onCheckedChange:()=>w.mutate(T.id),disabled:w.isLoading,children:l(Zd,{children:l(W,{icon:Pa})})}),l("label",{htmlFor:"checkbox-"+T.id,children:l(Dn,{store:{id:T.id,name:T.name,pictureUuid:T.pictureUuid},css:{paddingLeft:"$4"}},"manage-store-"+E)})]},"store-"+T.id))]})]}),g(P,{children:[l(ae,{children:"Inventory"}),l(P,{css:{gap:"$1"},children:m.inventory.map((T,E)=>l(M,{children:pp(T.type,T.name)},"inventory-"+E))})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function dCe({dropbox:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=ve({mutationFn:s=>(s.preventDefault(),i.delete("/dropboxes/"+e.id).then(()=>{n(!1),F({type:"success",title:"Dropbox has been successfully removed from your store."}),r.invalidateQueries({queryKey:["dropboxes"]})}).catch(function(a){var c,u,d,f;(u=(c=a.response)==null?void 0:c.data)!=null&&u.error?F({type:"error",title:(d=a.response.data)==null?void 0:d.error.title,message:(f=a.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{type:"danger",onSelect:s=>s.preventDefault(),children:[l(W,{icon:so}),l("p",{children:"Delete"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Remove dropbox"}),g(ht,{children:[g("p",{children:["You are about to remove the dropbox ",l("strong",{children:e.name}),"."]}),l("p",{children:"Do you wish to continue?"})]}),l(dt,{onSubmit:o.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o.isLoading,variant:"danger",children:"Remove the dropbox"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const fCe=[{name:"object",type:6,icon:Qm,color:"$slIconInventoryObject"},{name:"texture",type:0,icon:rU,color:"$slIconInventoryTexture"},{name:"landmark",type:3,icon:UE,color:"$slIconInventoryLandmark"},{name:"notecard",type:7,icon:Jz,color:"$slIconInventoryNotecard"}];function pp(e,t){const n=fCe.find(r=>r.type===parseInt(e));return g("span",{children:[l(W,{css:{width:16,height:16},icon:n?n.icon:sce,color:n?n.color:""})," ",t]})}function pK({label:e,picture:t,size:n=24,boldLabel:r=!1,asBox:i=!1,round:o=!1,boxCss:s={}}){return i?g(ce,{css:{...s},children:[l(bi,{pictureUuid:t,size:n,round:o})," ",r?l("strong",{children:e}):e]}):g(z,{children:[l(bi,{pictureUuid:t,size:n,round:o})," ",r?l("strong",{children:e}):e]})}const hCe=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"1fr 250px","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}});function pCe(){const e=te(),{isLoading:t,data:n}=ms(),{isLoading:r,data:i}=_t(["user","profile"],()=>e.get("/settings/user/profile").then(o=>o.data));return Z.extend(Pn),Z.extend(On),r||t?l(z,{}):l(P,{css:{gap:"$6"},children:g(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8},children:[g(M,{css:{position:"relative",width:"100%",height:"200px",alignItems:"flex-end",borderRadius:8},children:[l(M,{css:{top:0,position:"absolute",width:"100%",height:"140px",alignItems:"flex-end",backgroundColor:"#FBAB7E",backgroundImage:"linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%)"}}),l(yCe,{pictureUuid:i.profilePicture,children:g(M,{css:{position:"relative",width:128,zIndex:0,height:128,marginLeft:"$6","&:hover":{cursor:"pointer",color:"$gray600"}},children:[l(Dt,{css:{height:"100%",width:"100%",border:"2px solid $borderColor",borderRadius:999999},src:kn({uuid:i.profilePicture.uuid?i.profilePicture.uuid:"avatar",size:256})}),l(M,{css:{position:"absolute",backgroundColor:"$backgroundColor",justifyContent:"center",alignItems:"center",transition:"color 200ms",p:"$3",borderRadius:100,right:"-$2",bottom:"-$2",boxShadow:"$small"},children:l(W,{icon:sU,css:{width:24,height:24}})})]})})]}),l(P,{css:{p:"$6"},children:g(P,{css:{gap:"$8"},children:[g(hCe,{children:[g(P,{children:[l(Qn,{children:n.user.name}),g(A,{children:["Joined on ",Z(i.joinedAt).format("LL")]})]}),i.stores.length>=1&&l(vCe,{stores:i.stores})]}),g(P,{css:{gap:"$4"},children:[l(gCe,{profile:i}),l(mCe,{profile:i}),l(PX,{})]})]})})]})})}function mCe({profile:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const a=new FormData(s.target),c=a.get("flickr_url"),u=a.get("facebook_url"),d=a.get("instagram_url"),f=a.get("personal_url"),h=a.get("deviant_art_url"),p=a.get("bluesky_url"),m=a.get("x_url");return r.patch("/settings/user/profile/socials",{flickrUrl:c,facebookUrl:u,instagramUrl:d,personalUrl:f,deviantArtUrl:h,blueskyUrl:p,xUrl:m}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"The socials links has been updated."}),i.invalidateQueries({queryKey:["user","profile"]})}).catch(function(v){var b,x,C,w;(x=(b=v.response)==null?void 0:b.data)!=null&&x.error?F({type:"error",title:(C=v.response.data)==null?void 0:C.error.title,message:(w=v.response.data)==null?void 0:w.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Social URLs"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:18,width:18},"& a":{lineHeight:1,p:"$1"}},children:[e.flickrUrl&&l(ie,{to:e.flickrUrl,target:"_blank",children:l(Ua,{})}),e.facebookUrl&&l(ie,{to:e.facebookUrl,target:"_blank",children:l(za,{})}),e.instagramUrl&&l(ie,{to:e.instagramUrl,target:"_blank",children:l(Va,{})}),e.xUrl&&l(ie,{to:e.xUrl,target:"_blank",children:l(ja,{})}),e.deviantArtUrl&&l(ie,{to:e.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.blueskyUrl&&l(ie,{to:e.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.personalUrl&&l(ie,{to:e.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]}),t&&g(dt,{onSubmit:o.mutate,children:[g(P,{children:[l(ae,{children:"Flickr URL"}),l(Ke,{name:"flickr_url",type:"text",defaultValue:e.flickrUrl})]}),g(P,{children:[l(ae,{children:"Facebook URL"}),l(Ke,{name:"facebook_url",type:"text",defaultValue:e.facebookUrl})]}),g(P,{children:[l(ae,{children:"Instagram URL"}),l(Ke,{name:"instagram_url",type:"text",defaultValue:e.instagramUrl})]}),g(P,{children:[l(ae,{children:"Twitter/X URL"}),l(Ke,{name:"x_url",type:"text",defaultValue:e.xUrl})]}),g(P,{children:[l(ae,{children:"Personal Website URL"}),l(Ke,{name:"personal_url",type:"text",defaultValue:e.personalUrl})]}),g(P,{children:[l(ae,{children:"Deviant Art URL"}),l(Ke,{name:"deviant_art_url",type:"text",defaultValue:e.deviantArtUrl})]}),g(P,{children:[l(ae,{children:"BlueSky URL"}),l(Ke,{name:"bluesky_url",type:"text",defaultValue:e.blueSkyUrl})]}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function gCe({profile:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("about");return r.patch("/settings/user/profile/about",{about:c}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"Your about section has been saved."}),i.invalidateQueries({queryKey:["user","profile"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"About"}),l(A,{css:{marginLeft:"auto",color:"$gray400",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{children:e.about&&e.about.split(`
`).map((s,a)=>g(Ae.Fragment,{children:[s,l("br",{})]},a))}),t&&g(dt,{onSubmit:o.mutate,children:[l(Ti,{name:"about",defaultValue:e.about,maximumCharacters:500,css:{height:200}}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function vCe({stores:e}){return g(P,{css:{gap:"$1"},children:[g(A,{css:{fontSize:"0.875rem",textTransform:"uppercase",fontWeight:"$bold",fontFamily:"$redHatDisplay"},children:["Store",e.length>1?"s":""]}),l(M,{css:{gap:"$2",fontSize:"0.75rem",flexWrap:"wrap"},children:e.map((t,n)=>l(ce,{css:{whiteSpace:"nowrap",backgroundColor:"$backgroundColor",color:"$textColor",p:"$1",paddingRight:"$2",fontWeight:"$medium",border:"1px solid $borderColor",borderRadius:2e3,width:"fit-content"},children:l(pK,{round:!0,size:18,picture:t.picture,label:t.name,asBox:!0})},"profile-store-"+n))})]})}function yCe({children:e,pictureUuid:t}){const n=te(),r=Ee(),[i,o]=y.exports.useState(!1),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("uuid");return n.patch("/settings/user/profile/picture",{uuid:u}).then(()=>{o(!1),F({type:"success",title:"Successfully updated \u{1F3A8}",message:"This new picture for your avatar looks good."}),r.invalidateQueries({queryKey:["user","profile"]}),r.invalidateQueries({queryKey:["me"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:i,onOpenChange:o,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Edit your avatar picture"}),g(ht,{children:[l(A,{children:"The picture of your avatar will be shown in various area on EasyBloggers. By entering an UUID here, you will override the picture we use from Second Life."}),g(A,{children:["Please enter a texture UUID from Second Life which you can get by"," ",g("code",{children:["Right Click ",">"," Copy Asset UUID"]})]})]}),g(dt,{onSubmit:s.mutate,children:[g(P,{children:[l(ae,{children:"Texture UUID"}),l(Ke,{type:"text",name:"uuid",defaultValue:t.overrided?t.uuid:"",placeholder:"00000000-0000-0000-0000-000000000000"})]}),l(M,{css:{marginTop:25,justifyContent:"flex-end"},children:l(Y,{type:"submit",variant:"primary",disabled:s.isLoading,children:"Change the picture"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function Ab(){const{pageTitle:e,setPageTitle:t}=Ar(),{type:n,setting:r}=Na(),{setContent:i}=Si(),o=Tn.exports.useMediaQuery({maxWidth:992}),{permissions:s,selectedStore:a}=st();let c,u=!0,d="600px",f=!0;return y.exports.useEffect(()=>{t("Settings")},[e,t]),y.exports.useEffect(()=>{i(null)},[i]),!n&&!r?l(xh,{to:"/settings/user/profile"}):(n==="store"?r==="general"?c=l(wMe,{}):r==="bloggers-application"?c=l(INe,{}):r==="designers-application"?c=l(zNe,{}):r==="preferences"?(c=l(KFe,{}),d="800px"):r==="locations"?(c=l(JFe,{}),d="800px"):r==="friends"?(c=l(MMe,{}),d="600px"):r==="notifications"?(c=l(ZFe,{}),d="800px"):r==="audit"&&(c=l(KNe,{}),d="100%"):n==="billing"?r==="subscription"?(c=l(QFe,{}),d="1200px"):r==="quota"?(c=l(GFe,{}),f=!1,d="800px"):r==="upgrade-subscription"?(c=l(HQ,{}),d="1200px"):r==="auto-renew"&&(c=l(XFe,{}),d="800px"):n==="user"&&(r==="profile"?(c=l(pCe,{}),f=!1,u=!1):r==="password"&&(c=l(BQ,{}))),g(ql,{css:{flexDirection:o?"column":"row"},children:[l(P,{css:{minWidth:200,gap:"$8"},children:g(P,{css:{gap:"$6"},children:[s.features.settings.user.general.view===!0&&g(P,{children:[l($b,{children:"User"}),l(uo,{faIcon:bC,label:"Profile",url:"/settings/user/profile"}),l(uo,{faIcon:Gle,label:"Password",url:"/settings/user/password"})]}),s.features.settings.store.view&&g(P,{children:[l($b,{children:a.type}),s.features.settings.store.general.view===!0&&l(uo,{faIcon:bce,label:"General",url:"/settings/store/general"}),s.features.settings.store.audit.view===!0&&l(uo,{faIcon:pce,label:"Audit Log",url:"/settings/store/audit"}),s.features.settings.store.bloggersApplication.view===!0&&l(uo,{faIcon:ID,label:"Bloggers Application",url:"/settings/store/bloggers-application"}),s.features.settings.store.designersApplication.view===!0&&l(uo,{faIcon:ID,label:"Designers Application",url:"/settings/store/designers-application"}),s.features.settings.store.friends.view===!0&&l(uo,{faIcon:ez,label:"Friends",url:"/settings/store/friends"}),s.features.settings.store.locations.view===!0&&l(uo,{faIcon:ece,label:"Locations",url:"/settings/store/locations"}),s.features.settings.store.notifications.view===!0&&l(uo,{faIcon:Xm,label:"Notifications",url:"/settings/store/notifications"}),s.features.settings.store.preferences.view===!0&&l(uo,{faIcon:gce,label:"Preferences",url:"/settings/store/preferences"})]}),s.features.settings.billing.view&&g(P,{children:[l($b,{children:"Billing"}),s.features.settings.billing.subscription.view===!0&&l(uo,{faIcon:oce,label:"Subscription",url:"/settings/billing/subscription"}),s.features.settings.billing.subscription.view===!0&&l(uo,{faIcon:Qle,label:"Auto-renew",url:"/settings/billing/auto-renew"}),s.features.settings.billing.subscription.view===!0&&l(uo,{faIcon:ace,label:"Quota",url:"/settings/billing/quota"})]})]})}),l(Jd,{css:{maxWidth:d,backgroundColor:f?"$cardBackgroundColor":"transparent",border:f?"1px solid $borderColor":"0px solid",boxShadow:f?"$xsmall":"none"},children:l(P,{css:{padding:u?"$6":0},children:c})})]}))}const $b=de("div",{textTransform:"uppercase",fontWeight:"$bold",fontFamily:"$inter",fontSize:12,color:"$gray400",marginBottom:"$3"});function uo({faIcon:e,label:t,url:n}){return g(bCe,{to:n,active:location.pathname.startsWith(n),children:[l(W,{css:{width:18},icon:e}),t]})}const bCe=de(ps,{display:"flex",alignItems:"center",gap:"$2",px:"$2",py:"$1",borderRadius:8,color:"$textColor",transition:"background-color 0.2s",marginBottom:"$1",fontWeight:"$medium","&:hover":{transition:"background-color 0.2s",cursor:"pointer",backgroundColor:"$hoveringItem"},variants:{active:{true:{transition:"background-color 0.3s",cursor:"pointer",backgroundColor:"$hoveringItem"}}}});function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mn.apply(this,arguments)}function nv(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yl.apply(this,arguments)}function xCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const VR=["http","https","mailto","tel"];function CCe(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<VR.length;){const o=VR[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var mK=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function c0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jR(e.position):"start"in e||"end"in e?jR(e):"line"in e||"column"in e?bw(e):""}function bw(e){return WR(e&&e.line)+":"+WR(e&&e.column)}function jR(e){return bw(e&&e.start)+"-"+bw(e&&e.end)}function WR(e){return e&&typeof e=="number"?e:1}class bs extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=c0(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}bs.prototype.file="";bs.prototype.name="";bs.prototype.reason="";bs.prototype.message="";bs.prototype.stack="";bs.prototype.fatal=null;bs.prototype.column=null;bs.prototype.line=null;bs.prototype.source=null;bs.prototype.ruleId=null;bs.prototype.position=null;const na={basename:wCe,dirname:SCe,extname:ECe,join:TCe,sep:"/"};function wCe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gg(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function SCe(e){if(gg(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function ECe(e){gg(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function TCe(...e){let t=-1,n;for(;++t<e.length;)gg(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":kCe(n)}function kCe(e){gg(e);const t=e.charCodeAt(0)===47;let n=_Ce(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _Ce(e,t){let n="",r=0,i=-1,o=0,s=-1,a,c;for(;++s<=e.length;){if(s<e.length)a=e.charCodeAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function gg(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ACe={cwd:$Ce};function $Ce(){return"/"}function xw(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function DCe(e){if(typeof e=="string")e=new URL(e);else if(!xw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return OCe(e)}function OCe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Db=["history","path","basename","stem","extname","dirname"];class gK{constructor(t){let n;t?typeof t=="string"||PCe(t)?n={value:t}:xw(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=ACe.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Db.length;){const o=Db[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Db.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){xw(t)&&(t=DCe(t)),Pb(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?na.dirname(this.path):void 0}set dirname(t){qR(this.basename,"dirname"),this.path=na.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?na.basename(this.path):void 0}set basename(t){Pb(t,"basename"),Ob(t,"basename"),this.path=na.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?na.extname(this.path):void 0}set extname(t){if(Ob(t,"extname"),qR(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=na.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?na.basename(this.path,this.extname):void 0}set stem(t){Pb(t,"stem"),Ob(t,"stem"),this.path=na.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const i=new bs(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}}function Ob(e,t){if(e&&e.includes(na.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+na.sep+"`")}function Pb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function PCe(e){return mK(e)}function KR(e){if(e)throw e}var s5=Object.prototype.hasOwnProperty,vK=Object.prototype.toString,GR=Object.defineProperty,YR=Object.getOwnPropertyDescriptor,QR=function(t){return typeof Array.isArray=="function"?Array.isArray(t):vK.call(t)==="[object Array]"},XR=function(t){if(!t||vK.call(t)!=="[object Object]")return!1;var n=s5.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&s5.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||s5.call(t,i)},ZR=function(t,n){GR&&n.name==="__proto__"?GR(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},JR=function(t,n){if(n==="__proto__")if(s5.call(t,n)){if(YR)return YR(t,n).value}else return;return t[n]},rf=function e(){var t,n,r,i,o,s,a=arguments[0],c=1,u=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=JR(a,n),i=JR(t,n),a!==i&&(d&&i&&(XR(i)||(o=QR(i)))?(o?(o=!1,s=r&&QR(r)?r:[]):s=r&&XR(r)?r:{},ZR(a,{name:n,newValue:e(d,s,i)})):typeof i<"u"&&ZR(a,{name:n,newValue:i}));return a};function Cw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function RCe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...u){const d=e[++o];let f=-1;if(c){s(c);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,d?MCe(d,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function MCe(e,t){let n;return r;function r(...s){const a=e.length>s.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(u){const d=u;if(a&&n)throw d;return i(d)}a||(c instanceof Promise?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const ICe=bK().freeze(),yK={}.hasOwnProperty;function bK(){const e=RCe(),t=[];let n={},r,i=-1;return o.data=s,o.Parser=void 0,o.Compiler=void 0,o.freeze=a,o.attachers=t,o.use=c,o.parse=u,o.stringify=d,o.run=f,o.runSync=h,o.process=p,o.processSync=m,o;function o(){const v=bK();let b=-1;for(;++b<t.length;)v.use(...t[b]);return v.data(rf(!0,{},n)),v}function s(v,b){return typeof v=="string"?arguments.length===2?(Ib("data",r),n[v]=b,o):yK.call(n,v)&&n[v]||null:v?(Ib("data",r),n=v,o):n}function a(){if(r)return o;for(;++i<t.length;){const[v,...b]=t[i];if(b[0]===!1)continue;b[0]===!0&&(b[0]=void 0);const x=v.call(o,...b);typeof x=="function"&&e.use(x)}return r=!0,i=Number.POSITIVE_INFINITY,o}function c(v,...b){let x;if(Ib("use",r),v!=null)if(typeof v=="function")T(v,...b);else if(typeof v=="object")Array.isArray(v)?S(v):w(v);else throw new TypeError("Expected usable value, not `"+v+"`");return x&&(n.settings=Object.assign(n.settings||{},x)),o;function C(E){if(typeof E=="function")T(E);else if(typeof E=="object")if(Array.isArray(E)){const[k,..._]=E;T(k,..._)}else w(E);else throw new TypeError("Expected usable value, not `"+E+"`")}function w(E){S(E.plugins),E.settings&&(x=Object.assign(x||{},E.settings))}function S(E){let k=-1;if(E!=null)if(Array.isArray(E))for(;++k<E.length;){const _=E[k];C(_)}else throw new TypeError("Expected a list of plugins, not `"+E+"`")}function T(E,k){let _=-1,O;for(;++_<t.length;)if(t[_][0]===E){O=t[_];break}O?(Cw(O[1])&&Cw(k)&&(k=rf(!0,O[1],k)),O[1]=k):t.push([...arguments])}}function u(v){o.freeze();const b=mp(v),x=o.Parser;return Rb("parse",x),eM(x,"parse")?new x(String(b),b).parse():x(String(b),b)}function d(v,b){o.freeze();const x=mp(b),C=o.Compiler;return Mb("stringify",C),tM(v),eM(C,"compile")?new C(v,x).compile():C(v,x)}function f(v,b,x){if(tM(v),o.freeze(),!x&&typeof b=="function"&&(x=b,b=void 0),!x)return new Promise(C);C(null,x);function C(w,S){e.run(v,mp(b),T);function T(E,k,_){k=k||v,E?S(E):w?w(k):x(null,k,_)}}}function h(v,b){let x,C;return o.run(v,b,w),nM("runSync","run",C),x;function w(S,T){KR(S),x=T,C=!0}}function p(v,b){if(o.freeze(),Rb("process",o.Parser),Mb("process",o.Compiler),!b)return new Promise(x);x(null,b);function x(C,w){const S=mp(v);o.run(o.parse(S),S,(E,k,_)=>{if(E||!k||!_)T(E);else{const O=o.stringify(k,_);O==null||(FCe(O)?_.value=O:_.result=O),T(E,_)}});function T(E,k){E||!k?w(E):C?C(k):b(null,k)}}}function m(v){let b;o.freeze(),Rb("processSync",o.Parser),Mb("processSync",o.Compiler);const x=mp(v);return o.process(x,C),nM("processSync","process",b),x;function C(w){b=!0,KR(w)}}}function eM(e,t){return typeof e=="function"&&e.prototype&&(LCe(e.prototype)||t in e.prototype)}function LCe(e){let t;for(t in e)if(yK.call(e,t))return!0;return!1}function Rb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Mb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Ib(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tM(e){if(!Cw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nM(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mp(e){return NCe(e)?e:new gK(e)}function NCe(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FCe(e){return typeof e=="string"||mK(e)}const BCe={};function HCe(e,t){const n=t||BCe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xK(e,r,i)}function xK(e,t,n){if(zCe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rM(e.children,t,n)}return Array.isArray(e)?rM(e,t,n):""}function rM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xK(e[i],t,n);return r.join("")}function zCe(e){return Boolean(e&&typeof e=="object")}function ko(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Ko(e,t){return e.length>0?(ko(e,e.length,0,t),e):t}const iM={}.hasOwnProperty;function CK(e){const t={};let n=-1;for(;++n<e.length;)UCe(t,e[n]);return t}function UCe(e,t){let n;for(n in t){const i=(iM.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){iM.call(i,s)||(i[s]=[]);const a=o[s];VCe(i[s],Array.isArray(a)?a:a?[a]:[])}}}function VCe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ko(e,0,0,r)}const jCe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Di=Eu(/[A-Za-z]/),vi=Eu(/[\dA-Za-z]/),WCe=Eu(/[#-'*+\--9=?A-Z^-~]/);function rv(e){return e!==null&&(e<32||e===127)}const ww=Eu(/\d/),qCe=Eu(/[\dA-Fa-f]/),KCe=Eu(/[!-/:-@[-`{-~]/);function kt(e){return e!==null&&e<-2}function An(e){return e!==null&&(e<0||e===32)}function Kt(e){return e===-2||e===-1||e===32}const H6=Eu(jCe),Bd=Eu(/\s/);function Eu(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function rn(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return Kt(c)?(e.enter(n),a(c)):t(c)}function a(c){return Kt(c)&&o++<i?(e.consume(c),a):(e.exit(n),t(c))}}const GCe={tokenize:YCe};function YCe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),rn(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return kt(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const QCe={tokenize:XCe},oM={tokenize:ZCe};function XCe(e){const t=this,n=[];let r=0,i,o,s;return a;function a(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const S=t.events.length;let T=S,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){E=t.events[T][1].end;break}x(r);let k=S;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},E),k++;return ko(t.events,T+1,0,t.events.slice(S)),t.events.length=k,u(w)}return a(w)}function u(w){if(r===n.length){if(!i)return h(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oM,d,f)(w)}function d(w){return i&&C(),x(r),h(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(w)}function h(w){return t.containerState={},e.attempt(oM,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),h(w)}function m(w){if(w===null){i&&C(),x(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),v(w)}function v(w){if(w===null){b(e.exit("chunkFlow"),!0),x(0),e.consume(w);return}return kt(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),v)}function b(w,S){const T=t.sliceStream(w);if(S&&T.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(T),t.parser.lazy[w.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const k=t.events.length;let _=k,O,D;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(O){D=t.events[_][1].end;break}O=!0}for(x(r),E=k;E<t.events.length;)t.events[E][1].end=Object.assign({},D),E++;ko(t.events,_+1,0,t.events.slice(k)),t.events.length=E}}function x(w){let S=n.length;for(;S-- >w;){const T=n[S];t.containerState=T[1],T[0].exit.call(t,e)}n.length=w}function C(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ZCe(e,t,n){return rn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function iv(e){if(e===null||An(e)||Bd(e))return 1;if(H6(e))return 2}function z6(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Sw={name:"attention",tokenize:ewe,resolveAll:JCe};function JCe(e,t){let n=-1,r,i,o,s,a,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);sM(f,-c),sM(h,c),s={type:c>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},o={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ko(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ko(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Ko(u,z6(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ko(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ko(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ko(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ewe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=iv(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const u=e.exit("attentionSequence"),d=iv(c),f=!d||d===2&&i||n.includes(c),h=!i||i===2&&d||n.includes(r);return u._open=Boolean(o===42?f:f&&(i||!h)),u._close=Boolean(o===42?h:h&&(d||!f)),t(c)}}function sM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const twe={name:"autolink",tokenize:nwe};function nwe(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Di(p)?(e.consume(p),s):u(p)}function s(p){return p===43||p===45||p===46||vi(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||vi(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||rv(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),d):WCe(p)?(e.consume(p),u):n(p)}function d(p){return vi(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||vi(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const vg={tokenize:rwe,partial:!0};function rwe(e,t,n){return r;function r(o){return Kt(o)?rn(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||kt(o)?t(o):n(o)}}const wK={name:"blockQuote",tokenize:iwe,continuation:{tokenize:owe},exit:swe};function iwe(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Kt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function owe(e,t,n){const r=this;return i;function i(s){return Kt(s)?rn(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(wK,t,n)(s)}}function swe(e){e.exit("blockQuote")}const SK={name:"characterEscape",tokenize:awe};function awe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return KCe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const aM=document.createElement("i");function lk(e){const t="&"+e+";";aM.innerHTML=t;const n=aM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const EK={name:"characterReference",tokenize:lwe};function lwe(e,t,n){const r=this;let i=0,o,s;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=vi,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=qCe,d):(e.enter("characterReferenceValue"),o=7,s=ww,d(f))}function d(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return s===vi&&!lk(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),d):n(f)}}const lM={tokenize:uwe,partial:!0},cM={name:"codeFenced",tokenize:cwe,concrete:!0};function cwe(e,t,n){const r=this,i={tokenize:T,partial:!0};let o=0,s=0,a;return c;function c(E){return u(E)}function u(E){const k=r.events[r.events.length-1];return o=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,a=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(E)}function d(E){return E===a?(s++,e.consume(E),d):s<3?n(E):(e.exit("codeFencedFenceSequence"),Kt(E)?rn(e,f,"whitespace")(E):f(E))}function f(E){return E===null||kt(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(lM,v,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||kt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):Kt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rn(e,p,"whitespace")(E)):E===96&&E===a?n(E):(e.consume(E),h)}function p(E){return E===null||kt(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||kt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===a?n(E):(e.consume(E),m)}function v(E){return e.attempt(i,S,b)(E)}function b(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),x}function x(E){return o>0&&Kt(E)?rn(e,C,"linePrefix",o+1)(E):C(E)}function C(E){return E===null||kt(E)?e.check(lM,v,S)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||kt(E)?(e.exit("codeFlowValue"),C(E)):(e.consume(E),w)}function S(E){return e.exit("codeFenced"),t(E)}function T(E,k,_){let O=0;return D;function D(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),L}function L(X){return E.enter("codeFencedFence"),Kt(X)?rn(E,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):N(X)}function N(X){return X===a?(E.enter("codeFencedFenceSequence"),j(X)):_(X)}function j(X){return X===a?(O++,E.consume(X),j):O>=s?(E.exit("codeFencedFenceSequence"),Kt(X)?rn(E,G,"whitespace")(X):G(X)):_(X)}function G(X){return X===null||kt(X)?(E.exit("codeFencedFence"),k(X)):_(X)}}}function uwe(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Lb={name:"codeIndented",tokenize:fwe},dwe={tokenize:hwe,partial:!0};function fwe(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),rn(e,o,"linePrefix",4+1)(u)}function o(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):kt(u)?e.attempt(dwe,s,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||kt(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function hwe(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):kt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):rn(e,o,"linePrefix",4+1)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):kt(s)?i(s):n(s)}}const pwe={name:"codeText",tokenize:vwe,resolve:mwe,previous:gwe};function mwe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function gwe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vwe(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(o=e.enter("codeTextSequence"),i=0,d(f)):kt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||kt(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}function TK(e){const t={};let n=-1,r,i,o,s,a,c,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ywe(e,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(s=e[o],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),a=e.slice(i,n),a.unshift(r),ko(e,i,n-i+1,a))}}return!u}function ywe(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,c=[],u={};let d,f,h=-1,p=n,m=0,v=0;const b=[v];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(v=h+1,b.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),h=b.length;h--;){const x=a.slice(b[h],b[h+1]),C=o.pop();c.unshift([C,C+x.length-1]),ko(e,C,2,x)}for(h=-1;++h<c.length;)u[m+c[h][0]]=m+c[h][1],m+=c[h][1]-c[h][0]-1;return u}const bwe={tokenize:wwe,resolve:Cwe},xwe={tokenize:Swe,partial:!0};function Cwe(e){return TK(e),e}function wwe(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):kt(a)?e.check(xwe,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Swe(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),rn(e,o,"linePrefix")}function o(s){if(s===null||kt(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function kK(e,t,n,r,i,o,s,a,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||rv(x)?n(x):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),v(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||kt(x)?n(x):(e.consume(x),x===92?m:p)}function m(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function v(x){return!d&&(x===null||x===41||An(x))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,v):x===41?(e.consume(x),d--,v):x===null||x===32||x===40||rv(x)?n(x):(e.consume(x),x===92?b:v)}function b(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function _K(e,t,n,r,i,o){const s=this;let a=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),d}function d(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):kt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||kt(p)||a++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!Kt(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function AK(e,t,n,r,i,o){let s;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,c):n(h)}function c(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),c(s)):h===null?n(h):kt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),rn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||kt(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:d)}function f(h){return h===s||h===92?(e.consume(h),d):d(h)}}function u0(e,t){let n;return r;function r(i){return kt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Kt(i)?rn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Vs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ewe={name:"definition",tokenize:kwe},Twe={tokenize:_we,partial:!0};function kwe(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return _K.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Vs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return An(p)?u0(e,u)(p):u(p)}function u(p){return kK(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(Twe,f,f)(p)}function f(p){return Kt(p)?rn(e,h,"whitespace")(p):h(p)}function h(p){return p===null||kt(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function _we(e,t,n){return r;function r(a){return An(a)?u0(e,i)(a):n(a)}function i(a){return AK(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Kt(a)?rn(e,s,"whitespace")(a):s(a)}function s(a){return a===null||kt(a)?t(a):n(a)}}const Awe={name:"hardBreakEscape",tokenize:$we};function $we(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return kt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Dwe={name:"headingAtx",tokenize:Pwe,resolve:Owe};function Owe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ko(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Pwe(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||An(d)?(e.exit("atxHeadingSequence"),a(d)):n(d)}function a(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||kt(d)?(e.exit("atxHeading"),t(d)):Kt(d)?rn(e,a,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),a(d))}function u(d){return d===null||d===35||An(d)?(e.exit("atxHeadingText"),a(d)):(e.consume(d),u)}}const Rwe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],uM=["pre","script","style","textarea"],Mwe={name:"htmlFlow",tokenize:Fwe,resolveTo:Nwe,concrete:!0},Iwe={tokenize:Hwe,partial:!0},Lwe={tokenize:Bwe,partial:!0};function Nwe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Fwe(e,t,n){const r=this;let i,o,s,a,c;return u;function u(I){return d(I)}function d(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),f}function f(I){return I===33?(e.consume(I),h):I===47?(e.consume(I),o=!0,v):I===63?(e.consume(I),i=3,r.interrupt?t:R):Di(I)?(e.consume(I),s=String.fromCharCode(I),b):n(I)}function h(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,a=0,m):Di(I)?(e.consume(I),i=4,r.interrupt?t:R):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:R):n(I)}function m(I){const me="CDATA[";return I===me.charCodeAt(a++)?(e.consume(I),a===me.length?r.interrupt?t:N:m):n(I)}function v(I){return Di(I)?(e.consume(I),s=String.fromCharCode(I),b):n(I)}function b(I){if(I===null||I===47||I===62||An(I)){const me=I===47,Se=s.toLowerCase();return!me&&!o&&uM.includes(Se)?(i=1,r.interrupt?t(I):N(I)):Rwe.includes(s.toLowerCase())?(i=6,me?(e.consume(I),x):r.interrupt?t(I):N(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?C(I):w(I))}return I===45||vi(I)?(e.consume(I),s+=String.fromCharCode(I),b):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:N):n(I)}function C(I){return Kt(I)?(e.consume(I),C):D(I)}function w(I){return I===47?(e.consume(I),D):I===58||I===95||Di(I)?(e.consume(I),S):Kt(I)?(e.consume(I),w):D(I)}function S(I){return I===45||I===46||I===58||I===95||vi(I)?(e.consume(I),S):T(I)}function T(I){return I===61?(e.consume(I),E):Kt(I)?(e.consume(I),T):w(I)}function E(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),c=I,k):Kt(I)?(e.consume(I),E):_(I)}function k(I){return I===c?(e.consume(I),c=null,O):I===null||kt(I)?n(I):(e.consume(I),k)}function _(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||An(I)?T(I):(e.consume(I),_)}function O(I){return I===47||I===62||Kt(I)?w(I):n(I)}function D(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||kt(I)?N(I):Kt(I)?(e.consume(I),L):n(I)}function N(I){return I===45&&i===2?(e.consume(I),re):I===60&&i===1?(e.consume(I),oe):I===62&&i===4?(e.consume(I),se):I===63&&i===3?(e.consume(I),R):I===93&&i===5?(e.consume(I),H):kt(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Iwe,ee,j)(I)):I===null||kt(I)?(e.exit("htmlFlowData"),j(I)):(e.consume(I),N)}function j(I){return e.check(Lwe,G,ee)(I)}function G(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),X}function X(I){return I===null||kt(I)?j(I):(e.enter("htmlFlowData"),N(I))}function re(I){return I===45?(e.consume(I),R):N(I)}function oe(I){return I===47?(e.consume(I),s="",U):N(I)}function U(I){if(I===62){const me=s.toLowerCase();return uM.includes(me)?(e.consume(I),se):N(I)}return Di(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),U):N(I)}function H(I){return I===93?(e.consume(I),R):N(I)}function R(I){return I===62?(e.consume(I),se):I===45&&i===2?(e.consume(I),R):N(I)}function se(I){return I===null||kt(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),se)}function ee(I){return e.exit("htmlFlow"),t(I)}}function Bwe(e,t,n){const r=this;return i;function i(s){return kt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Hwe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(vg,t,n)}}const zwe={name:"htmlText",tokenize:Uwe};function Uwe(e,t,n){const r=this;let i,o,s;return a;function a(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),c}function c(R){return R===33?(e.consume(R),u):R===47?(e.consume(R),T):R===63?(e.consume(R),w):Di(R)?(e.consume(R),_):n(R)}function u(R){return R===45?(e.consume(R),d):R===91?(e.consume(R),o=0,m):Di(R)?(e.consume(R),C):n(R)}function d(R){return R===45?(e.consume(R),p):n(R)}function f(R){return R===null?n(R):R===45?(e.consume(R),h):kt(R)?(s=f,oe(R)):(e.consume(R),f)}function h(R){return R===45?(e.consume(R),p):f(R)}function p(R){return R===62?re(R):R===45?h(R):f(R)}function m(R){const se="CDATA[";return R===se.charCodeAt(o++)?(e.consume(R),o===se.length?v:m):n(R)}function v(R){return R===null?n(R):R===93?(e.consume(R),b):kt(R)?(s=v,oe(R)):(e.consume(R),v)}function b(R){return R===93?(e.consume(R),x):v(R)}function x(R){return R===62?re(R):R===93?(e.consume(R),x):v(R)}function C(R){return R===null||R===62?re(R):kt(R)?(s=C,oe(R)):(e.consume(R),C)}function w(R){return R===null?n(R):R===63?(e.consume(R),S):kt(R)?(s=w,oe(R)):(e.consume(R),w)}function S(R){return R===62?re(R):w(R)}function T(R){return Di(R)?(e.consume(R),E):n(R)}function E(R){return R===45||vi(R)?(e.consume(R),E):k(R)}function k(R){return kt(R)?(s=k,oe(R)):Kt(R)?(e.consume(R),k):re(R)}function _(R){return R===45||vi(R)?(e.consume(R),_):R===47||R===62||An(R)?O(R):n(R)}function O(R){return R===47?(e.consume(R),re):R===58||R===95||Di(R)?(e.consume(R),D):kt(R)?(s=O,oe(R)):Kt(R)?(e.consume(R),O):re(R)}function D(R){return R===45||R===46||R===58||R===95||vi(R)?(e.consume(R),D):L(R)}function L(R){return R===61?(e.consume(R),N):kt(R)?(s=L,oe(R)):Kt(R)?(e.consume(R),L):O(R)}function N(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,j):kt(R)?(s=N,oe(R)):Kt(R)?(e.consume(R),N):(e.consume(R),G)}function j(R){return R===i?(e.consume(R),i=void 0,X):R===null?n(R):kt(R)?(s=j,oe(R)):(e.consume(R),j)}function G(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||An(R)?O(R):(e.consume(R),G)}function X(R){return R===47||R===62||An(R)?O(R):n(R)}function re(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function oe(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),U}function U(R){return Kt(R)?rn(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):H(R)}function H(R){return e.enter("htmlTextData"),s(R)}}const ck={name:"labelEnd",tokenize:Gwe,resolveTo:Kwe,resolveAll:qwe},Vwe={tokenize:Ywe},jwe={tokenize:Qwe},Wwe={tokenize:Xwe};function qwe(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function Kwe(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return a=[["enter",c,t],["enter",u,t]],a=Ko(a,e.slice(o+1,o+r+3)),a=Ko(a,[["enter",d,t]]),a=Ko(a,z6(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=Ko(a,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),a=Ko(a,e.slice(s+1)),a=Ko(a,[["exit",c,t]]),ko(e,o,e.length,a),e}function Gwe(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?f(h):(s=r.parser.defined.includes(Vs(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):n(h)}function c(h){return h===40?e.attempt(Vwe,d,s?d:f)(h):h===91?e.attempt(jwe,d,s?u:f)(h):s?d(h):f(h)}function u(h){return e.attempt(Wwe,d,f)(h)}function d(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function Ywe(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return An(f)?u0(e,o)(f):o(f)}function o(f){return f===41?d(f):kK(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return An(f)?u0(e,c)(f):d(f)}function a(f){return n(f)}function c(f){return f===34||f===39||f===40?AK(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return An(f)?u0(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Qwe(e,t,n){const r=this;return i;function i(a){return _K.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Vs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function Xwe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Zwe={name:"labelStartImage",tokenize:Jwe,resolveAll:ck.resolveAll};function Jwe(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const eSe={name:"labelStartLink",tokenize:tSe,resolveAll:ck.resolveAll};function tSe(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Nb={name:"lineEnding",tokenize:nSe};function nSe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rn(e,t,"linePrefix")}}const a5={name:"thematicBreak",tokenize:rSe};function rSe(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||kt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Kt(u)?rn(e,a,"whitespace")(u):a(u))}}const Vi={name:"list",tokenize:sSe,continuation:{tokenize:aSe},exit:cSe},iSe={tokenize:uSe,partial:!0},oSe={tokenize:lSe,partial:!0};function sSe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ww(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(a5,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return ww(p)&&++s<10?(e.consume(p),c):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(vg,r.interrupt?n:d,e.attempt(iSe,h,f))}function d(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return Kt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function aSe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(vg,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rn(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Kt(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oSe,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,rn(e,e.attempt(Vi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function lSe(e,t,n){const r=this;return rn(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function cSe(e){e.exit(this.containerState.type)}function uSe(e,t,n){const r=this;return rn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const s=r.events[r.events.length-1];return!Kt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const dM={name:"setextUnderline",tokenize:fSe,resolveTo:dSe};function dSe(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function fSe(e,t,n){const r=this;let i;return o;function o(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Kt(u)?rn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||kt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const hSe={tokenize:pSe};function pSe(e){const t=this,n=e.attempt(vg,r,e.attempt(this.parser.constructs.flowInitial,i,rn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bwe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mSe={resolveAll:DK()},gSe=$K("string"),vSe=$K("text");function $K(e){return{tokenize:t,resolveAll:DK(e==="text"?ySe:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(d){return u(d)?o(d):a(d)}function a(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),o(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const f=i[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function DK(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function ySe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)c=!0,a++;else if(u!==-1){o++;break}}if(a){const u={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function bSe(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],a=[];const c={consume:C,enter:w,exit:S,attempt:k(T),check:k(E),interrupt:k(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:h,now:m,defineSkip:v,write:f};let d=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(L){return s=Ko(s,L),b(),s[s.length-1]!==null?[]:(_(t,0),u.events=z6(o,u.events,u),u.events)}function h(L,N){return CSe(p(L),N)}function p(L){return xSe(s,L)}function m(){const{line:L,column:N,offset:j,_index:G,_bufferIndex:X}=r;return{line:L,column:N,offset:j,_index:G,_bufferIndex:X}}function v(L){i[L.line]=L.column,D()}function b(){let L;for(;r._index<s.length;){const N=s[r._index];if(typeof N=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<N.length;)x(N.charCodeAt(r._bufferIndex));else x(N)}}function x(L){d=d(L)}function C(L){kt(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,D()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function w(L,N){const j=N||{};return j.type=L,j.start=m(),u.events.push(["enter",j,u]),a.push(j),j}function S(L){const N=a.pop();return N.end=m(),u.events.push(["exit",N,u]),N}function T(L,N){_(L,N.from)}function E(L,N){N.restore()}function k(L,N){return j;function j(G,X,re){let oe,U,H,R;return Array.isArray(G)?ee(G):"tokenize"in G?ee([G]):se(G);function se(pe){return ye;function ye(_e){const $e=_e!==null&&pe[_e],J=_e!==null&&pe.null,fe=[...Array.isArray($e)?$e:$e?[$e]:[],...Array.isArray(J)?J:J?[J]:[]];return ee(fe)(_e)}}function ee(pe){return oe=pe,U=0,pe.length===0?re:I(pe[U])}function I(pe){return ye;function ye(_e){return R=O(),H=pe,pe.partial||(u.currentConstruct=pe),pe.name&&u.parser.constructs.disable.null.includes(pe.name)?Se():pe.tokenize.call(N?Object.assign(Object.create(u),N):u,c,me,Se)(_e)}}function me(pe){return L(H,R),X}function Se(pe){return R.restore(),++U<oe.length?I(oe[U]):re}}}function _(L,N){L.resolveAll&&!o.includes(L)&&o.push(L),L.resolve&&ko(u.events,N,u.events.length-N,L.resolve(u.events.slice(N),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function O(){const L=m(),N=u.previous,j=u.currentConstruct,G=u.events.length,X=Array.from(a);return{restore:re,from:G};function re(){r=L,u.previous=N,u.currentConstruct=j,u.events.length=G,a=X,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function xSe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function CSe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
`;break}case-3:{s=`\r
`;break}case-2:{s=t?" ":"	";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}const wSe={[42]:Vi,[43]:Vi,[45]:Vi,[48]:Vi,[49]:Vi,[50]:Vi,[51]:Vi,[52]:Vi,[53]:Vi,[54]:Vi,[55]:Vi,[56]:Vi,[57]:Vi,[62]:wK},SSe={[91]:Ewe},ESe={[-2]:Lb,[-1]:Lb,[32]:Lb},TSe={[35]:Dwe,[42]:a5,[45]:[dM,a5],[60]:Mwe,[61]:dM,[95]:a5,[96]:cM,[126]:cM},kSe={[38]:EK,[92]:SK},_Se={[-5]:Nb,[-4]:Nb,[-3]:Nb,[33]:Zwe,[38]:EK,[42]:Sw,[60]:[twe,zwe],[91]:eSe,[92]:[Awe,SK],[93]:ck,[95]:Sw,[96]:pwe},ASe={null:[Sw,mSe]},$Se={null:[42,95]},DSe={null:[]},OSe=Object.freeze(Object.defineProperty({__proto__:null,document:wSe,contentInitial:SSe,flowInitial:ESe,flow:TSe,string:kSe,text:_Se,insideSpan:ASe,attentionMarkers:$Se,disable:DSe},Symbol.toStringTag,{value:"Module"}));function PSe(e){const n=CK([OSe,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(GCe),document:i(QCe),flow:i(hSe),string:i(gSe),text:i(vSe)};return r;function i(o){return s;function s(a){return bSe(r,o,a)}}}const fM=/[\0\t\n\r]/g;function RSe(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const c=[];let u,d,f,h,p;for(o=t+o.toString(s),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(fM.lastIndex=f,u=fM.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(f);break}if(p===10&&f===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<h&&(c.push(o.slice(f,h)),e+=h-f),p){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}function MSe(e){for(;!TK(e););return e}function OK(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}const ISe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PK(e){return e.replace(ISe,LSe)}function LSe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return OK(n.slice(o?2:1),o?16:10)}return lk(n)||e}const RK={}.hasOwnProperty,NSe=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FSe(n)(MSe(PSe(n).document().write(RSe()(e,t,!0))))};function FSe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(We),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(Pe),blockQuote:a(fe),characterEscape:L,characterReference:L,codeFenced:a(we),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(we,c),codeText:a(Le,c),codeTextData:L,data:L,codeFlowValue:L,definition:a(He),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Ge),hardBreakEscape:a(rt),hardBreakTrailing:a(rt),htmlFlow:a(ft,c),htmlFlowData:L,htmlText:a(ft,c),htmlTextData:L,image:a(vt),label:c,link:a(We),listItem:a(Vt),listItemValue:m,listOrdered:a(De,p),listUnordered:a(De),paragraph:a(bn),reference:Se,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Pe),strong:a($r),thematicBreak:a(Xs)},exit:{atxHeading:d(),atxHeadingSequence:k,autolink:d(),autolinkEmail:J,autolinkProtocol:$e,blockQuote:d(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:_e,codeFenced:d(C),codeFencedFence:x,codeFencedFenceInfo:v,codeFencedFenceMeta:b,codeFlowValue:N,codeIndented:d(w),codeText:d(oe),codeTextData:N,data:N,definition:d(),definitionDestinationString:E,definitionLabelString:S,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(G),hardBreakTrailing:d(G),htmlFlow:d(X),htmlFlowData:N,htmlText:d(re),htmlTextData:N,image:d(H),label:se,labelText:R,lineEnding:j,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:pe,resourceDestinationString:ee,resourceTitleString:I,resource:me,setextHeading:d(D),setextHeadingLineSequence:O,setextHeadingText:_,strong:d(),thematicBreak:d()}};MK(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(K){let V={type:"root",children:[]};const le={stack:[V],tokenStack:[],config:t,enter:u,exit:f,buffer:c,resume:h,setData:o,getData:s},ge=[];let qe=-1;for(;++qe<K.length;)if(K[qe][1].type==="listOrdered"||K[qe][1].type==="listUnordered")if(K[qe][0]==="enter")ge.push(qe);else{const xt=ge.pop();qe=i(K,xt,qe)}for(qe=-1;++qe<K.length;){const xt=t[K[qe][0]];RK.call(xt,K[qe][1].type)&&xt[K[qe][1].type].call(Object.assign({sliceSerialize:K[qe][2].sliceSerialize},le),K[qe][1])}if(le.tokenStack.length>0){const xt=le.tokenStack[le.tokenStack.length-1];(xt[1]||hM).call(le,void 0,xt[0])}for(V.position={start:tc(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:tc(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)V=t.transforms[qe](V)||V;return V}function i(K,V,le){let ge=V-1,qe=-1,xt=!1,Mt,B,ne,xe;for(;++ge<=le;){const be=K[ge];if(be[1].type==="listUnordered"||be[1].type==="listOrdered"||be[1].type==="blockQuote"?(be[0]==="enter"?qe++:qe--,xe=void 0):be[1].type==="lineEndingBlank"?be[0]==="enter"&&(Mt&&!xe&&!qe&&!ne&&(ne=ge),xe=void 0):be[1].type==="linePrefix"||be[1].type==="listItemValue"||be[1].type==="listItemMarker"||be[1].type==="listItemPrefix"||be[1].type==="listItemPrefixWhitespace"||(xe=void 0),!qe&&be[0]==="enter"&&be[1].type==="listItemPrefix"||qe===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(Mt){let ke=ge;for(B=void 0;ke--;){const lt=K[ke];if(lt[1].type==="lineEnding"||lt[1].type==="lineEndingBlank"){if(lt[0]==="exit")continue;B&&(K[B][1].type="lineEndingBlank",xt=!0),lt[1].type="lineEnding",B=ke}else if(!(lt[1].type==="linePrefix"||lt[1].type==="blockQuotePrefix"||lt[1].type==="blockQuotePrefixWhitespace"||lt[1].type==="blockQuoteMarker"||lt[1].type==="listItemIndent"))break}ne&&(!B||ne<B)&&(Mt._spread=!0),Mt.end=Object.assign({},B?K[B][1].start:be[1].end),K.splice(B||ge,0,["exit",Mt,be[2]]),ge++,le++}be[1].type==="listItemPrefix"&&(Mt={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0},K.splice(ge,0,["enter",Mt,be[2]]),ge++,le++,ne=void 0,xe=!0)}}return K[V][1]._spread=xt,le}function o(K,V){n[K]=V}function s(K){return n[K]}function a(K,V){return le;function le(ge){u.call(this,K(ge),ge),V&&V.call(this,ge)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(K,V,le){return this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([V,le]),K.position={start:tc(V.start)},K}function d(K){return V;function V(le){K&&K.call(this,le),f.call(this,le)}}function f(K,V){const le=this.stack.pop(),ge=this.tokenStack.pop();if(ge)ge[0].type!==K.type&&(V?V.call(this,K,ge[0]):(ge[1]||hM).call(this,K,ge[0]));else throw new Error("Cannot close `"+K.type+"` ("+c0({start:K.start,end:K.end})+"): it\u2019s not open");return le.position.end=tc(K.end),le}function h(){return HCe(this.stack.pop())}function p(){o("expectingFirstListItemValue",!0)}function m(K){if(s("expectingFirstListItemValue")){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(K),10),o("expectingFirstListItemValue")}}function v(){const K=this.resume(),V=this.stack[this.stack.length-1];V.lang=K}function b(){const K=this.resume(),V=this.stack[this.stack.length-1];V.meta=K}function x(){s("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function C(){const K=this.resume(),V=this.stack[this.stack.length-1];V.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function w(){const K=this.resume(),V=this.stack[this.stack.length-1];V.value=K.replace(/(\r?\n|\r)$/g,"")}function S(K){const V=this.resume(),le=this.stack[this.stack.length-1];le.label=V,le.identifier=Vs(this.sliceSerialize(K)).toLowerCase()}function T(){const K=this.resume(),V=this.stack[this.stack.length-1];V.title=K}function E(){const K=this.resume(),V=this.stack[this.stack.length-1];V.url=K}function k(K){const V=this.stack[this.stack.length-1];if(!V.depth){const le=this.sliceSerialize(K).length;V.depth=le}}function _(){o("setextHeadingSlurpLineEnding",!0)}function O(K){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(K).charCodeAt(0)===61?1:2}function D(){o("setextHeadingSlurpLineEnding")}function L(K){const V=this.stack[this.stack.length-1];let le=V.children[V.children.length-1];(!le||le.type!=="text")&&(le=Lo(),le.position={start:tc(K.start)},V.children.push(le)),this.stack.push(le)}function N(K){const V=this.stack.pop();V.value+=this.sliceSerialize(K),V.position.end=tc(K.end)}function j(K){const V=this.stack[this.stack.length-1];if(s("atHardBreak")){const le=V.children[V.children.length-1];le.position.end=tc(K.end),o("atHardBreak");return}!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(V.type)&&(L.call(this,K),N.call(this,K))}function G(){o("atHardBreak",!0)}function X(){const K=this.resume(),V=this.stack[this.stack.length-1];V.value=K}function re(){const K=this.resume(),V=this.stack[this.stack.length-1];V.value=K}function oe(){const K=this.resume(),V=this.stack[this.stack.length-1];V.value=K}function U(){const K=this.stack[this.stack.length-1];if(s("inReference")){const V=s("referenceType")||"shortcut";K.type+="Reference",K.referenceType=V,delete K.url,delete K.title}else delete K.identifier,delete K.label;o("referenceType")}function H(){const K=this.stack[this.stack.length-1];if(s("inReference")){const V=s("referenceType")||"shortcut";K.type+="Reference",K.referenceType=V,delete K.url,delete K.title}else delete K.identifier,delete K.label;o("referenceType")}function R(K){const V=this.sliceSerialize(K),le=this.stack[this.stack.length-2];le.label=PK(V),le.identifier=Vs(V).toLowerCase()}function se(){const K=this.stack[this.stack.length-1],V=this.resume(),le=this.stack[this.stack.length-1];if(o("inReference",!0),le.type==="link"){const ge=K.children;le.children=ge}else le.alt=V}function ee(){const K=this.resume(),V=this.stack[this.stack.length-1];V.url=K}function I(){const K=this.resume(),V=this.stack[this.stack.length-1];V.title=K}function me(){o("inReference")}function Se(){o("referenceType","collapsed")}function pe(K){const V=this.resume(),le=this.stack[this.stack.length-1];le.label=V,le.identifier=Vs(this.sliceSerialize(K)).toLowerCase(),o("referenceType","full")}function ye(K){o("characterReferenceType",K.type)}function _e(K){const V=this.sliceSerialize(K),le=s("characterReferenceType");let ge;le?(ge=OK(V,le==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):ge=lk(V);const qe=this.stack.pop();qe.value+=ge,qe.position.end=tc(K.end)}function $e(K){N.call(this,K);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(K)}function J(K){N.call(this,K);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(K)}function fe(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Le(){return{type:"inlineCode",value:""}}function He(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ge(){return{type:"emphasis",children:[]}}function Pe(){return{type:"heading",depth:void 0,children:[]}}function rt(){return{type:"break"}}function ft(){return{type:"html",value:""}}function vt(){return{type:"image",title:null,url:"",alt:null}}function We(){return{type:"link",title:null,url:"",children:[]}}function De(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function Vt(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function bn(){return{type:"paragraph",children:[]}}function $r(){return{type:"strong",children:[]}}function Lo(){return{type:"text",value:""}}function Xs(){return{type:"thematicBreak"}}}function tc(e){return{line:e.line,column:e.column,offset:e.offset}}function MK(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?MK(e,r):BSe(e,r)}}function BSe(e,t){let n;for(n in t)if(RK.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function hM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+c0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+c0({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+c0({start:t.start,end:t.end})+") is still open")}function HSe(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return NSe(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function zSe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function USe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function VSe(e,t){const n=t.value?t.value+`
`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function jSe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WSe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ph(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&vi(e.charCodeAt(n+1))&&vi(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function IK(e,t){const n=String(t.identifier).toUpperCase(),r=Ph(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const s=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)}function qSe(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},IK(e,{type:"footnoteReference",identifier:i,position:t.position})}function KSe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GSe(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function LK(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function YSe(e,t){const n=e.definition(t.identifier);if(!n)return LK(e,t);const r={src:Ph(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function QSe(e,t){const n={src:Ph(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function XSe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZSe(e,t){const n=e.definition(t.identifier);if(!n)return LK(e,t);const r={href:Ph(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function JSe(e,t){const n={href:Ph(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eEe(e,t,n){const r=e.all(t),i=n?tEe(n):NK(t),o={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const d=r[a];(i||a!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function tEe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=NK(n[r])}return t}function NK(e){const t=e.spread;return t==null?e.children.length>1:t}function nEe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function rEe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iEe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function oEe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yg=FK("start"),U6=FK("end");function sEe(e){return{start:yg(e),end:U6(e)}}function FK(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function aEe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=yg(t.children[1]),c=U6(t.children[t.children.length-1]);a.line&&c.line&&(s.position={start:a,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function lEe(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<a;){const f=t.children[c],h={},p=s?s[c]:void 0;p&&(h.align=p);let m={type:"element",tagName:o,properties:h,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(t,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function cEe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const pM=9,mM=32;function uEe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(gM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(gM(t.slice(i),i>0,!1)),o.join("")}function gM(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===pM||o===mM;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===pM||o===mM;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dEe(e,t){const n={type:"text",value:uEe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fEe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hEe={blockquote:zSe,break:USe,code:VSe,delete:jSe,emphasis:WSe,footnoteReference:IK,footnote:qSe,heading:KSe,html:GSe,imageReference:YSe,image:QSe,inlineCode:XSe,linkReference:ZSe,link:JSe,listItem:eEe,list:nEe,paragraph:rEe,root:iEe,strong:oEe,table:aEe,tableCell:cEe,tableRow:lEe,text:dEe,thematicBreak:fEe,toml:M2,yaml:M2,definition:M2,footnoteDefinition:M2};function M2(){return null}const uk=function(e){if(e==null)return vEe;if(typeof e=="string")return gEe(e);if(typeof e=="object")return Array.isArray(e)?pEe(e):mEe(e);if(typeof e=="function")return V6(e);throw new Error("Expected function, string, or object as test")};function pEe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=uk(e[n]);return V6(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function mEe(e){return V6(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function gEe(e){return V6(t);function t(n){return n&&n.type===e}}function V6(e){return t;function t(n,...r){return Boolean(n&&typeof n=="object"&&"type"in n&&Boolean(e.call(this,n,...r)))}}function vEe(){return!0}const yEe=!0,Ew=!1,d0="skip",BK=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const i=uk(t),o=r?-1:1;s(e,void 0,[])();function s(a,c,u){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=[],p,m,v;if((!t||i(a,c,u[u.length-1]||null))&&(h=bEe(n(a,u)),h[0]===Ew))return h;if(a.children&&h[0]!==d0)for(m=(r?a.children.length:-1)+o,v=u.concat(a);m>-1&&m<a.children.length;){if(p=s(a.children[m],m,v)(),p[0]===Ew)return p;m=typeof p[1]=="number"?p[1]:m+o}return h}}};function bEe(e){return Array.isArray(e)?e:typeof e=="number"?[yEe,e]:[e]}const ds=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),BK(e,t,i,r);function i(o,s){const a=s[s.length-1];return n(o,a?a.children.indexOf(o):null,a)}};function xEe(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const vM={}.hasOwnProperty;function CEe(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return ds(e,"definition",r=>{const i=yM(r.identifier);i&&!vM.call(t,i)&&(t[i]=r)}),n;function n(r){const i=yM(r);return i&&vM.call(t,i)?t[i]:null}}function yM(e){return String(e||"").toUpperCase()}const ov={}.hasOwnProperty;function wEe(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...hEe,...n.handlers},s.definition=CEe(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.patch=SEe,s.applyData=EEe,s.one=a,s.all=c,s.wrap=kEe,s.augment=o,ds(e,"footnoteDefinition",u=>{const d=String(u.identifier).toUpperCase();ov.call(i,d)||(i[d]=u)}),s;function o(u,d){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(d.type!=="element"&&(d={type:"element",tagName:"",properties:{},children:[]}),d.tagName=f.hName),d.type==="element"&&f.hProperties&&(d.properties={...d.properties,...f.hProperties}),"children"in d&&d.children&&f.hChildren&&(d.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};xEe(f)||(d.position={start:yg(f),end:U6(f)})}return d}function s(u,d,f,h){return Array.isArray(f)&&(h=f,f={}),o(u,{type:"element",tagName:d,properties:f||{},children:h||[]})}function a(u,d){return HK(s,u,d)}function c(u){return dk(s,u)}}function SEe(e,t){e.position&&(t.position=sEe(e))}function EEe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function HK(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return ov.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:dk(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):TEe(e,t)}function dk(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=HK(e,r[i],t);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const s=o.children[0];s&&s.type==="text"&&(s.value=s.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function TEe(e,t){const n=t.data||{},r="value"in t&&!(ov.call(n,"hProperties")||ov.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:dk(e,t)};return e.patch(t,r),e.applyData(t,r)}function kEe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function _Ee(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const i=e.all(r),o=String(r.identifier).toUpperCase(),s=Ph(o.toLowerCase());let a=0;const c=[];for(;++a<=e.footnoteCounts[o];){const f={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};a>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(f)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const f=u.children[u.children.length-1];f&&f.type==="text"?f.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...c)}else i.push(...c);const d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(i,!0)};e.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
`}]}}function zK(e,t){const n=wEe(e,t),r=n.one(e,null),i=_Ee(n);return i&&r.children.push({type:"text",value:`
`},i),Array.isArray(r)?{type:"root",children:r}:r}const AEe=function(e,t){return e&&"run"in e?DEe(e,t):OEe(e||t)},$Ee=AEe;function DEe(e,t){return(n,r,i)=>{e.run(zK(n,t),r,o=>{i(o)})}}function OEe(e){return t=>zK(t,e)}class bg{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}bg.prototype.property={};bg.prototype.normal={};bg.prototype.space=null;function UK(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new bg(n,r,t)}function km(e){return e.toLowerCase()}class xs{constructor(t,n){this.property=t,this.attribute=n}}xs.prototype.space=null;xs.prototype.boolean=!1;xs.prototype.booleanish=!1;xs.prototype.overloadedBoolean=!1;xs.prototype.number=!1;xs.prototype.commaSeparated=!1;xs.prototype.spaceSeparated=!1;xs.prototype.commaOrSpaceSeparated=!1;xs.prototype.mustUseProperty=!1;xs.prototype.defined=!1;let PEe=0;const Lt=e1(),hr=e1(),VK=e1(),Me=e1(),Rn=e1(),Sf=e1(),ho=e1();function e1(){return 2**++PEe}const Tw=Object.freeze(Object.defineProperty({__proto__:null,boolean:Lt,booleanish:hr,overloadedBoolean:VK,number:Me,spaceSeparated:Rn,commaSeparated:Sf,commaOrSpaceSeparated:ho},Symbol.toStringTag,{value:"Module"})),Fb=Object.keys(Tw);class fk extends xs{constructor(t,n,r,i){let o=-1;if(super(t,n),bM(this,"space",i),typeof r=="number")for(;++o<Fb.length;){const s=Fb[o];bM(this,Fb[o],(r&Tw[s])===Tw[s])}}}fk.prototype.defined=!0;function bM(e,t,n){n&&(e[t]=n)}const REe={}.hasOwnProperty;function Rh(e){const t={},n={};let r;for(r in e.properties)if(REe.call(e.properties,r)){const i=e.properties[r],o=new fk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[km(r)]=r,n[km(o.attribute)]=r}return new bg(t,n,e.space)}const jK=Rh({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),WK=Rh({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function qK(e,t){return t in e?e[t]:t}function KK(e,t){return qK(e,t.toLowerCase())}const GK=Rh({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:KK,properties:{xmlns:null,xmlnsXLink:null}}),YK=Rh({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:hr,ariaAutoComplete:null,ariaBusy:hr,ariaChecked:hr,ariaColCount:Me,ariaColIndex:Me,ariaColSpan:Me,ariaControls:Rn,ariaCurrent:null,ariaDescribedBy:Rn,ariaDetails:null,ariaDisabled:hr,ariaDropEffect:Rn,ariaErrorMessage:null,ariaExpanded:hr,ariaFlowTo:Rn,ariaGrabbed:hr,ariaHasPopup:null,ariaHidden:hr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Rn,ariaLevel:Me,ariaLive:null,ariaModal:hr,ariaMultiLine:hr,ariaMultiSelectable:hr,ariaOrientation:null,ariaOwns:Rn,ariaPlaceholder:null,ariaPosInSet:Me,ariaPressed:hr,ariaReadOnly:hr,ariaRelevant:null,ariaRequired:hr,ariaRoleDescription:Rn,ariaRowCount:Me,ariaRowIndex:Me,ariaRowSpan:Me,ariaSelected:hr,ariaSetSize:Me,ariaSort:null,ariaValueMax:Me,ariaValueMin:Me,ariaValueNow:Me,ariaValueText:null,role:null}}),MEe=Rh({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:KK,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sf,acceptCharset:Rn,accessKey:Rn,action:null,allow:null,allowFullScreen:Lt,allowPaymentRequest:Lt,allowUserMedia:Lt,alt:null,as:null,async:Lt,autoCapitalize:null,autoComplete:Rn,autoFocus:Lt,autoPlay:Lt,blocking:Rn,capture:Lt,charSet:null,checked:Lt,cite:null,className:Rn,cols:Me,colSpan:null,content:null,contentEditable:hr,controls:Lt,controlsList:Rn,coords:Me|Sf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Lt,defer:Lt,dir:null,dirName:null,disabled:Lt,download:VK,draggable:hr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Lt,formTarget:null,headers:Rn,height:Me,hidden:Lt,high:Me,href:null,hrefLang:null,htmlFor:Rn,httpEquiv:Rn,id:null,imageSizes:null,imageSrcSet:null,inert:Lt,inputMode:null,integrity:null,is:null,isMap:Lt,itemId:null,itemProp:Rn,itemRef:Rn,itemScope:Lt,itemType:Rn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Lt,low:Me,manifest:null,max:null,maxLength:Me,media:null,method:null,min:null,minLength:Me,multiple:Lt,muted:Lt,name:null,nonce:null,noModule:Lt,noValidate:Lt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Lt,optimum:Me,pattern:null,ping:Rn,placeholder:null,playsInline:Lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Lt,referrerPolicy:null,rel:Rn,required:Lt,reversed:Lt,rows:Me,rowSpan:Me,sandbox:Rn,scope:null,scoped:Lt,seamless:Lt,selected:Lt,shadowRootDelegatesFocus:Lt,shadowRootMode:null,shape:null,size:Me,sizes:null,slot:null,span:Me,spellCheck:hr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Me,step:null,style:null,tabIndex:Me,target:null,title:null,translate:null,type:null,typeMustMatch:Lt,useMap:null,value:hr,width:Me,wrap:null,align:null,aLink:null,archive:Rn,axis:null,background:null,bgColor:null,border:Me,borderColor:null,bottomMargin:Me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Lt,declare:Lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Me,leftMargin:Me,link:null,longDesc:null,lowSrc:null,marginHeight:Me,marginWidth:Me,noResize:Lt,noHref:Lt,noShade:Lt,noWrap:Lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Me,rules:null,scheme:null,scrolling:hr,standby:null,summary:null,text:null,topMargin:Me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Lt,disableRemotePlayback:Lt,prefix:null,property:null,results:Me,security:null,unselectable:null}}),IEe=Rh({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:qK,properties:{about:ho,accentHeight:Me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Me,amplitude:Me,arabicForm:null,ascent:Me,attributeName:null,attributeType:null,azimuth:Me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Me,by:null,calcMode:null,capHeight:Me,className:Rn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Me,diffuseConstant:Me,direction:null,display:null,dur:null,divisor:Me,dominantBaseline:null,download:Lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Me,enableBackground:null,end:null,event:null,exponent:Me,externalResourcesRequired:null,fill:null,fillOpacity:Me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Sf,g2:Sf,glyphName:Sf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Me,horizOriginX:Me,horizOriginY:Me,id:null,ideographic:Me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Me,k:Me,k1:Me,k2:Me,k3:Me,k4:Me,kernelMatrix:ho,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Me,overlineThickness:Me,paintOrder:null,panose1:null,path:null,pathLength:Me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Rn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Me,pointsAtY:Me,pointsAtZ:Me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ho,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ho,rev:ho,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ho,requiredFeatures:ho,requiredFonts:ho,requiredFormats:ho,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Me,specularExponent:Me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Me,strikethroughThickness:Me,string:null,stroke:null,strokeDashArray:ho,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Me,strokeOpacity:Me,strokeWidth:null,style:null,surfaceScale:Me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ho,tabIndex:Me,tableValues:null,target:null,targetX:Me,targetY:Me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ho,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Me,underlineThickness:Me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Me,values:null,vAlphabetic:Me,vMathematical:Me,vectorEffect:null,vHanging:Me,vIdeographic:Me,version:null,vertAdvY:Me,vertOriginX:Me,vertOriginY:Me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),LEe=/^data[-\w.:]+$/i,xM=/-[a-z]/g,NEe=/[A-Z]/g;function xg(e,t){const n=km(t);let r=t,i=xs;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&LEe.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(xM,BEe);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!xM.test(o)){let s=o.replace(NEe,FEe);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=fk}return new i(r,t)}function FEe(e){return"-"+e.toLowerCase()}function BEe(e){return e.charAt(1).toUpperCase()}const CM={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Mh=UK([WK,jK,GK,YK,MEe],"html"),Tu=UK([WK,jK,GK,YK,IEe],"svg");function HEe(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{ds(t,"element",(n,r,i)=>{const o=i;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,o)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var QK={exports:{}},yn={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hk=Symbol.for("react.element"),pk=Symbol.for("react.portal"),j6=Symbol.for("react.fragment"),W6=Symbol.for("react.strict_mode"),q6=Symbol.for("react.profiler"),K6=Symbol.for("react.provider"),G6=Symbol.for("react.context"),zEe=Symbol.for("react.server_context"),Y6=Symbol.for("react.forward_ref"),Q6=Symbol.for("react.suspense"),X6=Symbol.for("react.suspense_list"),Z6=Symbol.for("react.memo"),J6=Symbol.for("react.lazy"),UEe=Symbol.for("react.offscreen"),XK;XK=Symbol.for("react.module.reference");function Cs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hk:switch(e=e.type,e){case j6:case q6:case W6:case Q6:case X6:return e;default:switch(e=e&&e.$$typeof,e){case zEe:case G6:case Y6:case J6:case Z6:case K6:return e;default:return t}}case pk:return t}}}yn.ContextConsumer=G6;yn.ContextProvider=K6;yn.Element=hk;yn.ForwardRef=Y6;yn.Fragment=j6;yn.Lazy=J6;yn.Memo=Z6;yn.Portal=pk;yn.Profiler=q6;yn.StrictMode=W6;yn.Suspense=Q6;yn.SuspenseList=X6;yn.isAsyncMode=function(){return!1};yn.isConcurrentMode=function(){return!1};yn.isContextConsumer=function(e){return Cs(e)===G6};yn.isContextProvider=function(e){return Cs(e)===K6};yn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hk};yn.isForwardRef=function(e){return Cs(e)===Y6};yn.isFragment=function(e){return Cs(e)===j6};yn.isLazy=function(e){return Cs(e)===J6};yn.isMemo=function(e){return Cs(e)===Z6};yn.isPortal=function(e){return Cs(e)===pk};yn.isProfiler=function(e){return Cs(e)===q6};yn.isStrictMode=function(e){return Cs(e)===W6};yn.isSuspense=function(e){return Cs(e)===Q6};yn.isSuspenseList=function(e){return Cs(e)===X6};yn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===j6||e===q6||e===W6||e===Q6||e===X6||e===UEe||typeof e=="object"&&e!==null&&(e.$$typeof===J6||e.$$typeof===Z6||e.$$typeof===K6||e.$$typeof===G6||e.$$typeof===Y6||e.$$typeof===XK||e.getModuleId!==void 0)};yn.typeOf=Cs;(function(e){e.exports=yn})(QK);const VEe=Nm(QK.exports);function ZK(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function wM(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function mk(e){return e.join(" ").trim()}function kw(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const s=n.slice(i,r).trim();(s||!o)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function gk(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var vk={exports:{}},SM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,jEe=/\n/g,WEe=/^\s*/,qEe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,KEe=/^:\s*/,GEe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,YEe=/^[;\s]*/,QEe=/^\s+|\s+$/g,XEe=`
`,EM="/",TM="*",Gu="",ZEe="comment",JEe="declaration",eTe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var v=m.match(jEe);v&&(n+=v.length);var b=m.lastIndexOf(XEe);r=~b?m.length-b:r+m.length}function o(){var m={line:n,column:r};return function(v){return v.position=new s(m),u(),v}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(m){var v=new Error(t.source+":"+n+":"+r+": "+m);if(v.reason=m,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function c(m){var v=m.exec(e);if(!!v){var b=v[0];return i(b),e=e.slice(b.length),v}}function u(){c(WEe)}function d(m){var v;for(m=m||[];v=f();)v!==!1&&m.push(v);return m}function f(){var m=o();if(!(EM!=e.charAt(0)||TM!=e.charAt(1))){for(var v=2;Gu!=e.charAt(v)&&(TM!=e.charAt(v)||EM!=e.charAt(v+1));)++v;if(v+=2,Gu===e.charAt(v-1))return a("End of comment missing");var b=e.slice(2,v-2);return r+=2,i(b),e=e.slice(v),r+=2,m({type:ZEe,comment:b})}}function h(){var m=o(),v=c(qEe);if(!!v){if(f(),!c(KEe))return a("property missing ':'");var b=c(GEe),x=m({type:JEe,property:kM(v[0].replace(SM,Gu)),value:b?kM(b[0].replace(SM,Gu)):Gu});return c(YEe),x}}function p(){var m=[];d(m);for(var v;v=h();)v!==!1&&(m.push(v),d(m));return m}return u(),p()};function kM(e){return e?e.replace(QEe,Gu):Gu}var tTe=eTe;function JK(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=tTe(e),o=typeof t=="function",s,a,c=0,u=i.length;c<u;c++)r=i[c],s=r.property,a=r.value,o?t(s,a,r):a&&(n||(n={}),n[s]=a);return n}vk.exports=JK;vk.exports.default=JK;const nTe=vk.exports,_w={}.hasOwnProperty,rTe=new Set(["table","thead","tbody","tfoot","tr"]);function eG(e,t){const n=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?n.push(iTe(e,i,r,t)):i.type==="text"?(t.type!=="element"||!rTe.has(t.tagName)||!ZK(i))&&n.push(i.value):i.type==="raw"&&!e.options.skipHtml&&n.push(i.value);return n}function iTe(e,t,n,r){const i=e.options,o=i.transformLinkUri===void 0?CCe:i.transformLinkUri,s=e.schema,a=t.tagName,c={};let u=s,d;if(s.space==="html"&&a==="svg"&&(u=Tu,e.schema=u),t.properties)for(d in t.properties)_w.call(t.properties,d)&&sTe(c,d,t.properties[d],e);(a==="ol"||a==="ul")&&e.listDepth++;const f=eG(e,t);(a==="ol"||a==="ul")&&e.listDepth--,e.schema=s;const h=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&_w.call(i.components,a)?i.components[a]:a,m=typeof p=="string"||p===Ae.Fragment;if(!VEe.isValidElementType(p))throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`);if(c.key=n,a==="a"&&i.linkTarget&&(c.target=typeof i.linkTarget=="function"?i.linkTarget(String(c.href||""),t.children,typeof c.title=="string"?c.title:null):i.linkTarget),a==="a"&&o&&(c.href=o(String(c.href||""),t.children,typeof c.title=="string"?c.title:null)),!m&&a==="code"&&r.type==="element"&&r.tagName!=="pre"&&(c.inline=!0),!m&&(a==="h1"||a==="h2"||a==="h3"||a==="h4"||a==="h5"||a==="h6")&&(c.level=Number.parseInt(a.charAt(1),10)),a==="img"&&i.transformImageUri&&(c.src=i.transformImageUri(String(c.src||""),String(c.alt||""),typeof c.title=="string"?c.title:null)),!m&&a==="li"&&r.type==="element"){const v=oTe(t);c.checked=v&&v.properties?Boolean(v.properties.checked):null,c.index=Bb(r,t),c.ordered=r.tagName==="ol"}return!m&&(a==="ol"||a==="ul")&&(c.ordered=a==="ol",c.depth=e.listDepth),(a==="td"||a==="th")&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),m||(c.isHeader=a==="th")),!m&&a==="tr"&&r.type==="element"&&(c.isHeader=Boolean(r.tagName==="thead")),i.sourcePos&&(c["data-sourcepos"]=cTe(h)),!m&&i.rawSourcePos&&(c.sourcePosition=t.position),!m&&i.includeElementIndex&&(c.index=Bb(r,t),c.siblingCount=Bb(r)),m||(c.node=t),f.length>0?Ae.createElement(p,c,f):Ae.createElement(p,c)}function oTe(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function Bb(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function sTe(e,t,n,r){const i=xg(r.schema,t);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?gk(o):mk(o)),i.property==="style"&&typeof o=="string"&&(o=aTe(o)),i.space&&i.property?e[_w.call(CM,i.property)?CM[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function aTe(e){const t={};try{nTe(e,n)}catch{}return t;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[o.replace(/-([a-z])/g,lTe)]=i}}function lTe(e,t){return t.toUpperCase()}function cTe(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const _M={}.hasOwnProperty,uTe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",I2={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function e9(e){for(const o in I2)if(_M.call(I2,o)&&_M.call(e,o)){const s=I2[o];console.warn(`[react-markdown] Warning: please ${s.to?`use \`${s.to}\` instead of`:"remove"} \`${o}\` (see <${uTe}#${s.id}> for more info)`),delete I2[o]}const t=ICe().use(HSe).use(e.remarkPlugins||[]).use($Ee,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(HEe,e),n=new gK;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=l(z,{children:eG({options:e,schema:Mh,listDepth:0},r)});return e.className&&(i=l("div",{className:e.className,children:i})),i}e9.propTypes={children:ze.exports.string,className:ze.exports.string,allowElement:ze.exports.func,allowedElements:ze.exports.arrayOf(ze.exports.string),disallowedElements:ze.exports.arrayOf(ze.exports.string),unwrapDisallowed:ze.exports.bool,remarkPlugins:ze.exports.arrayOf(ze.exports.oneOfType([ze.exports.object,ze.exports.func,ze.exports.arrayOf(ze.exports.oneOfType([ze.exports.bool,ze.exports.string,ze.exports.object,ze.exports.func,ze.exports.arrayOf(ze.exports.any)]))])),rehypePlugins:ze.exports.arrayOf(ze.exports.oneOfType([ze.exports.object,ze.exports.func,ze.exports.arrayOf(ze.exports.oneOfType([ze.exports.bool,ze.exports.string,ze.exports.object,ze.exports.func,ze.exports.arrayOf(ze.exports.any)]))])),sourcePos:ze.exports.bool,rawSourcePos:ze.exports.bool,skipHtml:ze.exports.bool,includeElementIndex:ze.exports.bool,transformLinkUri:ze.exports.oneOfType([ze.exports.func,ze.exports.bool]),linkTarget:ze.exports.oneOfType([ze.exports.func,ze.exports.string]),transformImageUri:ze.exports.func,components:ze.exports.object};const dTe={tokenize:vTe,partial:!0},tG={tokenize:yTe,partial:!0},nG={tokenize:bTe,partial:!0},rG={tokenize:xTe,partial:!0},fTe={tokenize:CTe,partial:!0},iG={tokenize:mTe,previous:sG},oG={tokenize:gTe,previous:aG},Yl={tokenize:pTe,previous:lG},Ka={},hTe={text:Ka};let Ou=48;for(;Ou<123;)Ka[Ou]=Yl,Ou++,Ou===58?Ou=65:Ou===91&&(Ou=97);Ka[43]=Yl;Ka[45]=Yl;Ka[46]=Yl;Ka[95]=Yl;Ka[72]=[Yl,oG];Ka[104]=[Yl,oG];Ka[87]=[Yl,iG];Ka[119]=[Yl,iG];function pTe(e,t,n){const r=this;let i,o;return s;function s(f){return!Aw(f)||!lG.call(r,r.previous)||yk(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(f))}function a(f){return Aw(f)?(e.consume(f),a):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(fTe,d,u)(f):f===45||f===95||vi(f)?(o=!0,e.consume(f),c):d(f)}function u(f){return e.consume(f),i=!0,c}function d(f){return o&&i&&Di(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function mTe(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!sG.call(r,r.previous)||yk(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dTe,e.attempt(tG,e.attempt(nG,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function gTe(e,t,n){const r=this;let i="",o=!1;return s;function s(f){return(f===72||f===104)&&aG.call(r,r.previous)&&!yk(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),a):n(f)}function a(f){if(Di(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),a;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),o?u:(o=!0,c)):n(f)}function u(f){return f===null||rv(f)||An(f)||Bd(f)||H6(f)?n(f):e.attempt(tG,e.attempt(nG,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function vTe(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function yTe(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(rG,c,a)(u):u===null||An(u)||Bd(u)||u!==45&&H6(u)?c(u):(o=!0,e.consume(u),s)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function c(u){return i||r||!o?n(u):t(u)}}function bTe(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(rG,t,o)(s):s===null||An(s)||Bd(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function xTe(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||An(a)||Bd(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||An(a)||Bd(a)?t(a):r(a)}function o(a){return Di(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):Di(a)?(e.consume(a),s):n(a)}}function CTe(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return vi(o)?n(o):t(o)}}function sG(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||An(e)}function aG(e){return!Di(e)}function lG(e){return!(e===47||Aw(e))}function Aw(e){return e===43||e===45||e===46||e===95||vi(e)}function yk(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const wTe={tokenize:DTe,partial:!0};function STe(){return{document:{[91]:{tokenize:_Te,continuation:{tokenize:ATe},exit:$Te}},text:{[91]:{tokenize:kTe},[93]:{add:"after",tokenize:ETe,resolveTo:TTe}}}}function ETe(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!s||!s._balanced)return n(c);const u=Vs(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function TTe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function kTe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!s||f===null||f===91||An(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Vs(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return An(f)||(s=!0),o++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function _Te(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(s>999||m===93&&!a||m===null||m===91||An(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Vs(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return An(m)||(a=!0),s++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),rn(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function ATe(e,t,n){return e.check(vg,t,e.attempt(wTe,t,n))}function $Te(e){e.exit("gfmFootnoteDefinition")}function DTe(e,t,n){const r=this;return rn(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function OTe(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{[126]:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let u=c;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[c][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[c][1].end)},f={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[c][1].start)},h=[["enter",d,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",f,a]],p=a.parser.constructs.insideSpan.null;p&&ko(h,h.length,0,z6(p,s.slice(u+1,c),a)),ko(h,h.length,0,[["exit",f,a],["enter",s[c][1],a],["exit",s[c][1],a],["exit",d,a]]),ko(s,u-1,c-u+3,h),c=u+h.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function o(s,a,c){const u=this.previous,d=this.events;let f=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const v=iv(u);if(m===126)return f>1?c(m):(s.consume(m),f++,p);if(f<2&&!n)return c(m);const b=s.exit("strikethroughSequenceTemporary"),x=iv(m);return b._open=!x||x===2&&Boolean(v),b._close=!v||v===2&&Boolean(x),a(m)}}}class PTe{constructor(){this.map=[]}add(t,n,r){RTe(this,t,n,r)}consume(t){if(this.map.sort((o,s)=>o[0]-s[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function RTe(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function MTe(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}const ITe={flow:{null:{tokenize:LTe,resolveAll:NTe}}};function LTe(e,t,n){const r=this;let i=0,o=0,s;return a;function a(D){let L=r.events.length-1;for(;L>-1;){const G=r.events[L][1].type;if(G==="lineEnding"||G==="linePrefix")L--;else break}const N=L>-1?r.events[L][1].type:null,j=N==="tableHead"||N==="tableRow"?E:c;return j===E&&r.parser.lazy[r.now().line]?n(D):j(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(s=!0,o+=1),d(D)}function d(D){return D===null?n(D):kt(D)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),p):n(D):Kt(D)?rn(e,d,"whitespace")(D):(o+=1,s&&(s=!1,i+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||An(D)?(e.exit("data"),d(D)):(e.consume(D),D===92?h:f)}function h(D){return D===92||D===124?(e.consume(D),f):f(D)}function p(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),s=!1,Kt(D)?rn(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):m(D))}function m(D){return D===45||D===58?b(D):D===124?(s=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),v):T(D)}function v(D){return Kt(D)?rn(e,b,"whitespace")(D):b(D)}function b(D){return D===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),x):D===45?(o+=1,x(D)):D===null||kt(D)?S(D):T(D)}function x(D){return D===45?(e.enter("tableDelimiterFiller"),C(D)):T(D)}function C(D){return D===45?(e.consume(D),C):D===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(D))}function w(D){return Kt(D)?rn(e,S,"whitespace")(D):S(D)}function S(D){return D===124?m(D):D===null||kt(D)?!s||i!==o?T(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):T(D)}function T(D){return n(D)}function E(D){return e.enter("tableRow"),k(D)}function k(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):D===null||kt(D)?(e.exit("tableRow"),t(D)):Kt(D)?rn(e,k,"whitespace")(D):(e.enter("data"),_(D))}function _(D){return D===null||D===124||An(D)?(e.exit("data"),k(D)):(e.consume(D),D===92?O:_)}function O(D){return D===92||D===124?(e.consume(D),_):_(D)}}function NTe(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,c=0,u,d,f;const h=new PTe;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,c!==0&&(AM(h,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=L2(h,t,o,i,void 0,f),o=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],f=L2(h,t,o,i,void 0,f)),o=s,s=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,o[1]!==0?(s[0]=s[1],f=L2(h,t,o,i,n,f)):s[1]!==0&&(f=L2(h,t,s,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&AM(h,t,c,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=MTe(t.events,n))}return e}function L2(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},_1(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=_1(t.events,n[1]);if(o={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=_1(t.events,n[2]),d=_1(t.events,n[3]),f={type:a,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,v=n[3]-n[2]-1;e.add(m,v,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},_1(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function AM(e,t,n,r,i){const o=[],s=_1(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function _1(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const FTe={tokenize:HTe},BTe={text:{[91]:FTe}};function HTe(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return An(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(c)}function a(c){return kt(c)?t(c):Kt(c)?e.check({tokenize:zTe},t,n)(c):n(c)}}function zTe(e,t,n){return rn(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function UTe(e){return CK([hTe,STe(),OTe(e),ITe,BTe])}function $M(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function VTe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const jTe={}.hasOwnProperty,cG=function(e,t,n,r){let i,o;typeof t=="string"||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});const s=uk(i.ignore||[]),a=WTe(o);let c=-1;for(;++c<a.length;)BK(e,"text",u);return e;function u(f,h){let p=-1,m;for(;++p<h.length;){const v=h[p];if(s(v,m?m.children.indexOf(v):void 0,m))return;m=v}if(m)return d(f,h)}function d(f,h){const p=h[h.length-1],m=a[c][0],v=a[c][1];let b=0;const x=p.children.indexOf(f);let C=!1,w=[];m.lastIndex=0;let S=m.exec(f.value);for(;S;){const T=S.index,E={index:S.index,input:S.input,stack:[...h,f]};let k=v(...S,E);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k!==!1&&(b!==T&&w.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(k)?w.push(...k):k&&w.push(k),b=T+S[0].length,C=!0),!m.global)break;S=m.exec(f.value)}return C?(b<f.value.length&&w.push({type:"text",value:f.value.slice(b)}),p.children.splice(x,1,...w)):w=[f],x+w.length}};function WTe(e){const t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([DM(e[n][0]),OM(e[n][1])])}else{let n;for(n in e)jTe.call(e,n)&&t.push([DM(n),OM(e[n])])}return t}function DM(e){return typeof e=="string"?new RegExp(VTe(e),"g"):e}function OM(e){return typeof e=="function"?e:()=>e}const Hb="phrasing",zb=["autolink","link","image","label"],qTe={transforms:[JTe],enter:{literalAutolink:GTe,literalAutolinkEmail:Ub,literalAutolinkHttp:Ub,literalAutolinkWww:Ub},exit:{literalAutolink:ZTe,literalAutolinkEmail:XTe,literalAutolinkHttp:YTe,literalAutolinkWww:QTe}},KTe={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hb,notInConstruct:zb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hb,notInConstruct:zb},{character:":",before:"[ps]",after:"\\/",inConstruct:Hb,notInConstruct:zb}]};function GTe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ub(e){this.config.enter.autolinkProtocol.call(this,e)}function YTe(e){this.config.exit.autolinkProtocol.call(this,e)}function QTe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function XTe(e){this.config.exit.autolinkEmail.call(this,e)}function ZTe(e){this.exit(e)}function JTe(e){cG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eke],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,tke]],{ignore:["link","linkReference"]})}function eke(e,t,n,r,i){let o="";if(!uG(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!nke(n)))return!1;const s=rke(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function tke(e,t,n,r){return!uG(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nke(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rke(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=$M(e,"(");let o=$M(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function uG(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Bd(n)||H6(n))&&(!t||n!==47)}function dG(e){return e.label||!e.identifier?e.label||"":PK(e.identifier)}function ike(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a,s.push(o.move(t.handle(c,e,t,{before:`
`,after:`
`,...o.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(oke(c,i[a+1],e,t)))}return r.pop(),s.join("")}function oke(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
`.repeat(1+o);if(o===!1)return`

<!---->

`}return`

`}const ske=/\r?\n|\r/g;function ake(e,t){const n=[];let r=0,i=0,o;for(;o=ske.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function fG(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function lke(e,t){return PM(e,t.inConstruct,!0)&&!PM(e,t.notInConstruct,!1)}function PM(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hG(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let a=-1;for(;++a<e.unsafe.length;){const d=e.unsafe[a];if(!lke(e.stack,d))continue;const f=fG(d);let h;for(;h=f.exec(r);){const p="before"in d||Boolean(d.atBreak),m="after"in d,v=h.index+(p?h[1].length:0);i.includes(v)?(s[v].before&&!p&&(s[v].before=!1),s[v].after&&!m&&(s[v].after=!1)):(i.push(v),s[v]={before:p,after:m})}}i.sort(cke);let c=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const d=i[a];d<c||d>=u||d+1<u&&i[a+1]===d+1&&s[d].after&&!s[d+1].before&&!s[d+1].after||i[a-1]===d-1&&s[d].before&&!s[d-1].before&&!s[d-1].after||(c!==d&&o.push(RM(r.slice(c,d),"\\")),c=d,/[!-/:-@[-`{-~]/.test(r.charAt(d))&&(!n.encode||!n.encode.includes(r.charAt(d)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(d).toString(16).toUpperCase()+";"),c++))}return o.push(RM(r.slice(c,u),n.after)),o.join("")}function cke(e,t){return e-t}function RM(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,a=0,c;for(;c=n.exec(o);)r.push(c.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function t9(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:c,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:r}}function a(u){r+=u}function c(u){const d=u||"",f=d.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,o=f.length===1?o+h.length:1+h.length+r,d}}pG.peek=xke;function uke(){return{enter:{gfmFootnoteDefinition:fke,gfmFootnoteDefinitionLabelString:hke,gfmFootnoteCall:gke,gfmFootnoteCallString:vke},exit:{gfmFootnoteDefinition:mke,gfmFootnoteDefinitionLabelString:pke,gfmFootnoteCall:bke,gfmFootnoteCallString:yke}}}function dke(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Cke,footnoteReference:pG}}}function fke(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hke(){this.buffer()}function pke(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Vs(this.sliceSerialize(e)).toLowerCase()}function mke(e){this.exit(e)}function gke(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vke(){this.buffer()}function yke(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Vs(this.sliceSerialize(e)).toLowerCase()}function bke(e){this.exit(e)}function pG(e,t,n,r){const i=t9(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(hG(n,dG(e),{...i.current(),before:o,after:"]"})),a(),s(),o+=i.move("]"),o}function xke(){return"["}function Cke(e,t,n,r){const i=t9(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(hG(n,dG(e),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(ake(ike(e,n,i.current()),wke)),s(),o}function wke(e,t,n){return t===0?e:(n?"":"    ")+e}function mG(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,a=n.before;r.push(-1);let c=t.createTracker(n);for(;++s<i.length;){const u=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let f=t.handle.handlers[i[s+1].type];f&&f.peek&&(f=f.peek),d=f?f(i[s+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else d=n.after;o.length>0&&(a==="\r"||a===`
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",c=t.createTracker(n),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:a,after:d}))),a=o[o.length-1].slice(-1)}return r.pop(),o.join("")}const Ske=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gG.peek=Ake;const Eke={canContainEols:["delete"],enter:{strikethrough:kke},exit:{strikethrough:_ke}},Tke={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ske}],handlers:{delete:gG}};function kke(e){this.enter({type:"delete",children:[]},e)}function _ke(e){this.exit(e)}function gG(e,t,n,r){const i=t9(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=mG(e,n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Ake(){return"~"}vG.peek=$ke;function vG(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=fG(s);let c;if(!!s.atBreak)for(;c=a.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function $ke(){return"`"}function Dke(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Pke,i=[],o=[],s=[],a=[];let c=0,u=-1;for(;++u<e.length;){const m=[],v=[];let b=-1;for(e[u].length>c&&(c=e[u].length);++b<e[u].length;){const x=Oke(e[u][b]);if(t.alignDelimiters!==!1){const C=r(x);v[b]=C,(a[b]===void 0||C>a[b])&&(a[b]=C)}m.push(x)}o[u]=m,s[u]=v}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<c;)i[d]=MM(n[d]);else{const m=MM(n);for(;++d<c;)i[d]=m}d=-1;const f=[],h=[];for(;++d<c;){const m=i[d];let v="",b="";m===99?(v=":",b=":"):m===108?v=":":m===114&&(b=":");let x=t.alignDelimiters===!1?1:Math.max(1,a[d]-v.length-b.length);const C=v+"-".repeat(x)+b;t.alignDelimiters!==!1&&(x=v.length+x+b.length,x>a[d]&&(a[d]=x),h[d]=x),f[d]=C}o.splice(1,0,f),s.splice(1,0,h),u=-1;const p=[];for(;++u<o.length;){const m=o[u],v=s[u];d=-1;const b=[];for(;++d<c;){const x=m[d]||"";let C="",w="";if(t.alignDelimiters!==!1){const S=a[d]-(v[d]||0),T=i[d];T===114?C=" ".repeat(S):T===99?S%2?(C=" ".repeat(S/2+.5),w=" ".repeat(S/2-.5)):(C=" ".repeat(S/2),w=C):w=" ".repeat(S)}t.delimiterStart!==!1&&!d&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&x==="")&&(t.delimiterStart!==!1||d)&&b.push(" "),t.alignDelimiters!==!1&&b.push(C),b.push(x),t.alignDelimiters!==!1&&b.push(w),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||d!==c-1)&&b.push("|")}p.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return p.join(`
`)}function Oke(e){return e==null?"":String(e)}function Pke(e){return e.length}function MM(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Rke={enter:{table:Mke,tableData:IM,tableHeader:IM,tableRow:Lke},exit:{codeText:Nke,table:Ike,tableData:Vb,tableHeader:Vb,tableRow:Vb}};function Mke(e){const t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function Ike(e){this.exit(e),this.setData("inTable")}function Lke(e){this.enter({type:"tableRow",children:[]},e)}function Vb(e){this.exit(e)}function IM(e){this.enter({type:"tableCell",children:[]},e)}function Nke(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Fke));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Fke(e,t){return t==="|"?t:e}function Bke(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:c,inlineCode:h}};function s(p,m,v,b){return u(d(p,v,b),p.align)}function a(p,m,v,b){const x=f(p,v,b),C=u([x]);return C.slice(0,C.indexOf(`
`))}function c(p,m,v,b){const x=v.enter("tableCell"),C=v.enter("phrasing"),w=mG(p,v,{...b,before:o,after:o});return C(),x(),w}function u(p,m){return Dke(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(p,m,v){const b=p.children;let x=-1;const C=[],w=m.enter("table");for(;++x<b.length;)C[x]=f(b[x],m,v);return w(),C}function f(p,m,v){const b=p.children;let x=-1;const C=[],w=m.enter("tableRow");for(;++x<b.length;)C[x]=c(b[x],p,m,v);return w(),C}function h(p,m,v){let b=vG(p,m,v);return v.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Hke(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zke(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Uke(e,t,n,r){const i=zke(n);let o=n.bulletCurrent||Hke(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),d);return c(),u;function d(f,h,p){return h?(p?"":" ".repeat(s))+f:(p?o:o+" ".repeat(s-o.length))+f}}const Vke={exit:{taskListCheckValueChecked:LM,taskListCheckValueUnchecked:LM,paragraph:Wke}},jke={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:qke}};function LM(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function Wke(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function qke(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=t9(r);o&&a.move(s);let c=Uke(e,t,n,{...r,...a.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+s}}function Kke(){return[qTe,uke(),Eke,Rke,Vke]}function Gke(e){return{extensions:[KTe,dke(),Tke,Bke(e),jke]}}function Yke(e={}){const t=this.data();n("micromarkExtensions",UTe(e)),n("fromMarkdownExtensions",Kke()),n("toMarkdownExtensions",Gke(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}var Ys={};const Qke=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];Ys.REPLACEMENT_CHARACTER="\uFFFD";Ys.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};Ys.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};Ys.isSurrogate=function(e){return e>=55296&&e<=57343};Ys.isSurrogatePair=function(e){return e>=56320&&e<=57343};Ys.getSurrogatePairCodePoint=function(e,t){return(e-55296)*1024+9216+t};Ys.isControlCodePoint=function(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159};Ys.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||Qke.indexOf(e)>-1};var bk={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"};const A1=Ys,jb=bk,Pu=A1.CODE_POINTS,Xke=1<<16;class Zke{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Xke}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.lastCharPos){const n=this.html.charCodeAt(this.pos+1);if(A1.isSurrogatePair(n))return this.pos++,this._addGap(),A1.getSurrogatePairCodePoint(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Pu.EOF;return this._err(jb.surrogateInInputStream),t}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(t,n){this.html?this.html+=t:this.html=t,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Pu.EOF;let t=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&t===Pu.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):t===Pu.CARRIAGE_RETURN?(this.skipNextNewLine=!0,Pu.LINE_FEED):(this.skipNextNewLine=!1,A1.isSurrogate(t)&&(t=this._processSurrogate(t)),t>31&&t<127||t===Pu.LINE_FEED||t===Pu.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){A1.isControlCodePoint(t)?this._err(jb.controlCharacterInInputStream):A1.isUndefinedCodePoint(t)&&this._err(jb.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}var Jke=Zke,e_e=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);const t_e=Jke,Cn=Ys,ad=e_e,Ce=bk,q=Cn.CODE_POINTS,Ru=Cn.CODE_POINT_SEQUENCES,n_e={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},yG=1<<0,bG=1<<1,xG=1<<2,r_e=yG|bG|xG,qt="DATA_STATE",$1="RCDATA_STATE",Np="RAWTEXT_STATE",al="SCRIPT_DATA_STATE",CG="PLAINTEXT_STATE",NM="TAG_OPEN_STATE",FM="END_TAG_OPEN_STATE",Wb="TAG_NAME_STATE",BM="RCDATA_LESS_THAN_SIGN_STATE",HM="RCDATA_END_TAG_OPEN_STATE",zM="RCDATA_END_TAG_NAME_STATE",UM="RAWTEXT_LESS_THAN_SIGN_STATE",VM="RAWTEXT_END_TAG_OPEN_STATE",jM="RAWTEXT_END_TAG_NAME_STATE",WM="SCRIPT_DATA_LESS_THAN_SIGN_STATE",qM="SCRIPT_DATA_END_TAG_OPEN_STATE",KM="SCRIPT_DATA_END_TAG_NAME_STATE",GM="SCRIPT_DATA_ESCAPE_START_STATE",YM="SCRIPT_DATA_ESCAPE_START_DASH_STATE",Es="SCRIPT_DATA_ESCAPED_STATE",QM="SCRIPT_DATA_ESCAPED_DASH_STATE",qb="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",N2="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",XM="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",ZM="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",JM="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",tl="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",eI="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",tI="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",F2="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",nI="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",Js="BEFORE_ATTRIBUTE_NAME_STATE",B2="ATTRIBUTE_NAME_STATE",Kb="AFTER_ATTRIBUTE_NAME_STATE",Gb="BEFORE_ATTRIBUTE_VALUE_STATE",H2="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",z2="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",U2="ATTRIBUTE_VALUE_UNQUOTED_STATE",Yb="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",nc="SELF_CLOSING_START_TAG_STATE",gp="BOGUS_COMMENT_STATE",rI="MARKUP_DECLARATION_OPEN_STATE",iI="COMMENT_START_STATE",oI="COMMENT_START_DASH_STATE",rc="COMMENT_STATE",sI="COMMENT_LESS_THAN_SIGN_STATE",aI="COMMENT_LESS_THAN_SIGN_BANG_STATE",lI="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",cI="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",V2="COMMENT_END_DASH_STATE",j2="COMMENT_END_STATE",uI="COMMENT_END_BANG_STATE",dI="DOCTYPE_STATE",W2="BEFORE_DOCTYPE_NAME_STATE",q2="DOCTYPE_NAME_STATE",fI="AFTER_DOCTYPE_NAME_STATE",hI="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",pI="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Qb="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",Xb="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Zb="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",mI="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",gI="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",vI="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",vp="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",yp="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Jb="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",nl="BOGUS_DOCTYPE_STATE",K2="CDATA_SECTION_STATE",yI="CDATA_SECTION_BRACKET_STATE",bI="CDATA_SECTION_END_STATE",b1="CHARACTER_REFERENCE_STATE",xI="NAMED_CHARACTER_REFERENCE_STATE",CI="AMBIGUOS_AMPERSAND_STATE",wI="NUMERIC_CHARACTER_REFERENCE_STATE",SI="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",EI="DECIMAL_CHARACTER_REFERENCE_START_STATE",TI="HEXADEMICAL_CHARACTER_REFERENCE_STATE",kI="DECIMAL_CHARACTER_REFERENCE_STATE",bp="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Bn(e){return e===q.SPACE||e===q.LINE_FEED||e===q.TABULATION||e===q.FORM_FEED}function f0(e){return e>=q.DIGIT_0&&e<=q.DIGIT_9}function ks(e){return e>=q.LATIN_CAPITAL_A&&e<=q.LATIN_CAPITAL_Z}function Vu(e){return e>=q.LATIN_SMALL_A&&e<=q.LATIN_SMALL_Z}function dc(e){return Vu(e)||ks(e)}function e7(e){return dc(e)||f0(e)}function wG(e){return e>=q.LATIN_CAPITAL_A&&e<=q.LATIN_CAPITAL_F}function SG(e){return e>=q.LATIN_SMALL_A&&e<=q.LATIN_SMALL_F}function i_e(e){return f0(e)||wG(e)||SG(e)}function l5(e){return e+32}function er(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|e&1023))}function ic(e){return String.fromCharCode(l5(e))}function _I(e,t){const n=ad[++e];let r=++e,i=r+n-1;for(;r<=i;){const o=r+i>>>1,s=ad[o];if(s<t)r=o+1;else if(s>t)i=o-1;else return ad[o+n]}return-1}class Mn{constructor(){this.preprocessor=new t_e,this.tokenQueue=[],this.allowCDATA=!1,this.state=qt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(t){this._consume(),this._err(t),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()}write(t,n){this.active=!0,this.preprocessor.write(t,n)}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Mn.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(t){this.state=t,this._unconsume()}_consumeSequenceIfMatch(t,n,r){let i=0,o=!0;const s=t.length;let a=0,c=n,u;for(;a<s;a++){if(a>0&&(c=this._consume(),i++),c===q.EOF){o=!1;break}if(u=t[a],c!==u&&(r||c!==l5(u))){o=!1;break}}if(!o)for(;i--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==Ru.SCRIPT_STRING.length)return!1;for(let t=0;t<this.tempBuff.length;t++)if(this.tempBuff[t]!==Ru.SCRIPT_STRING[t])return!1;return!0}_createStartTagToken(){this.currentToken={type:Mn.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Mn.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Mn.COMMENT_TOKEN,data:""}}_createDoctypeToken(t){this.currentToken={type:Mn.DOCTYPE_TOKEN,name:t,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n}}_createEOFToken(){this.currentToken={type:Mn.EOF_TOKEN}}_createAttr(t){this.currentAttr={name:t,value:""}}_leaveAttrName(t){Mn.getTokenAttr(this.currentToken,this.currentAttr.name)===null?this.currentToken.attrs.push(this.currentAttr):this._err(Ce.duplicateAttribute),this.state=t}_leaveAttrValue(t){this.state=t}_emitCurrentToken(){this._emitCurrentCharacterToken();const t=this.currentToken;this.currentToken=null,t.type===Mn.START_TAG_TOKEN?this.lastStartTagName=t.tagName:t.type===Mn.END_TAG_TOKEN&&(t.attrs.length>0&&this._err(Ce.endTagWithAttributes),t.selfClosing&&this._err(Ce.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(t,n){this.currentCharacterToken&&this.currentCharacterToken.type!==t&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=n:this._createCharacterToken(t,n)}_emitCodePoint(t){let n=Mn.CHARACTER_TOKEN;Bn(t)?n=Mn.WHITESPACE_CHARACTER_TOKEN:t===q.NULL&&(n=Mn.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,er(t))}_emitSeveralCodePoints(t){for(let n=0;n<t.length;n++)this._emitCodePoint(t[n])}_emitChars(t){this._appendCharToCurrentCharacterToken(Mn.CHARACTER_TOKEN,t)}_matchNamedCharacterReference(t){let n=null,r=1,i=_I(0,t);for(this.tempBuff.push(t);i>-1;){const o=ad[i],s=o<r_e;s&&o&yG&&(n=o&bG?[ad[++i],ad[++i]]:[ad[++i]],r=0);const c=this._consume();if(this.tempBuff.push(c),r++,c===q.EOF)break;s?i=o&xG?_I(i,c):-1:i=c===o?++i:-1}for(;r--;)this.tempBuff.pop(),this._unconsume();return n}_isCharacterReferenceInAttribute(){return this.returnState===H2||this.returnState===z2||this.returnState===U2}_isCharacterReferenceAttributeQuirk(t){if(!t&&this._isCharacterReferenceInAttribute()){const n=this._consume();return this._unconsume(),n===q.EQUALS_SIGN||e7(n)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let t=0;t<this.tempBuff.length;t++)this.currentAttr.value+=er(this.tempBuff[t]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[qt](t){this.preprocessor.dropParsedChunk(),t===q.LESS_THAN_SIGN?this.state=NM:t===q.AMPERSAND?(this.returnState=qt,this.state=b1):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitCodePoint(t)):t===q.EOF?this._emitEOFToken():this._emitCodePoint(t)}[$1](t){this.preprocessor.dropParsedChunk(),t===q.AMPERSAND?(this.returnState=$1,this.state=b1):t===q.LESS_THAN_SIGN?this.state=BM:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?this._emitEOFToken():this._emitCodePoint(t)}[Np](t){this.preprocessor.dropParsedChunk(),t===q.LESS_THAN_SIGN?this.state=UM:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?this._emitEOFToken():this._emitCodePoint(t)}[al](t){this.preprocessor.dropParsedChunk(),t===q.LESS_THAN_SIGN?this.state=WM:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?this._emitEOFToken():this._emitCodePoint(t)}[CG](t){this.preprocessor.dropParsedChunk(),t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?this._emitEOFToken():this._emitCodePoint(t)}[NM](t){t===q.EXCLAMATION_MARK?this.state=rI:t===q.SOLIDUS?this.state=FM:dc(t)?(this._createStartTagToken(),this._reconsumeInState(Wb)):t===q.QUESTION_MARK?(this._err(Ce.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(gp)):t===q.EOF?(this._err(Ce.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(Ce.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(qt))}[FM](t){dc(t)?(this._createEndTagToken(),this._reconsumeInState(Wb)):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingEndTagName),this.state=qt):t===q.EOF?(this._err(Ce.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(Ce.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(gp))}[Wb](t){Bn(t)?this.state=Js:t===q.SOLIDUS?this.state=nc:t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):ks(t)?this.currentToken.tagName+=ic(t):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.tagName+=Cn.REPLACEMENT_CHARACTER):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=er(t)}[BM](t){t===q.SOLIDUS?(this.tempBuff=[],this.state=HM):(this._emitChars("<"),this._reconsumeInState($1))}[HM](t){dc(t)?(this._createEndTagToken(),this._reconsumeInState(zM)):(this._emitChars("</"),this._reconsumeInState($1))}[zM](t){if(ks(t))this.currentToken.tagName+=ic(t),this.tempBuff.push(t);else if(Vu(t))this.currentToken.tagName+=er(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Bn(t)){this.state=Js;return}if(t===q.SOLIDUS){this.state=nc;return}if(t===q.GREATER_THAN_SIGN){this.state=qt,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState($1)}}[UM](t){t===q.SOLIDUS?(this.tempBuff=[],this.state=VM):(this._emitChars("<"),this._reconsumeInState(Np))}[VM](t){dc(t)?(this._createEndTagToken(),this._reconsumeInState(jM)):(this._emitChars("</"),this._reconsumeInState(Np))}[jM](t){if(ks(t))this.currentToken.tagName+=ic(t),this.tempBuff.push(t);else if(Vu(t))this.currentToken.tagName+=er(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Bn(t)){this.state=Js;return}if(t===q.SOLIDUS){this.state=nc;return}if(t===q.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=qt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Np)}}[WM](t){t===q.SOLIDUS?(this.tempBuff=[],this.state=qM):t===q.EXCLAMATION_MARK?(this.state=GM,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(al))}[qM](t){dc(t)?(this._createEndTagToken(),this._reconsumeInState(KM)):(this._emitChars("</"),this._reconsumeInState(al))}[KM](t){if(ks(t))this.currentToken.tagName+=ic(t),this.tempBuff.push(t);else if(Vu(t))this.currentToken.tagName+=er(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Bn(t)){this.state=Js;return}else if(t===q.SOLIDUS){this.state=nc;return}else if(t===q.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=qt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(al)}}[GM](t){t===q.HYPHEN_MINUS?(this.state=YM,this._emitChars("-")):this._reconsumeInState(al)}[YM](t){t===q.HYPHEN_MINUS?(this.state=qb,this._emitChars("-")):this._reconsumeInState(al)}[Es](t){t===q.HYPHEN_MINUS?(this.state=QM,this._emitChars("-")):t===q.LESS_THAN_SIGN?this.state=N2:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[QM](t){t===q.HYPHEN_MINUS?(this.state=qb,this._emitChars("-")):t===q.LESS_THAN_SIGN?this.state=N2:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.state=Es,this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Es,this._emitCodePoint(t))}[qb](t){t===q.HYPHEN_MINUS?this._emitChars("-"):t===q.LESS_THAN_SIGN?this.state=N2:t===q.GREATER_THAN_SIGN?(this.state=al,this._emitChars(">")):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.state=Es,this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Es,this._emitCodePoint(t))}[N2](t){t===q.SOLIDUS?(this.tempBuff=[],this.state=XM):dc(t)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(JM)):(this._emitChars("<"),this._reconsumeInState(Es))}[XM](t){dc(t)?(this._createEndTagToken(),this._reconsumeInState(ZM)):(this._emitChars("</"),this._reconsumeInState(Es))}[ZM](t){if(ks(t))this.currentToken.tagName+=ic(t),this.tempBuff.push(t);else if(Vu(t))this.currentToken.tagName+=er(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Bn(t)){this.state=Js;return}if(t===q.SOLIDUS){this.state=nc;return}if(t===q.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=qt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Es)}}[JM](t){Bn(t)||t===q.SOLIDUS||t===q.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?tl:Es,this._emitCodePoint(t)):ks(t)?(this.tempBuff.push(l5(t)),this._emitCodePoint(t)):Vu(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(Es)}[tl](t){t===q.HYPHEN_MINUS?(this.state=eI,this._emitChars("-")):t===q.LESS_THAN_SIGN?(this.state=F2,this._emitChars("<")):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[eI](t){t===q.HYPHEN_MINUS?(this.state=tI,this._emitChars("-")):t===q.LESS_THAN_SIGN?(this.state=F2,this._emitChars("<")):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.state=tl,this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=tl,this._emitCodePoint(t))}[tI](t){t===q.HYPHEN_MINUS?this._emitChars("-"):t===q.LESS_THAN_SIGN?(this.state=F2,this._emitChars("<")):t===q.GREATER_THAN_SIGN?(this.state=al,this._emitChars(">")):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.state=tl,this._emitChars(Cn.REPLACEMENT_CHARACTER)):t===q.EOF?(this._err(Ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=tl,this._emitCodePoint(t))}[F2](t){t===q.SOLIDUS?(this.tempBuff=[],this.state=nI,this._emitChars("/")):this._reconsumeInState(tl)}[nI](t){Bn(t)||t===q.SOLIDUS||t===q.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Es:tl,this._emitCodePoint(t)):ks(t)?(this.tempBuff.push(l5(t)),this._emitCodePoint(t)):Vu(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(tl)}[Js](t){Bn(t)||(t===q.SOLIDUS||t===q.GREATER_THAN_SIGN||t===q.EOF?this._reconsumeInState(Kb):t===q.EQUALS_SIGN?(this._err(Ce.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B2):(this._createAttr(""),this._reconsumeInState(B2)))}[B2](t){Bn(t)||t===q.SOLIDUS||t===q.GREATER_THAN_SIGN||t===q.EOF?(this._leaveAttrName(Kb),this._unconsume()):t===q.EQUALS_SIGN?this._leaveAttrName(Gb):ks(t)?this.currentAttr.name+=ic(t):t===q.QUOTATION_MARK||t===q.APOSTROPHE||t===q.LESS_THAN_SIGN?(this._err(Ce.unexpectedCharacterInAttributeName),this.currentAttr.name+=er(t)):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentAttr.name+=Cn.REPLACEMENT_CHARACTER):this.currentAttr.name+=er(t)}[Kb](t){Bn(t)||(t===q.SOLIDUS?this.state=nc:t===q.EQUALS_SIGN?this.state=Gb:t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(B2)))}[Gb](t){Bn(t)||(t===q.QUOTATION_MARK?this.state=H2:t===q.APOSTROPHE?this.state=z2:t===q.GREATER_THAN_SIGN?(this._err(Ce.missingAttributeValue),this.state=qt,this._emitCurrentToken()):this._reconsumeInState(U2))}[H2](t){t===q.QUOTATION_MARK?this.state=Yb:t===q.AMPERSAND?(this.returnState=H2,this.state=b1):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentAttr.value+=Cn.REPLACEMENT_CHARACTER):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):this.currentAttr.value+=er(t)}[z2](t){t===q.APOSTROPHE?this.state=Yb:t===q.AMPERSAND?(this.returnState=z2,this.state=b1):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentAttr.value+=Cn.REPLACEMENT_CHARACTER):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):this.currentAttr.value+=er(t)}[U2](t){Bn(t)?this._leaveAttrValue(Js):t===q.AMPERSAND?(this.returnState=U2,this.state=b1):t===q.GREATER_THAN_SIGN?(this._leaveAttrValue(qt),this._emitCurrentToken()):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentAttr.value+=Cn.REPLACEMENT_CHARACTER):t===q.QUOTATION_MARK||t===q.APOSTROPHE||t===q.LESS_THAN_SIGN||t===q.EQUALS_SIGN||t===q.GRAVE_ACCENT?(this._err(Ce.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=er(t)):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):this.currentAttr.value+=er(t)}[Yb](t){Bn(t)?this._leaveAttrValue(Js):t===q.SOLIDUS?this._leaveAttrValue(nc):t===q.GREATER_THAN_SIGN?(this._leaveAttrValue(qt),this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):(this._err(Ce.missingWhitespaceBetweenAttributes),this._reconsumeInState(Js))}[nc](t){t===q.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInTag),this._emitEOFToken()):(this._err(Ce.unexpectedSolidusInTag),this._reconsumeInState(Js))}[gp](t){t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._emitCurrentToken(),this._emitEOFToken()):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.data+=Cn.REPLACEMENT_CHARACTER):this.currentToken.data+=er(t)}[rI](t){this._consumeSequenceIfMatch(Ru.DASH_DASH_STRING,t,!0)?(this._createCommentToken(),this.state=iI):this._consumeSequenceIfMatch(Ru.DOCTYPE_STRING,t,!1)?this.state=dI:this._consumeSequenceIfMatch(Ru.CDATA_START_STRING,t,!0)?this.allowCDATA?this.state=K2:(this._err(Ce.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=gp):this._ensureHibernation()||(this._err(Ce.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(gp))}[iI](t){t===q.HYPHEN_MINUS?this.state=oI:t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptClosingOfEmptyComment),this.state=qt,this._emitCurrentToken()):this._reconsumeInState(rc)}[oI](t){t===q.HYPHEN_MINUS?this.state=j2:t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptClosingOfEmptyComment),this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(rc))}[rc](t){t===q.HYPHEN_MINUS?this.state=V2:t===q.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=sI):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.data+=Cn.REPLACEMENT_CHARACTER):t===q.EOF?(this._err(Ce.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=er(t)}[sI](t){t===q.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=aI):t===q.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(rc)}[aI](t){t===q.HYPHEN_MINUS?this.state=lI:this._reconsumeInState(rc)}[lI](t){t===q.HYPHEN_MINUS?this.state=cI:this._reconsumeInState(V2)}[cI](t){t!==q.GREATER_THAN_SIGN&&t!==q.EOF&&this._err(Ce.nestedComment),this._reconsumeInState(j2)}[V2](t){t===q.HYPHEN_MINUS?this.state=j2:t===q.EOF?(this._err(Ce.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(rc))}[j2](t){t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):t===q.EXCLAMATION_MARK?this.state=uI:t===q.HYPHEN_MINUS?this.currentToken.data+="-":t===q.EOF?(this._err(Ce.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(rc))}[uI](t){t===q.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=V2):t===q.GREATER_THAN_SIGN?(this._err(Ce.incorrectlyClosedComment),this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(rc))}[dI](t){Bn(t)?this.state=W2:t===q.GREATER_THAN_SIGN?this._reconsumeInState(W2):t===q.EOF?(this._err(Ce.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(W2))}[W2](t){Bn(t)||(ks(t)?(this._createDoctypeToken(ic(t)),this.state=q2):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this._createDoctypeToken(Cn.REPLACEMENT_CHARACTER),this.state=q2):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(er(t)),this.state=q2))}[q2](t){Bn(t)?this.state=fI:t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):ks(t)?this.currentToken.name+=ic(t):t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.name+=Cn.REPLACEMENT_CHARACTER):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=er(t)}[fI](t){Bn(t)||(t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(Ru.PUBLIC_STRING,t,!1)?this.state=hI:this._consumeSequenceIfMatch(Ru.SYSTEM_STRING,t,!1)?this.state=gI:this._ensureHibernation()||(this._err(Ce.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl)))}[hI](t){Bn(t)?this.state=pI:t===q.QUOTATION_MARK?(this._err(Ce.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=Qb):t===q.APOSTROPHE?(this._err(Ce.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=Xb):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl))}[pI](t){Bn(t)||(t===q.QUOTATION_MARK?(this.currentToken.publicId="",this.state=Qb):t===q.APOSTROPHE?(this.currentToken.publicId="",this.state=Xb):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl)))}[Qb](t){t===q.QUOTATION_MARK?this.state=Zb:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.publicId+=Cn.REPLACEMENT_CHARACTER):t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=er(t)}[Xb](t){t===q.APOSTROPHE?this.state=Zb:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.publicId+=Cn.REPLACEMENT_CHARACTER):t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=er(t)}[Zb](t){Bn(t)?this.state=mI:t===q.GREATER_THAN_SIGN?(this.state=qt,this._emitCurrentToken()):t===q.QUOTATION_MARK?(this._err(Ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=vp):t===q.APOSTROPHE?(this._err(Ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=yp):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl))}[mI](t){Bn(t)||(t===q.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=qt):t===q.QUOTATION_MARK?(this.currentToken.systemId="",this.state=vp):t===q.APOSTROPHE?(this.currentToken.systemId="",this.state=yp):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl)))}[gI](t){Bn(t)?this.state=vI:t===q.QUOTATION_MARK?(this._err(Ce.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=vp):t===q.APOSTROPHE?(this._err(Ce.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=yp):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl))}[vI](t){Bn(t)||(t===q.QUOTATION_MARK?(this.currentToken.systemId="",this.state=vp):t===q.APOSTROPHE?(this.currentToken.systemId="",this.state=yp):t===q.GREATER_THAN_SIGN?(this._err(Ce.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=qt,this._emitCurrentToken()):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(nl)))}[vp](t){t===q.QUOTATION_MARK?this.state=Jb:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.systemId+=Cn.REPLACEMENT_CHARACTER):t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=er(t)}[yp](t){t===q.APOSTROPHE?this.state=Jb:t===q.NULL?(this._err(Ce.unexpectedNullCharacter),this.currentToken.systemId+=Cn.REPLACEMENT_CHARACTER):t===q.GREATER_THAN_SIGN?(this._err(Ce.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=er(t)}[Jb](t){Bn(t)||(t===q.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=qt):t===q.EOF?(this._err(Ce.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Ce.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(nl)))}[nl](t){t===q.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=qt):t===q.NULL?this._err(Ce.unexpectedNullCharacter):t===q.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[K2](t){t===q.RIGHT_SQUARE_BRACKET?this.state=yI:t===q.EOF?(this._err(Ce.eofInCdata),this._emitEOFToken()):this._emitCodePoint(t)}[yI](t){t===q.RIGHT_SQUARE_BRACKET?this.state=bI:(this._emitChars("]"),this._reconsumeInState(K2))}[bI](t){t===q.GREATER_THAN_SIGN?this.state=qt:t===q.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(K2))}[b1](t){this.tempBuff=[q.AMPERSAND],t===q.NUMBER_SIGN?(this.tempBuff.push(t),this.state=wI):e7(t)?this._reconsumeInState(xI):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[xI](t){const n=this._matchNamedCharacterReference(t);if(this._ensureHibernation())this.tempBuff=[q.AMPERSAND];else if(n){const r=this.tempBuff[this.tempBuff.length-1]===q.SEMICOLON;this._isCharacterReferenceAttributeQuirk(r)||(r||this._errOnNextCodePoint(Ce.missingSemicolonAfterCharacterReference),this.tempBuff=n),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=CI}[CI](t){e7(t)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=er(t):this._emitCodePoint(t):(t===q.SEMICOLON&&this._err(Ce.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[wI](t){this.charRefCode=0,t===q.LATIN_SMALL_X||t===q.LATIN_CAPITAL_X?(this.tempBuff.push(t),this.state=SI):this._reconsumeInState(EI)}[SI](t){i_e(t)?this._reconsumeInState(TI):(this._err(Ce.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[EI](t){f0(t)?this._reconsumeInState(kI):(this._err(Ce.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[TI](t){wG(t)?this.charRefCode=this.charRefCode*16+t-55:SG(t)?this.charRefCode=this.charRefCode*16+t-87:f0(t)?this.charRefCode=this.charRefCode*16+t-48:t===q.SEMICOLON?this.state=bp:(this._err(Ce.missingSemicolonAfterCharacterReference),this._reconsumeInState(bp))}[kI](t){f0(t)?this.charRefCode=this.charRefCode*10+t-48:t===q.SEMICOLON?this.state=bp:(this._err(Ce.missingSemicolonAfterCharacterReference),this._reconsumeInState(bp))}[bp](){if(this.charRefCode===q.NULL)this._err(Ce.nullCharacterReference),this.charRefCode=q.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Ce.characterReferenceOutsideUnicodeRange),this.charRefCode=q.REPLACEMENT_CHARACTER;else if(Cn.isSurrogate(this.charRefCode))this._err(Ce.surrogateCharacterReference),this.charRefCode=q.REPLACEMENT_CHARACTER;else if(Cn.isUndefinedCodePoint(this.charRefCode))this._err(Ce.noncharacterCharacterReference);else if(Cn.isControlCodePoint(this.charRefCode)||this.charRefCode===q.CARRIAGE_RETURN){this._err(Ce.controlCharacterReference);const t=n_e[this.charRefCode];t&&(this.charRefCode=t)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Mn.CHARACTER_TOKEN="CHARACTER_TOKEN";Mn.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";Mn.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";Mn.START_TAG_TOKEN="START_TAG_TOKEN";Mn.END_TAG_TOKEN="END_TAG_TOKEN";Mn.COMMENT_TOKEN="COMMENT_TOKEN";Mn.DOCTYPE_TOKEN="DOCTYPE_TOKEN";Mn.EOF_TOKEN="EOF_TOKEN";Mn.HIBERNATION_TOKEN="HIBERNATION_TOKEN";Mn.MODE={DATA:qt,RCDATA:$1,RAWTEXT:Np,SCRIPT_DATA:al,PLAINTEXT:CG};Mn.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null};var n9=Mn,Qs={};const t7=Qs.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Qs.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Qs.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const Ie=Qs.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Qs.SPECIAL_ELEMENTS={[t7.HTML]:{[Ie.ADDRESS]:!0,[Ie.APPLET]:!0,[Ie.AREA]:!0,[Ie.ARTICLE]:!0,[Ie.ASIDE]:!0,[Ie.BASE]:!0,[Ie.BASEFONT]:!0,[Ie.BGSOUND]:!0,[Ie.BLOCKQUOTE]:!0,[Ie.BODY]:!0,[Ie.BR]:!0,[Ie.BUTTON]:!0,[Ie.CAPTION]:!0,[Ie.CENTER]:!0,[Ie.COL]:!0,[Ie.COLGROUP]:!0,[Ie.DD]:!0,[Ie.DETAILS]:!0,[Ie.DIR]:!0,[Ie.DIV]:!0,[Ie.DL]:!0,[Ie.DT]:!0,[Ie.EMBED]:!0,[Ie.FIELDSET]:!0,[Ie.FIGCAPTION]:!0,[Ie.FIGURE]:!0,[Ie.FOOTER]:!0,[Ie.FORM]:!0,[Ie.FRAME]:!0,[Ie.FRAMESET]:!0,[Ie.H1]:!0,[Ie.H2]:!0,[Ie.H3]:!0,[Ie.H4]:!0,[Ie.H5]:!0,[Ie.H6]:!0,[Ie.HEAD]:!0,[Ie.HEADER]:!0,[Ie.HGROUP]:!0,[Ie.HR]:!0,[Ie.HTML]:!0,[Ie.IFRAME]:!0,[Ie.IMG]:!0,[Ie.INPUT]:!0,[Ie.LI]:!0,[Ie.LINK]:!0,[Ie.LISTING]:!0,[Ie.MAIN]:!0,[Ie.MARQUEE]:!0,[Ie.MENU]:!0,[Ie.META]:!0,[Ie.NAV]:!0,[Ie.NOEMBED]:!0,[Ie.NOFRAMES]:!0,[Ie.NOSCRIPT]:!0,[Ie.OBJECT]:!0,[Ie.OL]:!0,[Ie.P]:!0,[Ie.PARAM]:!0,[Ie.PLAINTEXT]:!0,[Ie.PRE]:!0,[Ie.SCRIPT]:!0,[Ie.SECTION]:!0,[Ie.SELECT]:!0,[Ie.SOURCE]:!0,[Ie.STYLE]:!0,[Ie.SUMMARY]:!0,[Ie.TABLE]:!0,[Ie.TBODY]:!0,[Ie.TD]:!0,[Ie.TEMPLATE]:!0,[Ie.TEXTAREA]:!0,[Ie.TFOOT]:!0,[Ie.TH]:!0,[Ie.THEAD]:!0,[Ie.TITLE]:!0,[Ie.TR]:!0,[Ie.TRACK]:!0,[Ie.UL]:!0,[Ie.WBR]:!0,[Ie.XMP]:!0},[t7.MATHML]:{[Ie.MI]:!0,[Ie.MO]:!0,[Ie.MN]:!0,[Ie.MS]:!0,[Ie.MTEXT]:!0,[Ie.ANNOTATION_XML]:!0},[t7.SVG]:{[Ie.TITLE]:!0,[Ie.FOREIGN_OBJECT]:!0,[Ie.DESC]:!0}};const EG=Qs,Fe=EG.TAG_NAMES,Sn=EG.NAMESPACES;function AI(e){switch(e.length){case 1:return e===Fe.P;case 2:return e===Fe.RB||e===Fe.RP||e===Fe.RT||e===Fe.DD||e===Fe.DT||e===Fe.LI;case 3:return e===Fe.RTC;case 6:return e===Fe.OPTION;case 8:return e===Fe.OPTGROUP}return!1}function o_e(e){switch(e.length){case 1:return e===Fe.P;case 2:return e===Fe.RB||e===Fe.RP||e===Fe.RT||e===Fe.DD||e===Fe.DT||e===Fe.LI||e===Fe.TD||e===Fe.TH||e===Fe.TR;case 3:return e===Fe.RTC;case 5:return e===Fe.TBODY||e===Fe.TFOOT||e===Fe.THEAD;case 6:return e===Fe.OPTION;case 7:return e===Fe.CAPTION;case 8:return e===Fe.OPTGROUP||e===Fe.COLGROUP}return!1}function G2(e,t){switch(e.length){case 2:if(e===Fe.TD||e===Fe.TH)return t===Sn.HTML;if(e===Fe.MI||e===Fe.MO||e===Fe.MN||e===Fe.MS)return t===Sn.MATHML;break;case 4:if(e===Fe.HTML)return t===Sn.HTML;if(e===Fe.DESC)return t===Sn.SVG;break;case 5:if(e===Fe.TABLE)return t===Sn.HTML;if(e===Fe.MTEXT)return t===Sn.MATHML;if(e===Fe.TITLE)return t===Sn.SVG;break;case 6:return(e===Fe.APPLET||e===Fe.OBJECT)&&t===Sn.HTML;case 7:return(e===Fe.CAPTION||e===Fe.MARQUEE)&&t===Sn.HTML;case 8:return e===Fe.TEMPLATE&&t===Sn.HTML;case 13:return e===Fe.FOREIGN_OBJECT&&t===Sn.SVG;case 14:return e===Fe.ANNOTATION_XML&&t===Sn.MATHML}return!1}class s_e{constructor(t,n){this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=n}_indexOf(t){let n=-1;for(let r=this.stackTop;r>=0;r--)if(this.items[r]===t){n=r;break}return n}_isInTemplate(){return this.currentTagName===Fe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Sn.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(t){this.items[++this.stackTop]=t,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&this._updateCurrentElement()}insertAfter(t,n){const r=this._indexOf(t)+1;this.items.splice(r,0,n),r===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(t){for(;this.stackTop>-1;){const n=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),n===t&&r===Sn.HTML)break}}popUntilElementPopped(t){for(;this.stackTop>-1;){const n=this.current;if(this.pop(),n===t)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===Fe.H1||t===Fe.H2||t===Fe.H3||t===Fe.H4||t===Fe.H5||t===Fe.H6&&n===Sn.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===Fe.TD||t===Fe.TH&&n===Sn.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==Fe.TABLE&&this.currentTagName!==Fe.TEMPLATE&&this.currentTagName!==Fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Sn.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==Fe.TBODY&&this.currentTagName!==Fe.TFOOT&&this.currentTagName!==Fe.THEAD&&this.currentTagName!==Fe.TEMPLATE&&this.currentTagName!==Fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Sn.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==Fe.TR&&this.currentTagName!==Fe.TEMPLATE&&this.currentTagName!==Fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Sn.HTML;)this.pop()}remove(t){for(let n=this.stackTop;n>=0;n--)if(this.items[n]===t){this.items.splice(n,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const t=this.items[1];return t&&this.treeAdapter.getTagName(t)===Fe.BODY?t:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let n=this._indexOf(t);return--n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===Fe.HTML}hasInScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Sn.HTML)return!0;if(G2(r,i))return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if((n===Fe.H1||n===Fe.H2||n===Fe.H3||n===Fe.H4||n===Fe.H5||n===Fe.H6)&&r===Sn.HTML)return!0;if(G2(n,r))return!1}return!0}hasInListItemScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Sn.HTML)return!0;if((r===Fe.UL||r===Fe.OL)&&i===Sn.HTML||G2(r,i))return!1}return!0}hasInButtonScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Sn.HTML)return!0;if(r===Fe.BUTTON&&i===Sn.HTML||G2(r,i))return!1}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===Sn.HTML){if(r===t)return!0;if(r===Fe.TABLE||r===Fe.TEMPLATE||r===Fe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Sn.HTML){if(n===Fe.TBODY||n===Fe.THEAD||n===Fe.TFOOT)return!0;if(n===Fe.TABLE||n===Fe.HTML)return!1}}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===Sn.HTML){if(r===t)return!0;if(r!==Fe.OPTION&&r!==Fe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;AI(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;o_e(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;AI(this.currentTagName)&&this.currentTagName!==t;)this.pop()}}var a_e=s_e;const Y2=3;class Ds{constructor(t){this.length=0,this.entries=[],this.treeAdapter=t,this.bookmark=null}_getNoahArkConditionCandidates(t){const n=[];if(this.length>=Y2){const r=this.treeAdapter.getAttrList(t).length,i=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=this.length-1;s>=0;s--){const a=this.entries[s];if(a.type===Ds.MARKER_ENTRY)break;const c=a.element,u=this.treeAdapter.getAttrList(c);this.treeAdapter.getTagName(c)===i&&this.treeAdapter.getNamespaceURI(c)===o&&u.length===r&&n.push({idx:s,attrs:u})}}return n.length<Y2?[]:n}_ensureNoahArkCondition(t){const n=this._getNoahArkConditionCandidates(t);let r=n.length;if(r){const i=this.treeAdapter.getAttrList(t),o=i.length,s=Object.create(null);for(let a=0;a<o;a++){const c=i[a];s[c.name]=c.value}for(let a=0;a<o;a++)for(let c=0;c<r;c++){const u=n[c].attrs[a];if(s[u.name]!==u.value&&(n.splice(c,1),r--),n.length<Y2)return}for(let a=r-1;a>=Y2-1;a--)this.entries.splice(n[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:Ds.MARKER_ENTRY}),this.length++}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.push({type:Ds.ELEMENT_ENTRY,element:t,token:n}),this.length++}insertElementAfterBookmark(t,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:Ds.ELEMENT_ENTRY,element:t,token:n}),this.length++}removeEntry(t){for(let n=this.length-1;n>=0;n--)if(this.entries[n]===t){this.entries.splice(n,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const t=this.entries.pop();if(this.length--,t.type===Ds.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===Ds.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===t)return r}return null}getElementEntry(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===Ds.ELEMENT_ENTRY&&r.element===t)return r}return null}}Ds.MARKER_ENTRY="MARKER_ENTRY";Ds.ELEMENT_ENTRY="ELEMENT_ENTRY";var l_e=Ds;class TG{constructor(t){const n={},r=this._getOverriddenMethods(this,n);for(const i of Object.keys(r))typeof r[i]=="function"&&(n[i]=t[i],t[i]=r[i])}_getOverriddenMethods(){throw new Error("Not implemented")}}TG.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let i=0;i<e.__mixins.length;i++)if(e.__mixins[i].constructor===t)return e.__mixins[i];const r=new t(e,n);return e.__mixins.push(r),r};var Ql=TG;const c_e=Ql;class u_e extends c_e{constructor(t){super(t),this.preprocessor=t,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(t,n){return{advance(){const r=this.pos+1,i=this.html[r];return t.isEol&&(t.isEol=!1,t.line++,t.lineStartPos=r),(i===`
`||i==="\r"&&this.html[r+1]!==`
`)&&(t.isEol=!0),t.col=r-t.lineStartPos+1,t.offset=t.droppedBufferSize+r,n.advance.call(this)},retreat(){n.retreat.call(this),t.isEol=!1,t.col=this.pos-t.lineStartPos+1},dropParsedChunk(){const r=this.pos;n.dropParsedChunk.call(this);const i=r-this.pos;t.lineStartPos-=i,t.droppedBufferSize+=i,t.offset=t.droppedBufferSize+this.pos}}}}var kG=u_e;const $I=Ql,n7=n9,d_e=kG;class f_e extends $I{constructor(t){super(t),this.tokenizer=t,this.posTracker=$I.install(t.preprocessor,d_e),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const t=this.tokenizer.currentToken,n=this.tokenizer.currentAttr;t.location.attrs||(t.location.attrs=Object.create(null)),t.location.attrs[n.name]=this.currentAttrLocation}_getOverriddenMethods(t,n){const r={_createStartTagToken(){n._createStartTagToken.call(this),this.currentToken.location=t.ctLoc},_createEndTagToken(){n._createEndTagToken.call(this),this.currentToken.location=t.ctLoc},_createCommentToken(){n._createCommentToken.call(this),this.currentToken.location=t.ctLoc},_createDoctypeToken(i){n._createDoctypeToken.call(this,i),this.currentToken.location=t.ctLoc},_createCharacterToken(i,o){n._createCharacterToken.call(this,i,o),this.currentCharacterToken.location=t.ctLoc},_createEOFToken(){n._createEOFToken.call(this),this.currentToken.location=t._getCurrentLocation()},_createAttr(i){n._createAttr.call(this,i),t.currentAttrLocation=t._getCurrentLocation()},_leaveAttrName(i){n._leaveAttrName.call(this,i),t._attachCurrentAttrLocationInfo()},_leaveAttrValue(i){n._leaveAttrValue.call(this,i),t._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const i=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=i.startLine,this.currentCharacterToken.location.endCol=i.startCol,this.currentCharacterToken.location.endOffset=i.startOffset),this.currentToken.type===n7.EOF_TOKEN?(i.endLine=i.startLine,i.endCol=i.startCol,i.endOffset=i.startOffset):(i.endLine=t.posTracker.line,i.endCol=t.posTracker.col+1,i.endOffset=t.posTracker.offset+1),n._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const i=this.currentCharacterToken&&this.currentCharacterToken.location;i&&i.endOffset===-1&&(i.endLine=t.posTracker.line,i.endCol=t.posTracker.col,i.endOffset=t.posTracker.offset),n._emitCurrentCharacterToken.call(this)}};return Object.keys(n7.MODE).forEach(i=>{const o=n7.MODE[i];r[o]=function(s){t.ctLoc=t._getCurrentLocation(),n[o].call(this,s)}}),r}}var _G=f_e;const h_e=Ql;class p_e extends h_e{constructor(t,n){super(t),this.onItemPop=n.onItemPop}_getOverriddenMethods(t,n){return{pop(){t.onItemPop(this.current),n.pop.call(this)},popAllUpToHtmlElement(){for(let r=this.stackTop;r>0;r--)t.onItemPop(this.items[r]);n.popAllUpToHtmlElement.call(this)},remove(r){t.onItemPop(this.current),n.remove.call(this,r)}}}}var m_e=p_e;const r7=Ql,DI=n9,g_e=_G,v_e=m_e,y_e=Qs,i7=y_e.TAG_NAMES;class b_e extends r7{constructor(t){super(t),this.parser=t,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(t){let n=null;this.lastStartTagToken&&(n=Object.assign({},this.lastStartTagToken.location),n.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(t,n)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,o=this.treeAdapter.getTagName(t),s=n.type===DI.END_TAG_TOKEN&&o===n.tagName,a={};s?(a.endTag=Object.assign({},i),a.endLine=i.endLine,a.endCol=i.endCol,a.endOffset=i.endOffset):(a.endLine=i.startLine,a.endCol=i.startCol,a.endOffset=i.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}_getOverriddenMethods(t,n){return{_bootstrap(r,i){n._bootstrap.call(this,r,i),t.lastStartTagToken=null,t.lastFosterParentingLocation=null,t.currentToken=null;const o=r7.install(this.tokenizer,g_e);t.posTracker=o.posTracker,r7.install(this.openElements,v_e,{onItemPop:function(s){t._setEndLocation(s,t.currentToken)}})},_runParsingLoop(r){n._runParsingLoop.call(this,r);for(let i=this.openElements.stackTop;i>=0;i--)t._setEndLocation(this.openElements.items[i],t.currentToken)},_processTokenInForeignContent(r){t.currentToken=r,n._processTokenInForeignContent.call(this,r)},_processToken(r){if(t.currentToken=r,n._processToken.call(this,r),r.type===DI.END_TAG_TOKEN&&(r.tagName===i7.HTML||r.tagName===i7.BODY&&this.openElements.hasInScope(i7.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){const s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===r.tagName){t._setEndLocation(s,r);break}}},_setDocumentType(r){n._setDocumentType.call(this,r);const i=this.treeAdapter.getChildNodes(this.document),o=i.length;for(let s=0;s<o;s++){const a=i[s];if(this.treeAdapter.isDocumentTypeNode(a)){this.treeAdapter.setNodeSourceCodeLocation(a,r.location);break}}},_attachElementToTree(r){t._setStartLocation(r),t.lastStartTagToken=null,n._attachElementToTree.call(this,r)},_appendElement(r,i){t.lastStartTagToken=r,n._appendElement.call(this,r,i)},_insertElement(r,i){t.lastStartTagToken=r,n._insertElement.call(this,r,i)},_insertTemplate(r){t.lastStartTagToken=r,n._insertTemplate.call(this,r);const i=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(i,null)},_insertFakeRootElement(){n._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(r,i){n._appendCommentNode.call(this,r,i);const o=this.treeAdapter.getChildNodes(i),s=o[o.length-1];this.treeAdapter.setNodeSourceCodeLocation(s,r.location)},_findFosterParentingLocation(){return t.lastFosterParentingLocation=n._findFosterParentingLocation.call(this),t.lastFosterParentingLocation},_insertCharacters(r){n._insertCharacters.call(this,r);const i=this._shouldFosterParentOnInsertion(),o=i&&t.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,s=this.treeAdapter.getChildNodes(o),a=i&&t.lastFosterParentingLocation.beforeElement?s.indexOf(t.lastFosterParentingLocation.beforeElement)-1:s.length-1,c=s[a];if(this.treeAdapter.getNodeSourceCodeLocation(c)){const{endLine:d,endCol:f,endOffset:h}=r.location;this.treeAdapter.updateNodeSourceCodeLocation(c,{endLine:d,endCol:f,endOffset:h})}else this.treeAdapter.setNodeSourceCodeLocation(c,r.location)}}}}var x_e=b_e;const C_e=Ql;class w_e extends C_e{constructor(t,n){super(t),this.posTracker=null,this.onParseError=n.onParseError}_setErrorLocation(t){t.startLine=t.endLine=this.posTracker.line,t.startCol=t.endCol=this.posTracker.col,t.startOffset=t.endOffset=this.posTracker.offset}_reportError(t){const n={code:t,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(n),this.onParseError(n)}_getOverriddenMethods(t){return{_err(n){t._reportError(n)}}}}var xk=w_e;const S_e=xk,E_e=kG,T_e=Ql;class k_e extends S_e{constructor(t,n){super(t,n),this.posTracker=T_e.install(t,E_e),this.lastErrOffset=-1}_reportError(t){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(t))}}var __e=k_e;const A_e=xk,$_e=__e,D_e=Ql;class O_e extends A_e{constructor(t,n){super(t,n);const r=D_e.install(t.preprocessor,$_e,n);this.posTracker=r.posTracker}}var P_e=O_e;const R_e=xk,M_e=P_e,I_e=_G,OI=Ql;class L_e extends R_e{constructor(t,n){super(t,n),this.opts=n,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(t){this.ctLoc&&(t.startLine=this.ctLoc.startLine,t.startCol=this.ctLoc.startCol,t.startOffset=this.ctLoc.startOffset,t.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,t.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,t.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(t,n){return{_bootstrap(r,i){n._bootstrap.call(this,r,i),OI.install(this.tokenizer,M_e,t.opts),OI.install(this.tokenizer,I_e)},_processInputToken(r){t.ctLoc=r.location,n._processInputToken.call(this,r)},_err(r,i){t.locBeforeToken=i&&i.beforeToken,t._reportError(r)}}}}var N_e=L_e,on={};const{DOCUMENT_MODE:F_e}=Qs;on.createDocument=function(){return{nodeName:"#document",mode:F_e.NO_QUIRKS,childNodes:[]}};on.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};on.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}};on.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const AG=function(e){return{nodeName:"#text",value:e,parentNode:null}},$G=on.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},B_e=on.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};on.setTemplateContent=function(e,t){e.content=t};on.getTemplateContent=function(e){return e.content};on.setDocumentType=function(e,t,n,r){let i=null;for(let o=0;o<e.childNodes.length;o++)if(e.childNodes[o].nodeName==="#documentType"){i=e.childNodes[o];break}i?(i.name=t,i.publicId=n,i.systemId=r):$G(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r})};on.setDocumentMode=function(e,t){e.mode=t};on.getDocumentMode=function(e){return e.mode};on.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}};on.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if(n.nodeName==="#text"){n.value+=t;return}}$G(e,AG(t))};on.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&r.nodeName==="#text"?r.value+=t:B_e(e,AG(t),n)};on.adoptAttributes=function(e,t){const n=[];for(let r=0;r<e.attrs.length;r++)n.push(e.attrs[r].name);for(let r=0;r<t.length;r++)n.indexOf(t[r].name)===-1&&e.attrs.push(t[r])};on.getFirstChild=function(e){return e.childNodes[0]};on.getChildNodes=function(e){return e.childNodes};on.getParentNode=function(e){return e.parentNode};on.getAttrList=function(e){return e.attrs};on.getTagName=function(e){return e.tagName};on.getNamespaceURI=function(e){return e.namespaceURI};on.getTextNodeContent=function(e){return e.value};on.getCommentNodeContent=function(e){return e.data};on.getDocumentTypeNodeName=function(e){return e.name};on.getDocumentTypeNodePublicId=function(e){return e.publicId};on.getDocumentTypeNodeSystemId=function(e){return e.systemId};on.isTextNode=function(e){return e.nodeName==="#text"};on.isCommentNode=function(e){return e.nodeName==="#comment"};on.isDocumentTypeNode=function(e){return e.nodeName==="#documentType"};on.isElementNode=function(e){return!!e.tagName};on.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t};on.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation};on.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)};var H_e=function(t,n){return n=n||Object.create(null),[t,n].reduce((r,i)=>(Object.keys(i).forEach(o=>{r[o]=i[o]}),r),Object.create(null))},r9={};const{DOCUMENT_MODE:x1}=Qs,DG="html",z_e="about:legacy-compat",U_e="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",OG=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],V_e=OG.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),j_e=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],PG=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],W_e=PG.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function PI(e){const t=e.indexOf('"')!==-1?"'":'"';return t+e+t}function RI(e,t){for(let n=0;n<t.length;n++)if(e.indexOf(t[n])===0)return!0;return!1}r9.isConforming=function(e){return e.name===DG&&e.publicId===null&&(e.systemId===null||e.systemId===z_e)};r9.getDocumentMode=function(e){if(e.name!==DG)return x1.QUIRKS;const t=e.systemId;if(t&&t.toLowerCase()===U_e)return x1.QUIRKS;let n=e.publicId;if(n!==null){if(n=n.toLowerCase(),j_e.indexOf(n)>-1)return x1.QUIRKS;let r=t===null?V_e:OG;if(RI(n,r))return x1.QUIRKS;if(r=t===null?PG:W_e,RI(n,r))return x1.LIMITED_QUIRKS}return x1.NO_QUIRKS};r9.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+PI(t):n&&(r+=" SYSTEM"),n!==null&&(r+=" "+PI(n)),r};var ku={};const o7=n9,Ck=Qs,Ct=Ck.TAG_NAMES,qr=Ck.NAMESPACES,c5=Ck.ATTRS,MI={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},q_e="definitionurl",K_e="definitionURL",G_e={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Y_e={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:qr.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:qr.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:qr.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:qr.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:qr.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:qr.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:qr.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:qr.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:qr.XML},"xml:space":{prefix:"xml",name:"space",namespace:qr.XML},xmlns:{prefix:"",name:"xmlns",namespace:qr.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:qr.XMLNS}},Q_e=ku.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},X_e={[Ct.B]:!0,[Ct.BIG]:!0,[Ct.BLOCKQUOTE]:!0,[Ct.BODY]:!0,[Ct.BR]:!0,[Ct.CENTER]:!0,[Ct.CODE]:!0,[Ct.DD]:!0,[Ct.DIV]:!0,[Ct.DL]:!0,[Ct.DT]:!0,[Ct.EM]:!0,[Ct.EMBED]:!0,[Ct.H1]:!0,[Ct.H2]:!0,[Ct.H3]:!0,[Ct.H4]:!0,[Ct.H5]:!0,[Ct.H6]:!0,[Ct.HEAD]:!0,[Ct.HR]:!0,[Ct.I]:!0,[Ct.IMG]:!0,[Ct.LI]:!0,[Ct.LISTING]:!0,[Ct.MENU]:!0,[Ct.META]:!0,[Ct.NOBR]:!0,[Ct.OL]:!0,[Ct.P]:!0,[Ct.PRE]:!0,[Ct.RUBY]:!0,[Ct.S]:!0,[Ct.SMALL]:!0,[Ct.SPAN]:!0,[Ct.STRONG]:!0,[Ct.STRIKE]:!0,[Ct.SUB]:!0,[Ct.SUP]:!0,[Ct.TABLE]:!0,[Ct.TT]:!0,[Ct.U]:!0,[Ct.UL]:!0,[Ct.VAR]:!0};ku.causesExit=function(e){const t=e.tagName;return t===Ct.FONT&&(o7.getTokenAttr(e,c5.COLOR)!==null||o7.getTokenAttr(e,c5.SIZE)!==null||o7.getTokenAttr(e,c5.FACE)!==null)?!0:X_e[t]};ku.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===q_e){e.attrs[t].name=K_e;break}};ku.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=G_e[e.attrs[t].name];n&&(e.attrs[t].name=n)}};ku.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=Y_e[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}};ku.adjustTokenSVGTagName=function(e){const t=Q_e[e.tagName];t&&(e.tagName=t)};function Z_e(e,t){return t===qr.MATHML&&(e===Ct.MI||e===Ct.MO||e===Ct.MN||e===Ct.MS||e===Ct.MTEXT)}function J_e(e,t,n){if(t===qr.MATHML&&e===Ct.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===c5.ENCODING){const i=n[r].value.toLowerCase();return i===MI.TEXT_HTML||i===MI.APPLICATION_XML}}return t===qr.SVG&&(e===Ct.FOREIGN_OBJECT||e===Ct.DESC||e===Ct.TITLE)}ku.isIntegrationPoint=function(e,t,n,r){return!!((!r||r===qr.HTML)&&J_e(e,t,n)||(!r||r===qr.MATHML)&&Z_e(e,t))};const Q=n9,eAe=a_e,II=l_e,tAe=x_e,nAe=N_e,LI=Ql,rAe=on,iAe=H_e,NI=r9,ha=ku,ei=bk,oAe=Ys,t1=Qs,$=t1.TAG_NAMES,ut=t1.NAMESPACES,RG=t1.ATTRS,sAe={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:rAe},MG="hidden",aAe=8,lAe=3,IG="INITIAL_MODE",wk="BEFORE_HTML_MODE",i9="BEFORE_HEAD_MODE",Ih="IN_HEAD_MODE",LG="IN_HEAD_NO_SCRIPT_MODE",o9="AFTER_HEAD_MODE",Ta="IN_BODY_MODE",sv="TEXT_MODE",mi="IN_TABLE_MODE",NG="IN_TABLE_TEXT_MODE",s9="IN_CAPTION_MODE",Cg="IN_COLUMN_GROUP_MODE",rs="IN_TABLE_BODY_MODE",Nl="IN_ROW_MODE",a9="IN_CELL_MODE",Sk="IN_SELECT_MODE",Ek="IN_SELECT_IN_TABLE_MODE",av="IN_TEMPLATE_MODE",Tk="AFTER_BODY_MODE",l9="IN_FRAMESET_MODE",FG="AFTER_FRAMESET_MODE",BG="AFTER_AFTER_BODY_MODE",HG="AFTER_AFTER_FRAMESET_MODE",cAe={[$.TR]:Nl,[$.TBODY]:rs,[$.THEAD]:rs,[$.TFOOT]:rs,[$.CAPTION]:s9,[$.COLGROUP]:Cg,[$.TABLE]:mi,[$.BODY]:Ta,[$.FRAMESET]:l9},uAe={[$.CAPTION]:mi,[$.COLGROUP]:mi,[$.TBODY]:mi,[$.TFOOT]:mi,[$.THEAD]:mi,[$.COL]:Cg,[$.TR]:rs,[$.TD]:Nl,[$.TH]:Nl},FI={[IG]:{[Q.CHARACTER_TOKEN]:Cp,[Q.NULL_CHARACTER_TOKEN]:Cp,[Q.WHITESPACE_CHARACTER_TOKEN]:Gt,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:xAe,[Q.START_TAG_TOKEN]:Cp,[Q.END_TAG_TOKEN]:Cp,[Q.EOF_TOKEN]:Cp},[wk]:{[Q.CHARACTER_TOKEN]:h0,[Q.NULL_CHARACTER_TOKEN]:h0,[Q.WHITESPACE_CHARACTER_TOKEN]:Gt,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:CAe,[Q.END_TAG_TOKEN]:wAe,[Q.EOF_TOKEN]:h0},[i9]:{[Q.CHARACTER_TOKEN]:p0,[Q.NULL_CHARACTER_TOKEN]:p0,[Q.WHITESPACE_CHARACTER_TOKEN]:Gt,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Q2,[Q.START_TAG_TOKEN]:SAe,[Q.END_TAG_TOKEN]:EAe,[Q.EOF_TOKEN]:p0},[Ih]:{[Q.CHARACTER_TOKEN]:m0,[Q.NULL_CHARACTER_TOKEN]:m0,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Q2,[Q.START_TAG_TOKEN]:Ir,[Q.END_TAG_TOKEN]:n1,[Q.EOF_TOKEN]:m0},[LG]:{[Q.CHARACTER_TOKEN]:g0,[Q.NULL_CHARACTER_TOKEN]:g0,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Q2,[Q.START_TAG_TOKEN]:TAe,[Q.END_TAG_TOKEN]:kAe,[Q.EOF_TOKEN]:g0},[o9]:{[Q.CHARACTER_TOKEN]:v0,[Q.NULL_CHARACTER_TOKEN]:v0,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Q2,[Q.START_TAG_TOKEN]:_Ae,[Q.END_TAG_TOKEN]:AAe,[Q.EOF_TOKEN]:v0},[Ta]:{[Q.CHARACTER_TOKEN]:X2,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:lo,[Q.END_TAG_TOKEN]:kk,[Q.EOF_TOKEN]:il},[sv]:{[Q.CHARACTER_TOKEN]:ji,[Q.NULL_CHARACTER_TOKEN]:ji,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Gt,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:Gt,[Q.END_TAG_TOKEN]:o$e,[Q.EOF_TOKEN]:s$e},[mi]:{[Q.CHARACTER_TOKEN]:ol,[Q.NULL_CHARACTER_TOKEN]:ol,[Q.WHITESPACE_CHARACTER_TOKEN]:ol,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:_k,[Q.END_TAG_TOKEN]:Ak,[Q.EOF_TOKEN]:il},[NG]:{[Q.CHARACTER_TOKEN]:g$e,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:m$e,[Q.COMMENT_TOKEN]:wp,[Q.DOCTYPE_TOKEN]:wp,[Q.START_TAG_TOKEN]:wp,[Q.END_TAG_TOKEN]:wp,[Q.EOF_TOKEN]:wp},[s9]:{[Q.CHARACTER_TOKEN]:X2,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:v$e,[Q.END_TAG_TOKEN]:y$e,[Q.EOF_TOKEN]:il},[Cg]:{[Q.CHARACTER_TOKEN]:lv,[Q.NULL_CHARACTER_TOKEN]:lv,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:b$e,[Q.END_TAG_TOKEN]:x$e,[Q.EOF_TOKEN]:il},[rs]:{[Q.CHARACTER_TOKEN]:ol,[Q.NULL_CHARACTER_TOKEN]:ol,[Q.WHITESPACE_CHARACTER_TOKEN]:ol,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:C$e,[Q.END_TAG_TOKEN]:w$e,[Q.EOF_TOKEN]:il},[Nl]:{[Q.CHARACTER_TOKEN]:ol,[Q.NULL_CHARACTER_TOKEN]:ol,[Q.WHITESPACE_CHARACTER_TOKEN]:ol,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:S$e,[Q.END_TAG_TOKEN]:E$e,[Q.EOF_TOKEN]:il},[a9]:{[Q.CHARACTER_TOKEN]:X2,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:T$e,[Q.END_TAG_TOKEN]:k$e,[Q.EOF_TOKEN]:il},[Sk]:{[Q.CHARACTER_TOKEN]:ji,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:zG,[Q.END_TAG_TOKEN]:UG,[Q.EOF_TOKEN]:il},[Ek]:{[Q.CHARACTER_TOKEN]:ji,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:_$e,[Q.END_TAG_TOKEN]:A$e,[Q.EOF_TOKEN]:il},[av]:{[Q.CHARACTER_TOKEN]:X2,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:$$e,[Q.END_TAG_TOKEN]:D$e,[Q.EOF_TOKEN]:VG},[Tk]:{[Q.CHARACTER_TOKEN]:cv,[Q.NULL_CHARACTER_TOKEN]:cv,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:bAe,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:O$e,[Q.END_TAG_TOKEN]:P$e,[Q.EOF_TOKEN]:xp},[l9]:{[Q.CHARACTER_TOKEN]:Gt,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:R$e,[Q.END_TAG_TOKEN]:M$e,[Q.EOF_TOKEN]:xp},[FG]:{[Q.CHARACTER_TOKEN]:Gt,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:ji,[Q.COMMENT_TOKEN]:Cr,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:I$e,[Q.END_TAG_TOKEN]:L$e,[Q.EOF_TOKEN]:xp},[BG]:{[Q.CHARACTER_TOKEN]:u5,[Q.NULL_CHARACTER_TOKEN]:u5,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:BI,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:N$e,[Q.END_TAG_TOKEN]:u5,[Q.EOF_TOKEN]:xp},[HG]:{[Q.CHARACTER_TOKEN]:Gt,[Q.NULL_CHARACTER_TOKEN]:Gt,[Q.WHITESPACE_CHARACTER_TOKEN]:Mu,[Q.COMMENT_TOKEN]:BI,[Q.DOCTYPE_TOKEN]:Gt,[Q.START_TAG_TOKEN]:F$e,[Q.END_TAG_TOKEN]:Gt,[Q.EOF_TOKEN]:xp}};class dAe{constructor(t){this.options=iAe(sAe,t),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&LI.install(this,tAe),this.options.onParseError&&LI.install(this,nAe,{onParseError:this.options.onParseError})}parse(t){const n=this.treeAdapter.createDocument();return this._bootstrap(n,null),this.tokenizer.write(t,!0),this._runParsingLoop(null),n}parseFragment(t,n){n||(n=this.treeAdapter.createElement($.TEMPLATE,ut.HTML,[]));const r=this.treeAdapter.createElement("documentmock",ut.HTML,[]);this._bootstrap(r,n),this.treeAdapter.getTagName(n)===$.TEMPLATE&&this._pushTmplInsertionMode(av),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(t,!0),this._runParsingLoop(null);const i=this.treeAdapter.getFirstChild(r),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(i,o),o}_bootstrap(t,n){this.tokenizer=new Q(this.options),this.stopped=!1,this.insertionMode=IG,this.originalInsertionMode="",this.document=t,this.fragmentContext=n,this.headElement=null,this.formElement=null,this.openElements=new eAe(this.document,this.treeAdapter),this.activeFormattingElements=new II(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(t){for(;!this.stopped;){this._setupTokenizerCDATAMode();const n=this.tokenizer.getNextToken();if(n.type===Q.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,n.type===Q.WHITESPACE_CHARACTER_TOKEN&&n.chars[0]===`
`)){if(n.chars.length===1)continue;n.chars=n.chars.substr(1)}if(this._processInputToken(n),t&&this.pendingScript)break}}runParsingLoopForCurrentChunk(t,n){if(this._runParsingLoop(n),n&&this.pendingScript){const r=this.pendingScript;this.pendingScript=null,n(r);return}t&&t()}_setupTokenizerCDATAMode(){const t=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=t&&t!==this.document&&this.treeAdapter.getNamespaceURI(t)!==ut.HTML&&!this._isIntegrationPoint(t)}_switchToTextParsing(t,n){this._insertElement(t,ut.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=sv}switchToPlaintextParsing(){this.insertionMode=sv,this.originalInsertionMode=Ta,this.tokenizer.state=Q.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;do{if(this.treeAdapter.getTagName(t)===$.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}while(t)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===ut.HTML){const t=this.treeAdapter.getTagName(this.fragmentContext);t===$.TITLE||t===$.TEXTAREA?this.tokenizer.state=Q.MODE.RCDATA:t===$.STYLE||t===$.XMP||t===$.IFRAME||t===$.NOEMBED||t===$.NOFRAMES||t===$.NOSCRIPT?this.tokenizer.state=Q.MODE.RAWTEXT:t===$.SCRIPT?this.tokenizer.state=Q.MODE.SCRIPT_DATA:t===$.PLAINTEXT&&(this.tokenizer.state=Q.MODE.PLAINTEXT)}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";this.treeAdapter.setDocumentType(this.document,n,r,i)}_attachElementToTree(t){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(n,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r),this.openElements.push(r)}_insertFakeElement(t){const n=this.treeAdapter.createElement(t,ut.HTML,[]);this._attachElementToTree(n),this.openElements.push(n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ut.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n),this.openElements.push(n)}_insertFakeRootElement(){const t=this.treeAdapter.createElement($.HTML,ut.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r)}_insertCharacters(t){if(this._shouldFosterParentOnInsertion())this._fosterParentText(t.chars);else{const n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(n,t.chars)}}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_shouldProcessTokenInForeignContent(t){const n=this._getAdjustedCurrentElement();if(!n||n===this.document)return!1;const r=this.treeAdapter.getNamespaceURI(n);if(r===ut.HTML||this.treeAdapter.getTagName(n)===$.ANNOTATION_XML&&r===ut.MATHML&&t.type===Q.START_TAG_TOKEN&&t.tagName===$.SVG)return!1;const i=t.type===Q.CHARACTER_TOKEN||t.type===Q.NULL_CHARACTER_TOKEN||t.type===Q.WHITESPACE_CHARACTER_TOKEN;return(t.type===Q.START_TAG_TOKEN&&t.tagName!==$.MGLYPH&&t.tagName!==$.MALIGNMARK||i)&&this._isIntegrationPoint(n,ut.MATHML)||(t.type===Q.START_TAG_TOKEN||i)&&this._isIntegrationPoint(n,ut.HTML)?!1:t.type!==Q.EOF_TOKEN}_processToken(t){FI[this.insertionMode][t.type](this,t)}_processTokenInBodyMode(t){FI[Ta][t.type](this,t)}_processTokenInForeignContent(t){t.type===Q.CHARACTER_TOKEN?H$e(this,t):t.type===Q.NULL_CHARACTER_TOKEN?B$e(this,t):t.type===Q.WHITESPACE_CHARACTER_TOKEN?ji(this,t):t.type===Q.COMMENT_TOKEN?Cr(this,t):t.type===Q.START_TAG_TOKEN?z$e(this,t):t.type===Q.END_TAG_TOKEN&&U$e(this,t)}_processInputToken(t){this._shouldProcessTokenInForeignContent(t)?this._processTokenInForeignContent(t):this._processToken(t),t.type===Q.START_TAG_TOKEN&&t.selfClosing&&!t.ackSelfClosing&&this._err(ei.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(t,n){const r=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return ha.isIntegrationPoint(r,i,o,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.length;if(t){let n=t,r=null;do if(n--,r=this.activeFormattingElements.entries[n],r.type===II.MARKER_ENTRY||this.openElements.contains(r.element)){n++;break}while(n>0);for(let i=n;i<t;i++)r=this.activeFormattingElements.entries[i],this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Nl}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion($.P),this.openElements.popUntilTagNamePopped($.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop,n=!1;t>=0;t--){let r=this.openElements.items[t];t===0&&(n=!0,this.fragmentContext&&(r=this.fragmentContext));const i=this.treeAdapter.getTagName(r),o=cAe[i];if(o){this.insertionMode=o;break}else if(!n&&(i===$.TD||i===$.TH)){this.insertionMode=a9;break}else if(!n&&i===$.HEAD){this.insertionMode=Ih;break}else if(i===$.SELECT){this._resetInsertionModeForSelect(t);break}else if(i===$.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(i===$.HTML){this.insertionMode=this.headElement?o9:i9;break}else if(n){this.insertionMode=Ta;break}}}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.items[n],i=this.treeAdapter.getTagName(r);if(i===$.TEMPLATE)break;if(i===$.TABLE){this.insertionMode=Ek;return}}this.insertionMode=Sk}_pushTmplInsertionMode(t){this.tmplInsertionModeStack.push(t),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=t}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(t){const n=this.treeAdapter.getTagName(t);return n===$.TABLE||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const t={parent:null,beforeElement:null};for(let n=this.openElements.stackTop;n>=0;n--){const r=this.openElements.items[n],i=this.treeAdapter.getTagName(r),o=this.treeAdapter.getNamespaceURI(r);if(i===$.TEMPLATE&&o===ut.HTML){t.parent=this.treeAdapter.getTemplateContent(r);break}else if(i===$.TABLE){t.parent=this.treeAdapter.getParentNode(r),t.parent?t.beforeElement=r:t.parent=this.openElements.items[n-1];break}}return t.parent||(t.parent=this.openElements.items[0]),t}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_fosterParentText(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertTextBefore(n.parent,t,n.beforeElement):this.treeAdapter.insertText(n.parent,t)}_isSpecialElement(t){const n=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t);return t1.SPECIAL_ELEMENTS[r][n]}}var fAe=dAe;function hAe(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):_s(e,t),n}function pAe(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function mAe(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),c=a&&o>=lAe;!a||c?(c&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=gAe(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function gAe(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function vAe(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===$.TEMPLATE&&i===ut.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function yAe(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function bc(e,t){let n;for(let r=0;r<aAe&&(n=hAe(e,t),!!n);r++){const i=pAe(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const o=mAe(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(o),vAe(e,s,o),yAe(e,i,n)}}function Gt(){}function Q2(e){e._err(ei.misplacedDoctype)}function Cr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function bAe(e,t){e._appendCommentNode(t,e.openElements.items[0])}function BI(e,t){e._appendCommentNode(t,e.document)}function ji(e,t){e._insertCharacters(t)}function xp(e){e.stopped=!0}function xAe(e,t){e._setDocumentType(t);const n=t.forceQuirks?t1.DOCUMENT_MODE.QUIRKS:NI.getDocumentMode(t);NI.isConforming(t)||e._err(ei.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=wk}function Cp(e,t){e._err(ei.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,t1.DOCUMENT_MODE.QUIRKS),e.insertionMode=wk,e._processToken(t)}function CAe(e,t){t.tagName===$.HTML?(e._insertElement(t,ut.HTML),e.insertionMode=i9):h0(e,t)}function wAe(e,t){const n=t.tagName;(n===$.HTML||n===$.HEAD||n===$.BODY||n===$.BR)&&h0(e,t)}function h0(e,t){e._insertFakeRootElement(),e.insertionMode=i9,e._processToken(t)}function SAe(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.HEAD?(e._insertElement(t,ut.HTML),e.headElement=e.openElements.current,e.insertionMode=Ih):p0(e,t)}function EAe(e,t){const n=t.tagName;n===$.HEAD||n===$.BODY||n===$.HTML||n===$.BR?p0(e,t):e._err(ei.endTagWithoutMatchingOpenElement)}function p0(e,t){e._insertFakeElement($.HEAD),e.headElement=e.openElements.current,e.insertionMode=Ih,e._processToken(t)}function Ir(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.BASE||n===$.BASEFONT||n===$.BGSOUND||n===$.LINK||n===$.META?(e._appendElement(t,ut.HTML),t.ackSelfClosing=!0):n===$.TITLE?e._switchToTextParsing(t,Q.MODE.RCDATA):n===$.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,Q.MODE.RAWTEXT):(e._insertElement(t,ut.HTML),e.insertionMode=LG):n===$.NOFRAMES||n===$.STYLE?e._switchToTextParsing(t,Q.MODE.RAWTEXT):n===$.SCRIPT?e._switchToTextParsing(t,Q.MODE.SCRIPT_DATA):n===$.TEMPLATE?(e._insertTemplate(t,ut.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=av,e._pushTmplInsertionMode(av)):n===$.HEAD?e._err(ei.misplacedStartTagForHeadElement):m0(e,t)}function n1(e,t){const n=t.tagName;n===$.HEAD?(e.openElements.pop(),e.insertionMode=o9):n===$.BODY||n===$.BR||n===$.HTML?m0(e,t):n===$.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==$.TEMPLATE&&e._err(ei.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped($.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(ei.endTagWithoutMatchingOpenElement)}function m0(e,t){e.openElements.pop(),e.insertionMode=o9,e._processToken(t)}function TAe(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.BASEFONT||n===$.BGSOUND||n===$.HEAD||n===$.LINK||n===$.META||n===$.NOFRAMES||n===$.STYLE?Ir(e,t):n===$.NOSCRIPT?e._err(ei.nestedNoscriptInHead):g0(e,t)}function kAe(e,t){const n=t.tagName;n===$.NOSCRIPT?(e.openElements.pop(),e.insertionMode=Ih):n===$.BR?g0(e,t):e._err(ei.endTagWithoutMatchingOpenElement)}function g0(e,t){const n=t.type===Q.EOF_TOKEN?ei.openElementsLeftAfterEof:ei.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=Ih,e._processToken(t)}function _Ae(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.BODY?(e._insertElement(t,ut.HTML),e.framesetOk=!1,e.insertionMode=Ta):n===$.FRAMESET?(e._insertElement(t,ut.HTML),e.insertionMode=l9):n===$.BASE||n===$.BASEFONT||n===$.BGSOUND||n===$.LINK||n===$.META||n===$.NOFRAMES||n===$.SCRIPT||n===$.STYLE||n===$.TEMPLATE||n===$.TITLE?(e._err(ei.abandonedHeadElementChild),e.openElements.push(e.headElement),Ir(e,t),e.openElements.remove(e.headElement)):n===$.HEAD?e._err(ei.misplacedStartTagForHeadElement):v0(e,t)}function AAe(e,t){const n=t.tagName;n===$.BODY||n===$.HTML||n===$.BR?v0(e,t):n===$.TEMPLATE?n1(e,t):e._err(ei.endTagWithoutMatchingOpenElement)}function v0(e,t){e._insertFakeElement($.BODY),e.insertionMode=Ta,e._processToken(t)}function Mu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function X2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $Ae(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function DAe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function OAe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ut.HTML),e.insertionMode=l9)}function rl(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML)}function PAe(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement();const n=e.openElements.currentTagName;(n===$.H1||n===$.H2||n===$.H3||n===$.H4||n===$.H5||n===$.H6)&&e.openElements.pop(),e._insertElement(t,ut.HTML)}function HI(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function RAe(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML),n||(e.formElement=e.openElements.current))}function MAe(e,t){e.framesetOk=!1;const n=t.tagName;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r],o=e.treeAdapter.getTagName(i);let s=null;if(n===$.LI&&o===$.LI?s=$.LI:(n===$.DD||n===$.DT)&&(o===$.DD||o===$.DT)&&(s=o),s){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(o!==$.ADDRESS&&o!==$.DIV&&o!==$.P&&e._isSpecialElement(i))break}e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML)}function IAe(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML),e.tokenizer.state=Q.MODE.PLAINTEXT}function LAe(e,t){e.openElements.hasInScope($.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped($.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML),e.framesetOk=!1}function NAe(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName($.A);n&&(bc(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FAe(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope($.NOBR)&&(bc(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ut.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function BAe(e,t){e.treeAdapter.getDocumentMode(e.document)!==t1.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML),e.framesetOk=!1,e.insertionMode=mi}function D1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ut.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function HAe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ut.HTML);const n=Q.getTokenAttr(t,RG.TYPE);(!n||n.toLowerCase()!==MG)&&(e.framesetOk=!1),t.ackSelfClosing=!0}function UI(e,t){e._appendElement(t,ut.HTML),t.ackSelfClosing=!0}function zAe(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._appendElement(t,ut.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UAe(e,t){t.tagName=$.IMG,D1(e,t)}function VAe(e,t){e._insertElement(t,ut.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Q.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=sv}function jAe(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Q.MODE.RAWTEXT)}function WAe(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Q.MODE.RAWTEXT)}function VI(e,t){e._switchToTextParsing(t,Q.MODE.RAWTEXT)}function qAe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML),e.framesetOk=!1,e.insertionMode===mi||e.insertionMode===s9||e.insertionMode===rs||e.insertionMode===Nl||e.insertionMode===a9?e.insertionMode=Ek:e.insertionMode=Sk}function jI(e,t){e.openElements.currentTagName===$.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML)}function WI(e,t){e.openElements.hasInScope($.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ut.HTML)}function KAe(e,t){e.openElements.hasInScope($.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion($.RTC),e._insertElement(t,ut.HTML)}function GAe(e,t){e.openElements.hasInButtonScope($.P)&&e._closePElement(),e._insertElement(t,ut.HTML)}function YAe(e,t){e._reconstructActiveFormattingElements(),ha.adjustTokenMathMLAttrs(t),ha.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,ut.MATHML):e._insertElement(t,ut.MATHML),t.ackSelfClosing=!0}function QAe(e,t){e._reconstructActiveFormattingElements(),ha.adjustTokenSVGAttrs(t),ha.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,ut.SVG):e._insertElement(t,ut.SVG),t.ackSelfClosing=!0}function No(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ut.HTML)}function lo(e,t){const n=t.tagName;switch(n.length){case 1:n===$.I||n===$.S||n===$.B||n===$.U?C1(e,t):n===$.P?rl(e,t):n===$.A?NAe(e,t):No(e,t);break;case 2:n===$.DL||n===$.OL||n===$.UL?rl(e,t):n===$.H1||n===$.H2||n===$.H3||n===$.H4||n===$.H5||n===$.H6?PAe(e,t):n===$.LI||n===$.DD||n===$.DT?MAe(e,t):n===$.EM||n===$.TT?C1(e,t):n===$.BR?D1(e,t):n===$.HR?zAe(e,t):n===$.RB?WI(e,t):n===$.RT||n===$.RP?KAe(e,t):n!==$.TH&&n!==$.TD&&n!==$.TR&&No(e,t);break;case 3:n===$.DIV||n===$.DIR||n===$.NAV?rl(e,t):n===$.PRE?HI(e,t):n===$.BIG?C1(e,t):n===$.IMG||n===$.WBR?D1(e,t):n===$.XMP?jAe(e,t):n===$.SVG?QAe(e,t):n===$.RTC?WI(e,t):n!==$.COL&&No(e,t);break;case 4:n===$.HTML?$Ae(e,t):n===$.BASE||n===$.LINK||n===$.META?Ir(e,t):n===$.BODY?DAe(e,t):n===$.MAIN||n===$.MENU?rl(e,t):n===$.FORM?RAe(e,t):n===$.CODE||n===$.FONT?C1(e,t):n===$.NOBR?FAe(e,t):n===$.AREA?D1(e,t):n===$.MATH?YAe(e,t):n===$.MENU?GAe(e,t):n!==$.HEAD&&No(e,t);break;case 5:n===$.STYLE||n===$.TITLE?Ir(e,t):n===$.ASIDE?rl(e,t):n===$.SMALL?C1(e,t):n===$.TABLE?BAe(e,t):n===$.EMBED?D1(e,t):n===$.INPUT?HAe(e,t):n===$.PARAM||n===$.TRACK?UI(e,t):n===$.IMAGE?UAe(e,t):n!==$.FRAME&&n!==$.TBODY&&n!==$.TFOOT&&n!==$.THEAD&&No(e,t);break;case 6:n===$.SCRIPT?Ir(e,t):n===$.CENTER||n===$.FIGURE||n===$.FOOTER||n===$.HEADER||n===$.HGROUP||n===$.DIALOG?rl(e,t):n===$.BUTTON?LAe(e,t):n===$.STRIKE||n===$.STRONG?C1(e,t):n===$.APPLET||n===$.OBJECT?zI(e,t):n===$.KEYGEN?D1(e,t):n===$.SOURCE?UI(e,t):n===$.IFRAME?WAe(e,t):n===$.SELECT?qAe(e,t):n===$.OPTION?jI(e,t):No(e,t);break;case 7:n===$.BGSOUND?Ir(e,t):n===$.DETAILS||n===$.ADDRESS||n===$.ARTICLE||n===$.SECTION||n===$.SUMMARY?rl(e,t):n===$.LISTING?HI(e,t):n===$.MARQUEE?zI(e,t):n===$.NOEMBED?VI(e,t):n!==$.CAPTION&&No(e,t);break;case 8:n===$.BASEFONT?Ir(e,t):n===$.FRAMESET?OAe(e,t):n===$.FIELDSET?rl(e,t):n===$.TEXTAREA?VAe(e,t):n===$.TEMPLATE?Ir(e,t):n===$.NOSCRIPT?e.options.scriptingEnabled?VI(e,t):No(e,t):n===$.OPTGROUP?jI(e,t):n!==$.COLGROUP&&No(e,t);break;case 9:n===$.PLAINTEXT?IAe(e,t):No(e,t);break;case 10:n===$.BLOCKQUOTE||n===$.FIGCAPTION?rl(e,t):No(e,t);break;default:No(e,t)}}function XAe(e){e.openElements.hasInScope($.BODY)&&(e.insertionMode=Tk)}function ZAe(e,t){e.openElements.hasInScope($.BODY)&&(e.insertionMode=Tk,e._processToken(t))}function oc(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function JAe(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope($.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped($.FORM):e.openElements.remove(n))}function e$e(e){e.openElements.hasInButtonScope($.P)||e._insertFakeElement($.P),e._closePElement()}function t$e(e){e.openElements.hasInListItemScope($.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion($.LI),e.openElements.popUntilTagNamePopped($.LI))}function n$e(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function r$e(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function qI(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function i$e(e){e._reconstructActiveFormattingElements(),e._insertFakeElement($.BR),e.openElements.pop(),e.framesetOk=!1}function _s(e,t){const n=t.tagName;for(let r=e.openElements.stackTop;r>0;r--){const i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function kk(e,t){const n=t.tagName;switch(n.length){case 1:n===$.A||n===$.B||n===$.I||n===$.S||n===$.U?bc(e,t):n===$.P?e$e(e):_s(e,t);break;case 2:n===$.DL||n===$.UL||n===$.OL?oc(e,t):n===$.LI?t$e(e):n===$.DD||n===$.DT?n$e(e,t):n===$.H1||n===$.H2||n===$.H3||n===$.H4||n===$.H5||n===$.H6?r$e(e):n===$.BR?i$e(e):n===$.EM||n===$.TT?bc(e,t):_s(e,t);break;case 3:n===$.BIG?bc(e,t):n===$.DIR||n===$.DIV||n===$.NAV||n===$.PRE?oc(e,t):_s(e,t);break;case 4:n===$.BODY?XAe(e):n===$.HTML?ZAe(e,t):n===$.FORM?JAe(e):n===$.CODE||n===$.FONT||n===$.NOBR?bc(e,t):n===$.MAIN||n===$.MENU?oc(e,t):_s(e,t);break;case 5:n===$.ASIDE?oc(e,t):n===$.SMALL?bc(e,t):_s(e,t);break;case 6:n===$.CENTER||n===$.FIGURE||n===$.FOOTER||n===$.HEADER||n===$.HGROUP||n===$.DIALOG?oc(e,t):n===$.APPLET||n===$.OBJECT?qI(e,t):n===$.STRIKE||n===$.STRONG?bc(e,t):_s(e,t);break;case 7:n===$.ADDRESS||n===$.ARTICLE||n===$.DETAILS||n===$.SECTION||n===$.SUMMARY||n===$.LISTING?oc(e,t):n===$.MARQUEE?qI(e,t):_s(e,t);break;case 8:n===$.FIELDSET?oc(e,t):n===$.TEMPLATE?n1(e,t):_s(e,t);break;case 10:n===$.BLOCKQUOTE||n===$.FIGCAPTION?oc(e,t):_s(e,t);break;default:_s(e,t)}}function il(e,t){e.tmplInsertionModeStackTop>-1?VG(e,t):e.stopped=!0}function o$e(e,t){t.tagName===$.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function s$e(e,t){e._err(ei.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}function ol(e,t){const n=e.openElements.currentTagName;n===$.TABLE||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=NG,e._processToken(t)):zo(e,t)}function a$e(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ut.HTML),e.insertionMode=s9}function l$e(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ut.HTML),e.insertionMode=Cg}function c$e(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.COLGROUP),e.insertionMode=Cg,e._processToken(t)}function u$e(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ut.HTML),e.insertionMode=rs}function d$e(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.TBODY),e.insertionMode=rs,e._processToken(t)}function f$e(e,t){e.openElements.hasInTableScope($.TABLE)&&(e.openElements.popUntilTagNamePopped($.TABLE),e._resetInsertionMode(),e._processToken(t))}function h$e(e,t){const n=Q.getTokenAttr(t,RG.TYPE);n&&n.toLowerCase()===MG?e._appendElement(t,ut.HTML):zo(e,t),t.ackSelfClosing=!0}function p$e(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ut.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _k(e,t){const n=t.tagName;switch(n.length){case 2:n===$.TD||n===$.TH||n===$.TR?d$e(e,t):zo(e,t);break;case 3:n===$.COL?c$e(e,t):zo(e,t);break;case 4:n===$.FORM?p$e(e,t):zo(e,t);break;case 5:n===$.TABLE?f$e(e,t):n===$.STYLE?Ir(e,t):n===$.TBODY||n===$.TFOOT||n===$.THEAD?u$e(e,t):n===$.INPUT?h$e(e,t):zo(e,t);break;case 6:n===$.SCRIPT?Ir(e,t):zo(e,t);break;case 7:n===$.CAPTION?a$e(e,t):zo(e,t);break;case 8:n===$.COLGROUP?l$e(e,t):n===$.TEMPLATE?Ir(e,t):zo(e,t);break;default:zo(e,t)}}function Ak(e,t){const n=t.tagName;n===$.TABLE?e.openElements.hasInTableScope($.TABLE)&&(e.openElements.popUntilTagNamePopped($.TABLE),e._resetInsertionMode()):n===$.TEMPLATE?n1(e,t):n!==$.BODY&&n!==$.CAPTION&&n!==$.COL&&n!==$.COLGROUP&&n!==$.HTML&&n!==$.TBODY&&n!==$.TD&&n!==$.TFOOT&&n!==$.TH&&n!==$.THEAD&&n!==$.TR&&zo(e,t)}function zo(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function m$e(e,t){e.pendingCharacterTokens.push(t)}function g$e(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)zo(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function v$e(e,t){const n=t.tagName;n===$.CAPTION||n===$.COL||n===$.COLGROUP||n===$.TBODY||n===$.TD||n===$.TFOOT||n===$.TH||n===$.THEAD||n===$.TR?e.openElements.hasInTableScope($.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped($.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=mi,e._processToken(t)):lo(e,t)}function y$e(e,t){const n=t.tagName;n===$.CAPTION||n===$.TABLE?e.openElements.hasInTableScope($.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped($.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=mi,n===$.TABLE&&e._processToken(t)):n!==$.BODY&&n!==$.COL&&n!==$.COLGROUP&&n!==$.HTML&&n!==$.TBODY&&n!==$.TD&&n!==$.TFOOT&&n!==$.TH&&n!==$.THEAD&&n!==$.TR&&kk(e,t)}function b$e(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.COL?(e._appendElement(t,ut.HTML),t.ackSelfClosing=!0):n===$.TEMPLATE?Ir(e,t):lv(e,t)}function x$e(e,t){const n=t.tagName;n===$.COLGROUP?e.openElements.currentTagName===$.COLGROUP&&(e.openElements.pop(),e.insertionMode=mi):n===$.TEMPLATE?n1(e,t):n!==$.COL&&lv(e,t)}function lv(e,t){e.openElements.currentTagName===$.COLGROUP&&(e.openElements.pop(),e.insertionMode=mi,e._processToken(t))}function C$e(e,t){const n=t.tagName;n===$.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ut.HTML),e.insertionMode=Nl):n===$.TH||n===$.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement($.TR),e.insertionMode=Nl,e._processToken(t)):n===$.CAPTION||n===$.COL||n===$.COLGROUP||n===$.TBODY||n===$.TFOOT||n===$.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=mi,e._processToken(t)):_k(e,t)}function w$e(e,t){const n=t.tagName;n===$.TBODY||n===$.TFOOT||n===$.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=mi):n===$.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=mi,e._processToken(t)):(n!==$.BODY&&n!==$.CAPTION&&n!==$.COL&&n!==$.COLGROUP||n!==$.HTML&&n!==$.TD&&n!==$.TH&&n!==$.TR)&&Ak(e,t)}function S$e(e,t){const n=t.tagName;n===$.TH||n===$.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,ut.HTML),e.insertionMode=a9,e.activeFormattingElements.insertMarker()):n===$.CAPTION||n===$.COL||n===$.COLGROUP||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR?e.openElements.hasInTableScope($.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=rs,e._processToken(t)):_k(e,t)}function E$e(e,t){const n=t.tagName;n===$.TR?e.openElements.hasInTableScope($.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=rs):n===$.TABLE?e.openElements.hasInTableScope($.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=rs,e._processToken(t)):n===$.TBODY||n===$.TFOOT||n===$.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope($.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=rs,e._processToken(t)):(n!==$.BODY&&n!==$.CAPTION&&n!==$.COL&&n!==$.COLGROUP||n!==$.HTML&&n!==$.TD&&n!==$.TH)&&Ak(e,t)}function T$e(e,t){const n=t.tagName;n===$.CAPTION||n===$.COL||n===$.COLGROUP||n===$.TBODY||n===$.TD||n===$.TFOOT||n===$.TH||n===$.THEAD||n===$.TR?(e.openElements.hasInTableScope($.TD)||e.openElements.hasInTableScope($.TH))&&(e._closeTableCell(),e._processToken(t)):lo(e,t)}function k$e(e,t){const n=t.tagName;n===$.TD||n===$.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nl):n===$.TABLE||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==$.BODY&&n!==$.CAPTION&&n!==$.COL&&n!==$.COLGROUP&&n!==$.HTML&&kk(e,t)}function zG(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.OPTION?(e.openElements.currentTagName===$.OPTION&&e.openElements.pop(),e._insertElement(t,ut.HTML)):n===$.OPTGROUP?(e.openElements.currentTagName===$.OPTION&&e.openElements.pop(),e.openElements.currentTagName===$.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ut.HTML)):n===$.INPUT||n===$.KEYGEN||n===$.TEXTAREA||n===$.SELECT?e.openElements.hasInSelectScope($.SELECT)&&(e.openElements.popUntilTagNamePopped($.SELECT),e._resetInsertionMode(),n!==$.SELECT&&e._processToken(t)):(n===$.SCRIPT||n===$.TEMPLATE)&&Ir(e,t)}function UG(e,t){const n=t.tagName;if(n===$.OPTGROUP){const r=e.openElements.items[e.openElements.stackTop-1],i=r&&e.treeAdapter.getTagName(r);e.openElements.currentTagName===$.OPTION&&i===$.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===$.OPTGROUP&&e.openElements.pop()}else n===$.OPTION?e.openElements.currentTagName===$.OPTION&&e.openElements.pop():n===$.SELECT&&e.openElements.hasInSelectScope($.SELECT)?(e.openElements.popUntilTagNamePopped($.SELECT),e._resetInsertionMode()):n===$.TEMPLATE&&n1(e,t)}function _$e(e,t){const n=t.tagName;n===$.CAPTION||n===$.TABLE||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR||n===$.TD||n===$.TH?(e.openElements.popUntilTagNamePopped($.SELECT),e._resetInsertionMode(),e._processToken(t)):zG(e,t)}function A$e(e,t){const n=t.tagName;n===$.CAPTION||n===$.TABLE||n===$.TBODY||n===$.TFOOT||n===$.THEAD||n===$.TR||n===$.TD||n===$.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped($.SELECT),e._resetInsertionMode(),e._processToken(t)):UG(e,t)}function $$e(e,t){const n=t.tagName;if(n===$.BASE||n===$.BASEFONT||n===$.BGSOUND||n===$.LINK||n===$.META||n===$.NOFRAMES||n===$.SCRIPT||n===$.STYLE||n===$.TEMPLATE||n===$.TITLE)Ir(e,t);else{const r=uAe[n]||Ta;e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}}function D$e(e,t){t.tagName===$.TEMPLATE&&n1(e,t)}function VG(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped($.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function O$e(e,t){t.tagName===$.HTML?lo(e,t):cv(e,t)}function P$e(e,t){t.tagName===$.HTML?e.fragmentContext||(e.insertionMode=BG):cv(e,t)}function cv(e,t){e.insertionMode=Ta,e._processToken(t)}function R$e(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.FRAMESET?e._insertElement(t,ut.HTML):n===$.FRAME?(e._appendElement(t,ut.HTML),t.ackSelfClosing=!0):n===$.NOFRAMES&&Ir(e,t)}function M$e(e,t){t.tagName===$.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagName!==$.FRAMESET&&(e.insertionMode=FG))}function I$e(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.NOFRAMES&&Ir(e,t)}function L$e(e,t){t.tagName===$.HTML&&(e.insertionMode=HG)}function N$e(e,t){t.tagName===$.HTML?lo(e,t):u5(e,t)}function u5(e,t){e.insertionMode=Ta,e._processToken(t)}function F$e(e,t){const n=t.tagName;n===$.HTML?lo(e,t):n===$.NOFRAMES&&Ir(e,t)}function B$e(e,t){t.chars=oAe.REPLACEMENT_CHARACTER,e._insertCharacters(t)}function H$e(e,t){e._insertCharacters(t),e.framesetOk=!1}function z$e(e,t){if(ha.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ut.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ut.MATHML?ha.adjustTokenMathMLAttrs(t):r===ut.SVG&&(ha.adjustTokenSVGTagName(t),ha.adjustTokenSVGAttrs(t)),ha.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function U$e(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ut.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}const KI=/[#.]/g;function V$e(e,t){const n=e||"",r={};let i=0,o,s;for(;i<n.length;){KI.lastIndex=i;const a=KI.exec(n),c=n.slice(i,a?a.index:n.length);c&&(o?o==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:s=c,i+=c.length),a&&(o=a[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const j$e=new Set(["menu","submit","reset","button"]),$w={}.hasOwnProperty;function jG(e,t,n){const r=n&&G$e(n);return function(o,s,...a){let c=-1,u;if(o==null)u={type:"root",children:[]},a.unshift(s);else if(u=V$e(o,t),u.tagName=u.tagName.toLowerCase(),r&&$w.call(r,u.tagName)&&(u.tagName=r[u.tagName]),W$e(s,u.tagName)){let d;for(d in s)$w.call(s,d)&&q$e(e,u.properties,d,s[d])}else a.unshift(s);for(;++c<a.length;)Dw(u.children,a[c]);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}}function W$e(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?j$e.has(e.type.toLowerCase()):!("value"in e)}function q$e(e,t,n,r){const i=xg(e,n);let o=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=wM(r):i.commaSeparated?s=kw(r):i.commaOrSpaceSeparated?s=wM(kw(r).join(" ")):s=GI(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?K$e(r):String(r);if(Array.isArray(s)){const a=[];for(;++o<s.length;)a[o]=GI(i,i.property,s[o]);s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Dw(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Dw(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Dw(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function GI(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||km(n)===km(t)))return!0}return n}function K$e(e){const t=[];let n;for(n in e)$w.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function G$e(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Y$e=jG(Mh,"div"),Q$e=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],X$e=jG(Tu,"g",Q$e);function Z$e(e){const t=String(e),n=[],r=/\r?\n|\r/g;for(;r.test(t);)n.push(r.lastIndex);return n.push(t.length+1),{toPoint:i,toOffset:o};function i(s){let a=-1;if(typeof s=="number"&&s>-1&&s<n[n.length-1]){for(;++a<n.length;)if(n[a]>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s}}return{line:void 0,column:void 0,offset:void 0}}function o(s){const a=s&&s.line,c=s&&s.column;if(typeof a=="number"&&typeof c=="number"&&!Number.isNaN(a)&&!Number.isNaN(c)&&a-1 in n){const u=(n[a-2]||0)+c-1||0;if(u>-1&&u<n[n.length-1])return u}return-1}}const _m={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},WG={}.hasOwnProperty,J$e=Object.prototype;function eDe(e,t){const n=t||{};let r,i;return rDe(n)?(i=n,r={}):(i=n.file||void 0,r=n),$k({schema:r.space==="svg"?Tu:Mh,file:i,verbose:r.verbose,location:!1},e)}function $k(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},d5(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:qG(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),s=Z$e(o),a=s.toPoint(0),c=s.toPoint(o.length);n.position={start:a,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},d5(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},d5(e,r,n),n}default:return n=tDe(e,t),n}}function qG(e,t){let n=-1;const r=[];for(;++n<t.length;)r[n]=$k(e,t[n]);return r}function tDe(e,t){const n=e.schema;e.schema=t.namespaceURI===_m.svg?Tu:Mh;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],c=(a.prefix?a.prefix+":":"")+a.name;WG.call(J$e,c)||(i[c]=a.value)}const s=(e.schema.space==="svg"?X$e:Y$e)(t.tagName,i,qG(e,t.childNodes));if(d5(e,t,s),s.tagName==="template"){const a=t,c=a.sourceCodeLocation,u=c&&c.startTag&&of(c.startTag),d=c&&c.endTag&&of(c.endTag),f=$k(e,a.content);u&&d&&e.file&&(f.position={start:u.end,end:d.start}),s.content=f}return e.schema=n,s}function d5(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nDe(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nDe(e,t,n){const r=of(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const o={};let s;if(n.attrs)for(s in n.attrs)WG.call(n.attrs,s)&&(o[xg(e.schema,s).property]=of(n.attrs[s]));t.data={position:{opening:of(n.startTag),closing:n.endTag?of(n.endTag):null,properties:o}}}}return r}function of(e){const t=YI({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=YI({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function YI(e){return e.line&&e.column?e:void 0}function rDe(e){return"messages"in e}const QI={}.hasOwnProperty;function c9(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&QI.call(i,e)){const c=String(i[e]);s=QI.call(a,c)?a[c]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const iDe={}.hasOwnProperty,KG=c9("type",{handlers:{root:sDe,element:dDe,text:cDe,comment:uDe,doctype:lDe}});function oDe(e,t){const n=t&&typeof t=="object"?t.space:t;return KG(e,n==="svg"?Tu:Mh)}function sDe(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Dk(e.children,n,t),Lh(e,n),n}function aDe(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Dk(e.children,n,t),Lh(e,n),n}function lDe(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0};return Lh(e,t),t}function cDe(e){const t={nodeName:"#text",value:e.value,parentNode:void 0};return Lh(e,t),t}function uDe(e){const t={nodeName:"#comment",data:e.value,parentNode:void 0};return Lh(e,t),t}function dDe(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Tu);const i=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&iDe.call(e.properties,o)){const a=fDe(r,o,e.properties[o]);a&&i.push(a)}}const s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:_m[r.space],childNodes:[],parentNode:void 0};return s.childNodes=Dk(e.children,s,r),Lh(e,s),e.tagName==="template"&&e.content&&(s.content=aDe(e.content,r)),s}function fDe(e,t,n){const r=xg(e,t);if(n==null||n===!1||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?gk(n):mk(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=i.name.indexOf(":");o<0?i.prefix="":(i.name=i.name.slice(o+1),i.prefix=r.attribute.slice(0,o)),i.namespace=_m[r.space]}return i}function Dk(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=KG(e[r],n);o.parentNode=t,i.push(o)}return i}function Lh(e,t){const n=e.position;n&&n.start&&n.end&&(t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const hDe=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"],pDe="IN_TEMPLATE_MODE",mDe="DATA_STATE",gDe="CHARACTER_TOKEN",vDe="START_TAG_TOKEN",yDe="END_TAG_TOKEN",bDe="COMMENT_TOKEN",xDe="DOCTYPE_TOKEN",CDe={sourceCodeLocationInfo:!0,scriptingEnabled:!1},GG=function(e,t,n){let r=-1;const i=new fAe(CDe),o=c9("type",{handlers:{root:v,element:b,text:x,comment:w,doctype:C,raw:S},unknown:TDe});let s,a,c,u,d;if(_De(t)&&(n=t,t=void 0),n&&n.passThrough)for(;++r<n.passThrough.length;)o.handlers[n.passThrough[r]]=T;const f=eDe(kDe(e)?p():h(),t);if(s&&ds(f,"comment",(k,_,O)=>{const D=k;if(D.value.stitch&&O!==null&&_!==null)return O.children[_]=D.value.stitch,_}),e.type!=="root"&&f.type==="root"&&f.children.length===1)return f.children[0];return f;function h(){const k={nodeName:"template",tagName:"template",attrs:[],namespaceURI:_m.html,childNodes:[]},_={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:_m.html,childNodes:[]},O={nodeName:"#document-fragment",childNodes:[]};if(i._bootstrap(_,k),i._pushTmplInsertionMode(pDe),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),a=i.tokenizer,!a)throw new Error("Expected `tokenizer`");return c=a.preprocessor,d=a.__mixins[0],u=d.posTracker,o(e),E(),i._adoptNodes(_.childNodes[0],O),O}function p(){const k=i.treeAdapter.createDocument();if(i._bootstrap(k,void 0),a=i.tokenizer,!a)throw new Error("Expected `tokenizer`");return c=a.preprocessor,d=a.__mixins[0],u=d.posTracker,o(e),E(),k}function m(k){let _=-1;if(k)for(;++_<k.length;)o(k[_])}function v(k){m(k.children)}function b(k){E(),i._processInputToken(wDe(k)),m(k.children),hDe.includes(k.tagName)||(E(),i._processInputToken(EDe(k)))}function x(k){E(),i._processInputToken({type:gDe,chars:k.value,location:sf(k)})}function C(k){E(),i._processInputToken({type:xDe,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:sf(k)})}function w(k){E(),i._processInputToken({type:bDe,data:k.value,location:sf(k)})}function S(k){const _=yg(k),O=_.line||1,D=_.column||1,L=_.offset||0;if(!c)throw new Error("Expected `preprocessor`");if(!a)throw new Error("Expected `tokenizer`");if(!u)throw new Error("Expected `posTracker`");if(!d)throw new Error("Expected `locationTracker`");c.html=void 0,c.pos=-1,c.lastGapPos=-1,c.lastCharPos=-1,c.gapStack=[],c.skipNextNewLine=!1,c.lastChunkWritten=!1,c.endOfChunkHit=!1,u.isEol=!1,u.lineStartPos=-D+1,u.droppedBufferSize=L,u.offset=0,u.col=1,u.line=O,d.currentAttrLocation=void 0,d.ctLoc=sf(k),a.write(k.value),i._runParsingLoop(null),(a.state==="NAMED_CHARACTER_REFERENCE_STATE"||a.state==="NUMERIC_CHARACTER_REFERENCE_END_STATE")&&(c.lastChunkWritten=!0,a[a.state](a._consume()))}function T(k){s=!0;let _;"children"in k?_={...k,children:GG({type:"root",children:k.children},t,n).children}:_={...k},w({type:"comment",value:{stitch:_}})}function E(){if(!a)throw new Error("Expected `tokenizer`");if(!u)throw new Error("Expected `posTracker`");const k=a.currentCharacterToken;k&&(k.location.endLine=u.line,k.location.endCol=u.col+1,k.location.endOffset=u.offset+1,i._processInputToken(k)),a.tokenQueue=[],a.state=mDe,a.returnState="",a.charRefCode=-1,a.tempBuff=[],a.lastStartTagName="",a.consumedAfterSnapshot=-1,a.active=!1,a.currentCharacterToken=void 0,a.currentToken=void 0,a.currentAttr=void 0}};function wDe(e){const t=Object.assign(sf(e));return t.startTag=Object.assign({},t),{type:vDe,tagName:e.tagName,selfClosing:!1,attrs:SDe(e),location:t}}function SDe(e){return oDe({tagName:e.tagName,type:"element",properties:e.properties,children:[]}).attrs}function EDe(e){const t=Object.assign(sf(e));return t.startTag=Object.assign({},t),{type:yDe,tagName:e.tagName,attrs:[],location:t}}function TDe(e){throw new Error("Cannot compile `"+e.type+"` node")}function kDe(e){const t=e.type==="root"?e.children[0]:e;return Boolean(t&&(t.type==="doctype"||t.type==="element"&&t.tagName==="html"))}function sf(e){const t=yg(e),n=U6(e);return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function _De(e){return Boolean(e&&!("message"in e&&"messages"in e))}function ADe(e={}){return(t,n)=>GG(t,n,e)}function $De(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let i=!1;try{i=!!document.execCommand("copy")}catch{i=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(i)}function YG(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?YG(t.parentElement):null}function DDe(e){var t=n=>{var r=YG(n.target);!r||(r.classList.add("active"),$De(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};y.exports.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var i;(i=e.current)==null||i.removeEventListener("click",t,!1)}},[e])}var ODe=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement"];const PDe=Ae.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:i,style:o,disableCopy:s=!1,skipHtml:a=!0,onScroll:c,onMouseOver:u,pluginsFilter:d,wrapperElement:f={},warpperElement:h={}}=e,p=xCe(e,ODe),m=Ae.useRef(null);y.exports.useImperativeHandle(t,()=>yl({},e,{mdp:m}),[m,e]);var v=(n||"")+" "+(r||"");DDe(m);var b=[...p.rehypePlugins||[]],x={allowElement:(S,T,E)=>p.allowElement?p.allowElement(S,T,E):/^[A-Za-z0-9]+$/.test(S.tagName)};a&&b.push(ADe);var C=[...p.remarkPlugins||[],Yke],w=yl({},h,f);return l("div",yl({ref:m,onScroll:c,onMouseOver:u},w,{className:v,style:o,children:l(e9,yl({},x,p,{skipHtml:a,rehypePlugins:d?d("rehype",b):b,remarkPlugins:d?d("remark",C):C,children:i||""}))}))}),QG="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",XG="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",RDe=new RegExp("^[^"+XG+"]*["+QG+"]"),MDe=new RegExp("^[^"+QG+"]*["+XG+"]");function IDe(e){const t=String(e||"");return RDe.test(t)?"rtl":MDe.test(t)?"ltr":"neutral"}function ZG(e){return"children"in e?JG(e):"value"in e?e.value:""}function LDe(e){return e.type==="text"?e.value:"children"in e?JG(e):""}function JG(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=LDe(e.children[t]);return n.join("")}function NDe(e,t){const n=e.schema,r=e.language,i=e.direction,o=e.editableOrEditingHost;let s;if(t.type==="element"&&t.properties){const u=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",f=XI(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Tu),f==="rtl"?s=f:f==="ltr"||f!=="auto"&&t.tagName==="html"||f!=="auto"&&t.tagName==="input"&&d==="tel"?s="ltr":(f==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?s=s7(ZG(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?s=t.properties.value?s7(t.properties.value):"ltr":ds(t,c)),s&&(e.direction=s)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return a;function a(){e.schema=n,e.language=r,e.direction=i,e.editableOrEditingHost=o}function c(u){if(u.type==="text")return s=s7(u.value),s?Ew:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||XI(u)))return d0}}function s7(e){const t=IDe(e);return t==="neutral"?void 0:t}function XI(e){const t=e.type==="element"&&e.properties&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}const FDe={}.hasOwnProperty;function xi(e,t){const n=typeof t=="string"&&BDe(e)&&e.type==="element"&&e.properties&&FDe.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}function BDe(e){return Boolean(e&&typeof e=="object"&&"type"in e)}const HDe=c9("operator",{unknown:YDe,invalid:UDe,handlers:{"=":VDe,"~=":jDe,"|=":WDe,"^=":qDe,"$=":KDe,"*=":GDe}});function zDe(e,t,n){const r=e.attrs;let i=-1;for(;++i<r.length;)if(!HDe(r[i],t,xg(n,r[i].name)))return!1;return!0}function UDe(e,t,n){return xi(t,n.property)}function VDe(e,t,n){return Boolean(xi(t,n.property)&&t.properties&&Nh(t.properties[n.property],n)===e.value)}function jDe(e,t,n){const r=t.properties&&t.properties[n.property];return!n.commaSeparated&&r&&typeof r=="object"&&e.value&&r.includes(e.value)||xi(t,n.property)&&Nh(r,n)===e.value}function WDe(e,t,n){const r=Nh(t.properties&&t.properties[n.property],n);return Boolean(xi(t,n.property)&&e.value&&(r===e.value||r.slice(0,e.value.length)===e.value&&r.charAt(e.value.length)==="-"))}function qDe(e,t,n){return Boolean(xi(t,n.property)&&t.properties&&e.value&&Nh(t.properties[n.property],n).slice(0,e.value.length)===e.value)}function KDe(e,t,n){return Boolean(xi(t,n.property)&&t.properties&&e.value&&Nh(t.properties[n.property],n).slice(-e.value.length)===e.value)}function GDe(e,t,n){return Boolean(xi(t,n.property)&&t.properties&&e.value&&Nh(t.properties[n.property],n).includes(e.value))}function YDe(e){throw new Error("Unknown operator `"+e.operator+"`")}function Nh(e,t){return typeof e=="boolean"?t.attribute:Array.isArray(e)?(t.commaSeparated?gk:mk)(e):String(e)}function QDe(e,t){const n=t.properties.className||[];let r=-1;if(e.classNames){for(;++r<e.classNames.length;)if(!n.includes(e.classNames[r]))return!1}return!0}function XDe(e,t){return Boolean(t.properties&&t.properties.id===e.id)}function ZDe(e,t){return e.tagName==="*"||e.tagName===t.tagName}function JDe(e,t){return function(n,r){let i=ZI(n,"tag");const o=ZI(r==null?"*":r,"range"),s=[];let a=-1;for(;++a<o.length;){const c=o[a].toLowerCase();if(!t&&c==="*")continue;let u=-1;const d=[];for(;++u<i.length;)if(e(i[u].toLowerCase(),c)){if(!t)return i[u];s.push(i[u])}else d.push(i[u]);i=d}return t?s:void 0}}const eOe=JDe(function(e,t){const n=e.split("-"),r=t.split("-");let i=0,o=0;if(r[o]!=="*"&&n[i]!==r[o])return!1;for(i++,o++;o<r.length;){if(r[o]==="*"){o++;continue}if(!n[i])return!1;if(n[i]===r[o]){i++,o++;continue}if(n[i].length===1)return!1;i++}return!0},!0);function ZI(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const tOe=new Set([9,10,12,13,32]),JI="0".charCodeAt(0),nOe="9".charCodeAt(0);function rOe(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=o(),i=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i!=null?i:1),a(),t<e.length?(r=o(),a(),i=s()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function o(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const c=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=JI&&e.charCodeAt(t)<=nOe;)u=u*10+(e.charCodeAt(t)-JI),t++;return t===c?null:u}function a(){for(;t<e.length&&tOe.has(e.charCodeAt(t));)t++}}var eL={trueFunc:function(){return!0},falseFunc:function(){return!1}};function iOe(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return eL.falseFunc;if(t===-1)return o=>o<=n;if(t===0)return o=>o===n;if(t===1)return n<0?eL.trueFunc:o=>o>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?o=>o>=n&&o%r===i:o=>o<=n&&o%r===i}function tL(e){return iOe(rOe(e))}const oOe=tL.default||tL,sOe=c9("name",{unknown:OOe,invalid:DOe,handlers:{any:Ow,"any-link":aOe,blank:lOe,checked:cOe,dir:uOe,disabled:tY,empty:dOe,enabled:fOe,"first-child":hOe,"first-of-type":pOe,has:mOe,lang:gOe,"last-child":vOe,"last-of-type":yOe,matches:Ow,not:bOe,"nth-child":xOe,"nth-last-child":COe,"nth-of-type":SOe,"nth-last-of-type":wOe,"only-child":EOe,"only-of-type":TOe,optional:kOe,"read-only":_Oe,"read-write":nY,required:rY,root:AOe,scope:$Oe}});eY.needsIndex=["any","first-child","first-of-type","last-child","last-of-type","matches","not","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];function eY(e,t,n,r,i){const o=e.pseudos;let s=-1;for(;++s<o.length;)if(!sOe(o[s],t,n,r,i))return!1;return!0}function aOe(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&xi(t,"href")}function lOe(e,t){return!iY(t,n);function n(r){return r.type==="element"||r.type==="text"&&!ZK(r)}}function cOe(e,t){return t.tagName==="input"||t.tagName==="menuitem"?Boolean(t.properties&&(t.properties.type==="checkbox"||t.properties.type==="radio")&&xi(t,"checked")):t.tagName==="option"?xi(t,"selected"):!1}function uOe(e,t,n,r,i){return i.direction===e.value}function tY(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&xi(t,"disabled")}function dOe(e,t){return!iY(t,n);function n(r){return r.type==="element"||r.type==="text"}}function fOe(e,t){return!tY(e,t)}function hOe(e,t,n,r,i){return Ga(i,e),i.elementIndex===0}function pOe(e,t,n,r,i){return Ga(i,e),i.typeIndex===0}function mOe(e,t,n,r,i){const o={...i,found:!1,shallow:!1,one:!0,scopeElements:[t],results:[],rootQuery:Ok(e.value)};return Pk(o,{type:"root",children:t.children}),o.results.length>0}function gOe(e,t,n,r,i){return i.language!==""&&i.language!==void 0&&eOe(i.language,kw(e.value)).length>0}function vOe(e,t,n,r,i){return Ga(i,e),Boolean(i.elementCount&&i.elementIndex===i.elementCount-1)}function yOe(e,t,n,r,i){return Ga(i,e),typeof i.typeIndex=="number"&&typeof i.typeCount=="number"&&i.typeIndex===i.typeCount-1}function Ow(e,t,n,r,i){const o={...i,found:!1,shallow:!1,one:!0,scopeElements:[t],results:[],rootQuery:Ok(e.value)};return Pk(o,t),o.results[0]===t}function bOe(e,t,n,r,i){return!Ow(e,t,n,r,i)}function xOe(e,t,n,r,i){const o=u9(e);return Ga(i,e),typeof i.elementIndex=="number"&&o(i.elementIndex)}function COe(e,t,n,r,i){const o=u9(e);return Ga(i,e),Boolean(typeof i.elementCount=="number"&&typeof i.elementIndex=="number"&&o(i.elementCount-i.elementIndex-1))}function wOe(e,t,n,r,i){const o=u9(e);return Ga(i,e),typeof i.typeCount=="number"&&typeof i.typeIndex=="number"&&o(i.typeCount-1-i.typeIndex)}function SOe(e,t,n,r,i){const o=u9(e);return Ga(i,e),typeof i.typeIndex=="number"&&o(i.typeIndex)}function EOe(e,t,n,r,i){return Ga(i,e),i.elementCount===1}function TOe(e,t,n,r,i){return Ga(i,e),i.typeCount===1}function kOe(e,t){return!rY(e,t)}function _Oe(e,t,n,r,i){return!nY(e,t,n,r,i)}function nY(e,t,n,r,i){return t.tagName==="input"||t.tagName==="textarea"?!xi(t,"readOnly")&&!xi(t,"disabled"):Boolean(i.editableOrEditingHost)}function rY(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&xi(t,"required")}function AOe(e,t,n,r,i){return Boolean((!r||r.type==="root")&&i.schema&&(i.schema.space==="html"||i.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function $Oe(e,t,n,r,i){return i.scopeElements.includes(t)}function DOe(){throw new Error("Invalid pseudo-selector")}function OOe(e){throw e.name?new Error("Unknown pseudo-selector `"+e.name+"`"):new Error("Unexpected pseudo-element or empty pseudo-class")}function iY(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function Ga(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function u9(e){let t=e._cachedFn;return t||(t=oOe(e.value),e._cachedFn=t),t}function POe(e,t,n,r,i){return Boolean((!e.tagName||ZDe(e,t))&&(!e.classNames||QDe(e,t))&&(!e.id||XDe(e,t))&&(!e.attrs||zDe(e,t,i.schema))&&(!e.pseudos||eY(e,t,n,r,i)))}const ROe=[];function Ok(e){return e===null?{type:"selectors",selectors:[]}:e.type==="ruleSet"?{type:"selectors",selectors:[e]}:e}function Pk(e,t){t&&oY(e,[],t,void 0,void 0)}function oY(e,t,n,r,i){let o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};const s=NDe(e,n);return n.type==="element"&&(o=IOe(e,f5(t,e.rootQuery.selectors),n,r,i)),"children"in n&&!e.shallow&&!(e.one&&e.found)&&MOe(e,o,n),s(),o}function MOe(e,t,n){const r=f5(t.descendant,t.directChild);let i,o=-1;const s={count:0,types:new Map},a={count:0,types:new Map};for(;++o<n.children.length;)nL(s,n.children[o]);for(o=-1;++o<n.children.length;){const c=n.children[o],u=c.type==="element"?c.tagName.toUpperCase():void 0;if(e.elementIndex=a.count,e.typeIndex=u&&a.types.get(u)||0,e.elementCount=s.count,e.typeCount=u?s.types.get(u):0,"children"in c){const d=f5(r,i),f=oY(e,d,n.children[o],o,n);i=f5(f.generalSibling,f.adjacentSibling)}if(e.one&&e.found)break;nL(a,n.children[o])}}function IOe(e,t,n,r,i){const o={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let s=-1;for(;++s<t.length;){const a=t[s];if(e.one&&e.found)break;if(e.shallow&&a.rule.rule)throw new Error("Expected selector without nesting");if(POe(a.rule,n,r,i,e)){const c=a.rule.rule;if(c){const u={type:"ruleSet",rule:c},d=c.nestingOperator==="+"?"adjacentSibling":c.nestingOperator==="~"?"generalSibling":c.nestingOperator===">"?"directChild":"descendant";a7(o,d,u)}else e.found=!0,e.results.includes(n)||e.results.push(n)}a.rule.nestingOperator===null?a7(o,"descendant",a):a.rule.nestingOperator==="~"&&a7(o,"generalSibling",a)}return o}function f5(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:ROe}function a7(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function nL(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}var sY={},Rk={},Mk={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s){return s>="a"&&s<="z"||s>="A"&&s<="Z"||s==="-"||s==="_"}e.isIdentStart=t;function n(s){return s>="a"&&s<="z"||s>="A"&&s<="Z"||s>="0"&&s<="9"||s==="-"||s==="_"}e.isIdent=n;function r(s){return s>="a"&&s<="f"||s>="A"&&s<="F"||s>="0"&&s<="9"}e.isHex=r;function i(s){for(var a=s.length,c="",u=0;u<a;){var d=s.charAt(u);if(e.identSpecialChars[d])c+="\\"+d;else if(d==="_"||d==="-"||d>="A"&&d<="Z"||d>="a"&&d<="z"||u!==0&&d>="0"&&d<="9")c+=d;else{var f=d.charCodeAt(0);if((f&63488)===55296){var h=s.charCodeAt(u++);if((f&64512)!==55296||(h&64512)!==56320)throw Error("UCS-2(decode): illegal sequence");f=((f&1023)<<10)+(h&1023)+65536}c+="\\"+f.toString(16)+" "}u++}return c}e.escapeIdentifier=i;function o(s){for(var a=s.length,c="",u=0,d;u<a;){var f=s.charAt(u);f==='"'?f='\\"':f==="\\"?f="\\\\":(d=e.strReplacementsRev[f])!==void 0&&(f=d),c+=f,u++}return'"'+c+'"'}e.escapeStr=o,e.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},e.strReplacementsRev={"\n":"\\n","\r":"\\r","	":"\\t","\f":"\\f","\v":"\\v"},e.singleQuoteEscapeChars={n:`
`,r:"\r",t:"	",f:"\f","\\":"\\","'":"'"},e.doubleQuotesEscapeChars={n:`
`,r:"\r",t:"	",f:"\f","\\":"\\",'"':'"'}})(Mk);Object.defineProperty(Rk,"__esModule",{value:!0});var Ts=Mk;function LOe(e,t,n,r,i,o){var s=e.length,a="";function c(v,b){var x="";for(t++,a=e.charAt(t);t<s;){if(a===v)return t++,x;if(a==="\\"){t++,a=e.charAt(t);var C=void 0;if(a===v)x+=v;else if((C=b[a])!==void 0)x+=C;else if(Ts.isHex(a)){var w=a;for(t++,a=e.charAt(t);Ts.isHex(a);)w+=a,t++,a=e.charAt(t);a===" "&&(t++,a=e.charAt(t)),x+=String.fromCharCode(parseInt(w,16));continue}else x+=a}else x+=a;t++,a=e.charAt(t)}return x}function u(){var v="";for(a=e.charAt(t);t<s;){if(Ts.isIdent(a))v+=a;else if(a==="\\"){if(t++,t>=s)throw Error("Expected symbol but end of file reached.");if(a=e.charAt(t),Ts.identSpecialChars[a])v+=a;else if(Ts.isHex(a)){var b=a;for(t++,a=e.charAt(t);Ts.isHex(a);)b+=a,t++,a=e.charAt(t);a===" "&&(t++,a=e.charAt(t)),v+=String.fromCharCode(parseInt(b,16));continue}else v+=a}else return v;t++,a=e.charAt(t)}return v}function d(){a=e.charAt(t);for(var v=!1;a===" "||a==="	"||a===`
`||a==="\r"||a==="\f";)v=!0,t++,a=e.charAt(t);return v}function f(){var v=h();if(t<s)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return v}function h(){var v=p();if(!v)return null;var b=v;for(a=e.charAt(t);a===",";){if(t++,d(),b.type!=="selectors"&&(b={type:"selectors",selectors:[v]}),v=p(),!v)throw Error('Rule expected after ",".');b.selectors.push(v)}return b}function p(){d();var v={type:"ruleSet"},b=m();if(!b)return null;for(var x=v;b&&(b.type="rule",x.rule=b,x=b,d(),a=e.charAt(t),!(t>=s||a===","||a===")"));)if(i[a]){var C=a;if(t++,d(),b=m(),!b)throw Error('Rule expected after "'+C+'".');b.nestingOperator=C}else b=m(),b&&(b.nestingOperator=null);return v}function m(){for(var v=null;t<s;)if(a=e.charAt(t),a==="*")t++,(v=v||{}).tagName="*";else if(Ts.isIdentStart(a)||a==="\\")(v=v||{}).tagName=u();else if(a===".")t++,v=v||{},(v.classNames=v.classNames||[]).push(u());else if(a==="#")t++,(v=v||{}).id=u();else if(a==="["){t++,d();var b={name:u()};if(d(),a==="]")t++;else{var x="";if(r[a]&&(x=a,t++,a=e.charAt(t)),t>=s)throw Error('Expected "=" but end of file reached.');if(a!=="=")throw Error('Expected "=" but "'+a+'" found.');b.operator=x+"=",t++,d();var C="";if(b.valueType="string",a==='"')C=c('"',Ts.doubleQuotesEscapeChars);else if(a==="'")C=c("'",Ts.singleQuoteEscapeChars);else if(o&&a==="$")t++,C=u(),b.valueType="substitute";else{for(;t<s&&a!=="]";)C+=a,t++,a=e.charAt(t);C=C.trim()}if(d(),t>=s)throw Error('Expected "]" but end of file reached.');if(a!=="]")throw Error('Expected "]" but "'+a+'" found.');t++,b.value=C}v=v||{},(v.attrs=v.attrs||[]).push(b)}else if(a===":"){t++;var w=u(),S={name:w};if(a==="("){t++;var T="";if(d(),n[w]==="selector")S.valueType="selector",T=h();else{if(S.valueType=n[w]||"string",a==='"')T=c('"',Ts.doubleQuotesEscapeChars);else if(a==="'")T=c("'",Ts.singleQuoteEscapeChars);else if(o&&a==="$")t++,T=u(),S.valueType="substitute";else{for(;t<s&&a!==")";)T+=a,t++,a=e.charAt(t);T=T.trim()}d()}if(t>=s)throw Error('Expected ")" but end of file reached.');if(a!==")")throw Error('Expected ")" but "'+a+'" found.');t++,S.value=T}v=v||{},(v.pseudos=v.pseudos||[]).push(S)}else break;return v}return f()}Rk.parseCssSelector=LOe;var Ik={};Object.defineProperty(Ik,"__esModule",{value:!0});var fo=Mk;function h5(e){var t="";switch(e.type){case"ruleSet":for(var n=e.rule,r=[];n;)n.nestingOperator&&r.push(n.nestingOperator),r.push(h5(n)),n=n.rule;t=r.join(" ");break;case"selectors":t=e.selectors.map(h5).join(", ");break;case"rule":e.tagName&&(e.tagName==="*"?t="*":t=fo.escapeIdentifier(e.tagName)),e.id&&(t+="#"+fo.escapeIdentifier(e.id)),e.classNames&&(t+=e.classNames.map(function(i){return"."+fo.escapeIdentifier(i)}).join("")),e.attrs&&(t+=e.attrs.map(function(i){return"operator"in i?i.valueType==="substitute"?"["+fo.escapeIdentifier(i.name)+i.operator+"$"+i.value+"]":"["+fo.escapeIdentifier(i.name)+i.operator+fo.escapeStr(i.value)+"]":"["+fo.escapeIdentifier(i.name)+"]"}).join("")),e.pseudos&&(t+=e.pseudos.map(function(i){return i.valueType?i.valueType==="selector"?":"+fo.escapeIdentifier(i.name)+"("+h5(i.value)+")":i.valueType==="substitute"?":"+fo.escapeIdentifier(i.name)+"($"+i.value+")":i.valueType==="numeric"?":"+fo.escapeIdentifier(i.name)+"("+i.value+")":":"+fo.escapeIdentifier(i.name)+"("+fo.escapeIdentifier(i.value)+")":":"+fo.escapeIdentifier(i.name)}).join(""));break;default:throw Error('Unknown entity type: "'+e.type+'".')}return t}Ik.renderEntity=h5;Object.defineProperty(sY,"__esModule",{value:!0});var NOe=Rk,FOe=Ik,BOe=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];this.pseudos[o]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];delete this.pseudos[o]}return this},e.prototype.registerNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];this.pseudos[o]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];delete this.pseudos[o]}return this},e.prototype.registerNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];this.ruleNestingOperators[o]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];delete this.ruleNestingOperators[o]}return this},e.prototype.registerAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];this.attrEqualityMods[o]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];delete this.attrEqualityMods[o]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(t){return NOe.parseCssSelector(t,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(t){return FOe.renderEntity(t).trim()},e}(),HOe=sY.CssSelectorParser=BOe;const d9=new HOe;d9.registerAttrEqualityMods("~","|","^","$","*");d9.registerSelectorPseudos("any","matches","not","has");d9.registerNestingOperators(">","+","~");function zOe(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return d9.parse(e)}function UOe(e,t,n){const r=VOe(e,t,n);return Pk(r,t||void 0),r.results}function VOe(e,t,n){return{rootQuery:Ok(zOe(e)),results:[],scopeElements:t?t.type==="root"?t.children:[t]:[],one:!1,shallow:!1,found:!1,schema:n==="svg"?Tu:Mh,language:void 0,direction:"ltr",editableOrEditingHost:!1,typeIndex:void 0,elementIndex:void 0,typeCount:void 0,elementCount:void 0}}const aY=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=aY(n.children))}),t),jOe=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const i=UOe(t,r);i&&i.length>0&&ds(r,i,(o,s,a)=>{n(o,s,a)});return}ds(r,(i,o,s)=>{n(i,o,s)})}}},WOe=jOe;var qOe=function(t){return n=>{ds(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=yl({},r.properties,{"data-meta":String(r.data.meta)}))})}};const KOe=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),GOe=(e=[],t)=>{let n=t;for(;n>-1;){if(n--,!e[n])return;if(e[n]&&e[n].value&&e[n].value.replace(/(\n|\s)/g,"")!==""||e[n].type!=="text")return!/^rehype:/.test(e[n].value)||e[n].type!=="comment"?void 0:e[n]}},lY=(e=[],t,n,r)=>{let i=t;for(;i<e.length;)if(i++,n){const o=e[i];if(o&&o.value&&o.value.replace(/(\n|\s)/g,"")!==""||e[i]&&e[i].type==="element")return o.tagName===n?o:void 0}else{const o=e[i];if(!o||o.type==="element"||o.type==="text"&&o.value.replace(/(\n|\s)/g,"")!=="")return;if(o.type&&/^(comment|raw)$/ig.test(o.type))return o.value&&!/^rehype:/.test(o.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?lY(e,i,"pre",r)?void 0:(o.value=(o.value||"").replace(/^(\n|\s)+/,""),o):(o.value=(o.value||"").replace(/^(\n|\s)+/,""),o)}},rL=({value:e=""})=>{const t=KOe(e.replace(/^<!--(.*?)-->/,"$1").replace(/^rehype:/,""));return Object.keys(t).forEach(n=>{t[n]==="true"&&(t[n]=!0),t[n]==="false"&&(t[n]=!1),typeof t[n]=="string"&&!/^0/.test(t[n])&&!isNaN(+t[n])&&(t[n]=+t[n])}),t},iL=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},YOe=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{ds(r,"element",(i,o,s)=>{if(n&&i.tagName==="pre"&&i&&Array.isArray(i.children)&&s&&Array.isArray(s.children)&&s.children.length>1){const a=i.children[0];if(a&&a.tagName==="code"&&typeof o=="number"){const c=GOe(s.children,o);if(c){const u=rL(c);Object.keys(u).length>0&&(i.properties={...i.properties,"data-type":"rehyp"},a.properties=iL(a.properties,u,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(i.tagName)&&s&&Array.isArray(s.children)&&typeof o=="number"){const a=lY(s.children,o,"",n);if(a){const c=rL(a);Object.keys(c).length>0&&(i.properties=iL(i.properties,c,t))}}})}},QOe=YOe,XOe=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,ZOe=Object.hasOwnProperty;class JOe{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=ePe(t,n===!0);const o=i;for(;ZOe.call(r.occurrences,i);)r.occurrences[o]++,i=o+"-"+r.occurrences[o];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function ePe(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(XOe,"").replace(/ /g,"-"))}function cY(e){const t=e&&e.type==="element"&&e.tagName.toLowerCase()||"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:null}const oL=new JOe;function tPe(e={}){const t=e.prefix||"";return n=>{oL.reset(),ds(n,"element",r=>{cY(r)&&r.properties&&!xi(r,"id")&&(r.properties.id=t+oL.slug(ZG(r)))})}}const uY=function(e){if(e==null)return Lk;if(typeof e=="string")return rPe(e);if(typeof e=="object")return nPe(e);if(typeof e=="function")return dY(e);throw new Error("Expected function, string, or array as test")};function nPe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=uY(e[n]);return dY(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function rPe(e){return t;function t(n){return Lk(n)&&n.tagName===e}}function dY(e){return t;function t(n,...r){return Lk(n)&&Boolean(e.call(this,n,...r))}}function Lk(e){return Boolean(e&&typeof e=="object"&&e.type==="element"&&typeof e.tagName=="string")}const iPe={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]};function oPe(e={}){let t=e.properties;const n=e.behaviour||e.behavior||"prepend",r=e.content||iPe,i=e.group,o=uY(e.test);let s;return n==="wrap"?s=u:n==="before"||n==="after"?s=c:(t||(t={ariaHidden:"true",tabIndex:-1}),s=a),p=>{ds(p,"element",(m,v,b)=>{if(cY(m)&&xi(m,"id")&&o(m,v,b))return s(m,v,b)})};function a(p){return p.children[n==="prepend"?"unshift":"push"](h(p,rf(!0,{},t),d(r,p))),[d0]}function c(p,m,v){if(typeof m!="number"||!v)return;const b=h(p,rf(!0,{},t),d(r,p));let x=n==="before"?[b,p]:[p,b];if(i){const C=f(i,p);C&&!Array.isArray(C)&&C.type==="element"&&(C.children=x,x=[C])}return v.children.splice(m,1,...x),[d0,m+x.length]}function u(p){return p.children=[h(p,rf(!0,{},t),p.children)],[d0]}function d(p,m){const v=f(p,m);return Array.isArray(v)?v:[v]}function f(p,m){return typeof p=="function"?p(m):rf(!0,Array.isArray(p)?[]:{},p)}function h(p,m,v){return{type:"element",tagName:"a",properties:Object.assign({},m,{href:"#"+(p.properties||{}).id}),children:v}}}const sPe=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{ds(r,(i,o,s)=>{if(i.type==="element"||i.type==="root"){let a=!1;i.children=i.children.filter(c=>{if(c.type==="raw"||c.type==="comment"){let u=(c.value||"").trim();if(u=u.replace(/^<!--(.*?)-->/,"$1"),u===t)return a=!0,!1;if(u===n)return a=!1,!1}return!a})}})}},aPe=sPe;var lPe={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function cPe(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var uPe=(e,t)=>(n,r,i)=>{if(n.type==="element"&&i&&i.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var o=n.children&&n.children[0];o&&o.properties&&o.properties.ariaHidden==="true"&&(o.properties=yl({class:"anchor"},o.properties),o.children=[lPe])}if(n.type==="element"&&n.tagName==="pre"&&!e){var s=aY(n.children);n.children.push(cPe(s))}t&&t(n,r,i)},dPe=[tPe,oPe,aPe];const fY=Ae.forwardRef((e,t)=>{var n,r=[qOe,...dPe,[WOe,{rewrite:uPe((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[QOe,{properties:"attr"}],...e.rehypePlugins||[]];return l(PDe,yl({},e,{rehypePlugins:r,ref:t}))});function fPe(e,t){return mn({},e,t)}var Fh=Ae.createContext({markdown:""});function hY(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=mn({},t,hY(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function pY(e,t,n,r,i){t===void 0&&(t=[]);var o=hY(t||[]),s=[];if(e.altKey&&s.push("alt"),e.shiftKey&&s.push("shift"),e.metaKey&&s.push("cmd"),e.ctrlKey&&s.push("ctrl"),s.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&s.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&s.push("escape"),!(s.length<1)){var a=!!o[s.join("+")],c=a?o[s.join("+")]:void 0;if(Object.keys(o).forEach(u=>{var d=u.split("+").every(f=>/ctrlcmd/.test(f)?s.includes("ctrl")||s.includes("cmd"):s.includes(f));d&&(c=o[u])}),c&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(c,r,i,s);return}}}var l7;function sL(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof l7>"u"){var t=document.createElement("textarea");t.value="1",l7=!!t.firstChild}return l7}function Ef(e,t){if(e.focus(),document.selection){var n=document.selection.createRange();n.text=t,n.collapse(!1),n.select();return}var r=!1;if(t!==""?r=document.execCommand&&document.execCommand("insertText",!1,t):r=document.execCommand&&document.execCommand("delete",!1),!r){var i=e.selectionStart,o=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var s=document.createRange(),a=document.createTextNode(t);if(sL(e)){var c=e.firstChild;if(!c)e.appendChild(a);else{for(var u=0,d=null,f=null;c&&(d===null||f===null);){var h=c.nodeValue.length;i>=u&&i<=u+h&&s.setStart(d=c,i-u),o>=u&&o<=u+h&&s.setEnd(f=c,o-u),u+=h,c=c.nextSibling}i!==o&&s.deleteContents()}}if(sL(e)&&s.commonAncestorContainer.nodeName==="#text")s.insertNode(a);else{var p=e.value;e.value=p.slice(0,i)+t+p.slice(o)}}e.setSelectionRange(i+t.length,i+t.length);var m=document.createEvent("UIEvent");m.initEvent("input",!0,!1),e.dispatchEvent(m)}}function Ni(e){var{text:t,selection:n,prefix:r,suffix:i=r}=e,o=n;if(t&&t.length&&n.start===n.end&&(o=hPe(t,n.start)),o.start>=r.length&&o.end<=t.length-i.length){var s=t.slice(o.start-r.length,o.end+i.length);if(s.startsWith(r)&&s.endsWith(i))return{start:o.start-r.length,end:o.end+i.length}}return o}function y0(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
`)+1,i=t.slice(n.end).indexOf(`
`)+n.end;return i===n.end-1&&(i=t.length),{start:r,end:i}}function mY(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,i=t-1;i>=0&&n>=0;i--)switch(e.charCodeAt(i)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function gY(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,i=t;i<e.length&&n>=0;i++)switch(e.charCodeAt(i)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function hPe(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=a=>a===" "||a.charCodeAt(0)===10,r=0,i=e.length,o=t;o-1>-1;o--)if(n(e[o-1])){r=o;break}for(var s=t;s<e.length;s++)if(n(e[s])){i=s;break}return{start:r,end:i}}function ti(e){var{api:t,selectedText:n,selection:r,prefix:i,suffix:o=i}=e;n.length>=i.length+o.length&&n.startsWith(i)&&n.endsWith(o)?(t.replaceSelection(n.slice(i.length,o.length?-o.length:void 0)),t.setSelectionRange({start:r.start-i.length,end:r.end-i.length})):(t.replaceSelection(""+i+n+o),t.setSelectionRange({start:r.start+i.length,end:r.end+i.length}))}function Nk(e,t){var n=e.split(/\n/),r=0,i=n.map((o,s)=>{if(typeof t=="string")return o.startsWith(t)?(r-=t.length,o.slice(t.length)):(r+=t.length,t+o);if(typeof t=="function"){if(o.startsWith(t(o,s)))return r-=t(o,s).length,o.slice(t(o,s).length);var a=t(o,s);return r+=a.length,t(o,s)+o}throw Error("insertion is expected to be either a string or a function")}).join(`
`);return{modifiedText:i,insertionLength:r}}var Fk={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:l("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:l("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},vY={name:"codeBlock",keyCommand:"codeBlock",shortcuts:"ctrlcmd+shift+j",prefix:"```",buttonProps:{"aria-label":"Insert Code Block (ctrl + shift + j)",title:"Insert Code Block (ctrl + shift +j)"},icon:l("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:l("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),i="\n```\n",o="\n```\n";r.selectedText.length>=i.length+o.length-2&&r.selectedText.startsWith(i)&&r.selectedText.endsWith(o)?(i="```\n",o="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
`||r.selection.start===0)&&(i="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
`||r.selection.end===e.text.length)&&(o="\n```"));var s=Ni({text:e.text,selection:e.selection,prefix:i,suffix:o}),a=t.setSelectionRange(s);ti({api:t,selectedText:a.selectedText,selection:e.selection,prefix:i,suffix:o})}},pPe={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:l("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:l("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:(e,t)=>{if(e.selectedText.indexOf(`
`)===-1){var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else vY.execute(e,t)}},mPe={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:l("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:g("g",{fill:"none",fillRule:"evenodd",children:[l("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),l("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),l("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Tf={keyCommand:"divider"},gPe={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:l("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:l("path",{fill:"currentColor",d:"M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"})}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({fullscreen:!r.fullscreen})}};function vPe(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Bk=(e,t)=>{var n=mn({children:e,icon:l("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:l("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:()=>{}},t,{keyCommand:"group"});return Array.isArray(n.children)&&(n.children=n.children.map(r=>{var i=mn({},(vPe(r),r));return i.parent=n,mn({},i)})),n},Hk={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`

---
`,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:l("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:l("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length&&r.selectedText.startsWith(e.command.prefix)?ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},yPe={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:l("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:l("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=Ni({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},zk={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:l("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:l("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},bPe={name:"link",keyCommand:"link",shortcuts:"ctrlcmd+l",prefix:"[",suffix:"](url)",buttonProps:{"aria-label":"Add a link (ctrl + l)",title:"Add a link (ctrl + l)"},icon:l("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:l("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?(n=Ni({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Uk=(e,t,n)=>{var r=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),i=t.setSelectionRange(r),o=mY(i.text,i.selection.start),s=Array(o+1).join(`
`),a=gY(i.text,i.selection.end),c=Array(a+1).join(`
`),{modifiedText:u,insertionLength:d}=Nk(i.selectedText,n);if(d<0){var f=i.selection.start,h=i.selection.end;i.selection.start>0&&e.text.slice(i.selection.start-1,i.selection.start)===`
`&&(f-=1),i.selection.end<e.text.length-1&&e.text.slice(i.selection.end,i.selection.end+1)===`
`&&(h+=1),t.setSelectionRange({start:f,end:h}),t.replaceSelection(""+u),t.setSelectionRange({start:f,end:f+u.length})}else{t.replaceSelection(""+s+u+c);var p=i.selection.start+o,m=p+u.length;t.setSelectionRange({start:p,end:m})}},Vk={name:"unordered-list",keyCommand:"list",shortcuts:"ctrl+shift+u",prefix:"- ",buttonProps:{"aria-label":"Add unordered list (ctrl + shift + u)",title:"Add unordered list (ctrl + shift + u)"},icon:l("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:l("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Uk(e,t,"- ")}},xPe={name:"ordered-list",keyCommand:"list",shortcuts:"ctrl+shift+o",prefix:"1. ",buttonProps:{"aria-label":"Add ordered list (ctrl + shift + o)",title:"Add ordered list (ctrl + shift + o)"},icon:l("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:l("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Uk(e,t,(n,r)=>r+1+". ")}},CPe={name:"checked-list",keyCommand:"list",shortcuts:"ctrl+shift+c",prefix:"- [ ] ",buttonProps:{"aria-label":"Add checked list (ctrl + shift + c)",title:"Add checked list (ctrl + shift + c)"},icon:l("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:l("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:(e,t)=>{Uk(e,t,(n,r)=>"- [ ] ")}},wPe={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:g("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[l("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),l("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"preview"})}},SPe={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:g("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[l("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),l("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"edit"})}},EPe={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:g("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[l("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),l("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:(e,t,n,r,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"live"})}},jk={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:l("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:l("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),i=mY(r.text,r.selection.start),o=Array(i+1).join(`
`),s=gY(r.text,r.selection.end),a=Array(s+1).join(`
`),c=Nk(r.selectedText,e.command.prefix);t.replaceSelection(""+o+c.modifiedText+a);var u=r.selection.start+i,d=u+c.modifiedText.length;t.setSelectionRange({start:u,end:d})}},TPe={name:"strikethrough",keyCommand:"strikethrough",shortcuts:"ctrl+shift+x",buttonProps:{"aria-label":"Add strikethrough text (ctrl + shift + x)",title:"Add strikethrough text (ctrl + shift + x)"},prefix:"~~",icon:l("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:l("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},yY={name:"title1",keyCommand:"title1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert title1 (ctrl + 1)",title:"Insert title1 (ctrl + 1)"},icon:l("div",{style:{fontSize:18,textAlign:"left"},children:"Title 1"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}};function Bh(e){var{state:t,api:n,prefix:r,suffix:i=r}=e,o=y0({text:t.text,selection:t.selection}),s=n.setSelectionRange(o);ti({api:n,selectedText:s.selectedText,selection:t.selection,prefix:r,suffix:i})}mn({},yY,{icon:l("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:l("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});var Wk={name:"title2",keyCommand:"title2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert title2 (ctrl + 2)",title:"Insert title2 (ctrl + 2)"},icon:l("div",{style:{fontSize:16,textAlign:"left"},children:"Title 2"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},qk={name:"title3",keyCommand:"title3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert title3 (ctrl + 3)",title:"Insert title3 (ctrl + 3)"},icon:l("div",{style:{fontSize:15,textAlign:"left"},children:"Title 3"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},kPe={name:"title4",keyCommand:"title4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert title4 (ctrl + 4)",title:"Insert title4 (ctrl + 4)"},icon:l("div",{style:{fontSize:14,textAlign:"left"},children:"Title 4"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},_Pe={name:"title5",keyCommand:"title5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert title5 (ctrl + 5)",title:"Insert title5 (ctrl + 5)"},icon:l("div",{style:{fontSize:12,textAlign:"left"},children:"Title 5"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},APe={name:"title6",keyCommand:"title6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert title6 (ctrl + 6)",title:"Insert title6 (ctrl + 6)"},icon:l("div",{style:{fontSize:12,textAlign:"left"},children:"Title 6"}),execute:(e,t)=>{Bh({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},$Pe={name:"table",keyCommand:"table",prefix:`
| Header | Header |
|--------|--------|
| Cell | Cell |
| Cell | Cell |
| Cell | Cell |

`,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:l("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:l("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"})}),execute:(e,t)=>{var n=Ni({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length+e.command.suffix.length&&r.selectedText.startsWith(e.command.prefix)?ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),ti({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},DPe={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:l("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:l("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:()=>{window.open("https://www.markdownguide.org/basic-syntax/","_blank","noreferrer")}},OPe=()=>[Fk,zk,TPe,Hk,Bk([yY,Wk,qk,kPe,_Pe,APe],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Tf,bPe,jk,pPe,vY,mPe,yPe,$Pe,Tf,Vk,xPe,CPe,Tf,DPe],PPe=()=>[SPe,EPe,wPe,Tf,gPe];function uv(e){var t;return{selection:{start:e.selectionStart,end:e.selectionEnd},text:e.value,selectedText:(t=e.value)==null?void 0:t.slice(e.selectionStart,e.selectionEnd)}}class Kk{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return Ef(this.textArea,t),uv(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,uv(this.textArea)}}class Gk{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new Kk(t)}getState(){return this.textArea?uv(this.textArea):!1}executeCommand(t,n,r,i){t.execute&&t.execute(mn({command:t},uv(this.textArea)),this.textApi,n,r,i)}}function p5(e){e.stopPropagation(),e.preventDefault()}function aL(e,t){p5(e);var n=e.target,r=new Kk(n),i={start:n.selectionStart,end:n.selectionEnd};if(i=y0({text:n.value,selection:i}),!(t<0&&i.start<=0||t>0&&i.end>=n.value.length)){var o=n.value.slice(i.start,i.end);if(t<0){var s=y0({text:n.value,selection:{start:i.start-1,end:i.start-1}}),a=n.value.slice(s.start,s.end);r.setSelectionRange({start:s.start,end:i.end}),Ef(n,o+`
`+a),r.setSelectionRange({start:s.start,end:s.start+o.length})}else{var c=y0({text:n.value,selection:{start:i.end+1,end:i.end+1}}),u=n.value.slice(c.start,c.end);r.setSelectionRange({start:i.start,end:c.end}),Ef(n,u+`
`+o),r.setSelectionRange({start:c.end-o.length,end:c.end})}}}function RPe(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,i=r.value.substr(0,r.selectionStart),o=i.split(`
`),s=o[o.length-1],a=new Kk(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){p5(e);var c=new Array(t+1).join("  ");if(r.selectionStart!==r.selectionEnd){var u=r.value.substring(0,r.selectionStart).split(`
`),d=r.value.substring(0,r.selectionEnd).split(`
`),f=[];d.forEach((k,_)=>{k!==u[_]&&f.push(k)});var h=f.join(`
`),p=r.value.substring(r.selectionStart,r.selectionEnd),m=r.value.substring(0,r.selectionStart).length;a.setSelectionRange({start:r.value.indexOf(h),end:r.selectionEnd});var v=Nk(h,e.shiftKey?"":c),b=v.modifiedText;e.shiftKey&&(b=b.split(`
`).map(k=>k.replace(new RegExp("^"+c),"")).join(`
`)),a.replaceSelection(b);var x=e.shiftKey?-t:t,C=e.shiftKey?-f.length*t:f.length*t;a.setSelectionRange({start:m+x,end:m+p.length+C})}else return Ef(r,c)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(s)||/^\d+.\s/.test(s))&&!e.shiftKey){p5(e);var w=`
- `;return s.startsWith("*")&&(w=`
* `),(s.startsWith("- [ ]")||s.startsWith("- [X]")||s.startsWith("- [x]"))&&(w=`
- [ ] `),/^\d+.\s/.test(s)&&(w=`
`+(parseInt(s)+1)+". "),Ef(r,w)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){p5(e);var S={start:r.selectionStart,end:r.selectionEnd},T=S;S=y0({text:r.value,selection:S});var E=r.value.slice(S.start,S.end);a.setSelectionRange({start:S.end,end:S.end}),Ef(r,`
`+E),a.setSelectionRange({start:T.start,end:T.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?aL(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&aL(e,1)}var MPe=["prefixCls","onChange"],IPe=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","dispatch"];function LPe(e){var{prefixCls:t,onChange:n}=e,r=nv(e,MPe),i=y.exports.useContext(Fh),{markdown:o,commands:s,fullscreen:a,preview:c,highlightEnable:u,extraCommands:d,tabSize:f,defaultTabEnable:h,dispatch:p}=i;nv(i,IPe);var m=Ae.useRef(null),v=Ae.useRef(),b=Ae.useRef({fullscreen:a,preview:c});y.exports.useEffect(()=>{b.current={fullscreen:a,preview:c,highlightEnable:u}},[a,c,u]),y.exports.useEffect(()=>{if(m.current&&p){var C=new Gk(m.current);v.current=C,p({textarea:m.current,commandOrchestrator:C})}},[]);var x=C=>{RPe(C,f,h),pY(C,[...s||[],...d||[]],v.current,p,b.current)};return y.exports.useEffect(()=>(m.current&&m.current.addEventListener("keydown",x),()=>{m.current&&m.current.removeEventListener("keydown",x)}),[]),l("textarea",mn({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:m,className:t+"-text-input "+(r.className?r.className:""),value:o,onChange:C=>{p&&p({markdown:C.target.value}),n&&n(C)}}))}var NPe=["prefixCls","className","onScroll","renderTextarea"];function FPe(e){var t=e||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:o}=t,s=nv(t,NPe),{markdown:a,scrollTop:c,commands:u,extraCommands:d,dispatch:f}=y.exports.useContext(Fh),h=Ae.useRef(null),p=Ae.useRef(),m=Ae.createRef();y.exports.useEffect(()=>{var b={};m.current&&(b.textareaWarp=m.current||void 0,m.current.scrollTop=c||0),f&&f(mn({},b))},[]),y.exports.useEffect(()=>{if(h.current&&f){var b=new Gk(h.current);p.current=b,f({textarea:h.current,commandOrchestrator:b})}},[]);var v={WebkitTextFillColor:"initial",overflow:"auto"};return l("div",{ref:m,className:n+"-area "+(r||""),onScroll:i,children:l("div",{className:n+"-text",children:o?Ae.cloneElement(o(mn({},s,{value:a,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:f,onChange:s.onChange,shortcuts:pY,useContext:{commands:u,extraCommands:d,commandOrchestrator:p.current}}),{ref:h}):l(y.exports.Fragment,{children:l(LPe,mn({prefixCls:n},s,{style:v}))})})})}function BPe(e){var{prefixCls:t,groupName:n,commands:r,children:i}=e||{},{barPopup:o={}}=y.exports.useContext(Fh);return y.exports.useMemo(()=>l("div",{className:t+"-toolbar-child "+(n&&o[n]?"active":""),onClick:s=>s.stopPropagation(),children:Array.isArray(r)?l(Pw,mn({commands:r},e,{isChild:!0})):i}),[r,o,n,t])}function lL(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:i,barPopup:o={},components:s,commandOrchestrator:a,dispatch:c}=y.exports.useContext(Fh),u=y.exports.useRef("");function d(f,h){if(!!c){var p={barPopup:mn({},o)};f.keyCommand==="preview"&&(p.preview=f.value),f.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&f.keyCommand==="group"?e.commands.forEach(m=>{h===m.groupName?p.barPopup[h]=!0:m.keyCommand&&(p.barPopup[m.groupName]=!1)}):(h||f.parent)&&Object.keys(p.barPopup||{}).forEach(m=>{p.barPopup[m]=!1}),Object.keys(p).length&&c(mn({},p)),a&&a.executeCommand(f)}}return y.exports.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(u.current||(u.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=u.current))},[r,u,n]),l("ul",{children:(e.commands||[]).map((f,h)=>{if(f.keyCommand==="divider")return l("li",mn({},f.liProps,{className:t+"-toolbar-divider"}),h);if(!f.keyCommand)return l(y.exports.Fragment,{},h);var p=r&&f.keyCommand==="fullscreen"||f.keyCommand==="preview"&&i===f.value,m=f.children&&typeof f.children=="function"?f.children({getState:()=>a.getState(),textApi:a?a.textApi:void 0,close:()=>d({},f.groupName),execute:()=>d({execute:f.execute}),dispatch:c}):void 0,v=o&&i&&i==="preview"&&!/(preview|fullscreen)/.test(f.keyCommand),b=(s==null?void 0:s.toolbar)||f.render,x=b&&typeof b=="function"?b(f,!!v,d,h):null;return g("li",mn({},f.liProps,{className:p?"active":"",children:[x&&Ae.isValidElement(x)&&x,!x&&!f.buttonProps&&f.icon,!x&&f.buttonProps&&l("button",{type:"button",disabled:v,"data-name":f.name,...f.buttonProps,onClick:C=>{C.stopPropagation(),d(f,f.groupName)},children:f.icon},h),f.children&&l(BPe,{overflow:n,groupName:f.groupName,prefixCls:t,children:m,commands:Array.isArray(f.children)?f.children:void 0})]}),h)})})}function Pw(e){e===void 0&&(e={});var{prefixCls:t,toolbarBottom:n,isChild:r}=e,{commands:i,extraCommands:o}=y.exports.useContext(Fh),s=n?"bottom":"";return g("div",{className:t+"-toolbar "+s,children:[l(lL,mn({},e,{commands:e.commands||i||[]})),!r&&l(lL,mn({},e,{commands:o||[]}))]})}var HPe=e=>{var{prefixCls:t,onChange:n}=e||{},r=y.exports.useRef(null),i=y.exports.useRef(),o=y.exports.useRef(e.height);y.exports.useEffect(()=>{o.current!==e.height&&(o.current=e.height)},[e.height]);function s(d){if(i.current){var f,h=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY),p=i.current.height+h-i.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(i.current.height+(h-i.current.dragY))}}function a(){var d,f;i.current=void 0,document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a),(d=r.current)==null||d.removeEventListener("touchmove",s),(f=r.current)==null||f.removeEventListener("touchend",a)}function c(d){var f,h,p;d.preventDefault();var m=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY);i.current={height:o.current,dragY:m},document.addEventListener("mousemove",s),document.addEventListener("mouseup",a),(h=r.current)==null||h.addEventListener("touchmove",s,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",a,{passive:!1})}y.exports.useEffect(()=>{if(document){var d,f;(d=r.current)==null||d.addEventListener("touchstart",c,{passive:!1}),(f=r.current)==null||f.addEventListener("mousedown",c)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",c),document.removeEventListener("mousemove",s)}}},[]);var u=y.exports.useMemo(()=>l("svg",{viewBox:"0 0 512 512",height:"100%",children:l("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return l("div",{className:t+"-bar",ref:r,children:u})},zPe=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function UPe(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var VPe=Ae.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:i,value:o,commands:s=OPe(),commandsFilter:a,direction:c,extraCommands:u=PPe(),height:d=200,enableScroll:f=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:m="live",fullscreen:v=!1,overflow:b=!0,previewOptions:x={},textareaProps:C,maxHeight:w=1200,minHeight:S=100,autoFocus:T,tabSize:E=2,defaultTabEnable:k=!1,onChange:_,onStatistics:O,onHeightChange:D,hideToolbar:L,toolbarBottom:N=!1,components:j,renderTextarea:G}=n,X=nv(n,zPe),re=s.map(Pe=>a?a(Pe,!1):Pe).filter(Boolean),oe=u.map(Pe=>a?a(Pe,!0):Pe).filter(Boolean),[U,H]=y.exports.useReducer(fPe,{markdown:o,preview:m,components:j,height:d,highlightEnable:p,tabSize:E,defaultTabEnable:k,scrollTop:0,scrollTopPreview:0,commands:re,extraCommands:oe,fullscreen:v,barPopup:{}}),R=y.exports.useRef(null),se=y.exports.useRef(null),ee=y.exports.useRef(f);y.exports.useImperativeHandle(t,()=>mn({},U,{container:R.current,dispatch:H})),y.exports.useMemo(()=>ee.current=f,[f]),y.exports.useEffect(()=>{var Pe={};R.current&&(Pe.container=R.current||void 0),Pe.markdown=o||"",Pe.barPopup={},H&&H(mn({},U,Pe))},[]);var I=[i,"wmde-markdown-var",c?r+"-"+c:null,r,U.preview?r+"-show-"+U.preview:null,U.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();y.exports.useMemo(()=>o!==U.markdown&&H({markdown:o||""}),[o,U.markdown]),y.exports.useMemo(()=>m!==U.preview&&H({preview:m}),[m]),y.exports.useMemo(()=>E!==U.tabSize&&H({tabSize:E}),[E]),y.exports.useMemo(()=>p!==U.highlightEnable&&H({highlightEnable:p}),[p]),y.exports.useMemo(()=>T!==U.autoFocus&&H({autoFocus:T}),[T]),y.exports.useMemo(()=>v!==U.fullscreen&&H({fullscreen:v}),[v]),y.exports.useMemo(()=>d!==U.height&&H({height:d}),[d]),y.exports.useMemo(()=>d!==U.height&&D&&D(U.height,d,U),[d,D,U]),y.exports.useMemo(()=>s!==U.commands&&H({commands:re}),[e.commands]),y.exports.useMemo(()=>u!==U.extraCommands&&H({extraCommands:oe}),[e.extraCommands]);var me=y.exports.useRef(),Se=y.exports.useRef("preview"),pe=y.exports.useRef(!1);y.exports.useMemo(()=>{me.current=U.textareaWarp,U.textareaWarp&&(U.textareaWarp.addEventListener("mouseover",()=>{Se.current="text"}),U.textareaWarp.addEventListener("mouseleave",()=>{Se.current="preview"}))},[U.textareaWarp]);var ye=(Pe,rt)=>{if(!!ee.current){var ft=me.current,vt=se.current?se.current:void 0;if(pe.current||(Se.current=rt,pe.current=!0),ft&&vt){var We=(ft.scrollHeight-ft.offsetHeight)/(vt.scrollHeight-vt.offsetHeight);Pe.target===ft&&Se.current==="text"&&(vt.scrollTop=ft.scrollTop/We),Pe.target===vt&&Se.current==="preview"&&(ft.scrollTop=vt.scrollTop*We);var De=0;Se.current==="text"?De=ft.scrollTop||0:Se.current==="preview"&&(De=vt.scrollTop||0),H({scrollTop:De})}}},_e=r+"-preview "+(x.className||""),$e=Pe=>ye(Pe,"preview"),J=y.exports.useMemo(()=>l("div",{ref:se,className:_e,children:l(fY,mn({},x,{onScroll:$e,source:U.markdown||""}))}),[_e,x,U.markdown]),fe=(j==null?void 0:j.preview)&&(j==null?void 0:j.preview(U.markdown||"",U,H));fe&&Ae.isValidElement(fe)&&(J=l("div",{className:_e,ref:se,onScroll:$e,children:fe}));var we=mn({},X.style,{height:U.height||"100%"}),Le=()=>H({barPopup:mn({},UPe(U.barPopup))}),He=Pe=>H({height:Pe}),Ge=Pe=>{if(_&&_(Pe.target.value,Pe,U),C&&C.onChange&&C.onChange(Pe),U.textarea&&U.textarea instanceof HTMLTextAreaElement&&O){var rt=new Gk(U.textarea),ft=rt.getState()||{};O(mn({},ft,{lineCount:Pe.target.value.split(`
`).length,length:Pe.target.value.length}))}};return l(Fh.Provider,{value:mn({},U,{dispatch:H}),children:g("div",mn({ref:R,className:I},X,{onClick:Le,style:we,children:[!L&&!N&&l(Pw,{prefixCls:r,overflow:b,toolbarBottom:N}),g("div",{className:r+"-content",children:[/(edit|live)/.test(U.preview||"")&&l(FPe,mn({className:r+"-input",prefixCls:r,autoFocus:T},C,{onChange:Ge,renderTextarea:(j==null?void 0:j.textarea)||G,onScroll:Pe=>ye(Pe,"text")})),/(live|preview)/.test(U.preview||"")&&J]}),h&&!U.fullscreen&&l(HPe,{prefixCls:r,height:U.height,maxHeight:w,minHeight:S,onChange:He}),!L&&N&&l(Pw,{prefixCls:r,overflow:b,toolbarBottom:N})]}))})}),Yk=VPe;Yk.Markdown=fY;function jPe(e){cG(e,/\r?\n|\r/g,WPe)}function WPe(){return{type:"break"}}function qPe(){return jPe}function KPe(){const{isLoading:e,data:t}=ms();if(e)return l(z,{});if(!t.quota.mailbox.enabled)return l(YPe,{});if(t.quota.mailbox.exceeded)return l(GPe,{plan:t.subscription.type,maximumMailsPerWeek:t.quota.mailbox.quota})}function GPe({plan:e,maximumMailsPerWeek:t}){return g(Dh,{title:"Quota reached",children:[g(A,{children:["In your ",g("strong",{children:[e," plan"]}),", you are limited to ",t," mails per week."]}),l(A,{children:"Consider upgrading your plan to unlock more mails per week."})]})}function YPe(){return g(Dh,{title:"Not available in your plan",children:[g(A,{children:["The Mailbox feature is only available on ",l("strong",{children:"premium plans"}),"."]}),l(A,{children:"Consider upgrading your plan to unlock and use the Mailbox feature."})]})}function QPe(){var u;const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),r=te(),i=st(),{isLoading:o,error:s,data:a}=_t(["mailbox"],()=>r.get("/mailbox").then(d=>d.data)),c=a&&a.length===0;return Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{t("Mailbox")},[e,t]),y.exports.useEffect(()=>{var d;((d=i.permissions)==null?void 0:d.features.mailbox.create)===!0&&!o&&!c?n(l(cL,{})):n(null)},[(u=i.permissions)==null?void 0:u.features.mailbox.create,n,o,c]),o?l(z,{}):s?g(z,{children:["An error has occurred: ",s.message]}):g(ql,{children:[i.permissions.features.mailbox.edit===!0&&a.length===0&&l(no,{title:"Communicate with your team",content:g(z,{children:[g(A,{children:["Mailbox is a system to send updates to your team of managers, bloggers and friends. Set a mail as important, and it will be highlighted in the list. Notecards can be configured to be send on new Mail, in your"," ",l(ie,{to:"/settings/store/notifications",children:"Notifications settings"}),"."]}),l(cL,{css:{marginTop:"$6",mx:"auto"}})]})}),i.permissions.features.mailbox.edit===!1&&a.length===0&&l(no,{title:"Receive updates from stores or events",content:l(z,{children:l(A,{children:"Mailbox is a system for stores or events to send updates. Mail set as important will be shown highlighted at the top of the list."})})}),a.length>0&&l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{css:{width:0}}),i.permissions.features.mailbox.displayStore===!0&&l(Yt,{children:"Store"}),l(Yt,{children:"Title"}),l(Yt,{children:"Message"}),l(Yt,{children:"Published"}),l(Yt,{})]}),l(hu,{children:a.map(d=>g(Il,{css:{backgroundColor:d.important?"$mailboxImportantBackgroundColor":"inherit"},children:[l(Jt,{children:d.important&&l(W,{icon:Jie,css:{color:"$mailboxImportantIconColor"}})}),i.permissions.features.mailbox.displayStore===!0&&l(Jt,{children:l(Dn,{store:{id:d.store.id,name:d.store.name,pictureUuid:d.store.pictureUuid}})}),l(Jt,{children:d.title}),l(Jt,{children:l(ZPe,{children:l(e9,{disallowedElements:["heading"],children:d.message.slice(0,30)+"\u2026"})})}),l(Jt,{title:Z(d.publishedAt).format("LLL"),children:Z().to(d.publishedAt)}),g(pg,{children:[i.permissions.features.mailbox.edit===!0&&g(gs,{modal:!1,children:[l(vs,{children:l(Wa,{})}),g(ys,{side:"left",sideOffset:16,children:[l(JPe,{mail:d}),l(Em,{}),l(tRe,{mail:d})]})]}),i.permissions.features.mailbox.edit===!1&&l(eRe,{mail:d})]})]},"mail-"+d.id))})]})})]})}function cL({css:e={}}){const[t,n]=y.exports.useState(null),[r,i]=y.exports.useState(null),[o,s]=y.exports.useState(!1),[a,c]=y.exports.useState(!1),u=Ee(),d=te(),f=st(),h=ve({mutationFn:m=>{m.preventDefault();const v=new FormData(m.target);n(null);const b=v.get("title");return d.post("/mailbox",{title:b,important:o,message:r}).then(()=>{c(!1),i(""),F({type:"success",title:"Mail created",message:"The team has been notified."}),s(!1),u.invalidateQueries({queryKey:["mailbox"]}),u.invalidateQueries({queryKey:["me"]})}).catch(function(x){var C,w,S,T;(w=(C=x.response)==null?void 0:C.data)!=null&&w.error?F({type:"error",title:(S=x.response.data)==null?void 0:S.error.title,message:(T=x.response.data)==null?void 0:T.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}}),p=f.quota.mailbox.enabled&&!f.quota.mailbox.exceeded;return g(Ye,{open:a,onOpenChange:c,children:[l(Tm,{content:l(KPe,{}),openDelay:0,disabled:p,children:l(pt,{asChild:!0,disabled:!p,children:g(Y,{variant:"primary",disabled:!p,css:{marginLeft:"auto",...e},children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:Xm}),"Send a new mail"]})})}),g(Qe,{children:[l(Xe,{}),g(Ze,{size:"large",children:[l(nt,{children:"Create a mail"}),g(ht,{children:[l(A,{children:"Mails are an internal communication system within your store."}),l(A,{children:"Each blogger will be able to view the messages you create on their dashboard to stay updated with the store."})]}),g(dt,{onSubmit:h.mutate,children:[g(P,{children:[l(ae,{children:"Title"}),l(Ke,{name:"title",type:"text"})]}),g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Message"}),l(Yk,{"data-color-mode":"light",minHeight:200,height:300,maxHeight:450,value:r,onChange:i,overflow:!1,commands:[Fk,zk,Bk([Wk,qk],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title"}}),jk,Tf,Hk,Vk]})]}),g(M,{css:{cursor:"pointer",gap:"$2"},children:[l(Xd,{id:"checkbox-important",checked:o,onCheckedChange:()=>s(!o),children:l(Zd,{children:l(W,{icon:Pa})})}),l("label",{htmlFor:"checkbox-important",children:"Set as important"})]}),t&&l(XPe,{children:t}),l(wt,{children:l(Y,{disabled:h.isLoading,variant:"primary",type:"submit",children:"Create the message"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const XPe=de("div",{width:"100%",backgroundColor:"$destructive500",textAlign:"center",padding:"$4",color:"white",borderRadius:4,marginTop:"$4"}),ZPe=de("p",{"*":{all:"unset"}});function JPe({mail:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(e.message),[o,s]=y.exports.useState(e.important),a=Ee(),c=te(),u=ve({mutationFn:d=>{d.preventDefault();const h=new FormData(d.target).get("title");return c.patch("/mailbox/"+e.id,{title:h,message:r,important:o}).then(()=>{n(!1),F({type:"success",title:"Mail has been successfully updated."}),a.invalidateQueries({queryKey:["mailbox"]})}).catch(function(p){var m,v,b,x;(v=(m=p.response)==null?void 0:m.data)!=null&&v.error?F({type:"error",title:(b=p.response.data)==null?void 0:b.error.title,message:(x=p.response.data)==null?void 0:x.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{children:g(Xt,{onSelect:d=>d.preventDefault(),children:[l(W,{icon:Zz}),l("p",{children:"Edit"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:d=>d.preventDefault(),css:{maxWidth:"1200px"},children:[g(nt,{title:Z(e.publishedAt).format("LLL"),children:["Message \u2022 Published ",Z(e.publishedAt).fromNow()]}),l(ht,{}),g(dt,{onSubmit:u.mutate,children:[g(P,{children:[l(ae,{children:"Title"}),l(Ke,{name:"title",type:"text",defaultValue:e.title})]}),g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Message"}),l(Yk,{"data-color-mode":"light",minHeight:200,height:300,maxHeight:450,value:r,onChange:i,overflow:!1,commands:[Fk,zk,Bk([Wk,qk],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title"}}),jk,Tf,Hk,Vk]})]}),g(M,{css:{cursor:"pointer",gap:"$2"},children:[l(Xd,{id:"checkbox-important",checked:o,onCheckedChange:()=>s(!o),children:l(Zd,{children:l(W,{icon:Pa})})}),l("label",{htmlFor:"checkbox-important",children:"Set as important"})]}),l(wt,{children:l(Y,{disabled:u.isLoading,variant:"primary",type:"submit",children:"Edit the message"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function eRe({mail:e}){const[t,n]=y.exports.useState(!1);return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(Wa,{})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:r=>r.preventDefault(),children:[l(nt,{children:g(P,{children:[l("p",{children:e.title}),g(A,{css:{fontSize:"0.875rem",fontWeight:"$normal",color:"$gray400"},children:["Published on ",Z(e.publishedAt).format("LLL")]})]})}),l(ht,{children:l(P,{children:l(e9,{remarkPlugins:[qPe],children:e.message})})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function tRe({mail:e}){const[t,n]=y.exports.useState(!1),r=Ee(),i=te(),o=ve({mutationFn:s=>(s.preventDefault(),i.delete("/mailbox/"+e.id).then(()=>{n(!1),F({type:"success",title:"Mail successfully removed."}),r.invalidateQueries({queryKey:["mailbox"]})}).catch(function(a){var c,u,d,f;(u=(c=a.response)==null?void 0:c.data)!=null&&u.error?F({type:"error",title:(d=a.response.data)==null?void 0:d.error.title,message:(f=a.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{type:"danger",onSelect:s=>s.preventDefault(),children:[l(W,{icon:so}),l("p",{children:"Delete"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Remove mail"}),g(ht,{children:[g("p",{children:["You are about to remove the Mail ",l("strong",{children:e.title}),"."]}),l("p",{children:"Do you wish to continue?"})]}),l(dt,{onSubmit:o.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o.isLoading,variant:"danger",children:"Remove the mail"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function nRe(){return l(xh,{to:"/dashboard"})}function rRe(){return l(xh,{to:"/"})}var uL=function(e){return typeof e=="object"&&e!==null},Qk=function(e){var t=e.value,n=t===void 0?"":t,r=e.numInputs,i=r===void 0?4:r,o=e.onChange,s=e.onPaste,a=e.renderInput,c=e.shouldAutoFocus,u=c===void 0?!1:c,d=e.inputType,f=d===void 0?"text":d,h=e.renderSeparator,p=e.placeholder,m=e.containerStyle,v=e.inputStyle,b=e.skipDefaultStyles,x=b===void 0?!1:b,C=Ae.useState(0),w=C[0],S=C[1],T=Ae.useRef([]),E=function(){return n?n.toString().split(""):[]},k=f==="number"||f==="tel";Ae.useEffect(function(){T.current=T.current.slice(0,i)},[i]),Ae.useEffect(function(){var H;u&&((H=T.current[0])===null||H===void 0||H.focus())},[u]);var _=function(){if(typeof p=="string"){if(p.length===i)return p;p.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},O=function(H){var R=k?!isNaN(Number(H)):typeof H=="string";return R&&H.trim().length===1},D=function(H){var R=H.target.value;O(R)&&(re(R),X(w+1))},L=function(H){var R=H.nativeEvent,se=H.target.value;if(!O(se)){if(se.length===i){var ee=se.split("").some(function(I){return!O(I)});ee||(oe(se.split("")),X(i-1))}R.data===null&&R.inputType==="deleteContentBackward"&&(H.preventDefault(),re(""),X(w-1)),H.target.value=""}},N=function(H){return function(R){S(R),H.target.select()}},j=function(){S(w-1)},G=function(H){var R=E();[H.code,H.key].includes("Backspace")?(H.preventDefault(),re(""),X(w-1)):H.code==="Delete"?(H.preventDefault(),re("")):H.code==="ArrowLeft"?(H.preventDefault(),X(w-1)):H.code==="ArrowRight"||H.key===R[w]?(H.preventDefault(),X(w+1)):(H.code==="Spacebar"||H.code==="Space"||H.code==="ArrowUp"||H.code==="ArrowDown")&&H.preventDefault()},X=function(H){var R,se,ee=Math.max(Math.min(i-1,H),0);T.current[ee]&&((R=T.current[ee])===null||R===void 0||R.focus(),(se=T.current[ee])===null||se===void 0||se.select(),S(ee))},re=function(H){var R=E();R[w]=H[0],oe(R)},oe=function(H){var R=H.join("");o(R)},U=function(H){var R;H.preventDefault();var se=E(),ee=w,I=H.clipboardData.getData("text/plain").slice(0,i-w).split("");if(!(k&&I.some(function(Se){return isNaN(Number(Se))}))){for(var me=0;me<i;++me)me>=w&&I.length>0&&(se[me]=(R=I.shift())!==null&&R!==void 0?R:"",ee++);X(ee),oe(se)}};return l("div",{style:Object.assign({display:"flex",alignItems:"center"},uL(m)&&m),className:typeof m=="string"?m:void 0,onPaste:s,children:Array.from({length:i},function(H,R){return R}).map(function(H){var R,se,ee;return g(z,{children:[a({value:(R=E()[H])!==null&&R!==void 0?R:"",placeholder:(ee=(se=_())===null||se===void 0?void 0:se[H])!==null&&ee!==void 0?ee:void 0,ref:function(I){return T.current[H]=I},onChange:D,onFocus:function(I){return N(I)(H)},onBlur:j,onKeyDown:G,onPaste:U,autoComplete:"off","aria-label":"Please enter OTP character ".concat(H+1),style:Object.assign(x?{}:{width:"1em",textAlign:"center"},uL(v)?v:{}),className:typeof v=="string"?v:void 0,type:f,inputMode:k?"numeric":"text",onInput:L},H),H<i-1&&(typeof h=="function"?h(H):h)]})})})};function dL(){const[e,t]=y.exports.useState(null),[n,r]=y.exports.useState(!1),[i,o]=y.exports.useState(!1),{t:s}=Ks(),[a,c]=y.exports.useState(""),u=te(),f=Na().id,{isLoading:h,error:p,data:m}=_t(["store"],()=>u.get("/store/"+f+"/bloggers-application").then(x=>x.data).catch(x=>{if(x.response&&x.response.status===404){window.location.replace(x.response.data.redirectTo);return}throw x}),{retry:(x,C)=>C&&!(C.response&&C.response.status===404)}),v=ve({mutationFn:x=>{x.preventDefault();const C=new FormData(x.target),w={};for(const[S,T]of C)w[S]=T;return u.post("/store/"+f+"/bloggers-application",w).then(S=>{t(S.data.requestUuid),r(!0)}).catch(function(S){var T,E,k;(T=S.response.data)!=null&&T.error?F({type:"error",title:(E=S.response.data)==null?void 0:E.error.title,message:(k=S.response.data)==null?void 0:k.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}}),b=ve({mutationFn:()=>u.post("/store/"+f+"/bloggers-application/otpcode",{requestUuid:e,otpCode:a}).then(()=>{o(!0),t(null)}).catch(function(x){var C,w,S,T,E;((C=x.response)==null?void 0:C.status)===401?F({type:"error",title:(w=x.response.data)==null?void 0:w.error.title,message:(S=x.response.data)==null?void 0:S.error.message}):x.response?F({type:"error",title:(T=x.response.data)==null?void 0:T.error.title,message:(E=x.response.data)==null?void 0:E.error.message}):F({type:"error",title:"Unable to submit your application",message:"An unexpected error occured. Please try again."})})});return h?l(z,{}):p?l(z,{}):g(z,{children:[e&&l(Ye,{open:n,onOpenChange:r,children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:x=>x.preventDefault(),children:[l(nt,{children:"Confirm your identity"}),g(ht,{children:[l(A,{children:"A OTP code has been sent to you inworld in your local chat. To confirm your application, please enter the code in the box below."}),l(A,{children:"Note: This is a required security step to make sure that you are the avatar filling this form."})]}),g(dt,{onSubmit:x=>{x.preventDefault(),b.mutate()},children:[g(ce,{css:{display:"flex",flexDirection:"column",marginBottom:"$4"},children:[l(ae,{children:"OTP Code"}),l(Qk,{value:a,onChange:c,inputType:"number",numInputs:8,containerStyle:{justifyContent:"space-between"},renderInput:x=>l(sRe,{...x,disabled:b.isLoading})})]}),l(wt,{children:l(Y,{disabled:b.isLoading,variant:"primary",type:"submit",children:l("span",{children:"Confirm your application"})})})]}),l(Te,{children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})}),l(M,{css:{minHeight:"100svh",alignItems:"center",justifyContent:"center",py:"$10",px:"$2"},children:g(ce,{css:{backgroundColor:"white",borderRadius:12,border:"1px solid $borderColor",p:"$6","@sm":{p:"$3",width:"100%",maxWidth:500}},children:[!m.closed&&l(z,{children:g(oRe,{children:[l(M,{css:{minWidth:300,maxWidth:500,gridArea:"description","@sm":{minWidth:"100%",maxWidth:"100%"}},children:l(ce,{children:m.applicationFormDescription&&l(A,{children:m.applicationFormDescription.split(`
`).map((x,C)=>g(Ae.Fragment,{children:[x,l("br",{})]},C))})})}),l(iRe,{name:m.name,pictureUuid:m.pictureUuid}),i&&l(A,{children:s("translation:application.blogger.success")}),!i&&g(dt,{onSubmit:v.mutate,css:{gridArea:"form"},children:[g(ce,{css:{display:"flex",flexDirection:"column"},children:[g(ae,{children:["What is your avatar name? ",l(Zf,{})]}),l(Ke,{name:"avatarname",type:"text",required:!0})]}),m.applicationFormData&&m.applicationFormData.map(x=>l(z,{children:g(ce,{css:{display:"flex",flexDirection:"column"},children:[g(ae,{children:[x.name," ",x.required?l(Zf,{}):""]}),l(Ke,{name:x.id,type:"text",required:x.required,placeholder:x.value,title:x.value})]},x.id)})),l(Y,{css:{marginTop:"$4",width:"100%"},disabled:v.isLoading,variant:"primary",type:"submit",children:s("translation:application.designer.apply")})]})]})}),m.closed&&g(P,{css:{gap:"$8"},children:[l(Vq,{width:213}),l(A,{children:"Sorry, but the store does not take application anymore."})]})]})})]})}function iRe({name:e,pictureUuid:t}){return g(M,{css:{alignItems:"center",justifyContent:"center",gap:"$4",height:80,marginBottom:"$4",gridArea:"logo","@sm":{marginBottom:0}},children:[l(Dt,{css:{borderRadius:12,display:"block"},alt:"",width:48,height:48,src:kn({uuid:t||"store",size:128})}),l(Qn,{css:{textAlign:"center"},children:e})]})}function oRe({children:e}){return l(ce,{css:{display:"grid",gridTemplateColumns:"1fr 350px",gridTemplateRows:"0.3fr 1.7fr",gridTemplateAreas:"'description logo' 'description form'",gap:"0 $10","@sm":{gridTemplateColumns:"1fr",gridTemplateRows:"0fr 0fr 0fr",gridTemplateAreas:"'logo' 'description' 'form'",gap:"$8 0"}},children:e})}const sRe=de("input",{border:"1px solid $borderColor",fontSize:"20px",width:"50px !important",height:"50px !important",borderRadius:12,"@sm":{fontSize:16,borderRadius:4,width:"30px !important",height:"30px !important"},variants:{disabled:{true:{backgroundColor:"$gray200",cursor:"not-allowed"}}}});function aRe(){const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(null),[i,o]=y.exports.useState(!0),[s,a]=y.exports.useState([]),{t:c}=Ks(),u=te(),f=Na().id,{isLoading:h,error:p,data:m}=_t(["designer-application"],()=>u.get("/events/"+f+"/application/designers").then(b=>(o(!0),a(b.data.storesAvailable),b.data)).catch(b=>{if(a([]),b.response&&b.response.status===404){window.location.replace(b.response.data.redirectTo);return}return b.response&&b.response.status===401&&o(!1),b}),{retry:(b,x)=>x&&!(x.response&&(x.response.status===404||x.response.status===401))}),v=ve({mutationFn:b=>{b.preventDefault();const x=new FormData(b.target),C={store:n.id};for(const[w,S]of x)C[w]=S;return u.post("/events/"+f+"/application/designers",C).then(()=>{t(!0),F({type:"success",title:"Application sent",message:"Thank you for your application, we will get back to you shortly."})}).catch(function(w){var S,T,E;(S=w.response.data)!=null&&S.error?F({type:"error",title:(T=w.response.data)==null?void 0:T.error.title,message:(E=w.response.data)==null?void 0:E.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return h?l(z,{}):p?l(z,{}):l(M,{css:{minHeight:"100svh",alignItems:"center",justifyContent:"center",py:"$10",px:"$2"},children:g(ce,{css:{backgroundColor:"white",borderRadius:12,border:"1px solid $borderColor",p:"$6","@sm":{p:"$3",width:"100%",maxWidth:500}},children:[i&&m.closed&&l(uRe,{name:m.name,pictureUuid:m.pictureUuid}),!i&&l(cRe,{}),i&&s.length>0&&!m.closed&&g(lRe,{children:[l(M,{css:{minWidth:300,maxWidth:500,gridArea:"description","@sm":{minWidth:"100%",maxWidth:"100%"}},children:l(ce,{children:m.description&&l(A,{children:m.description.split(`
`).map((b,x)=>g(Ae.Fragment,{children:[b,l("br",{})]},x))})})}),l(bY,{name:m.name,pictureUuid:m.pictureUuid}),e&&l(A,{children:c("translation:application.designer.success")}),!e&&g(dt,{onSubmit:v.mutate,css:{gridArea:"form"},children:[g(ce,{css:{display:"flex",flexDirection:"column"},children:[g(ae,{children:[c("translation:application.designer.choose_store")," ",l(Zf,{})]}),l(lK,{options:m.storesAvailable,firstLoad:m.isLoading,isDisabled:m.isLoading,onChange:r,value:n,width:"100%",required:!0})]}),m.data&&m.data.map(b=>l(z,{children:g(ce,{css:{display:"flex",flexDirection:"column"},children:[g(ae,{children:[b.name," ",b.required?l(Zf,{}):""]}),l(Ke,{name:b.id,type:"text",required:b.required,placeholder:b.value,title:b.value})]},b.id)})),l(Y,{css:{marginTop:"$4",width:"100%"},disabled:v.isLoading,variant:"primary",type:"submit",children:c("translation:application.designer.apply")})]})]})]})})}function bY({name:e,pictureUuid:t}){return g(M,{css:{alignItems:"center",justifyContent:"center",gap:"$4",height:80,marginBottom:"$4",gridArea:"logo","@sm":{marginBottom:0}},children:[l(Dt,{css:{borderRadius:12,display:"block"},alt:"",width:48,height:48,src:kn({uuid:t||"store",size:128})}),l(Qn,{css:{textAlign:"center"},children:e})]})}function lRe({children:e}){return l(ce,{css:{display:"grid",gridTemplateColumns:"1fr 350px",gridTemplateRows:"0.3fr 1.7fr",gridTemplateAreas:"'description logo' 'description form'",gap:"0 $10","@sm":{gridTemplateColumns:"1fr",gridTemplateRows:"0fr 0fr 0fr",gridTemplateAreas:"'logo' 'description' 'form'",gap:"$8 0"}},children:e})}function cRe(){const{t:e}=Ks();return g(P,{css:{gap:"$4",maxWidth:470,textAlign:"center"},children:[l(br,{children:e("translation:application.designer.error.not_connected.title")}),g(A,{children:["If you have already and account, and a store, please sign in on"," ",l(ie,{to:"/login",target:"_blank",children:"https://web.kynno.app/login"})," ","and come back on this page."]}),l(A,{children:e("translation:application.designer.error.not_connected.body2")})]})}function uRe({name:e,pictureUuid:t}){const{t:n}=Ks();return g(P,{css:{gap:"$4"},children:[l(bY,{name:e,pictureUuid:t}),l(A,{css:{textAlign:"center"},children:n("translation:application.designer.closed")})]})}function dRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),r=te(),{isLoading:i,error:o,data:s}=_t(["applications"],()=>r.get("/bloggers/applications").then(a=>a.data));return Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{i?t("Bloggers Applications"):s.length>0&&t("Bloggers Applications - "+s.length)},[i,e,t,s]),y.exports.useEffect(()=>{n(null)},[n]),i?l(z,{}):o?g(z,{children:["An error has occurred: ",o.message]}):g(ql,{children:[s.length===0&&l(no,{title:"Bloggers Applications",content:g(z,{children:["Review the bloggers applications you receive from your application form. You can activate and personalize your application form on"," ",l(ie,{to:"/settings/store/bloggers-application",children:"this page"}),"."]})}),s.length>0&&l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Blogger"}),l(Yt,{children:"Applied"}),l(Yt,{})]}),l(hu,{children:s.map(a=>g(Il,{children:[l(Jt,{children:l(Be,{user:{id:a.blogger.id,name:a.blogger.name,pictureUuid:a.blogger.profilePictureUuid}})}),l(Jt,{title:Z(a.createdAt).format("LLL"),children:Z(a.createdAt).fromNow()}),l(pg,{children:l(fRe,{application:a})})]},"application-"+a.id))})]})})]})}function fRe({application:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(null),o=Ee(),s=te(),a=ve({mutationFn:()=>s.patch("/bloggers/applications/"+e.id,{status:"rejected",comment:r}).then(()=>{n(!1),F({type:"success",title:"The application has been rejected."}),o.invalidateQueries({queryKey:["applications"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),c=ve({mutationFn:()=>s.patch("/bloggers/applications/"+e.id,{status:"accepted",comment:r}).then(()=>{n(!1),F({type:"success",title:"The blogger has been accepted in your team. \u{1F973}"}),o.invalidateQueries({queryKey:["applications"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{children:l(Wa,{})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:u=>u.preventDefault(),children:[l(nt,{children:"Review Blogger Application"}),g(ht,{children:[g(P,{children:[l(ae,{children:"Blogger"}),l(ae,{type:"help",children:"Sometimes the system is out of date if the avatar recently changed their name. Copy their UUID in the Second Life search, and you can get their profile."}),g(A,{children:[e.blogger.name,", ",e.blogger.uuid]})]}),e.formData&&e.formData.map(u=>l(z,{children:g(P,{children:[l(ae,{children:u.name}),l(A,{children:u.value})]},u.id)})),g(ce,{css:{display:"flex",flexDirection:"column",my:"$4"},children:[l(ae,{children:"Comment"}),l(Ke,{name:"comment",type:"text",value:r,onChange:u=>i(u.target.value)})]})]}),g(wt,{children:[l(Y,{disabled:a.isLoading||c.isLoading,variant:"danger",onClick:()=>a.mutate(),children:"Deny the blogger"}),l(Y,{disabled:a.isLoading||c.isLoading,variant:"emerald",onClick:()=>c.mutate(),children:"Accept the blogger"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function hRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),r=te(),{isLoading:i,error:o,data:s}=_t(["designers-applications"],()=>r.get("/events/applications").then(a=>a.data));return Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{i?t("Designers Applications"):s.length>0&&t("Designers Applications - "+s.length)},[i,e,t,s]),y.exports.useEffect(()=>{n(null)},[n]),i?l(z,{}):o?g(z,{children:["An error has occurred: ",o.message]}):g(ql,{children:[s.length===0&&l(no,{title:"Designers Applications",content:g(z,{children:["Review the designers applications you receive from your application form. You can activate and personalize your application form on"," ",l(ie,{to:"/settings/store/designers-application",children:"this page"}),"."]})}),s.length>0&&l(Jd,{children:g(Ll,{children:[g(pu,{sticky:!0,children:[l(Yt,{children:"Store"}),l(Yt,{children:"Owner"}),l(Yt,{children:"Applied"}),l(Yt,{})]}),l(hu,{children:s.map(a=>g(Il,{children:[l(Jt,{css:{width:0,px:"$4"},children:l(Dn,{store:{id:a.store.id,name:a.store.name,pictureUuid:a.store.profilePictureUuid}})}),l(Jt,{children:l(Be,{user:{id:a.owner.id,name:a.owner.name,pictureUuid:a.owner.profilePictureUuid}})}),l(Jt,{title:Z(a.createdAt).format("LLL"),children:Z(a.createdAt).fromNow()}),l(pg,{children:l(pRe,{application:a})})]},"application-"+a.id))})]})})]})}function pRe({application:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(null),o=Ee(),s=te(),a=ve({mutationFn:()=>s.patch("/events/applications/"+e.id,{status:"rejected",comment:r}).then(()=>{n(!1),F({type:"success",title:"The application has been rejected."}),o.invalidateQueries({queryKey:["designers-applications"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}),c=ve({mutationFn:()=>s.patch("/events/applications/"+e.id,{status:"accepted",comment:r}).then(()=>{n(!1),F({type:"success",title:"The store joined your event. \u{1F973}"}),o.invalidateQueries({queryKey:["designers-applications"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})});return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{children:l(Wa,{})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:u=>u.preventDefault(),children:[l(nt,{children:"Review Designer Application"}),g(ht,{children:[g(P,{children:[l("h4",{children:"Name"}),l("p",{children:e.owner.name})]}),e.data&&e.data.map(u=>l(z,{children:g(P,{children:[l("h4",{children:u.name}),l(A,{children:u.value})]},u.id)})),g(ce,{css:{display:"flex",flexDirection:"column",my:"$4"},children:[l(ae,{children:"Comment:"}),l(Ke,{name:"comment",type:"text",value:r,onChange:u=>i(u.target.value)})]})]}),g(wt,{children:[l(Y,{disabled:a.isLoading||c.isLoading,variant:"danger",onClick:()=>a.mutate(),children:"Deny the store"}),l(Y,{disabled:a.isLoading||c.isLoading,variant:"emerald",onClick:()=>c.mutate(),children:"Accept the store"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function mRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),{id:r}=Na();return y.exports.useEffect(()=>{t("")},[e,t]),y.exports.useEffect(()=>{n(null)},[]),l(Kl,{css:{alignItems:"center"},children:g(P,{css:{display:"flex",flexDirection:"column",width:"100%",maxWidth:800,gap:"$2",height:"fit-content"},children:[l(ie,{to:"/explore/users",css:{width:"fit-content"},children:"<- Go back"}),l(gRe,{id:r})]})})}function gRe({id:e}){var s,a,c;const t=te(),{selectedStore:n}=st(),{isLoading:r,error:i,data:o}=_t(["user",e],()=>t.get("/user/"+e).then(u=>u.data));return Z.extend(Pn),Z.extend(On),r?l(z,{}):i?g(z,{children:["An error has occurred: ",i.message]}):g(P,{css:{gap:"$6"},children:[g(P,{css:{gap:"$6",p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall"},children:[g(M,{css:{gap:"$6","@sm":{flexDirection:"column"}},children:[l(P,{css:{gap:"$6",mx:"auto"},children:l(bi,{pictureUuid:o.picture,size:128,round:!0})}),l(P,{css:{flexGrow:1,gap:"$4"},children:g(M,{css:{width:"100%",gap:"$4","@sm":{flexDirection:"column"}},children:[g(P,{css:{flexGrow:1},children:[o.activeStatus!==null&&l(Et,{content:l(A,{children:o.activeStatus.status}),enabled:((s=o.activeStatus)==null?void 0:s.status)!==null,small:!0,children:g(Pi,{badge:"Paused",size:"small",round:!0,css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",width:"fit-content"},children:[l(W,{icon:F4,css:{marginRight:"$1"}}),"Away until"," ",Z(o.activeStatus.expirationDate).format("LL")]})}),l(Qn,{css:{overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"},children:o.name}),o.title&&l(A,{css:{color:"$gray400",marginTop:-4,marginBottom:"$2"},children:o.title}),(o.socials.flickrUrl||o.socials.deviantArtUrl||o.socials.blueskyUrl||o.socials.facebookUrl||o.socials.instagramUrl||o.socials.xUrl||o.socials.personalUrl)&&l(z,{children:g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[o.socials.flickrUrl&&l(ie,{to:o.socials.flickrUrl,target:"_blank",children:l(Ua,{})}),o.socials.deviantArtUrl&&l(ie,{to:o.socials.deviantArtUrl,target:"_blank",children:l(Ha,{})}),o.socials.blueskyUrl&&l(ie,{to:o.socials.blueskyUrl,target:"_blank",children:l(Ba,{})}),o.socials.facebookUrl&&l(ie,{to:o.socials.facebookUrl,target:"_blank",children:l(za,{})}),o.socials.instagramUrl&&l(ie,{to:o.socials.instagramUrl,target:"_blank",children:l(Va,{})}),o.socials.xUrl&&l(ie,{to:o.socials.xUrl,target:"_blank",children:l(ja,{})}),o.socials.personalUrl&&l(ie,{to:o.socials.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})})]}),g(P,{css:{gap:"$4",flexShrink:0},children:[o.currentStoreInfo&&g(z,{children:[l(vRe,{userId:o.id}),o.currentStoreInfo.role==="blogger"&&l(bRe,{blogger:{id:o.id,name:o.name}}),o.currentStoreInfo.role==="friend"&&l(ie,{to:"/settings/store/friends",css:{width:"100%"},children:g(Y,{css:{width:"100%"},variant:"gray",children:[l(W,{icon:v3}),l(A,{children:"Manage friends"})]})})]}),!o.currentStoreInfo&&o.invitation.canBeInvited&&l(z,{children:g(yRe,{user:o,store:n,children:[!o.invitation.pending&&g(z,{children:[l(W,{icon:rm}),g(A,{css:{mx:"auto"},children:["Invite to ",n.name]})]}),o.invitation.pending&&l(A,{css:{mx:"auto"},children:"Invitation pending"})]})})]})]})})]}),o.relatedStores.length>0&&g(P,{css:{gap:"$1"},children:[l(Tt,{children:"Part of the following"}),l(M,{css:{gap:"$2",flexWrap:"wrap"},children:o.relatedStores.map((u,d)=>l(ce,{css:{border:"1px solid $borderColor",borderRadius:1e3,px:"$3",py:"$1",boxShadow:"$xsmall","&:hover":{cursor:"pointer"}},children:l(Dn,{store:{id:u.id,name:u.name,pictureUuid:u.pictureUuid},css:{fontSize:13},pictureSize:18})},"store-"+d))})]}),o.about&&g(P,{children:[l(Tt,{children:"About"}),l(A,{children:o.about.split(`
`).map((u,d)=>g(Ae.Fragment,{children:[u,l("br",{})]},d))})]})]}),o.currentStoreInfo&&g(P,{css:{p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall",gap:"$6"},children:[g(br,{children:["Stats for ",o.store.name]}),l(P,{children:g(ce,{css:{display:"grid",gap:"$4",gridTemplateColumns:"1fr 1fr","@xs":{gridTemplateColumns:"1fr"}},children:[l(fL,{title:"Total accepted posts",content:o.currentStoreInfo.posts.totalAccepted}),l(fL,{title:"Last accepted post",content:o.currentStoreInfo.posts.lastAccepted?Z(o.currentStoreInfo.posts.lastAccepted).fromNow():"N/A"})]})}),g(Sp,{title:"Products",children:[g(P,{css:{gap:"$4"},children:[g(A,{children:["Out of your ",o.currentStoreInfo.products.total," products:"]}),g(ce,{children:[g(A,{children:["- Requested ",o.currentStoreInfo.products.requestedCount," ","products."]}),g(A,{children:["- Blogged"," ",o.currentStoreInfo.products.summary.accepted.length," ","products. This includes ",l("strong",{children:"Waiting For Review"}),", and"," ",l("strong",{children:"Accepted"})," posts."]}),g(A,{children:["- Rejected posts: ",o.currentStoreInfo.posts.rejected]}),g(A,{children:["- Last created post:"," ",o.currentStoreInfo.posts.lastCreated?l(Ne,{title:Z(o.currentStoreInfo.posts.lastCreated).format("LLL"),children:Z(o.currentStoreInfo.posts.lastCreated).fromNow()}):l(Ne,{children:"Never"})]})]})]}),g(ce,{css:{marginTop:"$4"},children:[o.currentStoreInfo.products.summary.missed_deadline.map((u,d)=>g(M,{css:{alignItems:"center",gap:"$1"},children:[l(Et,{small:!0,content:l(A,{children:"Missed deadline"}),children:l(W,{icon:F4,css:{color:"$destructive500"}})}),g(A,{children:[u.name,u.updatedAt&&g(z,{children:[g(Ne,{title:Z(u.createdAt).format("LLL"),css:{color:"$gray400"},children:[", created"," ",Z(u.createdAt).fromNow()]}),g(Ne,{title:Z(u.updatedAt).format("LLL"),css:{color:"$gray400"},children:[", last update"," ",Z(u.updatedAt).fromNow()]})]})]})]},"product-blogged-"+d)),o.currentStoreInfo.products.summary.accepted.map((u,d)=>g(M,{css:{alignItems:"center",gap:"$1"},children:[l(Et,{small:!0,content:l(A,{children:"Accepted"}),children:l(W,{icon:X0,css:{color:"$success600"}})}),g(A,{children:[u.name,g(Ne,{title:Z(u.updatedAt).format("LLL"),css:{color:"$gray400"},children:[", created ",Z(u.updatedAt).fromNow()]}),u.updatedAt&&g(Ne,{title:Z(u.updatedAt).format("LLL"),css:{color:"$gray400"},children:[", last update ",Z(u.updatedAt).fromNow()]})]})]},"product-blogged-"+d)),o.currentStoreInfo.products.requested.map((u,d)=>g(M,{css:{alignItems:"center",gap:"$1"},children:[l(Et,{small:!0,content:l(A,{children:"In progress"}),children:l(W,{icon:F4,css:{color:"$amber500"}})}),g(A,{children:[u.name,g(Ne,{title:Z(u.createdAt).format("LLL"),css:{color:"$gray400"},children:[", created ",Z(u.createdAt).fromNow()]}),u.updatedAt&&g(Ne,{title:Z(u.updatedAt).format("LLL"),css:{color:"$gray400"},children:[", last update ",Z(u.updatedAt).fromNow()]})]})]},"product-blogged-"+d)),o.currentStoreInfo.products.summary.rejected.map((u,d)=>g(M,{css:{alignItems:"center",gap:"$1"},children:[l(Et,{small:!0,content:l(A,{children:"Rejected post"}),children:l(W,{icon:Zp,css:{color:"$destructive500"}})}),g(A,{children:[u.name,u.updatedAt&&g(z,{children:[g(Ne,{title:Z(u.createdAt).format("LLL"),css:{color:"$gray400"},children:[", created ",Z(u.createdAt).fromNow()]}),g(Ne,{title:Z(u.updatedAt).format("LLL"),css:{color:"$gray400"},children:[", last update"," ",Z(u.updatedAt).fromNow()]})]})]})]},"product-blogged-"+d))]})]}),l(Yq,{countProducts:o.currentStoreInfo.products.total,countBloggedProduct:o.currentStoreInfo.products.summary.accepted.length,countRequestedProducts:o.currentStoreInfo.products.requestedCount}),l(Sp,{title:"Accepted posts per month",children:o.currentStoreInfo.posts.acceptedArray.map((u,d)=>g(M,{css:{alignItems:"center",gap:"$1"},children:[u.count>0&&u.count<n.minimumPostPerMonth&&l(W,{icon:Zp,css:{color:"$destructive600"}}),u.count>0&&u.count>=n.minimumPostPerMonth&&l(W,{icon:X0,css:{color:"$success600"}}),u.count===0&&l(W,{icon:Zp,css:{color:"$gray300"}}),g(A,{children:[Z(u.date).format("MMMM YYYY"),", ",u.count," post",u.count>1&&"s"]})]},"posts-accepted-"+d))}),o.currentStoreInfo&&((a=o.currentStoreInfo.lastForm)==null?void 0:a.formData)&&l(Sp,{title:"Application Form",children:l(P,{css:{gap:"$4"},children:o.currentStoreInfo.lastForm.formData.map(u=>g(ce,{css:{display:"flex",flexDirection:"column"},children:[l(ae,{children:u.name}),l(A,{children:u.value})]},u.id))})})]}),o.last10Posts.length>0&&l(P,{css:{p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall",gap:"$6"},children:l(Sp,{title:"Last 10 accepted posts",children:l(P,{css:{gap:"$4"},children:o.last10Posts.map((u,d)=>g(P,{children:[g(M,{css:{alignItems:"center",gap:"$2"},children:[l(W,{icon:Qm,css:{color:"orange"}}),l(A,{children:u.product.name})]}),l(ce,{css:{marginLeft:22},children:u.links.map((f,h)=>l(A,{children:l(ie,{to:f,target:"_blank",children:f})},"post-link-"+h))})]},"post-"+d))})})}),((c=o.expiredStatus)==null?void 0:c.length)>0&&l(P,{css:{p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall",gap:"$6"},children:l(Sp,{title:"Previous status",children:l(P,{css:{gap:"$4",marginTop:"$4"},children:o.expiredStatus.map((u,d)=>g(P,{children:[g(Tt,{children:["Expired on ",Z(u.expirationDate).format("LL")]}),l(M,{css:{alignItems:"center",gap:"$2"},children:l(A,{children:u.status})})]},"status-"+d))})})})]})}function vRe({userId:e}){const t=te(),n=ve({mutationFn:async()=>{var r,i,o,s;try{await t.get("/user/send-package/"+e),F({type:"success",title:"Package on its way",message:"In a few seconds, they should receive their blogger package."})}catch(a){(i=(r=a.response)==null?void 0:r.data)!=null&&i.error?F({type:"error",title:(o=a.response.data)==null?void 0:o.error.title,message:(s=a.response.data)==null?void 0:s.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}}});return g(Y,{css:{width:"100%"},variant:"gray",onClick:()=>{n.isLoading||n.mutate()},disabled:n.isLoading,children:[l(W,{icon:Od}),l(A,{css:{mx:"auto"},children:"Deliver package"})]})}function yRe({children:e,user:t,store:n}){const[r,i]=y.exports.useState(!1),o=Ee(),s=te(),a=ve({mutationFn:c=>{c.preventDefault();const d=new FormData(c.target).get("comment");return s.post("/bloggers/invite",{username:t.name,comment:d}).then(()=>{F({type:"success",title:"Invitation has been successfully sent",message:t.name+" received an invitation and will soon respond to your invitation."}),i(!1),o.invalidateQueries({queryKey:["user",t.id]})}).catch(function(f){f.response?F({type:"error",title:f.response.data.error.title}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{asChild:!0,children:l(Y,{css:{width:"100%"},variant:"gray",disabled:a.isLoading||t.invitation.pending,children:e})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:c=>c.preventDefault(),children:[l(nt,{children:"Invite this user"}),g(dt,{onSubmit:a.mutate,children:[g(ht,{children:[g(A,{children:["You are about to invite"," ",l(Be,{user:{id:t.id,name:t.name,pictureUuid:t.picture},inline:!0,nameBold:!0})," ","in your team of bloggers for the store"," ",l(Dn,{store:n,inline:!0,nameBold:!0})]}),g(P,{children:[g(P,{children:[l(ae,{children:"Comment"}),l(ae,{type:"help",children:"Add a personalised comment to explain why you are inviting them. It will increase your chances of approval."})]}),l(Ti,{name:"comment",maximumCharacters:1024,css:{height:200}})]})]}),l(wt,{children:l(Y,{disabled:a.isLoading,variant:"primary",type:"submit",children:"Invite the user"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function bRe({blogger:e}){return l(xRe,{blogger:e,children:g(Y,{variant:"softDanger",css:{width:"100%"},children:[l(W,{icon:so}),l(A,{css:{mx:"auto"},children:"Remove"})]})})}function fL({title:e,content:t}){return g(P,{css:{px:"$4",py:"$3",border:"1px solid $borderColor",borderRadius:8,boxShadow:"$xsmall"},children:[l(Tt,{children:e}),l(A,{children:t})]})}function Sp({title:e,children:t}){const[n,r]=y.exports.useState(!1);return g(P,{css:{gap:n?"$2":0},children:[g(br,{onClick:()=>r(o=>!o),css:{display:"flex",cursor:"pointer",alignItems:"center"},children:[e," ",l(W,{icon:Sy,css:{marginTop:"$1",marginLeft:"$2",transition:"all 200ms",transform:n?"rotate(180deg)":"none"}})]}),l(ce,{css:{transition:"all 200ms ease-in-out",maxHeight:n?"auto":0,overflow:"hidden",opacity:n?1:0},children:t})]})}function xRe({children:e,blogger:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("bloggerId");return o.delete("/bloggers/"+u).then(()=>{r(!1),F({type:"success",title:"The blogger won't have access to your products anymore."}),i.invalidateQueries({queryKey:["user",u]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Remove a blogger"}),g(ht,{children:[g("p",{children:["You are about to remove the blogger ",l("strong",{children:t.name})," from your store."]}),l("p",{children:"Do you wish to continue? They won\u2018t be able to create post or request an item to blog."})]}),g(dt,{onSubmit:s.mutate,children:[l("input",{name:"bloggerId",defaultValue:t.id,hidden:!0}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Remove the blogger"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}var Rw=new Map,Z2=new WeakMap,hL=0,CRe=void 0;function wRe(e){return e?(Z2.has(e)||(hL+=1,Z2.set(e,hL.toString())),Z2.get(e)):"0"}function SRe(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?wRe(e.root):e[t]}`).toString()}function ERe(e){const t=SRe(e);let n=Rw.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(s=>{s.forEach(a=>{var c;const u=a.isIntersecting&&i.some(d=>a.intersectionRatio>=d);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(c=r.get(a.target))==null||c.forEach(d=>{d(u,a)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},Rw.set(t,n)}return n}function TRe(e,t,n={},r=CRe){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const c=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),()=>{}}const{id:i,observer:o,elements:s}=ERe(n),a=s.get(e)||[];return s.has(e)||s.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(s.delete(e),o.unobserve(e)),s.size===0&&(o.disconnect(),Rw.delete(i))}}function Ya({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:s,initialInView:a,fallbackInView:c,onChange:u}={}){var d;const[f,h]=y.exports.useState(null),p=y.exports.useRef(),[m,v]=y.exports.useState({inView:!!a,entry:void 0});p.current=u,y.exports.useEffect(()=>{if(s||!f)return;let w;return w=TRe(f,(S,T)=>{v({inView:S,entry:T}),p.current&&p.current(S,T),T.isIntersecting&&o&&w&&(w(),w=void 0)},{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{w&&w()}},[Array.isArray(e)?e.toString():e,f,i,r,o,s,n,c,t]);const b=(d=m.entry)==null?void 0:d.target,x=y.exports.useRef();!f&&b&&!o&&!s&&x.current!==b&&(x.current=b,v({inView:!!a,entry:void 0}));const C=[h,m.inView,m.entry];return C.ref=C[0],C.inView=C[1],C.entry=C[2],C}function _u(e,t,n){var r=this,i=y.exports.useRef(null),o=y.exports.useRef(0),s=y.exports.useRef(null),a=y.exports.useRef([]),c=y.exports.useRef(),u=y.exports.useRef(),d=y.exports.useRef(e),f=y.exports.useRef(!0);d.current=e;var h=typeof window<"u",p=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,v=!("trailing"in n)||!!n.trailing,b="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,C=b?Math.max(+n.maxWait||0,t):null;y.exports.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var w=y.exports.useMemo(function(){var S=function(D){var L=a.current,N=c.current;return a.current=c.current=null,o.current=D,u.current=d.current.apply(N,L)},T=function(D,L){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(D):setTimeout(D,L)},E=function(D){if(!f.current)return!1;var L=D-i.current;return!i.current||L>=t||L<0||b&&D-o.current>=C},k=function(D){return s.current=null,v&&a.current?S(D):(a.current=c.current=null,u.current)},_=function D(){var L=Date.now();if(E(L))return k(L);if(f.current){var N=t-(L-i.current),j=b?Math.min(N,C-(L-o.current)):N;T(D,j)}},O=function(){if(h||x){var D=Date.now(),L=E(D);if(a.current=[].slice.call(arguments),c.current=r,i.current=D,L){if(!s.current&&f.current)return o.current=i.current,T(_,t),m?S(i.current):u.current;if(b)return T(_,t),S(i.current)}return s.current||T(_,t),u.current}};return O.cancel=function(){s.current&&(p?cancelAnimationFrame(s.current):clearTimeout(s.current)),o.current=0,a.current=i.current=c.current=s.current=null},O.isPending=function(){return!!s.current},O.flush=function(){return s.current?k(Date.now()):u.current},O},[m,b,t,C,v,p,h,x]);return w}function kRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{data:n,isLoading:r,isFetchingNextPage:i,fetchNextPage:o,refetch:s}=kBe(),[a,c]=Jn(),{ref:u,inView:d}=Ya();return y.exports.useEffect(()=>{t("Users")},[e,t]),y.exports.useEffect(()=>{d&&o()},[o,d]),y.exports.useEffect(()=>{a.get("search")===""&&a.delete("search"),c(a),s()},[a]),Z.extend(Pn),Z.extend(On),g(Kl,{css:{"@media (min-width: 1400px)":{width:"100%",mx:"auto",maxWidth:1800}},children:[r&&l(A,{children:"Fetching users\u2026"}),!r&&g(z,{children:[l(pL,{children:l(_Re,{})}),g(pL,{children:[n.pages.map(f=>l(Ae.Fragment,{children:f.users.map((h,p)=>l(Ae.Fragment,{children:l(ARe,{user:h,innerRef:p===15?u:void 0})},"user-"+f.currentPage+"-"+p))},"page-"+f.currentPage)),i&&l(A,{children:"Fetching more users\u2026"})]})]})]})}const pL=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}});function _Re(){const[e,t]=Jn(),[n,r]=y.exports.useState(e.get("search")),i=_u(o=>{o.length>=3||o.length===0?(e.set("search",o),t(e),r(o)):F({type:"error",title:"Can't perform search",message:"Please make sure to have a minimum of 3 characters for your search"})},600);return l(Ke,{placeholder:"Search",name:"search",type:"text",defaultValue:n,onChange:o=>i(o.target.value),css:{maxWidth:400,"@sm":{maxWidth:"100%"}}})}function ARe({user:e,innerRef:t}){return l(ie,{ref:t,to:"/user/"+e.id,css:{display:"flex"},children:g(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:12,transition:"all 200ms",position:"relative",p:"$4",gap:"$2",width:"100%",justifyContent:"space-between","&:hover":{cursor:"pointer",boxShadow:"$small",border:"1px solid $hoveringCard",transition:"all 200ms"}},children:[g(M,{css:{alignItems:"center",justifyContent:"space-between"},children:[l(Dt,{css:{borderRadius:100,display:"block",marginRight:"$2"},alt:"",width:48,height:48,src:kn({uuid:e.picture!==null?e.picture:"avatar",size:128})}),l($Re,{user:e})]}),l(Be,{css:{fontSize:18,fontFamily:"$redHatDisplay",fontWeight:"$bold",marginBottom:e.about===null?"auto":0},showPicture:!1,inline:!0,user:{id:e.id,name:e.username,pictureUuid:e.picture!==null?e.picture:"avatar"}}),e.about!==null&&g(A,{css:{marginBottom:"auto"},children:[e.about.slice(0,100),e.about.length>100?"\u2026":""]}),g(M,{css:{justifyContent:"space-between"},children:[g(P,{children:[l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:"Posts all time"}),g(M,{css:{gap:"$3"},children:[l(Et,{enabled:!0,content:g(A,{children:[e.postsAcceptedCount," accepted post",e.postsAcceptedCount>1?"s":""]}),small:!0,children:g(ce,{children:[l(W,{icon:X0,css:{color:"$gray500"}})," ",e.postsAcceptedCount]})}),l(Et,{enabled:!0,content:g(A,{children:[e.postsInProgressCount," in progress / waiting for review post",e.postsInProgressCount>1?"s":""]}),small:!0,children:g(ce,{children:[l(W,{icon:F4,css:{color:"$gray400"}})," ",e.postsInProgressCount]})})]})]}),g(P,{children:[l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:"This month"}),l(M,{css:{gap:"$3"},children:l(Et,{enabled:!0,content:g(A,{children:[e.postsAcceptedThisMonthCount," accepted post",e.postsAcceptedThisMonthCount>1?"s":""," in"," ",Z().format("MMMM")]}),small:!0,children:g(ce,{children:[l(W,{icon:X0,css:{color:"$gray500"}})," ",e.postsAcceptedThisMonthCount]})})})]})]})]})})}function $Re({user:e}){return l(P,{onClick:t=>t.stopPropagation(),children:(e.flickrUrl||e.deviantArtUrl||e.blueskyUrl||e.facebookUrl||e.instagramUrl||e.xUrl||e.personalUrl)&&l(z,{children:g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[e.flickrUrl&&l(ie,{to:e.flickrUrl,target:"_blank",children:l(Ua,{})}),e.deviantArtUrl&&l(ie,{to:e.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.blueskyUrl&&l(ie,{to:e.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.facebookUrl&&l(ie,{to:e.facebookUrl,target:"_blank",children:l(za,{})}),e.instagramUrl&&l(ie,{to:e.instagramUrl,target:"_blank",children:l(Va,{})}),e.xUrl&&l(ie,{to:e.xUrl,target:"_blank",children:l(ja,{})}),e.personalUrl&&l(ie,{to:e.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})})})}function DRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{data:n,isLoading:r,isFetchingNextPage:i,fetchNextPage:o,refetch:s}=yBe(),[a,c]=Jn(),{ref:u,inView:d}=Ya();return y.exports.useEffect(()=>{t("Events & Stores")},[e,t]),y.exports.useEffect(()=>{d&&o()},[o,d]),y.exports.useEffect(()=>{a.get("search")===""&&a.delete("search"),c(a),s()},[a]),Z.extend(Pn),Z.extend(On),r?l(z,{}):g(Kl,{css:{"@media (min-width: 1400px)":{width:"100%",mx:"auto",maxWidth:1800}},children:[l(mL,{children:l(ORe,{})}),g(mL,{children:[n.pages.map(f=>l(Ae.Fragment,{children:f.eventsAndStores.map((h,p)=>l(Ae.Fragment,{children:l(PRe,{user:h,innerRef:p===15?u:void 0})},"event-or-store-"+f.currentPage+"-"+p))},"page-"+f.currentPage)),i&&l(A,{children:"Fetching more users\u2026"})]})]})}const mL=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}});function ORe(){const[e,t]=Jn(),[n,r]=y.exports.useState(e.get("search")),i=_u(o=>{o.length>=3||o.length===0?(e.set("search",o),t(e),r(o)):F({type:"error",title:"Can't perform search",message:"Please make sure to have a minimum of 3 characters for your search"})},600);return l(Ke,{placeholder:"Search",name:"search",type:"text",defaultValue:n,onChange:o=>i(o.target.value),css:{maxWidth:400,"@sm":{maxWidth:"100%"}}})}function PRe({user:e,innerRef:t}){return l(ie,{ref:t,to:"/store/"+e.id,css:{display:"flex"},children:g(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:12,transition:"all 200ms",position:"relative",p:"$4",gap:"$2",width:"100%",justifyContent:"space-between","&:hover":{cursor:"pointer",boxShadow:"$small",border:"1px solid $hoveringCard",transition:"all 200ms"}},children:[g(M,{css:{alignItems:"center",justifyContent:"space-between"},children:[l(Dt,{css:{borderRadius:8,display:"block",marginRight:"$2"},alt:"",width:48,height:48,src:kn({uuid:e.picture!==null?e.picture:"avatar",size:128})}),l(RRe,{user:e.socials})]}),l(Dn,{css:{fontSize:18,fontFamily:"$redHatDisplay",fontWeight:"$bold",marginBottom:e.about===null?"auto":0},showPicture:!1,store:{id:e.id,name:e.name,pictureUuid:e.picture!==null?e.picture:"avatar"}}),e.about!==null&&g(A,{css:{marginBottom:"auto"},children:[e.about.slice(0,100),e.about.length>100?"\u2026":""]})]})})}function RRe({user:e}){return l(P,{onClick:t=>t.stopPropagation(),children:(e.flickrUrl||e.deviantArtUrl||e.blueskyUrl||e.facebookUrl||e.instagramUrl||e.xUrl||e.personalUrl)&&l(z,{children:g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[e.flickrUrl&&l(ie,{to:e.flickrUrl,target:"_blank",children:l(Ua,{})}),e.deviantArtUrl&&l(ie,{to:e.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.blueskyUrl&&l(ie,{to:e.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.facebookUrl&&l(ie,{to:e.facebookUrl,target:"_blank",children:l(za,{})}),e.instagramUrl&&l(ie,{to:e.instagramUrl,target:"_blank",children:l(Va,{})}),e.xUrl&&l(ie,{to:e.xUrl,target:"_blank",children:l(ja,{})}),e.personalUrl&&l(ie,{to:e.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})})})}function MRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),{id:r}=Na();return y.exports.useEffect(()=>{t("")},[e,t]),y.exports.useEffect(()=>{n(null)},[]),l(Kl,{css:{alignItems:"center"},children:g(P,{css:{display:"flex",flexDirection:"column",width:"100%",maxWidth:800,gap:"$2",height:"fit-content"},children:[l(ie,{to:"/explore/events-stores",css:{width:"fit-content"},children:"<- Go back"}),l(IRe,{id:r})]})})}function IRe({id:e}){const t=te(),{isLoading:n,error:r,data:i}=_t(["store",e],()=>t.get("/store/"+e).then(a=>a.data));Z.extend(Pn),Z.extend(On);const o=ve({mutationFn:async a=>{var c,u,d,f;try{await t.get("/user/send-package-store/"+a),F({type:"success",title:"Package on its way",message:"In a few seconds, they should receive their package."})}catch(h){(u=(c=h.response)==null?void 0:c.data)!=null&&u.error?F({type:"error",title:(d=h.response.data)==null?void 0:d.error.title,message:(f=h.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}}});if(n)return l(z,{});if(r)return g(z,{children:["An error has occurred: ",r.message]});const s=i.picture!==null&&i.picture!==void 0?i.picture:"store";return g(P,{css:{gap:"$6"},children:[g(P,{css:{gap:"$6",p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall"},children:[g(M,{css:{gap:"$6","@sm":{flexDirection:"column"}},children:[l(P,{css:{gap:"$6",mx:"auto"},children:l(Dt,{css:{left:0,borderRadius:8,marginRight:"$2"},alt:"",width:128,height:128,src:kn({uuid:s,size:256})})}),l(P,{css:{flexGrow:1,gap:"$4"},children:g(M,{css:{width:"100%",gap:"$4","@sm":{flexDirection:"column"}},children:[g(P,{css:{flexGrow:1},children:[l(Qn,{css:{overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"},children:i.name}),i.bloggersSearch!==null&&l(A,{css:{marginBottom:"$2",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"},children:l(ie,{to:i.bloggersSearch,target:"_blank",children:"We are looking for bloggers!"})}),i.designersSearch!==null&&l(A,{css:{marginBottom:"$2",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"},children:l(ie,{to:i.designersSearch,target:"_blank",children:"We are looking for designers!"})}),(i.socials.flickrUrl||i.socials.deviantArtUrl||i.socials.blueskyUrl||i.socials.facebookUrl||i.socials.instagramUrl||i.socials.xUrl||i.socials.personalUrl)&&l(z,{children:g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[i.socials.flickrUrl&&l(ie,{to:i.socials.flickrUrl,target:"_blank",children:l(Ua,{})}),i.socials.deviantArtUrl&&l(ie,{to:i.socials.deviantArtUrl,target:"_blank",children:l(Ha,{})}),i.socials.blueskyUrl&&l(ie,{to:i.socials.blueskyUrl,target:"_blank",children:l(Ba,{})}),i.socials.facebookUrl&&l(ie,{to:i.socials.facebookUrl,target:"_blank",children:l(za,{})}),i.socials.instagramUrl&&l(ie,{to:i.socials.instagramUrl,target:"_blank",children:l(Va,{})}),i.socials.xUrl&&l(ie,{to:i.socials.xUrl,target:"_blank",children:l(ja,{})}),i.socials.personalUrl&&l(ie,{to:i.socials.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})})]}),g(P,{css:{gap:"$4",flexShrink:0},children:[i.showLeftStore&&l(LRe,{storeId:i.id,canLeftStore:i.canLeftStore}),i.isPartOfSelectedStore&&g(z,{children:[g(Y,{css:{width:"100%"},variant:"gray",onClick:()=>{o.isLoading||o.mutate(i.id)},disabled:o.isLoading,children:[l(W,{icon:Od}),l(A,{children:"Deliver package"})]}),l(FRe,{store:{id:i.id,name:i.name},children:g(Y,{css:{width:"100%"},variant:"softDanger",children:[l(W,{icon:so}),l(A,{children:"Remove the store"})]})})]}),!i.isPartOfSelectedStore&&i.canInviteStore&&g(z,{children:[i.invitationInProgress&&g(Y,{css:{width:"100%"},variant:"primary",disabled:!0,children:[l(W,{icon:eD}),l(A,{children:"Invitation pending"})]}),!i.invitationInProgress&&l(BRe,{store:{id:i.id,name:i.name,picture:i.picture},children:g(Y,{css:{width:"100%"},variant:"primary",children:[l(W,{icon:eD}),l(A,{children:"Invite the store"})]})})]})]})]})})]}),i.coowners&&i.coowners.length===0&&g(P,{children:[l(Tt,{children:"Owner"}),l(Be,{user:{id:i.owner.id,name:i.owner.name,pictureUuid:i.owner.picture}})]}),i.coowners&&i.coowners.length>=1&&g(P,{children:[l(Tt,{children:"Owners"}),g(M,{css:{"& > *:not(:first-child)":{marginLeft:-6}},children:[l(Be,{showName:!1,css:{border:"2px solid $borderColor",borderRadius:1e4},user:{id:i.owner.id,name:i.owner.name,pictureUuid:i.owner.picture}},"coowners-id-"+e),i.coowners.map((a,c)=>l(Be,{showName:!1,css:{border:"2px solid $borderColor",borderRadius:1e4},user:{id:a.id,name:a.name,pictureUuid:a.profilePicture}},"coowners-id-"+c))]})]}),i.managers&&i.managers.length>1&&g(P,{children:[l(Tt,{children:"Managers"}),l(M,{css:{"& > *:not(:first-child)":{marginLeft:-6}},children:i.managers.map((a,c)=>l(Be,{showName:!1,css:{border:"2px solid $borderColor",borderRadius:1e4},user:{id:a.id,name:a.name,pictureUuid:a.profilePicture}},"manager-id-"+c))})]}),i.managers&&i.managers.length===1&&g(P,{children:[l(Tt,{children:"Manager"}),l(Be,{user:{id:i.managers[0].id,name:i.managers[0].name,pictureUuid:i.managers[0].profilePicture}})]}),i.about&&g(P,{children:[l(Tt,{children:"About"}),l(A,{children:i.about.split(`
`).map((a,c)=>g(Ae.Fragment,{children:[a,l("br",{})]},c))})]})]}),i.rules&&g(P,{css:{gap:"$6",p:"$6",borderRadius:8,border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",boxShadow:"$xsmall"},children:[l(br,{children:"Rules"}),l(A,{children:i.rules.split(`
`).map((a,c)=>g(Ae.Fragment,{children:[a,l("br",{})]},c))})]})]})}function LRe({storeId:e,canLeftStore:t}){return t?l(NRe,{storeId:e,children:g(Y,{css:{width:"100%"},variant:"gray",disabled:!t,children:[l(W,{icon:xC}),l(A,{css:{mx:"auto"},children:"Leave the store"})]})}):l(Et,{enabled:!t,content:g(P,{css:{gap:"$4"},children:[l(A,{children:"To protect the creator and their creations, you must have at least 1 accepted post per product you previously requested from this store."}),l(A,{children:"If you want to leave this store without this requirement, please contact the store owner."})]}),children:g(Y,{css:{width:"100%"},variant:"gray",disabled:!t,children:[l(W,{icon:xC}),l(A,{css:{mx:"auto"},children:"Leave the store"})]})})}function NRe({children:e,storeId:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("comment");return o.patch("/store/leave/"+t,{comment:u}).then(d=>{r(!1),F({type:"success",title:"You have left the store"}),d.data.redirect?(localStorage.setItem("selectedStore",d.data.selectedStore),window.location.href="/dashboard"):(i.invalidateQueries({queryKey:["store",t]}),i.invalidateQueries({queryKey:["me"]}))}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Sorry to hear that you want to leave this store"}),g(ht,{children:[g(A,{children:[" ","EasyBloggers requires everyone leaving to leave a comment for the store management team."]}),l(A,{children:"Please take a few seconds to explain why you are leaving, as it can help the creator to improve the store."})]}),g(dt,{onSubmit:s.mutate,children:[l(Ti,{name:"comment",maximumCharacters:255,css:{minHeight:150}}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Leave the store"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function FRe({children:e,store:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),s=ve({mutationFn:a=>(a.preventDefault(),o.delete("/events/"+t.id).then(()=>{r(!1),F({type:"success",title:"The store has been removed from your event."}),i.invalidateQueries({queryKey:["store",t.id]}),i.invalidateQueries({queryKey:["me"]})}).catch(function(c){var u,d,f,h;(d=(u=c.response)==null?void 0:u.data)!=null&&d.error?F({type:"error",title:(f=c.response.data)==null?void 0:f.error.title,message:(h=c.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Remove a store"}),g(ht,{children:[g("p",{children:["You are about to remove the store ",l("strong",{children:t.name})," from your event."]}),l("p",{children:"Do you wish to continue?"})]}),l(dt,{onSubmit:s.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Remove the store"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function BRe({children:e,store:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=te(),{selectedStore:s}=st(),a=ve({mutationFn:c=>{c.preventDefault();const d=new FormData(c.target).get("comment");return o.post("/events/"+t.id,{comment:d}).then(()=>{r(!1),F({type:"success",title:"Your invitation has been sent."}),i.invalidateQueries({queryKey:["store",t.id]}),i.invalidateQueries({queryKey:["me"]})}).catch(function(f){var h,p,m,v;(p=(h=f.response)==null?void 0:h.data)!=null&&p.error?F({type:"error",title:(m=f.response.data)==null?void 0:m.error.title,message:(v=f.response.data)==null?void 0:v.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[g(nt,{children:["Invite ",t.name]}),g(ht,{children:[g(A,{children:["You are about to invite the store"," ",l(Dn,{store:{id:t.id,name:t.name,pictureUuid:t.picture},inline:!0,nameBold:!0})," ","to your event"," ",l(Dn,{store:s,inline:!0,nameBold:!0}),"."]}),l(A,{children:"Leave a comment to increase the chance of getting a response."})]}),g(dt,{onSubmit:a.mutate,children:[g(P,{children:[l(ae,{children:"Comment (optional)"}),l(Ti,{name:"comment",maximumCharacters:1024,css:{height:200}})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:a.isLoading,variant:"primary",children:"Invite the store"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const HRe=fn({"0%":{"-webkit-transform":"scale(0.1, 0.1)",opacity:0},"50%":{opacity:1},"100%":{"-webkit-transform":"scale(1.2, 1.2)",opacity:0}});function xY({size:e,ringSize:t,color:n,enablePulse:r}){return g(ce,{css:{position:"relative",width:e*2,height:e*2},children:[l(ce,{css:{border:t+`px solid ${n}`,borderRadius:30,height:e*2,width:e*2,position:"absolute",animation:r?`${HRe} 1.3s ease-out`:"",animationIterationCount:"infinite",opacity:0}}),l(ce,{css:{width:e,height:e,backgroundColor:n,borderRadius:"50%",position:"absolute",top:e/2,left:e/2}})]})}const CY=de(mg);function zRe({options:e,firstLoad:t=!1,isDisabled:n=!1,width:r="300px",onChange:i=null,value:o=null,placeholder:s=null,placement:a="auto",isClearable:c=!1,menuPortalTarget:u=null,name:d=null,css:f={}}){if(t)return l(URe,{width:r,css:{...f}});const h=e.map(p=>({...p,...Mw(p)}));return l(Ne,{title:o?o.name:null,css:{...f},children:l(CY,{name:d,blurInputOnSelect:!0,isDisabled:n,getOptionValue:p=>JSON.stringify({id:p.id,name:p.value}),value:o?Mw(o,n):null,onChange:i,options:h,menuPortalTarget:u,placeholder:s||"- No dropbox selected -",isSearchable:!0,isClearable:c,menuPlacement:a,components:{Option:SY},styles:Oh})})}function URe({width:e,css:t=null}){return l(CY,{css:{...t,width:e},isDisabled:!0,defaultValue:Mw({id:null,status:null,name:"Loading\u2026"}),styles:Oh,components:{Option:SY}})}function wY(e,t,n,r){let i,o=!0;return e==="online"?i="$success500":e==="busy"?(i="$amber500",o=!1):(i="$gray500",o=!1),g(M,{css:{gap:"$2",alignItems:"center",width:"100%"},children:[l(xY,{size:8,ringSize:2,color:i,enablePulse:o}),l(ce,{css:r?{}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,flexShrink:1,flexBasis:0},children:t}),n&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}})]})}const Mw=(e,t=!1)=>({id:e.id,value:e.name,label:wY(e.status,e.name,t,!1)}),SY=e=>{const{innerProps:t,innerRef:n,data:r}=e,i={px:"$2",py:"$2",mx:"$1",borderRadius:8,alignItems:"center",color:"$textColor",transition:"0.1s background-color",cursor:"pointer","&:not(:last-child)":{marginBottom:"$1"}},o={transition:"0.1s background-color",backgroundColor:"$hoveringItem"},s=e.isFocused?{...o}:null;return l(M,{ref:n,...t,css:e.isSelected?{...i,fontWeight:"$bold",backgroundColor:"$hoveringItem",...s}:{...i,...s},children:wY(r.status,r.value,!1,!0)})};function VRe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),{id:r}=Na();return y.exports.useEffect(()=>{t("Newsletters")},[e,t]),y.exports.useEffect(()=>{n(null)},[]),g(Kl,{children:[l(ie,{to:"/subscribers/newsletters",css:{width:"fit-content"},children:"<- Go back"}),g(P,{css:{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,boxShadow:"$xsmall",p:"$4",gap:"$4",height:"fit-content"},children:[r==="new"&&l(WRe,{}),r!=="new"&&l(jRe,{id:r})]})]})}function jRe({id:e}){const t=sBe(),n=te(),{isLoading:r,error:i,data:o}=_t(["newsletters",e],()=>n.get("/subscribers/newsletters/"+e).then(a=>a.data));return r?l(Iw,{entity:null,onSave:null,isLoading:r}):i?g(z,{children:["An error has occurred: ",i.message]}):l(Iw,{entity:o,onSave:a=>t.mutate(a),isLoading:r||t.isLoading})}function WRe(){const e=fBe(),t=ar();return l(Iw,{entity:null,onSave:r=>{e.mutate(r,{onSuccess:()=>t("/subscribers/newsletters",{})})},isLoading:e.isLoading})}function Iw({entity:e,onSave:t,isLoading:n=!1}){const[r,i]=y.exports.useState({id:null,title:"",overridedName:"",message:"",dropbox:null,objectToDeliver:null,canArchive:!1,canEdit:!1}),o=Ee();y.exports.useEffect(()=>{e&&i(e)},[e]);const s=e===null&&n===!1||e&&e.canEdit,a=!e;return g(z,{children:[g(P,{children:[l(ae,{children:"Title"}),l(ae,{type:"help",children:"The title is used only in the interface, to help you recognize the different newsletters in your account."}),l(Ke,{name:"title",type:"text",value:r.title||"",readOnly:n||!s,onChange:c=>i({...r,title:c.target.value})})]}),g(P,{children:[l(ae,{children:"Message"}),g(ae,{type:"help",children:["Your subscriber will receive this message, you can use ","{name}"," to use the name of your subscriber. A maximum of 700 characters can be used, please note that no-ascii characters might take more than 1 character."]}),l(Ti,{css:{height:200},maximumCharacters:700,name:"message",type:"text",readOnly:n||!s,onChange:c=>i({...r,message:c.target.value}),value:r.message||""})]}),g(P,{children:[l(ae,{children:"Dropbox"}),l(ae,{type:"help",children:"Select the dropbox you want to assign this newsletter to, and please make sure that the dropbox has the object or notecard you want to send."}),l(ae,{type:"help",children:"Only dropboxes that have a minimum version of v1.3 are compatible with EasySubscribers and will be selectable here."}),l(GRe,{dropboxSelected:r.dropbox,isClearable:!0,isDisabled:n||!s,onChange:c=>{i(c?{...r,objectToDeliver:null,dropbox:{id:c.id,name:c.name,status:c.status}}:{...r,objectToDeliver:null,dropbox:null}),o.invalidateQueries({queryKey:["inventory",r.id]})}})]}),g(P,{css:{display:r.dropbox?"flex":"none"},children:[l(ae,{children:"Object to deliver (optional)"}),l(ae,{type:"help",children:"If you want to send an object with your message, please select it. It will only display the content of the selected dropbox."}),l(KRe,{isClearable:!0,isDisabled:n||!s,dropbox:r.dropbox,inventorySelected:r.objectToDeliver,onChange:c=>{i(c?{...r,objectToDeliver:{type:c.type,name:c.name}}:{...r,objectToDeliver:null})}})]}),g(M,{css:{gap:"$4",justifyContent:"end"},children:[!n&&a&&l(z,{children:l(Y,{variant:"primary",disabled:n,onClick:()=>t(r),children:"Create your newletter"})}),e&&g(z,{children:[e.canArchive&&l(qRe,{newsletter:r,isLoading:n}),s&&l(Y,{variant:"gray",disabled:n,onClick:()=>t(r),children:"Save the changes"})]})]})]})}function qRe({newsletter:e,isLoading:t}){const n=hBe(),[r,i]=y.exports.useState(!1),o=ar();return g(M,{css:{fontSize:13,borderRadius:6,height:"100%",alignItems:"center",cursor:"pointer",flexShrink:0},onClick:()=>{r===!1?i(!0):n.isLoading||n.mutate(e,{onSuccess:()=>{o("/subscribers/newsletters")}})},children:[n.isLoading&&g(M,{css:{gap:"$2"},children:[l(A,{children:"Archiving\u2026"}),l(qa,{size:16,color:"$destructive800",css:{marginLeft:"auto",flexShrink:0}})]}),!n.isLoading&&r&&l(Y,{variant:"softDanger",type:"button",disabled:t,children:"Confirm archiving?"}),!r&&l(Y,{variant:"onlyTextGray",type:"button",disabled:t,children:"Archive the newsletter"})]})}function KRe({dropbox:e,inventorySelected:t=null,onChange:n=null,isClearable:r=!1,isDisabled:i=!1}){const{isLoading:o,isFetching:s,data:a}=UQ({dropbox:e});return l(Gl,{menuPortalTarget:document.body,placement:"top",name:"objectToDeliver",firstLoad:o,isDisabled:s||i,isClearable:r,options:o?null:a,onChange:n?c=>n(c):null,value:o?null:t,width:"100%",css:{maxWidth:500}})}function GRe({dropboxSelected:e=null,onChange:t=null,isClearable:n=!1,isDisabled:r=!1}){const{isLoading:i,isFetching:o,data:s}=mBe({minimalVersion:"1.3"});let a;return i?a=null:(e==null?void 0:e.status)===void 0?e===null?a=null:s.find(c=>c.id===e.id)&&(a=s.find(c=>c.id===e.id)):a=e,l(zRe,{menuPortalTarget:document.body,placement:"top",name:"objectToDeliver",firstLoad:i,isDisabled:o||r,isClearable:n,options:i?null:s,onChange:t?c=>t(c):null,value:i?null:a,width:"100%",css:{maxWidth:500}})}const EY="Radio",[YRe,TY]=ii(EY),[QRe,XRe]=YRe(EY),ZRe=y.exports.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...u}=e,[d,f]=y.exports.useState(null),h=zt(t,v=>f(v)),p=y.exports.useRef(!1),m=d?Boolean(d.closest("form")):!0;return y.exports.createElement(QRe,{scope:n,checked:i,disabled:s},y.exports.createElement(Pt.button,ue({type:"button",role:"radio","aria-checked":i,"data-state":kY(i),"data-disabled":s?"":void 0,disabled:s,value:a},u,{ref:h,onClick:Ue(e.onClick,v=>{i||c==null||c(),m&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})})),m&&y.exports.createElement(tMe,{control:d,bubbles:!p.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),JRe="RadioIndicator",eMe=y.exports.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=XRe(JRe,n);return y.exports.createElement(Hi,{present:r||o.checked},y.exports.createElement(Pt.span,ue({"data-state":kY(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),tMe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.exports.useRef(null),s=Jm(n),a=eg(t);return y.exports.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[s,n,r]),y.exports.createElement("input",ue({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kY(e){return e?"checked":"unchecked"}const nMe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_Y="RadioGroup",[rMe,qGe]=ii(_Y,[I6,TY]),AY=I6(),$Y=TY(),[iMe,oMe]=rMe(_Y),sMe=y.exports.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,p=AY(n),m=fg(u),[v,b]=$o({prop:o,defaultProp:i,onChange:f});return y.exports.createElement(iMe,{scope:n,name:r,required:s,disabled:a,value:v,onValueChange:b},y.exports.createElement(Cq,ue({asChild:!0},p,{orientation:c,dir:m,loop:d}),y.exports.createElement(Pt.div,ue({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:m},h,{ref:t}))))}),aMe="RadioGroupItem",lMe=y.exports.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=oMe(aMe,n),s=o.disabled||r,a=AY(n),c=$Y(n),u=y.exports.useRef(null),d=zt(t,u),f=o.value===i.value,h=y.exports.useRef(!1);return y.exports.useEffect(()=>{const p=v=>{nMe.includes(v.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",m)}},[]),y.exports.createElement(wq,ue({asChild:!0},a,{focusable:!s,active:f}),y.exports.createElement(ZRe,ue({disabled:s,required:o.required,checked:f},c,i,{name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:Ue(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ue(i.onFocus,()=>{var p;h.current&&((p=u.current)===null||p===void 0||p.click())})})))}),cMe=y.exports.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=$Y(n);return y.exports.createElement(eMe,ue({},i,r,{ref:t}))}),uMe=sMe,dMe=lMe,fMe=cMe,wg=de(uMe,{display:"flex",flexDirection:"column",gap:10}),Lc=de(dMe,{all:"unset",backgroundColor:"$radioBackground",width:16,height:16,borderRadius:"100%",boxShadow:"$xsmall",border:"1px solid $radioBorder","&:focus":{boxShadow:"0 0 0 2px $gray700"}}),Nc=de(fMe,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",position:"relative","&::after":{content:'""',display:"block",width:8,height:8,borderRadius:"50%",backgroundColor:"$radioIndicator"}}),Fc=de(M,{alignItems:"center",cursor:"pointer",width:"fit-content",gap:"$2"});function hMe(){var f,h;const[e,t]=y.exports.useState(null),[n,r]=y.exports.useState(!1),[i]=Jn(),o=(f=i.get("h"))==null?void 0:f.toString(),s=(h=i.get("u"))==null?void 0:h.toString(),{isLoading:a,data:c,isError:u}=lBe({hash:o,user:s}),d=aBe();return u&&window.location.replace("https://www.kynno.app?utm_source=unsubscribe"),l(M,{css:{minHeight:"100svh",alignItems:"center",justifyContent:"center",py:"$10",px:"$2"},children:g(P,{css:{backgroundColor:"white",borderRadius:12,gap:"$4",maxWidth:600,border:"1px solid $borderColor",p:"$6"},children:[a&&l(br,{children:"Loading\u2026"}),n&&g(z,{children:[l(br,{children:"Sorry to see you go"}),l(A,{children:"If you are willing to subscribe to the newsletter, please visit their kiosk and click to subscribe again."})]}),!n&&(c==null?void 0:c.alreadyUnsubscribed)&&g(z,{children:[l(br,{children:"You already unsubscribed from this newsletter"}),l(A,{children:"If you are willing to subscribe to the newsletter, please visit their kiosk and click to subscribe again."})]}),!n&&(c==null?void 0:c.alreadyUnsubscribed)===!1&&g(z,{children:[l(br,{children:"We're sorry to hear that you're thinking about unsubscribing"}),l(A,{children:"Before you do, would you please consider taking the time to explain why you are unsubscribing? (optional)"}),l(P,{children:g(wg,{"aria-label":"Why do you unsubscribe?",onValueChange:p=>t(p),children:[g(Fc,{children:[l(Lc,{value:"no_longer_want",id:"c1",children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c1",children:"I no longer want to receive this newsletter"})]}),g(Fc,{children:[l(Lc,{value:"too_much",id:"c2",children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c2",children:"I receive too much newsletter"})]}),g(Fc,{children:[l(Lc,{value:"never_signed_up",id:"c3",children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c3",children:"I never signed up for this newsletter"})]}),g(Fc,{children:[l(Lc,{value:"inappriopriate",id:"c4",children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c4",children:"The newsletter is inappropriate"})]})]})}),l(Y,{disabled:a||u||d.isLoading,variant:"primary",css:{marginLeft:"auto"},onClick:()=>d.mutate({id:c==null?void 0:c.id,reason:e},{onSuccess:()=>r(!0)}),children:"Unsubscribe"})]})]})})}const pMe=de("svg"),gL=de("circle");function mMe({size:e,ringSize:t,color:n}){return g(ce,{css:{position:"relative",width:e*2,height:e*2},children:[g(pMe,{css:{height:e*2,width:e*2,overflow:"visible",top:0,left:0,position:"absolute"},children:[l(gL,{css:{stroke:n},cx:e,cy:e,fill:"none",strokeWidth:t,r:e,strokeDasharray:"10 100",children:l("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1.3s",values:"0 "+e+" "+e+";360 "+e+" "+e,keyTimes:"0;1"})}),l(gL,{css:{stroke:n,opacity:.3},cx:e,cy:e,fill:"none",strokeWidth:t,r:e})]}),l(ce,{css:{width:e,height:e,backgroundColor:n,borderRadius:"50%",position:"absolute",top:e/2,left:e/2}})]})}function gMe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),{quota:r}=st(),i=te(),o=ar(),{isLoading:s,error:a,data:c}=_t(["newsletters"],()=>i.get("/subscribers/newsletters").then(d=>d.data));if(Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{t("Newsletters")},[e,t]),y.exports.useEffect(()=>{if(!c)return;const d=Object.values(c).flatMap(f=>f).length;n(d===0?null:l(Y,{variant:"primary",onClick:()=>{o("/subscribers/newsletters/new",{})},children:"Create newsletter"}))},[c]),s)return l(z,{});if(a)return g(z,{children:["An error has occurred: ",a.message]});const u=Object.values(c).flatMap(d=>d).length;return g(Kl,{children:[u===0&&l(no,{title:"Dispatch your big news",content:g(P,{css:{gap:"$4",alignItems:"center"},children:[l(A,{children:"The newsletters are what contain the big news you want to share with your subscribers. Start to create and edit your first one, then publish it using one of your dropbox."}),l(Y,{variant:"primary",onClick:()=>{o("/subscribers/newsletters/new",{})},children:"Create your first newsletter"})]})}),u>0&&g(P,{css:{gap:"$6"},children:[r.subscribers.exceeded&&g(M,{css:{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,p:"$4",boxShadow:"$xsmall"},children:[g(br,{css:{mb:"$4"},children:[l(W,{icon:sz,css:{color:"$yellow400",marginRight:"$2"}})," ","Subscribers quota reached"]}),g(P,{css:{gap:"$1"},children:[g(A,{children:["Your current plan allows a maximum of"," ",l("strong",{children:r.subscribers.maximum})," subscribers in your store. You are not able to manually add subscribers, and your newsletter will be only published to your first"," ",l("strong",{children:r.subscribers.maximum})," subscribers."]}),g(A,{children:["Consider"," ",l(ie,{to:"/settings/billing/subscription",children:"upgrading your plan"})," ","to allow more subscribers to receive your future newsletters."]})]})]}),Object.entries(c).map(([d,f])=>{if(f.length!==0)return g(ce,{children:[g(Tt,{css:{marginBottom:"$4"},children:[d==="error"&&l(z,{children:"Error"}),d==="in_progress"&&l(z,{children:"In progress"}),d==="paused"&&l(z,{children:"Paused"}),d==="draft"&&l(z,{children:"Draft"}),d==="done"&&l(z,{children:"Done"})]}),l(P,{css:{gap:"$2"},children:f.map(h=>{const p=h.progress&&(h.status==="in_progress"||h.status==="paused"||h.status==="error");return g(M,{onClick:()=>{o("/subscribers/newsletters/"+h.id,{})},css:{p:"$3",background:"$cardBackgroundColor",boxShadow:"$xsmall",borderRadius:12,maxWidth:"100%",border:"1px solid $borderColor",cursor:"pointer",transition:"box-shadow 0.1s",alignItems:"center",gap:"$3","&:hover":{transition:"box-shadow 0.1s",boxShadow:"$medium"}},children:[h.status==="in_progress"&&l(mMe,{size:8,ringSize:3,color:"$yellow400"}),h.status==="draft"&&l(ce,{css:{width:4,height:24,marginRight:12,borderRadius:8,backgroundColor:"$gray300",flexShrink:0}}),h.status==="done"&&l(ce,{css:{width:4,marginRight:12,height:24,borderRadius:8,backgroundColor:"$success500",flexShrink:0}}),h.status==="error"&&l(ce,{css:{width:4,marginRight:12,height:24,borderRadius:8,backgroundColor:"$destructive700",flexShrink:0}}),h.status==="paused"&&l(W,{icon:JH,css:{width:16,color:"$gray500"}}),l(A,{css:{fontWeight:"bold",flexShrink:0},children:h.title}),l(ce,{type:"textEllipsis",css:{color:"$gray400",flex:1},children:h.message}),h.objectToDeliver!==null&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:[l(W,{icon:Qm}),l(A,{children:"1"})]}),h.status==="draft"&&h.dropbox!==null&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:[l(W,{icon:VE}),l(A,{children:"1"})]}),p&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:[l(W,{icon:bC}),g(A,{children:[h.progress.done," /"," ",h.progress.total]})]}),h.status==="done"&&h.progress&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:[l(W,{icon:bC}),l(A,{children:h.progress.done})]}),h.status==="done"&&h.updatedAt&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:[l(W,{icon:Pa}),l(A,{children:Z(h.updatedAt).format("LL")})]}),h.canPublish&&l(vMe,{newsletter:h}),h.canPause&&l(yMe,{newsletter:h})]},h.id)})})]},"status-"+d)})]})]})}function vMe({newsletter:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(!1),o=cBe();let s={};return t&&!o.isLoading&&(s={border:"1px solid $yellow300",backgroundColor:"$yellow300",color:"$yellow950"}),!r&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$gray50",border:"1px solid $gray200",color:"$gray500",alignItems:"center",gap:"$2",transition:"all 0.2s",...s},onClick:a=>{a.stopPropagation(),t===!1?n(!0):o.isLoading||o.mutate(e,{onSuccess:()=>{i(!0)},onError:()=>{n(!1)}})},children:[o.isLoading&&l(qa,{size:19,color:"$gray500",css:{flexShrink:0}}),!o.isLoading&&t&&l(A,{children:"Confirm publishing?"}),!t&&g(z,{children:[l(W,{icon:yoe}),l(A,{children:"Publish"})]})]})}function yMe({newsletter:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(!1),o=uBe();let s={};return t&&!o.isLoading&&(s={border:"1px solid $yellow300",backgroundColor:"$yellow300",color:"$yellow950"}),!r&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$gray50",border:"1px solid $gray200",color:"$gray500",alignItems:"center",gap:"$2",transition:"all 0.2s",...s},onClick:a=>{a.stopPropagation(),t===!1?n(!0):o.isLoading||o.mutate(e,{onSuccess:()=>{i(!0)},onError:()=>{n(!1)}})},children:[o.isLoading&&l(qa,{size:16,css:{marginLeft:"auto",flexShrink:0}}),!o.isLoading&&t&&l(A,{children:"Confirm pausing?"}),!t&&g(z,{children:[l(W,{icon:JH}),l(A,{children:"Pause"})]})]})}function bMe(){const{pageTitle:e,setPageTitle:t}=Ar(),{setContent:n}=Si(),[r,i]=Jn(),[o,s]=y.exports.useState(1),{quota:a}=st(),c=te(),u=Tn.exports.useMediaQuery({maxWidth:575}),d=Tn.exports.useMediaQuery({maxWidth:767}),f=Tn.exports.useMediaQuery({maxWidth:1200}),{isLoading:h,error:p,data:m}=_t({keepPreviousData:!0,queryKey:["subscribers",r.toString()],queryFn:()=>c.get("/subscribers/subscribers?"+r.toString()).then(b=>b.data)});if(Z.extend(Pn),Z.extend(On),y.exports.useEffect(()=>{t("Subscribers")},[e,t]),y.exports.useEffect(()=>{const b=parseInt(r.get("page"));b<=0||isNaN(b)?(s(1),r.delete("page"),i(r)):s(b>0?b:1),r.get("search")===""&&r.delete("search"),i(r)},[r,i]),y.exports.useEffect(()=>{h||(m.count>0&&m.subscribers.length===0||m.count<m.maxPerPage)&&(s(1),r.delete("page"),i(r))},[m,h]),y.exports.useEffect(()=>{m&&!(m.subscribers.length===0&&m.countActive===0&&(r.get("search")===null||r.get("search")===""))?n(l(yL,{})):n(null)},[m,r,n]),h)return l(z,{});if(p)return g(z,{children:["An error has occurred: ",p.message]});const v=[];for(let b=1;b<=Math.ceil(m.count/m.maxPerPage);b++)v.push(b);return g(Kl,{children:[m.subscribers.length===0&&m.countActive===0&&(r.get("search")===null||r.get("search")==="")&&l(no,{title:"No subscribers yet",content:g(P,{css:{gap:"$4",alignItems:"center"},children:[l(A,{children:"This page contains your subscribers list. You can import a list of subscribers, or you can rez the Subscribers Kiosk in-world and avatars can click on it to subscribe to your listing."}),!a.subscribers.exceeded&&l(yL,{}),a.subscribers.exceeded&&l(A,{children:"As a free plan, you are unable to add your subscribers. Please consider upgrading your plan and get started with Subscribers."})]})}),!(m.subscribers.length===0&&m.countActive===0&&(r.get("search")===null||r.get("search")===""))&&g(P,{css:{gap:"$4"},children:[a.subscribers.exceeded&&g(M,{css:{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,p:"$4",boxShadow:"$xsmall"},children:[g(br,{css:{mb:"$4"},children:[l(W,{icon:sz,css:{color:"$yellow400",marginRight:"$2"}})," ","Subscribers quota reached"]}),g(P,{css:{gap:"$1"},children:[g(A,{children:["Your current plan allows a maximum of"," ",l("strong",{children:a.subscribers.maximum})," subscribers in your store. You are not able to manually add subscribers, and your newsletter will be only published to your first"," ",l("strong",{children:a.subscribers.maximum})," subscribers."]}),g(A,{children:["Consider"," ",l(ie,{to:"/settings/billing/subscription",children:"upgrading your plan"})," ","to allow more subscribers to receive your future newsletters."]})]})]}),g(Qn,{children:["Total active - ",m.countActive]}),l(CMe,{}),m.subscribers.length>0&&g(z,{children:[l(P,{css:{gap:"$2"},children:m.subscribers.map(b=>g(P,{css:{p:"$3",background:"$cardBackgroundColor",boxShadow:"$xsmall",borderRadius:12,maxWidth:"100%",border:"1px solid $borderColor",gap:"$2"},children:[g(M,{css:{gap:"$4",alignItems:"center"},children:[l(ce,{css:{width:4,flexShrink:0,height:"100%",borderRadius:8,backgroundColor:b.status==="active"?"$success500":"$gray300"}}),l(A,{css:{fontWeight:"bold",flexShrink:0},children:l(Et,{enabled:!0,delayDuration:200,content:l("span",{children:"Copy"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(b.avatar.name).then(()=>F({type:"success",title:"Name copied"}))},children:b.avatar.name})})}),l(ce,{type:"textEllipsis",css:{color:"$gray400",marginRight:"auto"},children:l(Et,{enabled:!0,delayDuration:200,content:l("span",{children:"Copy"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{px:"$1",cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(b.avatar.uuid).then(()=>F({type:"success",title:"UUID copied"}))},children:b.avatar.uuid})})}),!u&&b.status==="active"&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2",flexShrink:0,height:"100%"},title:Z(b.createdAt).format("LLL"),children:[l(W,{icon:rm}),l(A,{children:Z(b.createdAt).fromNow()})]}),!u&&b.status==="unsubscribed"&&g(z,{children:[b.unsubscribedFrom&&l(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",flexShrink:0,gap:"$2"},children:l(A,{children:b.unsubscribedFrom})}),g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",flexShrink:0,gap:"$2"},title:Z(b.updatedAt).format("LLL"),children:[l(W,{icon:MD}),l(A,{children:Z(b.updatedAt).fromNow()})]})]}),!u&&b.status==="active"&&g(z,{children:[l(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",flexShrink:0,gap:"$2"},children:l(A,{children:b.joinedFrom})}),l(vL,{subscriber:b})]})]}),u&&g(M,{css:{justifyContent:"space-between"},children:[b.status==="active"&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2",flexShrink:0,height:"100%"},title:Z(b.createdAt).format("LLL"),children:[l(W,{icon:rm}),l(A,{children:Z(b.createdAt).fromNow()})]}),b.status==="unsubscribed"&&g(z,{children:[b.unsubscribedFrom&&l(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",flexShrink:0,gap:"$2"},children:l(A,{children:b.unsubscribedFrom})}),g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",flexShrink:0,gap:"$2"},title:Z(b.updatedAt).format("LLL"),children:[l(W,{icon:MD}),l(A,{children:Z(b.updatedAt).fromNow()})]})]}),b.status==="active"&&g(z,{children:[l(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,backgroundColor:"$backgroundColor",border:"1px solid $borderColor",color:"$textColor",alignItems:"center",gap:"$2"},children:l(A,{children:b.joinedFrom})}),l(vL,{subscriber:b})]})]})]},b.id))}),l(M,{css:{py:"$10",mx:"auto"},children:v.length>1&&v.map((b,x,C)=>{const w=C.length;let S=10;u||d?S=3:f&&(S=5);const T=o===b,E={py:"$3",px:"$4",cursor:"pointer",boxShadow:"$xsmall",backgroundColor:T?"$gray100":"$cardBackgroundColor",transition:"background-color 0.15s",borderTop:"1px solid $borderColor",borderBottom:"1px solid $borderColor","&:hover":{cursor:"pointer",backgroundColor:"$gray100",transition:"background-color 0.15s"},"&:not(:first-child), &:not(:last-child)":{borderLeft:"1px solid $borderColor"},"&:first-child":{borderLeft:"1px solid $borderColor",borderBottomLeftRadius:8,borderTopLeftRadius:8},"&:last-child":{borderRight:"1px solid $borderColor",borderBottomRightRadius:8,borderTopRightRadius:8}};if(w<=S)return l(A,{onClick:()=>{s(b),r.set("page",b),i(r)},css:E,children:b},"pagination-"+b);if(Math.abs(o-b)<=Math.floor(S/2)||b===1||b===w)return l(A,{onClick:()=>{s(b),r.set("page",b),i(r)},css:E,children:T?l("strong",{children:b}):b},"pagination-"+b);if(b===2&&o>S/2+1)return l(A,{css:E,onClick:()=>{s(Math.ceil(o-(S/2+1))),r.set("page",Math.ceil(o-(S/2+1)).toString()),i(r)},children:"\u2026"},"pagination-ellipsis-"+b);if(b===w-1&&o<w-S/2)return l(A,{onClick:()=>{s(o+Math.ceil(S/2)),r.set("page",(o+Math.ceil(S/2)).toString()),i(r)},css:E,children:"\u2026"},"pagination-ellipsis-"+b)})})]})]})]})}function vL({subscriber:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(!1),o=xBe(),s=Ee();return!r&&g(M,{css:{px:"$2",py:"$1",fontSize:13,borderRadius:6,height:"100%",backgroundColor:"$badgeDangerBackgroundColor",border:"1px solid $badgeDangerBorderColor",color:"$badgeDangerTextColor",alignItems:"center",gap:"$2",cursor:"pointer",flexShrink:0,"&:hover":{transition:"box-shadow 0.1s",boxShadow:"$medium"}},onClick:()=>{t===!1?n(!0):o.isLoading||o.mutate(e,{onSuccess:()=>{i(!0),s.invalidateQueries({queryKey:["subscribers"]})}})},children:[o.isLoading&&l(qa,{size:16,color:"$destructive800",css:{marginLeft:"auto",flexShrink:0}}),!o.isLoading&&t&&l(A,{children:"Confirm unsubscribe?"}),!t&&l(W,{icon:Ul})]})}function yL(){const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(""),i=vBe(),o=Ee(),{quota:s}=st();return g(Ye,{open:e&&!s.subscribers.exceeded,onOpenChange:t,children:[l(pt,{asChild:!0,children:l(Y,{variant:"primary",disabled:s.subscribers.exceeded,children:"Add subscribers"})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Add subscribers"}),g(ht,{children:[g(A,{css:{color:"$destructive800"},children:["It's important to note that you can only include subscribers who have willingly ",l("strong",{children:"OPTED IN"})," to receive messages from you. For instance, individuals who have purchased items or those on a visitor list without explicit opt-in ",l("strong",{children:"DO NOT MEET"})," the criteria. Spamming is against the ToS of Second Life, and your access to EasySubscribers could be terminated if there is any abuse."]}),l(A,{css:{color:"$destructive800"},children:"If you have any question regarding this policy, please feel free to contact me in-world, Luke Rowley."})]}),g(P,{css:{gap:"$6"},children:[g(P,{css:{flex:1},children:[l(ae,{children:"Name or UUID of the avatar"}),l(ae,{type:"help",children:"The system will run a check to import this avatar, so the name in the listing might differ from what you enter here to match their real name."}),l(Ke,{name:"username",type:"text",placeholder:"Luke Rowley",value:n,onChange:a=>r(a.target.value)}),l(Y,{variant:"primary",disabled:i.isLoading,css:{ml:"auto",marginTop:"$2"},onClick:()=>{i.mutate(n,{onSuccess:()=>{t(!1),r(null),o.invalidateQueries({queryKey:["subscribers"]})}})},children:"Add subscriber"})]}),l(xMe,{setOpen:t})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function xMe({setOpen:e}){const[t,n]=y.exports.useState(null),r=gBe(),[i]=Jn(),o=Ee(),s=()=>{const a=new FormData;a.append("file",t),r.mutate(a,{onSuccess:()=>{e(!1),o.invalidateQueries({queryKey:["subscribers",i.toString()]}),o.invalidateQueries({queryKey:["me"]})}})};return g(P,{css:{flex:1},children:[l(ae,{children:"Import a file"}),l(ae,{type:"help",children:"Your .csv file must contain 2 columns, the first one being the name of the avatar, and the second one their UUID."}),g(ae,{type:"help",children:["\u26A0\uFE0F Please make sure that the data are formatted as one avatar per line:",g("ul",{children:[l("li",{children:"- The format of the line must be: name,uuid"}),l("li",{children:"- name and uuid must be separate by a ,"}),l("li",{children:"- One avatar per line"}),l("li",{children:"- No header"})]})]}),l(ae,{type:"help",children:"No check will be performed on the data, it will be imported as it is."}),l(ae,{type:"help",children:"If you have any issue with the import, please contact Luke Rowley and I will be happy to help!"}),l(Ke,{name:"csv",type:"file",onChange:a=>n(a.target.files[0])}),g(Y,{variant:"primary",disabled:r.isLoading,css:{ml:"auto",marginTop:"$2"},onClick:s,children:[r.isLoading&&g(M,{css:{alignItems:"center"},children:["Import your file",l(qa,{css:{marginLeft:"$2",marginRight:"0"},color:"$gray800",size:16})]}),!r.isLoading&&l(z,{children:"Import your file"})]})]})}function CMe(){const[e,t]=Jn(),[n,r]=y.exports.useState(e.get("search")),i=_u(o=>{e.delete("page"),e.set("search",o),t(e),r(o)},600);return l(Ke,{placeholder:"Search",name:"search",type:"text",defaultValue:n,onChange:o=>i(o.target.value),css:{maxWidth:400,"@sm":{maxWidth:"100%"}}})}function wMe(){const e=te(),{subscription:t,permissions:n}=st(),{isLoading:r,data:i}=_t(["store","general"],()=>e.get("/settings/store/general").then(o=>o.data));return r?l(z,{}):g(P,{css:{gap:"$8"},children:[l(M,{css:{width:"100%",height:"140px",justifyContent:"left",alignItems:"flex-end",borderRadius:8},children:l(OMe,{pictureUuid:i.pictureUuid,active:t.isAllowedToChangeStorePicture,children:l(Et,{enabled:!t.isAllowedToChangeStorePicture,content:l(ce,{children:"Your current Subscription does not allow you to change your store picture."}),children:g(M,{css:{position:"relative",width:128,height:128,border:"4px solid $borderColor",color:"$textColor","&:hover":{cursor:"pointer",color:"$gray600"}},children:[l(Dt,{css:{height:"100%",width:"100%",borderRadius:8},src:kn({uuid:i.pictureUuid?i.pictureUuid:"store",size:256})}),l(M,{css:{position:"absolute",backgroundColor:"$backgroundColor",justifyContent:"center",alignItems:"center",transition:"color 200ms",p:"$3",borderRadius:100,right:"-$3",bottom:"-$3",boxShadow:"$small"},children:l(W,{icon:sU,css:{width:24,height:24}})})]})})})}),n.features.settings.store.general.editName&&l(TMe,{name:i.name}),n.features.settings.store.general.editName===!1&&g(P,{css:{gap:"$2"},children:[l(Tt,{children:"Name"}),l(A,{children:i.name})]}),n.features.settings.store.general.manageCoOwners&&l(AMe,{coowners:i.coOwners}),n.features.settings.store.general.manageManagers&&l(_Me,{managers:i.managers}),l(kMe,{store:i}),n.features.settings.store.general.editAbout&&l(EMe,{about:i.about}),n.features.settings.store.general.editRules&&l(SMe,{rules:i.rules})]})}function SMe({rules:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("rules");return r.patch("/settings/store/general/rules",{rules:c}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"Your rules has been saved."}),i.invalidateQueries({queryKey:["store","general"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Rules"}),l(A,{css:{marginLeft:"auto",color:"$gray400",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{children:e&&e.split(`
`).map((s,a)=>g(Ae.Fragment,{children:[s,l("br",{})]},a))}),t&&g(dt,{onSubmit:o.mutate,children:[l(Ti,{name:"rules",defaultValue:e,maximumCharacters:2048,css:{height:200}}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function EMe({about:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("about");return r.patch("/settings/store/general/about",{about:c}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"Your about section has been saved."}),i.invalidateQueries({queryKey:["store","general"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"About"}),l(A,{css:{marginLeft:"auto",color:"$gray400",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{children:e&&e.split(`
`).map((s,a)=>g(Ae.Fragment,{children:[s,l("br",{})]},a))}),t&&g(dt,{onSubmit:o.mutate,children:[l(Ti,{name:"about",defaultValue:e,maximumCharacters:512,css:{height:200}}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function TMe({name:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("name");return r.patch("/settings/store/general/name",{name:c}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"The name of your store has been updated. Please notice that the old URL for your application form has been updated."}),i.invalidateQueries({queryKey:["store","general"]}),i.invalidateQueries({queryKey:["me"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Name"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{children:e}),t&&g(dt,{onSubmit:o.mutate,children:[l(Ke,{name:"name",type:"text",defaultValue:e}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function kMe({store:e}){const[t,n]=y.exports.useState(!1),r=te(),i=Ee(),o=ve({mutationFn:s=>{s.preventDefault();const a=new FormData(s.target),c=a.get("flickr_url"),u=a.get("facebook_url"),d=a.get("instagram_url"),f=a.get("personal_url"),h=a.get("deviant_art_url"),p=a.get("bluesky_url"),m=a.get("x_url");return r.patch("/settings/store/socials",{flickrUrl:c,facebookUrl:u,instagramUrl:d,personalUrl:f,deviantArtUrl:h,blueskyUrl:p,xUrl:m}).then(()=>{n(!1),F({type:"success",title:"Successfully updated",message:"The socials links has been updated."}),i.invalidateQueries({queryKey:["store","general"]})}).catch(function(v){var b,x,C,w;(x=(b=v.response)==null?void 0:b.data)!=null&&x.error?F({type:"error",title:(C=v.response.data)==null?void 0:C.error.title,message:(w=v.response.data)==null?void 0:w.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Social URLs"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:18,width:18},"& a":{lineHeight:1,p:"$1"}},children:[e.socials.flickrUrl&&l(ie,{to:e.socials.flickrUrl,target:"_blank",children:l(Ua,{})}),e.socials.facebookUrl&&l(ie,{to:e.socials.facebookUrl,target:"_blank",children:l(za,{})}),e.socials.instagramUrl&&l(ie,{to:e.socials.instagramUrl,target:"_blank",children:l(Va,{})}),e.socials.xUrl&&l(ie,{to:e.socials.xUrl,target:"_blank",children:l(ja,{})}),e.socials.deviantArtUrl&&l(ie,{to:e.socials.deviantArtUrl,target:"_blank",children:l(Ha,{})}),e.socials.blueskyUrl&&l(ie,{to:e.socials.blueskyUrl,target:"_blank",children:l(Ba,{})}),e.socials.personalUrl&&l(ie,{to:e.socials.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]}),t&&g(dt,{onSubmit:o.mutate,children:[g(P,{children:[l(ae,{children:"Flickr URL"}),l(Ke,{name:"flickr_url",type:"text",defaultValue:e.socials.flickrUrl})]}),g(P,{children:[l(ae,{children:"Facebook URL"}),l(Ke,{name:"facebook_url",type:"text",defaultValue:e.socials.facebookUrl})]}),g(P,{children:[l(ae,{children:"Instagram URL"}),l(Ke,{name:"instagram_url",type:"text",defaultValue:e.socials.instagramUrl})]}),g(P,{children:[l(ae,{children:"Twitter/X URL"}),l(Ke,{name:"x_url",type:"text",defaultValue:e.socials.xUrl})]}),g(P,{children:[l(ae,{children:"Personal Website URL"}),l(Ke,{name:"personal_url",type:"text",defaultValue:e.socials.personalUrl})]}),g(P,{children:[l(ae,{children:"Deviant Art URL"}),l(Ke,{name:"deviant_art_url",type:"text",defaultValue:e.socials.deviantArtUrl})]}),g(P,{children:[l(ae,{children:"BlueSky URL"}),l(Ke,{name:"bluesky_url",type:"text",defaultValue:e.socials.blueSkyUrl})]}),l(Y,{css:{marginLeft:"auto"},disabled:o.isLoading,type:"submit",variant:"primary",children:"Apply your changes"})]})]})}function _Me({managers:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,data:i}=ms();if(r)return l(z,{});const o=i.subscription.maximumManagers,s=e.length<o;return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Managers"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{css:{color:"$gray500"},children:l(M,{css:{"& > *":{marginRight:"-$3",outline:"2px solid white",borderRadius:100}},children:e.map((a,c)=>l(Be,{sizePicture:32,showName:!1,user:{id:a.id,name:a.name,pictureUuid:a.profilePicture}},"manager-avatar-"+c))})}),t&&l(A,{children:g(P,{css:{gap:"$6"},children:[e.map((a,c)=>l(z,{children:g(M,{css:{alignItems:"center",gap:"$4"},children:[l(Be,{sizePicture:32,user:{id:a.id,name:a.name,pictureUuid:a.profilePicture}}),l($Me,{manager:a,children:l(ce,{css:{p:"$2",transition:"color 200ms",marginLeft:"auto","&:hover":{color:"$destructive800",cursor:"pointer"}},children:l(W,{icon:so})})})]},"managed-manager-"+c)})),l(PMe,{active:s,children:l(Et,{enabled:!s,content:g(ce,{children:["You are limited to"," ",g("strong",{children:[o," ",o<=1?"manager":"managers"]})," ","for this store."]}),children:g(Y,{variant:"primary",disabled:!s,css:{width:"100%",textAlign:"center",justifyContent:"center"},children:[l(W,{icon:ph}),"Add a manager"]})})})]})})]})}function AMe({coowners:e}){const[t,n]=y.exports.useState(!1),{subscription:r}=st(),i=r.maximumCoOwners,o=e.length<r.maximumCoOwners;return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Co-Owners"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>n(!t),children:t?"Cancel":"Edit"})]}),!t&&l(A,{css:{color:"$gray500"},children:l(M,{css:{"& > *":{marginRight:"-$3",outline:"2px solid white",borderRadius:100}},children:e.map((s,a)=>l(Be,{sizePicture:32,showName:!1,user:{id:s.id,name:s.name,pictureUuid:s.profilePicture}},"co-owner-avatar-"+a))})}),t&&l(A,{children:g(P,{css:{gap:"$6"},children:[e.map((s,a)=>l(z,{children:g(M,{css:{alignItems:"center",gap:"$4"},children:[l(Be,{sizePicture:32,user:{id:s.id,name:s.name,pictureUuid:s.profilePicture}}),l(DMe,{manager:s,children:l(ce,{css:{p:"$2",transition:"color 200ms",marginLeft:"auto","&:hover":{color:"$destructive800",cursor:"pointer"}},children:l(W,{icon:so})})})]},"managed-co-owner-"+a)})),l(RMe,{active:o,children:l(Et,{enabled:!o,content:g(ce,{children:["You are limited to"," ",g("strong",{children:[i," co-owners"]})," for this store."]}),children:g(Y,{variant:"primary",disabled:!o,css:{width:"100%",textAlign:"center",justifyContent:"center"},children:[l(W,{icon:ph}),"Add a co-owner"]})})})]})})]})}function $Me({children:e,manager:t}){const[n,r]=y.exports.useState(!1),i=te(),o=Ee(),s=ve({mutationFn:a=>(a.preventDefault(),i.delete("/settings/store/general/manager/"+t.id).then(()=>{r(!1),F({type:"success",title:t.name+" has been removed as manager from your store. "}),o.invalidateQueries({queryKey:["store","general"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(c){var u,d,f,h;(d=(u=c.response)==null?void 0:u.data)!=null&&d.error?F({type:"error",title:(f=c.response.data)==null?void 0:f.error.title,message:(h=c.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Delete the manager"}),g(ht,{children:[g(A,{children:["You are about to remove ",l("strong",{children:t.name})," as a manager of your store. Are you sure you want to continue?"]}),l(A,{children:"They won't have access to your creation anymore, and won't be able to manager your bloggers and store on EasyBloggers."})]}),l(dt,{onSubmit:s.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Confirm"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function DMe({children:e,manager:t}){const[n,r]=y.exports.useState(!1),i=te(),o=Ee(),s=ve({mutationFn:a=>(a.preventDefault(),i.delete("/settings/store/general/co-owner/"+t.id).then(()=>{r(!1),F({type:"success",title:t.name+" has been removed as co-owner from your store. "}),o.invalidateQueries({queryKey:["store","general"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(c){var u,d,f,h;(d=(u=c.response)==null?void 0:u.data)!=null&&d.error?F({type:"error",title:(f=c.response.data)==null?void 0:f.error.title,message:(h=c.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Delete the co-owner"}),g(ht,{children:[g(A,{children:["You are about to remove ",l("strong",{children:t.name})," as a co-owner of your store. Are you sure you want to continue?"]}),l(A,{children:"They won't be able to manage your store, neither to allow access to their dropboxes for your store."})]}),l(dt,{onSubmit:s.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Confirm"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function OMe({children:e,pictureUuid:t,active:n=!0}){const r=te(),i=Ee(),[o,s]=y.exports.useState(!1),a=ve({mutationFn:c=>{c.preventDefault();const d=new FormData(c.target).get("uuid");return r.patch("/settings/store/general/picture",{uuid:d}).then(()=>{s(!1),F({type:"success",title:"Successfully updated \u{1F3A8}",message:"This new picture for your store looks good."}),i.invalidateQueries({queryKey:["store","general"]}),i.invalidateQueries({queryKey:["me"]})}).catch(function(f){var h,p,m,v;(p=(h=f.response)==null?void 0:h.data)!=null&&p.error?F({type:"error",title:(m=f.response.data)==null?void 0:m.error.title,message:(v=f.response.data)==null?void 0:v.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return n?g(Ye,{open:o,onOpenChange:s,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:c=>c.preventDefault(),children:[l(nt,{children:"Edit the Store Picture"}),g(ht,{children:[l(A,{children:"The picture of your store will be shown in various area on EasyBloggers, it's the most useful way to get your brand recognized among bloggers."}),g(A,{children:["Please enter a texture UUID from Second Life which you can get by"," ",g("code",{children:["Right Click ",">"," Copy Asset UUID"]})]})]}),g(dt,{onSubmit:a.mutate,children:[g(P,{children:[l("div",{children:l("strong",{children:"Texture UUID"})}),l(Ke,{type:"text",name:"uuid",defaultValue:t,placeholder:"00000000-0000-0000-0000-000000000000"})]}),l(M,{css:{marginTop:25,justifyContent:"flex-end"},children:l(Y,{type:"submit",variant:"primary",disabled:a.isLoading,children:"Change the picture"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]}):e}function PMe({children:e,active:t=!0}){const n=te(),r=Ee(),[i,o]=y.exports.useState(!1),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("name");return n.post("/settings/store/general/manager",{name:u}).then(d=>{o(!1),F({type:"success",title:"Congratulations \u{1F973}",message:"Welcome to "+d.data.managerName+" in your team!"}),r.invalidateQueries({queryKey:["store","general"]}),r.invalidateQueries({queryKey:["me"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return t?g(Ye,{open:i,onOpenChange:o,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Add a manager"}),g(ht,{children:[l(A,{children:"In EasyBloggers, a manager has all the rights on your store, except on the General part of the settings."}),l(A,{children:"They don't have access to your Dropboxes as well."})]}),g(dt,{onSubmit:s.mutate,children:[g(P,{children:[l(ae,{children:"Avatar name"}),l(Ke,{type:"text",name:"name",placeholder:"Luke Rowley"})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"primary",children:"Add the manager"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]}):e}function RMe({children:e,active:t=!0}){const n=te(),r=Ee(),[i,o]=y.exports.useState(!1),s=ve({mutationFn:a=>{a.preventDefault();const u=new FormData(a.target).get("name");return n.post("/settings/store/general/co-owner",{name:u}).then(d=>{o(!1),F({type:"success",title:"Co-owner added",message:d.data.name+" has been added as a co-owner."}),r.invalidateQueries({queryKey:["store","general"]}),r.invalidateQueries({queryKey:["me"]})}).catch(function(d){var f,h,p,m;(h=(f=d.response)==null?void 0:f.data)!=null&&h.error?F({type:"error",title:(p=d.response.data)==null?void 0:p.error.title,message:(m=d.response.data)==null?void 0:m.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return t?g(Ye,{open:i,onOpenChange:o,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Add a co-owner"}),g(ht,{children:[l(A,{children:"A co-owner is someone who has all the rights on your store, except adding other co-owner."}),l(A,{children:"They can also share the content of their dropboxes for your store or event."}),g(A,{css:{color:"$destructive600"},children:[l("strong",{children:"Note:"})," Only one brand per subscription is allowed on EasyBloggers."]})]}),g(dt,{onSubmit:s.mutate,children:[g(P,{children:[l(ae,{children:"Avatar name"}),l(Ke,{type:"text",name:"name",placeholder:"Luke Rowley"})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"primary",children:"Add the co-owner"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]}):e}function MMe(){const e=te(),{isLoading:t,data:n}=_t(["store","friend"],()=>e.get("/settings/store/general/friend").then(r=>r.data));return t?l(z,{}):g(P,{css:{gap:"$8"},children:[g(P,{children:[l(Wl,{children:"Friends"}),l(A,{type:"light",children:"Friends are bloggers that are allowed to request the item from your store, but they bypass the deadlines and the priority settings. It's like they are the VIP of your bloggers, and they can still create posts."})]}),l(NMe,{friends:n})]})}function IMe({children:e,friend:t}){const[n,r]=y.exports.useState(!1),i=te(),o=Ee(),s=ve({mutationFn:a=>(a.preventDefault(),i.delete("/settings/store/general/friend/"+t.id).then(()=>{r(!1),F({type:"success",title:t.name+" has been removed as your friend from your store. "}),o.invalidateQueries({queryKey:["store","friend"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(c){var u,d,f,h;(d=(u=c.response)==null?void 0:u.data)!=null&&d.error?F({type:"error",title:(f=c.response.data)==null?void 0:f.error.title,message:(h=c.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Delete the friend"}),g(ht,{children:[g(A,{children:["You are about to remove ",l("strong",{children:t.name})," as a friend of your store. Are you sure you want to continue?"]}),l(A,{children:"They won't have access to your creation anymore."})]}),l(dt,{onSubmit:s.mutate,children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:s.isLoading,variant:"danger",children:"Confirm"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function LMe({children:e}){const t=te(),n=Ee(),[r,i]=y.exports.useState(!1),o=ve({mutationFn:s=>{s.preventDefault();const c=new FormData(s.target).get("name");return t.post("/settings/store/general/friend",{name:c}).then(u=>{i(!1),F({type:"success",title:"Congratulations \u{1F973}",message:"Welcome to "+u.data.friendName+" in your team!"}),n.invalidateQueries({queryKey:["store","friend"]}),n.invalidateQueries({queryKey:["me"]})}).catch(function(u){var d,f,h,p;(f=(d=u.response)==null?void 0:d.data)!=null&&f.error?F({type:"error",title:(h=u.response.data)==null?void 0:h.error.title,message:(p=u.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Add a friend"}),l(ht,{children:l(A,{children:"In EasyBloggers, a friend of a Store has the right to request any item, without having to post something and are not subject to deadlines."})}),g(dt,{onSubmit:o.mutate,children:[g(P,{children:[l(ae,{children:"Avatar name"}),l(Ke,{type:"text",name:"name",placeholder:"Luke Rowley"})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o.isLoading,variant:"primary",children:"Add my friend"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function NMe({friends:e}){const{isLoading:t,data:n}=ms();if(t)return l(z,{});const r=n.subscription.maximumBloggersAndFriends,i=n.quota.countBloggersAndFriends<n.subscription.maximumBloggersAndFriends;return l(P,{css:{gap:"$2"},children:g(P,{css:{gap:"$6"},children:[e.map((o,s)=>l(z,{children:g(M,{css:{alignItems:"center",gap:"$4"},children:[l(Be,{sizePicture:32,user:{id:o.id,name:o.name,pictureUuid:o.profilePicture}}),l(IMe,{friend:o,children:l(ce,{css:{p:"$2",transition:"color 200ms",marginLeft:"auto","&:hover":{color:"$destructive800",cursor:"pointer"}},children:l(W,{icon:so})})})]},"managed-friend-"+s)})),l(LMe,{children:l(Et,{enabled:!i,content:g(ce,{children:["You are limited to"," ",g("strong",{children:[r," friends and bloggers"]})," ","for this store."]}),children:g(Y,{disabled:!i,variant:"primary",css:{width:"100%",textAlign:"center",justifyContent:"center"},children:[l(W,{icon:ph}),"Add a friend"]})})})]})})}function FMe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.exports.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const f9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hh(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Xk(e){return"nodeType"in e}function zi(e){var t,n;return e?Hh(e)?e:Xk(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Zk(e){const{Document:t}=zi(e);return e instanceof t}function Sg(e){return Hh(e)?!1:e instanceof zi(e).HTMLElement}function BMe(e){return e instanceof zi(e).SVGElement}function zh(e){return e?Hh(e)?e.document:Xk(e)?Zk(e)?e:Sg(e)?e.ownerDocument:document:document:document}const fs=f9?y.exports.useLayoutEffect:y.exports.useEffect;function h9(e){const t=y.exports.useRef(e);return fs(()=>{t.current=e}),y.exports.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function HMe(){const e=y.exports.useRef(null),t=y.exports.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=y.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Am(e,t){t===void 0&&(t=[e]);const n=y.exports.useRef(e);return fs(()=>{n.current!==e&&(n.current=e)},t),n}function Eg(e,t){const n=y.exports.useRef();return y.exports.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function dv(e){const t=h9(e),n=y.exports.useRef(null),r=y.exports.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function fv(e){const t=y.exports.useRef();return y.exports.useEffect(()=>{t.current=e},[e]),t.current}let c7={};function Tg(e,t){return y.exports.useMemo(()=>{if(t)return t;const n=c7[e]==null?0:c7[e]+1;return c7[e]=n,e+"-"+n},[e,t])}function DY(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,s)=>{const a=Object.entries(s);for(const[c,u]of a){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const kf=DY(1),hv=DY(-1);function zMe(e){return"clientX"in e&&"clientY"in e}function p9(e){if(!e)return!1;const{KeyboardEvent:t}=zi(e.target);return t&&e instanceof t}function UMe(e){if(!e)return!1;const{TouchEvent:t}=zi(e.target);return t&&e instanceof t}function pv(e){if(UMe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return zMe(e)?{x:e.clientX,y:e.clientY}:null}const Fl=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(!!e)return[Fl.Translate.toString(e),Fl.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),bL="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function VMe(e){return e.matches(bL)?e:e.querySelector(bL)}const jMe={display:"none"};function WMe(e){let{id:t,value:n}=e;return l("div",{id:t,style:jMe,children:n})}const qMe={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function KMe(e){let{id:t,announcement:n}=e;return l("div",{id:t,style:qMe,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function GMe(){const[e,t]=y.exports.useState("");return{announce:y.exports.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const OY=y.exports.createContext(null);function YMe(e){const t=y.exports.useContext(OY);y.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function QMe(){const[e]=y.exports.useState(()=>new Set),t=y.exports.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.exports.useCallback(r=>{let{type:i,event:o}=r;e.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[e]),t]}const XMe={draggable:`
    To pick up a draggable item, press the space bar.
    While dragging, use the arrow keys to move the item.
    Press space again to drop the item in its new position, or press escape to cancel.
  `},ZMe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function JMe(e){let{announcements:t=ZMe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=XMe}=e;const{announce:o,announcement:s}=GMe(),a=Tg("DndLiveRegion"),[c,u]=y.exports.useState(!1);if(y.exports.useEffect(()=>{u(!0)},[]),YMe(y.exports.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!c)return null;const d=g(z,{children:[l(WMe,{id:r,value:i.draggable}),l(KMe,{id:a,announcement:s})]});return n?Lr.exports.createPortal(d,n):d}var Er;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Er||(Er={}));function mv(){}function gv(e,t){return y.exports.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function PY(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.exports.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const qs=Object.freeze({x:0,y:0});function eIe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tIe(e,t){const n=pv(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function nIe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function rIe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function iIe(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function xL(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const RY=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=xL(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,c=n.get(a);if(c){const u=eIe(xL(c),i);o.push({id:a,data:{droppableContainer:s,value:u}})}}return o.sort(nIe)};function oIe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const c=t.width*t.height,u=e.width*e.height,d=s*a,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const sIe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const c=oIe(a,t);c>0&&i.push({id:s,data:{droppableContainer:o,value:c}})}}return i.sort(rIe)};function aIe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function MY(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:qs}function lIe(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const cIe=lIe(1);function IY(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function uIe(e,t,n){const r=IY(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,c=e.left-s-(1-i)*parseFloat(n),u=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const dIe={ignoreTransform:!1};function Uh(e,t){t===void 0&&(t=dIe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=zi(e).getComputedStyle(e);u&&(n=uIe(n,u,d))}const{top:r,left:i,width:o,height:s,bottom:a,right:c}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:c}}function CL(e){return Uh(e,{ignoreTransform:!0})}function fIe(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function hIe(e,t){return t===void 0&&(t=zi(e).getComputedStyle(e)),t.position==="fixed"}function pIe(e,t){t===void 0&&(t=zi(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function Jk(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Zk(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Sg(i)||BMe(i)||n.includes(i))return n;const o=zi(e).getComputedStyle(i);return i!==e&&pIe(i,o)&&n.push(i),hIe(i,o)?n:r(i.parentNode)}return e?r(e):n}function LY(e){const[t]=Jk(e,1);return t!=null?t:null}function u7(e){return!f9||!e?null:Hh(e)?e:Xk(e)?Zk(e)||e===zh(e).scrollingElement?window:Sg(e)?e:null:null}function NY(e){return Hh(e)?e.scrollX:e.scrollLeft}function FY(e){return Hh(e)?e.scrollY:e.scrollTop}function Lw(e){return{x:NY(e),y:FY(e)}}var Rr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Rr||(Rr={}));function BY(e){return!f9||!e?!1:e===document.scrollingElement}function HY(e){const t={x:0,y:0},n=BY(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const mIe={x:.2,y:.2};function gIe(e,t,n,r,i){let{top:o,left:s,right:a,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=mIe);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=HY(e),p={x:0,y:0},m={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+v.height?(p.y=Rr.Backward,m.y=r*Math.abs((t.top+v.height-o)/v.height)):!d&&c>=t.bottom-v.height&&(p.y=Rr.Forward,m.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!h&&a>=t.right-v.width?(p.x=Rr.Forward,m.x=r*Math.abs((t.right-v.width-a)/v.width)):!f&&s<=t.left+v.width&&(p.x=Rr.Backward,m.x=r*Math.abs((t.left+v.width-s)/v.width)),{direction:p,speed:m}}function vIe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function zY(e){return e.reduce((t,n)=>kf(t,Lw(n)),qs)}function yIe(e){return e.reduce((t,n)=>t+NY(n),0)}function bIe(e){return e.reduce((t,n)=>t+FY(n),0)}function UY(e,t){if(t===void 0&&(t=Uh),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);!LY(e)||(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const xIe=[["x",["left","right"],yIe],["y",["top","bottom"],bIe]];class e_{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Jk(n),i=zY(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of xIe)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=a(r),d=i[o]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class b0{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function CIe(e){const{EventTarget:t}=zi(e);return e instanceof t?e:zh(e)}function d7(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var jo;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(jo||(jo={}));function wL(e){e.preventDefault()}function wIe(e){e.stopPropagation()}var hn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(hn||(hn={}));const VY={start:[hn.Space,hn.Enter],cancel:[hn.Esc],end:[hn.Space,hn.Enter]},SIe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case hn.Right:return{...n,x:n.x+25};case hn.Left:return{...n,x:n.x-25};case hn.Down:return{...n,y:n.y+25};case hn.Up:return{...n,y:n.y-25}}};class jY{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new b0(zh(n)),this.windowListeners=new b0(zi(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(jo.Resize,this.handleCancel),this.windowListeners.add(jo.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(jo.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&UY(r),n(qs)}handleKeyDown(t){if(p9(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=VY,coordinateGetter:s=SIe,scrollBehavior:a="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:qs;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=hv(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const v of m){const b=t.code,{isTop:x,isRight:C,isLeft:w,isBottom:S,maxScroll:T,minScroll:E}=HY(v),k=vIe(v),_={x:Math.min(b===hn.Right?k.right-k.width/2:k.right,Math.max(b===hn.Right?k.left:k.left+k.width/2,f.x)),y:Math.min(b===hn.Down?k.bottom-k.height/2:k.bottom,Math.max(b===hn.Down?k.top:k.top+k.height/2,f.y))},O=b===hn.Right&&!C||b===hn.Left&&!w,D=b===hn.Down&&!S||b===hn.Up&&!x;if(O&&_.x!==f.x){const L=v.scrollLeft+h.x,N=b===hn.Right&&L<=T.x||b===hn.Left&&L>=E.x;if(N&&!h.y){v.scrollTo({left:L,behavior:a});return}N?p.x=v.scrollLeft-L:p.x=b===hn.Right?v.scrollLeft-T.x:v.scrollLeft-E.x,p.x&&v.scrollBy({left:-p.x,behavior:a});break}else if(D&&_.y!==f.y){const L=v.scrollTop+h.y,N=b===hn.Down&&L<=T.y||b===hn.Up&&L>=E.y;if(N&&!h.x){v.scrollTo({top:L,behavior:a});return}N?p.y=v.scrollTop-L:p.y=b===hn.Down?v.scrollTop-T.y:v.scrollTop-E.y,p.y&&v.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,kf(hv(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}jY.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=VY,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function SL(e){return Boolean(e&&"distance"in e)}function EL(e){return Boolean(e&&"delay"in e)}class t_{constructor(t,n,r){var i;r===void 0&&(r=CIe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=zh(s),this.documentListeners=new b0(this.document),this.listeners=new b0(r),this.windowListeners=new b0(zi(s)),this.initialCoordinates=(i=pv(o))!=null?i:qs,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(jo.Resize,this.handleCancel),this.windowListeners.add(jo.DragStart,wL),this.windowListeners.add(jo.VisibilityChange,this.handleCancel),this.windowListeners.add(jo.ContextMenu,wL),this.documentListeners.add(jo.Keydown,this.handleKeydown),n){if(SL(n))return;if(EL(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(jo.Click,wIe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(jo.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const c=(n=pv(t))!=null?n:qs,u=hv(i,c);if(!r&&a){if(EL(a))return d7(u,a.tolerance)?this.handleCancel():void 0;if(SL(a))return a.tolerance!=null&&d7(u,a.tolerance)?this.handleCancel():d7(u,a.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===hn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const EIe={move:{name:"pointermove"},end:{name:"pointerup"}};class WY extends t_{constructor(t){const{event:n}=t,r=zh(n.target);super(t,EIe,r)}}WY.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const TIe={move:{name:"mousemove"},end:{name:"mouseup"}};var Nw;(function(e){e[e.RightClick=2]="RightClick"})(Nw||(Nw={}));class n_ extends t_{constructor(t){super(t,TIe,zh(t.event.target))}}n_.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Nw.RightClick?!1:(r==null||r({event:n}),!0)}}];const f7={move:{name:"touchmove"},end:{name:"touchend"}};class r_ extends t_{constructor(t){super(t,f7)}static setup(){return window.addEventListener(f7.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(f7.move.name,t)};function t(){}}}r_.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var x0;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(x0||(x0={}));var vv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(vv||(vv={}));function kIe(e){let{acceleration:t,activator:n=x0.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=vv.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=AIe({delta:f,disabled:!o}),[m,v]=HMe(),b=y.exports.useRef({x:0,y:0}),x=y.exports.useRef({x:0,y:0}),C=y.exports.useMemo(()=>{switch(n){case x0.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case x0.DraggableRect:return i}},[n,i,c]),w=y.exports.useRef(null),S=y.exports.useCallback(()=>{const E=w.current;if(!E)return;const k=b.current.x*x.current.x,_=b.current.y*x.current.y;E.scrollBy(k,_)},[]),T=y.exports.useMemo(()=>a===vv.TreeOrder?[...u].reverse():u,[a,u]);y.exports.useEffect(()=>{if(!o||!u.length||!C){v();return}for(const E of T){if((r==null?void 0:r(E))===!1)continue;const k=u.indexOf(E),_=d[k];if(!_)continue;const{direction:O,speed:D}=gIe(E,_,C,t,h);for(const L of["x","y"])p[L][O[L]]||(D[L]=0,O[L]=0);if(D.x>0||D.y>0){v(),w.current=E,m(S,s),b.current=D,x.current=O;return}}b.current={x:0,y:0},x.current={x:0,y:0},v()},[t,S,r,v,o,s,JSON.stringify(C),JSON.stringify(p),m,u,T,d,JSON.stringify(h)])}const _Ie={x:{[Rr.Backward]:!1,[Rr.Forward]:!1},y:{[Rr.Backward]:!1,[Rr.Forward]:!1}};function AIe(e){let{delta:t,disabled:n}=e;const r=fv(t);return Eg(i=>{if(n||!r||!i)return _Ie;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Rr.Backward]:i.x[Rr.Backward]||o.x===-1,[Rr.Forward]:i.x[Rr.Forward]||o.x===1},y:{[Rr.Backward]:i.y[Rr.Backward]||o.y===-1,[Rr.Forward]:i.y[Rr.Forward]||o.y===1}}},[n,t,r])}function $Ie(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Eg(i=>{var o;return t===null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function DIe(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var $m;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})($m||($m={}));var Fw;(function(e){e.Optimized="optimized"})(Fw||(Fw={}));const TL=new Map;function OIe(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=y.exports.useState(null),{frequency:a,measure:c,strategy:u}=i,d=y.exports.useRef(e),f=b(),h=Am(f),p=y.exports.useCallback(function(x){x===void 0&&(x=[]),!h.current&&s(C=>C===null?x:C.concat(x.filter(w=>!C.includes(w))))},[h]),m=y.exports.useRef(null),v=Eg(x=>{if(f&&!n)return TL;if(!x||x===TL||d.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const S=w.node.current,T=S?new e_(c(S),S):null;w.rect.current=T,T&&C.set(w.id,T)}return C}return x},[e,o,n,f,c]);return y.exports.useEffect(()=>{d.current=e},[e]),y.exports.useEffect(()=>{f||p()},[n,f]),y.exports.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),y.exports.useEffect(()=>{f||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},a))},[a,f,p,...r]),{droppableRects:v,measureDroppableContainers:p,measuringScheduled:o!=null};function b(){switch(u){case $m.Always:return!1;case $m.BeforeDragging:return n;default:return!n}}}function i_(e,t){return Eg(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function PIe(e,t){return i_(e,t)}function RIe(e){let{callback:t,disabled:n}=e;const r=h9(t),i=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return y.exports.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function m9(e){let{callback:t,disabled:n}=e;const r=h9(t),i=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return y.exports.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function MIe(e){return new e_(Uh(e),e)}function kL(e,t,n){t===void 0&&(t=MIe);const[r,i]=y.exports.useReducer(a,null),o=RIe({callback(c){if(!!e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),s=m9({callback:i});return fs(()=>{i(),e?(s==null||s.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),o==null||o.disconnect())},[e]),r;function a(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function IIe(e){const t=i_(e);return MY(e,t)}const _L=[];function LIe(e){const t=y.exports.useRef(e),n=Eg(r=>e?r&&r!==_L&&e&&t.current&&e.parentNode===t.current.parentNode?r:Jk(e):_L,[e]);return y.exports.useEffect(()=>{t.current=e},[e]),n}function NIe(e){const[t,n]=y.exports.useState(null),r=y.exports.useRef(e),i=y.exports.useCallback(o=>{const s=u7(o.target);!s||n(a=>a?(a.set(s,Lw(s)),new Map(a)):null)},[]);return y.exports.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(c=>{const u=u7(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Lw(u)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(c=>{const u=u7(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),y.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>kf(o,s),qs):zY(e):qs,[e,t])}function AL(e,t){t===void 0&&(t=[]);const n=y.exports.useRef(null);return y.exports.useEffect(()=>{n.current=null},t),y.exports.useEffect(()=>{const r=e!==qs;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?hv(e,n.current):qs}function FIe(e){y.exports.useEffect(()=>{if(!f9)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function BIe(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function qY(e){return y.exports.useMemo(()=>e?fIe(e):null,[e])}const h7=[];function HIe(e,t){t===void 0&&(t=Uh);const[n]=e,r=qY(n?zi(n):null),[i,o]=y.exports.useReducer(a,h7),s=m9({callback:o});return e.length>0&&i===h7&&o(),fs(()=>{e.length?e.forEach(c=>s==null?void 0:s.observe(c)):(s==null||s.disconnect(),o())},[e]),i;function a(){return e.length?e.map(c=>BY(c)?r:new e_(t(c),c)):h7}}function KY(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sg(t)?t:e}function zIe(e){let{measure:t}=e;const[n,r]=y.exports.useState(null),i=y.exports.useCallback(u=>{for(const{target:d}of u)if(Sg(d)){r(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=m9({callback:i}),s=y.exports.useCallback(u=>{const d=KY(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[a,c]=dv(s);return y.exports.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const UIe=[{sensor:WY,options:{}},{sensor:jY,options:{}}],VIe={current:{}},m5={draggable:{measure:CL},droppable:{measure:CL,strategy:$m.WhileDragging,frequency:Fw.Optimized},dragOverlay:{measure:Uh}};class C0 extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const jIe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new C0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:m5,measureDroppableContainers:mv,windowRect:null,measuringScheduled:!1},GY={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mv,draggableNodes:new Map,over:null,measureDroppableContainers:mv},kg=y.exports.createContext(GY),YY=y.exports.createContext(jIe);function WIe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new C0}}}function qIe(e,t){switch(t.type){case Er.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Er.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Er.DragEnd:case Er.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Er.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new C0(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Er.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new C0(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Er.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new C0(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function KIe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=y.exports.useContext(kg),o=fv(r),s=fv(n==null?void 0:n.id);return y.exports.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!p9(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:c,node:u}=a;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=VMe(d);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function QY(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function GIe(e){return y.exports.useMemo(()=>({draggable:{...m5.draggable,...e==null?void 0:e.draggable},droppable:{...m5.droppable,...e==null?void 0:e.droppable},dragOverlay:{...m5.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function YIe(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=y.exports.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;fs(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=MY(d,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=LY(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const g9=y.exports.createContext({...qs,scaleX:1,scaleY:1});var xc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xc||(xc={}));const XY=y.exports.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:c=!0,children:u,sensors:d=UIe,collisionDetection:f=sIe,measuring:h,modifiers:p,...m}=t;const v=y.exports.useReducer(qIe,void 0,WIe),[b,x]=v,[C,w]=QMe(),[S,T]=y.exports.useState(xc.Uninitialized),E=S===xc.Initialized,{draggable:{active:k,nodes:_,translate:O},droppable:{containers:D}}=b,L=k?_.get(k):null,N=y.exports.useRef({initial:null,translated:null}),j=y.exports.useMemo(()=>{var Ot;return k!=null?{id:k,data:(Ot=L==null?void 0:L.data)!=null?Ot:VIe,rect:N}:null},[k,L]),G=y.exports.useRef(null),[X,re]=y.exports.useState(null),[oe,U]=y.exports.useState(null),H=Am(m,Object.values(m)),R=Tg("DndDescribedBy",s),se=y.exports.useMemo(()=>D.getEnabled(),[D]),ee=GIe(h),{droppableRects:I,measureDroppableContainers:me,measuringScheduled:Se}=OIe(se,{dragging:E,dependencies:[O.x,O.y],config:ee.droppable}),pe=$Ie(_,k),ye=y.exports.useMemo(()=>oe?pv(oe):null,[oe]),_e=jt(),$e=PIe(pe,ee.draggable.measure);YIe({activeNode:k?_.get(k):null,config:_e.layoutShiftCompensation,initialRect:$e,measure:ee.draggable.measure});const J=kL(pe,ee.draggable.measure,$e),fe=kL(pe?pe.parentElement:null),we=y.exports.useRef({activatorEvent:null,active:null,activeNode:pe,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Le=D.getNodeFor((n=we.current.over)==null?void 0:n.id),He=zIe({measure:ee.dragOverlay.measure}),Ge=(r=He.nodeRef.current)!=null?r:pe,Pe=E?(i=He.rect)!=null?i:J:null,rt=Boolean(He.nodeRef.current&&He.rect),ft=IIe(rt?null:J),vt=qY(Ge?zi(Ge):null),We=LIe(E?Le!=null?Le:pe:null),De=HIe(We),Vt=QY(p,{transform:{x:O.x-ft.x,y:O.y-ft.y,scaleX:1,scaleY:1},activatorEvent:oe,active:j,activeNodeRect:J,containerNodeRect:fe,draggingNodeRect:Pe,over:we.current.over,overlayNodeRect:He.rect,scrollableAncestors:We,scrollableAncestorRects:De,windowRect:vt}),bn=ye?kf(ye,O):null,$r=NIe(We),Lo=AL($r),Xs=AL($r,[J]),K=kf(Vt,Lo),V=Pe?cIe(Pe,Vt):null,le=j&&V?f({active:j,collisionRect:V,droppableRects:I,droppableContainers:se,pointerCoordinates:bn}):null,ge=iIe(le,"id"),[qe,xt]=y.exports.useState(null),Mt=rt?Vt:kf(Vt,Xs),B=aIe(Mt,(o=qe==null?void 0:qe.rect)!=null?o:null,J),ne=y.exports.useCallback((Ot,It)=>{let{sensor:Ut,options:sn}=It;if(G.current==null)return;const tn=_.get(G.current);if(!tn)return;const Fn=Ot.nativeEvent,fr=new Ut({active:G.current,activeNode:tn,event:Fn,options:sn,context:we,onStart(xr){const Xl=G.current;if(Xl==null)return;const Kh=_.get(Xl);if(!Kh)return;const{onDragStart:Pg}=H.current,Rg={active:{id:Xl,data:Kh.data,rect:N}};Lr.exports.unstable_batchedUpdates(()=>{Pg==null||Pg(Rg),T(xc.Initializing),x({type:Er.DragStart,initialCoordinates:xr,active:Xl}),C({type:"onDragStart",event:Rg})})},onMove(xr){x({type:Er.DragMove,coordinates:xr})},onEnd:ki(Er.DragEnd),onCancel:ki(Er.DragCancel)});Lr.exports.unstable_batchedUpdates(()=>{re(fr),U(Ot.nativeEvent)});function ki(xr){return async function(){const{active:Kh,collisions:Pg,over:Rg,scrollAdjustedTranslate:N_}=we.current;let Gh=null;if(Kh&&N_){const{cancelDrop:Yh}=H.current;Gh={activatorEvent:Fn,active:Kh,collisions:Pg,delta:N_,over:Rg},xr===Er.DragEnd&&typeof Yh=="function"&&await Promise.resolve(Yh(Gh))&&(xr=Er.DragCancel)}G.current=null,Lr.exports.unstable_batchedUpdates(()=>{x({type:xr}),T(xc.Uninitialized),xt(null),re(null),U(null);const Yh=xr===Er.DragEnd?"onDragEnd":"onDragCancel";if(Gh){const N9=H.current[Yh];N9==null||N9(Gh),C({type:Yh,event:Gh})}})}}},[_]),xe=y.exports.useCallback((Ot,It)=>(Ut,sn)=>{const tn=Ut.nativeEvent,Fn=_.get(sn);if(G.current!==null||!Fn||tn.dndKit||tn.defaultPrevented)return;const fr={active:Fn};Ot(Ut,It.options,fr)===!0&&(tn.dndKit={capturedBy:It.sensor},G.current=sn,ne(Ut,It))},[_,ne]),be=DIe(d,xe);FIe(d),fs(()=>{J&&S===xc.Initializing&&T(xc.Initialized)},[J,S]),y.exports.useEffect(()=>{const{onDragMove:Ot}=H.current,{active:It,activatorEvent:Ut,collisions:sn,over:tn}=we.current;if(!It||!Ut)return;const Fn={active:It,activatorEvent:Ut,collisions:sn,delta:{x:K.x,y:K.y},over:tn};Lr.exports.unstable_batchedUpdates(()=>{Ot==null||Ot(Fn),C({type:"onDragMove",event:Fn})})},[K.x,K.y]),y.exports.useEffect(()=>{const{active:Ot,activatorEvent:It,collisions:Ut,droppableContainers:sn,scrollAdjustedTranslate:tn}=we.current;if(!Ot||G.current==null||!It||!tn)return;const{onDragOver:Fn}=H.current,fr=sn.get(ge),ki=fr&&fr.rect.current?{id:fr.id,rect:fr.rect.current,data:fr.data,disabled:fr.disabled}:null,xr={active:Ot,activatorEvent:It,collisions:Ut,delta:{x:tn.x,y:tn.y},over:ki};Lr.exports.unstable_batchedUpdates(()=>{xt(ki),Fn==null||Fn(xr),C({type:"onDragOver",event:xr})})},[ge]),fs(()=>{we.current={activatorEvent:oe,active:j,activeNode:pe,collisionRect:V,collisions:le,droppableRects:I,draggableNodes:_,draggingNode:Ge,draggingNodeRect:Pe,droppableContainers:D,over:qe,scrollableAncestors:We,scrollAdjustedTranslate:K},N.current={initial:Pe,translated:V}},[j,pe,le,V,_,Ge,Pe,I,D,qe,We,K]),kIe({..._e,delta:O,draggingRect:V,pointerCoordinates:bn,scrollableAncestors:We,scrollableAncestorRects:De});const ke=y.exports.useMemo(()=>({active:j,activeNode:pe,activeNodeRect:J,activatorEvent:oe,collisions:le,containerNodeRect:fe,dragOverlay:He,draggableNodes:_,droppableContainers:D,droppableRects:I,over:qe,measureDroppableContainers:me,scrollableAncestors:We,scrollableAncestorRects:De,measuringConfiguration:ee,measuringScheduled:Se,windowRect:vt}),[j,pe,J,oe,le,fe,He,_,D,I,qe,me,We,De,ee,Se,vt]),lt=y.exports.useMemo(()=>({activatorEvent:oe,activators:be,active:j,activeNodeRect:J,ariaDescribedById:{draggable:R},dispatch:x,draggableNodes:_,over:qe,measureDroppableContainers:me}),[oe,be,j,J,x,R,_,qe,me]);return g(OY.Provider,{value:w,children:[g(kg.Provider,{value:lt,children:[l(YY.Provider,{value:ke,children:l(g9.Provider,{value:B,children:u})}),l(KIe,{disabled:(a==null?void 0:a.restoreFocus)===!1})]}),l(JMe,{...a,hiddenTextDescribedById:R})]});function jt(){const Ot=(X==null?void 0:X.autoScrollEnabled)===!1,It=typeof c=="object"?c.enabled===!1:c===!1,Ut=E&&!Ot&&!It;return typeof c=="object"?{...c,enabled:Ut}:{enabled:Ut}}}),QIe=y.exports.createContext(null),$L="button",XIe="Droppable";function ZIe(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=Tg(XIe),{activators:s,activatorEvent:a,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=y.exports.useContext(kg),{role:p=$L,roleDescription:m="draggable",tabIndex:v=0}=i!=null?i:{},b=(c==null?void 0:c.id)===t,x=y.exports.useContext(b?g9:QIe),[C,w]=dv(),[S,T]=dv(),E=BIe(s,t),k=Am(n);fs(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:S,data:k}),()=>{const O=f.get(t);O&&O.key===o&&f.delete(t)}),[f,t]);const _=y.exports.useMemo(()=>({role:p,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&p===$L?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,v,b,m,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:u,attributes:_,isDragging:b,listeners:r?void 0:E,node:C,over:h,setNodeRef:w,setActivatorNodeRef:T,transform:x}}function ZY(){return y.exports.useContext(YY)}const JIe="Droppable",eLe={timeout:25};function tLe(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=Tg(JIe),{active:s,dispatch:a,over:c,measureDroppableContainers:u}=y.exports.useContext(kg),d=y.exports.useRef({disabled:n}),f=y.exports.useRef(!1),h=y.exports.useRef(null),p=y.exports.useRef(null),{disabled:m,updateMeasurementsFor:v,timeout:b}={...eLe,...i},x=Am(v!=null?v:r),C=y.exports.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),p.current=null},b)},[b]),w=m9({callback:C,disabled:m||!s}),S=y.exports.useCallback((_,O)=>{!w||(O&&(w.unobserve(O),f.current=!1),_&&w.observe(_))},[w]),[T,E]=dv(S),k=Am(t);return y.exports.useEffect(()=>{!w||!T.current||(w.disconnect(),f.current=!1,w.observe(T.current))},[T,w]),fs(()=>(a({type:Er.RegisterDroppable,element:{id:r,key:o,disabled:n,node:T,rect:h,data:k}}),()=>a({type:Er.UnregisterDroppable,key:o,id:r})),[r]),y.exports.useEffect(()=>{n!==d.current.disabled&&(a({type:Er.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:(c==null?void 0:c.id)===r,node:T,over:c,setNodeRef:E}}function nLe(e){let{animation:t,children:n}=e;const[r,i]=y.exports.useState(null),[o,s]=y.exports.useState(null),a=fv(n);return!n&&!r&&a&&i(a),fs(()=>{if(!o)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),g(z,{children:[n,r?y.exports.cloneElement(r,{ref:s}):null]})}const rLe={x:0,y:0,scaleX:1,scaleY:1};function iLe(e){let{children:t}=e;return l(kg.Provider,{value:GY,children:l(g9.Provider,{value:rLe,children:t})})}const oLe={position:"fixed",touchAction:"none"},sLe=e=>p9(e)?"transform 250ms ease":void 0,aLe=y.exports.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:s,rect:a,style:c,transform:u,transition:d=sLe}=e;if(!a)return null;const f=i?u:{...u,scaleX:1,scaleY:1},h={...oLe,width:a.width,height:a.height,top:a.top,left:a.left,transform:Fl.Transform.toString(f),transformOrigin:i&&r?tIe(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return Ae.createElement(n,{className:s,style:h,ref:t},o)}),lLe=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:s}=e;if(o!=null&&o.active)for(const[a,c]of Object.entries(o.active))c!==void 0&&(i[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(o!=null&&o.dragOverlay)for(const[a,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[c,u]of Object.entries(i))n.node.style.setProperty(c,u);s!=null&&s.active&&n.node.classList.remove(s.active)}},cLe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Fl.Transform.toString(t)},{transform:Fl.Transform.toString(n)}]},uLe={duration:250,easing:"ease",keyframes:cLe,sideEffects:lLe({styles:{active:{opacity:"0"}}})};function dLe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return h9((o,s)=>{if(t===null)return;const a=n.get(o);if(!a)return;const c=a.node.current;if(!c)return;const u=KY(s);if(!u)return;const{transform:d}=zi(s).getComputedStyle(s),f=IY(d);if(!f)return;const h=typeof t=="function"?t:fLe(t);return UY(c,i.draggable.measure),h({active:{id:o,data:a.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:s,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function fLe(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...uLe,...e};return o=>{let{active:s,dragOverlay:a,transform:c,...u}=o;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:c.scaleX!==1?s.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?s.rect.height*c.scaleY/a.rect.height:1},h={x:c.x-d.x,y:c.y-d.y,...f},p=i({...u,active:s,dragOverlay:a,transform:{initial:c,final:h}}),[m]=p,v=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(v))return;const b=r==null?void 0:r({active:s,dragOverlay:a,...u}),x=a.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{x.onfinish=()=>{b==null||b(),C()}})}}let DL=0;function hLe(e){return y.exports.useMemo(()=>{if(e!=null)return DL++,DL},[e])}const JY=Ae.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:s,wrapperElement:a="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:v,dragOverlay:b,over:x,measuringConfiguration:C,scrollableAncestors:w,scrollableAncestorRects:S,windowRect:T}=ZY(),E=y.exports.useContext(g9),k=hLe(f==null?void 0:f.id),_=QY(s,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:b.rect,over:x,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:S,transform:E,windowRect:T}),O=i_(h),D=dLe({config:r,draggableNodes:m,droppableContainers:v,measuringConfiguration:C}),L=O?b.setRef:void 0;return l(iLe,{children:l(nLe,{animation:D,children:f&&k?l(aLe,{id:f.id,ref:L,as:a,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:O,style:{zIndex:u,...i},transform:_,children:n},k):null})})});function v9(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function pLe(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function J2(e){return e!==null&&e>=0}function mLe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function gLe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const eQ=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=v9(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},e4={scaleX:1,scaleY:1},tQ=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const u=o[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...e4}:null}const c=vLe(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-c,...e4}:i<n&&i>=s?{x:0,y:a.height+c,...e4}:{x:0,y:0,...e4}};function vLe(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const nQ="Sortable",rQ=Ae.createContext({activeIndex:-1,containerId:nQ,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:eQ,disabled:{draggable:!1,droppable:!1}});function iQ(e){let{children:t,id:n,items:r,strategy:i=eQ,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:c,over:u,measureDroppableContainers:d}=ZY(),f=Tg(nQ,n),h=Boolean(a.rect!==null),p=y.exports.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),m=s!=null,v=s?p.indexOf(s.id):-1,b=u?p.indexOf(u.id):-1,x=y.exports.useRef(p),C=!mLe(p,x.current),w=b!==-1&&v===-1||C,S=gLe(o);fs(()=>{C&&m&&d(p)},[C,p,m,d]),y.exports.useEffect(()=>{x.current=p},[p]);const T=y.exports.useMemo(()=>({activeIndex:v,containerId:f,disabled:S,disableTransforms:w,items:p,overIndex:b,useDragOverlay:h,sortedRects:pLe(p,c),strategy:i}),[v,f,S.draggable,S.droppable,w,p,b,c,h,i]);return l(rQ.Provider,{value:T,children:t})}const yLe=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return v9(n,r,i).indexOf(t)},bLe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:c,transition:u}=e;return!u||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===c},xLe={duration:200,easing:"ease"},oQ="transform",CLe=Fl.Transition.toString({property:oQ,duration:0,easing:"linear"}),wLe={roleDescription:"sortable"};function SLe(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=y.exports.useState(null),a=y.exports.useRef(n);return fs(()=>{if(!t&&n!==a.current&&r.current){const c=i.current;if(c){const u=Uh(r.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&s(d)}}n!==a.current&&(a.current=n)},[t,n,r,i]),y.exports.useEffect(()=>{o&&s(null)},[o]),o}function sQ(e){let{animateLayoutChanges:t=bLe,attributes:n,disabled:r,data:i,getNewIndex:o=yLe,id:s,strategy:a,resizeObserverConfig:c,transition:u=xLe}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:v,overIndex:b,useDragOverlay:x,strategy:C}=y.exports.useContext(rQ),w=ELe(r,p),S=d.indexOf(s),T=y.exports.useMemo(()=>({sortable:{containerId:f,index:S,items:d},...i}),[f,i,S,d]),E=y.exports.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:k,node:_,isOver:O,setNodeRef:D}=tLe({id:s,data:T,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...c}}),{active:L,activatorEvent:N,activeNodeRect:j,attributes:G,setNodeRef:X,listeners:re,isDragging:oe,over:U,setActivatorNodeRef:H,transform:R}=ZIe({id:s,data:T,attributes:{...wLe,...n},disabled:w.draggable}),se=FMe(D,X),ee=Boolean(L),I=ee&&!m&&J2(h)&&J2(b),me=!x&&oe,Se=me&&I?R:null,pe=a!=null?a:C,ye=I?Se!=null?Se:pe({rects:v,activeNodeRect:j,activeIndex:h,overIndex:b,index:S}):null,_e=J2(h)&&J2(b)?o({id:s,items:d,activeIndex:h,overIndex:b}):S,$e=L==null?void 0:L.id,J=y.exports.useRef({activeId:$e,items:d,newIndex:_e,containerId:f}),fe=d!==J.current.items,we=t({active:L,containerId:f,isDragging:oe,isSorting:ee,id:s,index:S,items:d,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),Le=SLe({disabled:!we,index:S,node:_,rect:k});return y.exports.useEffect(()=>{ee&&J.current.newIndex!==_e&&(J.current.newIndex=_e),f!==J.current.containerId&&(J.current.containerId=f),d!==J.current.items&&(J.current.items=d)},[ee,_e,f,d]),y.exports.useEffect(()=>{if($e===J.current.activeId)return;if($e&&!J.current.activeId){J.current.activeId=$e;return}const Ge=setTimeout(()=>{J.current.activeId=$e},50);return()=>clearTimeout(Ge)},[$e]),{active:L,activeIndex:h,attributes:G,data:T,rect:k,index:S,newIndex:_e,items:d,isOver:O,isSorting:ee,isDragging:oe,listeners:re,node:_,overIndex:b,over:U,setNodeRef:se,setActivatorNodeRef:H,setDroppableNodeRef:D,setDraggableNodeRef:X,transform:Le!=null?Le:ye,transition:He()};function He(){if(Le||fe&&J.current.newIndex===S)return CLe;if(!(me&&!p9(N)||!u)&&(ee||we))return Fl.Transition.toString({...u,property:oQ})}}function ELe(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}hn.Down,hn.Right,hn.Up,hn.Left;const aQ="Collapsible",[TLe,KGe]=ii(aQ),[kLe,o_]=TLe(aQ),_Le=y.exports.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=e,[c=!1,u]=$o({prop:r,defaultProp:i,onChange:s});return y.exports.createElement(kLe,{scope:n,disabled:o,contentId:es(),open:c,onOpenToggle:y.exports.useCallback(()=>u(d=>!d),[u])},y.exports.createElement(Pt.div,ue({"data-state":s_(c),"data-disabled":o?"":void 0},a,{ref:t})))}),ALe="CollapsibleTrigger",$Le=y.exports.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=o_(ALe,n);return y.exports.createElement(Pt.button,ue({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":s_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Ue(e.onClick,i.onOpenToggle)}))}),lQ="CollapsibleContent",DLe=y.exports.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=o_(lQ,e.__scopeCollapsible);return y.exports.createElement(Hi,{present:n||i.open},({present:o})=>y.exports.createElement(OLe,ue({},r,{ref:t,present:o})))}),OLe=y.exports.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,s=o_(lQ,n),[a,c]=y.exports.useState(r),u=y.exports.useRef(null),d=zt(t,u),f=y.exports.useRef(0),h=f.current,p=y.exports.useRef(0),m=p.current,v=s.open||a,b=y.exports.useRef(v),x=y.exports.useRef();return y.exports.useEffect(()=>{const C=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(C)},[]),ri(()=>{const C=u.current;if(C){x.current=x.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const w=C.getBoundingClientRect();f.current=w.height,p.current=w.width,b.current||(C.style.transitionDuration=x.current.transitionDuration,C.style.animationName=x.current.animationName),c(r)}},[s.open,r]),y.exports.createElement(Pt.div,ue({"data-state":s_(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v},o,{ref:d,style:{["--radix-collapsible-content-height"]:h?`${h}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style}}),v&&i)});function s_(e){return e?"open":"closed"}const cQ=_Le,uQ=$Le,dQ=DLe;var PLe=Object.defineProperty,RLe=(e,t)=>{for(var n in t)PLe(e,n,{get:t[n],enumerable:!0})},Jf={};RLe(Jf,{assign:()=>FLe,colors:()=>tu,createStringInterpolator:()=>h_,skipAnimation:()=>yQ,to:()=>vQ,willAdvance:()=>p_});var a_=Ag(),ln=e=>_g(e,a_),l_=Ag();ln.write=e=>_g(e,l_);var y9=Ag();ln.onStart=e=>_g(e,y9);var c_=Ag();ln.onFrame=e=>_g(e,c_);var u_=Ag();ln.onFinish=e=>_g(e,u_);var _f=[];ln.setTimeout=(e,t)=>{const n=ln.now()+t,r=()=>{const o=_f.findIndex(s=>s.cancel==r);~o&&_f.splice(o,1),Hc-=~o?1:0},i={time:n,handler:e,cancel:r};return _f.splice(fQ(n),0,i),Hc+=1,hQ(),i};var fQ=e=>~(~_f.findIndex(t=>t.time>e)||~_f.length);ln.cancel=e=>{y9.delete(e),c_.delete(e),u_.delete(e),a_.delete(e),l_.delete(e)};ln.sync=e=>{Bw=!0,ln.batchedUpdates(e),Bw=!1};ln.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,ln.onStart(n)}return r.handler=e,r.cancel=()=>{y9.delete(n),t=null},r};var d_=typeof window<"u"?window.requestAnimationFrame:()=>{};ln.use=e=>d_=e;ln.now=typeof performance<"u"?()=>performance.now():Date.now;ln.batchedUpdates=e=>e();ln.catch=console.error;ln.frameLoop="always";ln.advance=()=>{ln.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):mQ()};var Bc=-1,Hc=0,Bw=!1;function _g(e,t){Bw?(t.delete(e),e(0)):(t.add(e),hQ())}function hQ(){Bc<0&&(Bc=0,ln.frameLoop!=="demand"&&d_(pQ))}function MLe(){Bc=-1}function pQ(){~Bc&&(d_(pQ),ln.batchedUpdates(mQ))}function mQ(){const e=Bc;Bc=ln.now();const t=fQ(Bc);if(t&&(gQ(_f.splice(0,t),n=>n.handler()),Hc-=t),!Hc){MLe();return}y9.flush(),a_.flush(e?Math.min(64,Bc-e):16.667),c_.flush(),l_.flush(),u_.flush()}function Ag(){let e=new Set,t=e;return{add(n){Hc+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Hc-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Hc-=t.size,gQ(t,r=>r(n)&&e.add(r)),Hc+=e.size,t=e)}}}function gQ(e,t){e.forEach(n=>{try{t(n)}catch(r){ln.catch(r)}})}function ILe(){}var LLe=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),$n={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function NLe(e,t){if($n.arr(e)){if(!$n.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Gi=(e,t)=>e.forEach(t);function yv(e,t,n){if($n.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Fp=e=>$n.und(e)?[]:$n.arr(e)?e:[e],f_=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),h_,vQ,tu=null,yQ=!1,p_=ILe,FLe=e=>{e.to&&(vQ=e.to),e.now&&(ln.now=e.now),e.colors!==void 0&&(tu=e.colors),e.skipAnimation!=null&&(yQ=e.skipAnimation),e.createStringInterpolator&&(h_=e.createStringInterpolator),e.requestAnimationFrame&&ln.use(e.requestAnimationFrame),e.batchedUpdates&&(ln.batchedUpdates=e.batchedUpdates),e.willAdvance&&(p_=e.willAdvance),e.frameLoop&&(ln.frameLoop=e.frameLoop)},w0=new Set,Yo=[],p7=[],bv=0,m_={get idle(){return!w0.size&&!Yo.length},start(e){bv>e.priority?(w0.add(e),ln.onStart(BLe)):(bQ(e),ln(Hw))},advance:Hw,sort(e){if(bv)ln.onFrame(()=>m_.sort(e));else{const t=Yo.indexOf(e);~t&&(Yo.splice(t,1),xQ(e))}},clear(){Yo=[],w0.clear()}};function BLe(){w0.forEach(bQ),w0.clear(),ln(Hw)}function bQ(e){Yo.includes(e)||xQ(e)}function xQ(e){Yo.splice(HLe(Yo,t=>t.priority>e.priority),0,e)}function Hw(e){const t=p7;for(let n=0;n<Yo.length;n++){const r=Yo[n];bv=r.priority,r.idle||(p_(r),r.advance(e),r.idle||t.push(r))}return bv=0,p7=Yo,p7.length=0,Yo=t,Yo.length>0}function HLe(e,t){const n=e.findIndex(t);return n<0?e.length:n}var zLe={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Fs="[-+]?\\d*\\.?\\d+",xv=Fs+"%";function b9(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var ULe=new RegExp("rgb"+b9(Fs,Fs,Fs)),VLe=new RegExp("rgba"+b9(Fs,Fs,Fs,Fs)),jLe=new RegExp("hsl"+b9(Fs,xv,xv)),WLe=new RegExp("hsla"+b9(Fs,xv,xv,Fs)),qLe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,KLe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,GLe=/^#([0-9a-fA-F]{6})$/,YLe=/^#([0-9a-fA-F]{8})$/;function QLe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=GLe.exec(e))?parseInt(t[1]+"ff",16)>>>0:tu&&tu[e]!==void 0?tu[e]:(t=ULe.exec(e))?(w1(t[1])<<24|w1(t[2])<<16|w1(t[3])<<8|255)>>>0:(t=VLe.exec(e))?(w1(t[1])<<24|w1(t[2])<<16|w1(t[3])<<8|RL(t[4]))>>>0:(t=qLe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=YLe.exec(e))?parseInt(t[1],16)>>>0:(t=KLe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=jLe.exec(e))?(OL(PL(t[1]),t4(t[2]),t4(t[3]))|255)>>>0:(t=WLe.exec(e))?(OL(PL(t[1]),t4(t[2]),t4(t[3]))|RL(t[4]))>>>0:null}function m7(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function OL(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=m7(i,r,e+1/3),s=m7(i,r,e),a=m7(i,r,e-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function w1(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function PL(e){return(parseFloat(e)%360+360)%360/360}function RL(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function t4(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function ML(e){let t=QLe(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,o=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}var Dm=(e,t,n)=>{if($n.fun(e))return e;if($n.arr(e))return Dm({range:e,output:t,extrapolate:n});if($n.str(e.output[0]))return h_(e);const r=e,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=ZLe(u,o);return XLe(u,o[d],o[d+1],i[d],i[d+1],c,s,a,r.map)}};function XLe(e,t,n,r,i,o,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(a==="identity")return u;a==="clamp"&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u=u+r:u=u*(i-r)+r,u)}function ZLe(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Om=Symbol.for("FluidValue.get"),Pm=Symbol.for("FluidValue.observers"),eh=e=>Boolean(e&&e[Om]),th=e=>e&&e[Om]?e[Om]():e;function JLe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Cv(e,t){const n=e[Pm];n&&n.forEach(r=>{JLe(r,t)})}var CQ=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");eNe(this,e)}},eNe=(e,t)=>wQ(e,Om,t);function g_(e,t){if(e[Om]){let n=e[Pm];n||wQ(e,Pm,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function wv(e,t){const n=e[Pm];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Pm]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var wQ=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),g5=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,tNe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,IL=new RegExp(`(${g5.source})(%|[a-z]+)`,"i"),nNe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,x9=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,SQ=e=>{const[t,n]=rNe(e);if(!t||f_())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&x9.test(n))return SQ(n);if(n)return n}return e},rNe=e=>{const t=x9.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},g7,iNe=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,EQ=e=>{g7||(g7=tu?new RegExp(`(${Object.keys(tu).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(o=>th(o).replace(x9,SQ).replace(tNe,ML).replace(g7,ML)),n=t.map(o=>o.match(g5).map(Number)),i=n[0].map((o,s)=>n.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(o=>Dm({...e,output:o}));return o=>{var c;const s=!IL.test(t[0])&&((c=t.find(u=>IL.test(u)))==null?void 0:c.replace(g5,""));let a=0;return t[0].replace(g5,()=>`${i[a++](o)}${s||""}`).replace(nNe,iNe)}},TQ="react-spring: ",kQ=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${TQ}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},oNe=kQ(console.warn);function sNe(){oNe(`${TQ}The "interpolate" function is deprecated in v9 (use "to" instead)`)}kQ(console.warn);function _Q(e){return $n.str(e)&&(e[0]=="#"||/\d/.test(e)||!f_()&&x9.test(e)||e in(tu||{}))}var AQ=f_()?y.exports.useEffect:y.exports.useLayoutEffect,aNe=()=>{const e=y.exports.useRef(!1);return AQ(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function lNe(){const e=y.exports.useState()[1],t=aNe();return()=>{t.current&&e(Math.random())}}function cNe(e,t){const[n]=y.exports.useState(()=>({inputs:t,result:e()})),r=y.exports.useRef(),i=r.current;let o=i;return o?Boolean(t&&o.inputs&&uNe(t,o.inputs))||(o={inputs:t,result:e()}):o=n,y.exports.useEffect(()=>{r.current=o,i==n&&(n.inputs=n.result=void 0)},[o]),o.result}function uNe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var dNe=e=>y.exports.useEffect(e,fNe),fNe=[],Rm=Symbol.for("Animated:node"),hNe=e=>!!e&&e[Rm]===e,v_=e=>e&&e[Rm],$Q=(e,t)=>LLe(e,Rm,t),y_=e=>e&&e[Rm]&&e[Rm].getPayload(),DQ=class{constructor(){$Q(this,this)}getPayload(){return this.payload||[]}},C9=class extends DQ{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,$n.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new C9(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $n.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,$n.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},b_=class extends C9{constructor(e){super(0),this._string=null,this._toString=Dm({output:[e,e]})}static create(e){return new b_(e)}getValue(){const e=this._string;return e==null?this._string=this._toString(this._value):e}setValue(e){if($n.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Dm({output:[this.getValue(),e]})),this._value=0,super.reset()}},Sv={dependencies:null},w9=class extends DQ{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return yv(this.source,(n,r)=>{hNe(n)?t[r]=n.getValue(e):eh(n)?t[r]=th(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Gi(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return yv(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Sv.dependencies&&eh(e)&&Sv.dependencies.add(e);const t=y_(e);t&&Gi(t,n=>this.add(n))}},OQ=class extends w9{constructor(e){super(e)}static create(e){return new OQ(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(pNe)),!0)}};function pNe(e){return(_Q(e)?b_:C9).create(e)}function mNe(e){const t=v_(e);return t?t.constructor:$n.arr(e)?OQ:_Q(e)?b_:C9}var LL=(e,t)=>{const n=!$n.fun(e)||e.prototype&&e.prototype.isReactComponent;return y.exports.forwardRef((r,i)=>{const o=y.exports.useRef(null),s=n&&y.exports.useCallback(m=>{o.current=yNe(i,m)},[i]),[a,c]=vNe(r,t),u=lNe(),d=()=>{const m=o.current;if(n&&!m)return;(m?t.applyAnimatedValues(m,a.getValue(!0)):!1)===!1&&u()},f=new gNe(d,c),h=y.exports.useRef();AQ(()=>(h.current=f,Gi(c,m=>g_(m,f)),()=>{h.current&&(Gi(h.current.deps,m=>wv(m,h.current)),ln.cancel(h.current.update))})),y.exports.useEffect(d,[]),dNe(()=>()=>{const m=h.current;Gi(m.deps,v=>wv(v,m))});const p=t.getComponentProps(a.getValue());return l(e,{...p,ref:s})})},gNe=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&ln.write(this.update)}};function vNe(e,t){const n=new Set;return Sv.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new w9(e),Sv.dependencies=null,[e,n]}function yNe(e,t){return e&&($n.fun(e)?e(t):e.current=t),t}var NL=Symbol.for("AnimatedComponent"),bNe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new w9(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=s=>{const a=FL(s)||"Anonymous";return $n.str(s)?s=o[s]||(o[s]=LL(s,i)):s=s[NL]||(s[NL]=LL(s,i)),s.displayName=`Animated(${a})`,s};return yv(e,(s,a)=>{$n.arr(e)&&(a=FL(s)),o[a]=o(s)}),{animated:o}},FL=e=>$n.str(e)?e:e&&$n.str(e.displayName)?e.displayName:$n.fun(e)&&e.name||null,BL=e=>e instanceof PQ,xNe=1,PQ=class extends CQ{constructor(){super(...arguments),this.id=xNe++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=v_(this);return e&&e.getValue()}to(...e){return Jf.to(this,e)}interpolate(...e){return sNe(),Jf.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Cv(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||m_.sort(this),Cv(this,{type:"priority",parent:this,priority:e})}},x_=({children:e,...t})=>{const n=y.exports.useContext(Ev),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=cNe(()=>({pause:r,immediate:i}),[r,i]);const{Provider:o}=Ev;return l(o,{value:t,children:e})},Ev=CNe(x_,{});x_.Provider=Ev.Provider;x_.Consumer=Ev.Consumer;function CNe(e,t){return Object.assign(e,y.exports.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var wNe=class extends PQ{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Dm(...t);const n=this._get(),r=mNe(n);$Q(this,r.create(n))}advance(e){const t=this._get(),n=this.get();NLe(t,n)||(v_(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&HL(this._active)&&v7(this)}_get(){const e=$n.arr(this.source)?this.source.map(th):Fp(th(this.source));return this.calc(...e)}_start(){this.idle&&!HL(this._active)&&(this.idle=!1,Gi(y_(this),e=>{e.done=!1}),Jf.skipAnimation?(ln.batchedUpdates(()=>this.advance()),v7(this)):m_.start(this))}_attach(){let e=1;Gi(Fp(this.source),t=>{eh(t)&&g_(t,this),BL(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Gi(Fp(this.source),e=>{eh(e)&&wv(e,this)}),this._active.clear(),v7(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Fp(this.source).reduce((t,n)=>Math.max(t,(BL(n)?n.priority:0)+1),0))}};function SNe(e){return e.idle!==!1}function HL(e){return!e.size||Array.from(e).every(SNe)}function v7(e){e.idle||(e.idle=!0,Gi(y_(e),t=>{t.done=!0}),Cv(e,{type:"idle",parent:e}))}Jf.assign({createStringInterpolator:EQ,to:(e,t)=>new wNe(e,t)});var RQ=/^--/;function ENe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!RQ.test(e)&&!(S0.hasOwnProperty(e)&&S0[e])?t+"px":(""+t).trim()}var zL={};function TNe(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:i,scrollTop:o,scrollLeft:s,viewBox:a,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:zL[f]||(zL[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));i!==void 0&&(e.textContent=i);for(const f in r)if(r.hasOwnProperty(f)){const h=ENe(f,r[f]);RQ.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,u[h])}),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),a!==void 0&&e.setAttribute("viewBox",a)}var S0={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kNe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),_Ne=["Webkit","Ms","Moz","O"];S0=Object.keys(S0).reduce((e,t)=>(_Ne.forEach(n=>e[kNe(n,t)]=e[t]),e),S0);var ANe=/^(matrix|translate|scale|rotate|skew)/,$Ne=/^(translate)/,DNe=/^(rotate|skew)/,y7=(e,t)=>$n.num(e)&&e!==0?e+t:e,v5=(e,t)=>$n.arr(e)?e.every(n=>v5(n,t)):$n.num(e)?e===t:parseFloat(e)===t,ONe=class extends w9{constructor({x:e,y:t,z:n,...r}){const i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(s=>[`translate3d(${s.map(a=>y7(a,"px")).join(",")})`,v5(s,0)])),yv(r,(s,a)=>{if(a==="transform")i.push([s||""]),o.push(c=>[c,c===""]);else if(ANe.test(a)){if(delete r[a],$n.und(s))return;const c=$Ne.test(a)?"px":DNe.test(a)?"deg":"";i.push(Fp(s)),o.push(a==="rotate3d"?([u,d,f,h])=>[`rotate3d(${u},${d},${f},${y7(h,c)})`,v5(h,0)]:u=>[`${a}(${u.map(d=>y7(d,c)).join(",")})`,v5(u,a.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new PNe(i,o)),super(r)}},PNe=class extends CQ{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Gi(this.inputs,(n,r)=>{const i=th(n[0]),[o,s]=this.transforms[r]($n.arr(i)?i:n.map(th));e+=" "+o,t=t&&s}),t?"none":e}observerAdded(e){e==1&&Gi(this.inputs,t=>Gi(t,n=>eh(n)&&g_(n,this)))}observerRemoved(e){e==0&&Gi(this.inputs,t=>Gi(t,n=>eh(n)&&wv(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Cv(this,e)}},RNe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Jf.assign({batchedUpdates:Lr.exports.unstable_batchedUpdates,createStringInterpolator:EQ,colors:zLe});var MNe=bNe(RNe,{applyAnimatedValues:TNe,createAnimatedStyle:e=>new ONe(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),MQ=MNe.animated;function INe(){const e=te(),t=Ee(),n=Tn.exports.useMediaQuery({maxWidth:992}),[r,i]=y.exports.useState(null),{isLoading:o,data:s}=ms(),{isLoading:a,data:c}=_t(["store","bloggers-application"],()=>e.get("/settings/store/bloggers-application").then(d=>d.data)),u=ve({mutationFn:d=>{d.preventDefault();const f=new FormData(d.target),h=f.get("applicationOpen")==="on",p=f.get("applicationFormDescription");return e.patch("/settings/store/bloggers-application",{applicationOpen:h,applicationFormData:r,applicationFormDescription:p}).then(m=>{F({type:"success",title:m.data.title,message:m.data.message}),t.invalidateQueries({queryKey:["store"]})}).catch(function(m){var v,b,x,C;(b=(v=m.response)==null?void 0:v.data)!=null&&b.error?F({type:"error",title:(x=m.response.data)==null?void 0:x.error.title,message:(C=m.response.data)==null?void 0:C.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return a||o?l(z,{}):(r===null&&i(c.applicationFormData?c.applicationFormData:[]),l(dt,{onSubmit:u.mutate,children:g(P,{css:{gap:"$8"},children:[g(P,{children:[g(M,{css:{marginRight:n?0:"$4",alignItems:n?"left":"center",flexDirection:n?"column":"row"},children:[l(br,{css:{order:n?2:0},children:"Bloggers Application Form"}),l(Pi,{css:{marginLeft:n?0:"$4",marginRight:n?"auto":0},badge:c.applicationOpen?"Active":"Closed",children:c.applicationOpen?"Active":"Closed"})]}),l(ce,{children:l("p",{children:l(ie,{to:c.applicationUrl,target:"_blank",rel:"noopener",children:c.applicationUrl})})})]}),g(P,{children:[l(ae,{children:"Description on the form"}),l(Ti,{css:{height:300},defaultValue:c.applicationFormDescription,name:"applicationFormDescription"})]}),g(P,{css:{gap:"$4"},children:[g(P,{children:[l(ae,{children:"Custom Fields"}),g(Uq,{children:[l(A,{children:"From this interface, you are able to customize the form for your future bloggers to apply. Start by clicking `Add a field` and enter a name and description. You are able to organize your fields as well."}),g(A,{css:{marginTop:"$2",fontStyle:"italic"},children:["Note: The name of the blogger is ",l("strong",{children:"always asked"})," on the form, you don't need to add it yourself."]})]})]}),l(LNe,{items:r,setItems:i,customQuestionsCountMax:s.subscription.applicationFormLimitation.countCustomBloggersQuestions})]}),g(M,{css:{alignItems:"center"},children:[l(IQ,{id:"applicationOpen",defaultChecked:c.applicationOpen,name:"applicationOpen",css:{cursor:"pointer"},children:l(LQ,{})}),l(ae,{htmlFor:"applicationOpen",css:{paddingLeft:15,cursor:"pointer"},children:"Open the form for bloggers to apply"})]}),l(Y,{variant:"primary",disabled:u.isLoading,css:{marginLeft:"auto",marginTop:"$6"},children:"Apply your changes"})]})}))}function LNe({items:e,setItems:t,customQuestionsCountMax:n}){const[r,i]=y.exports.useState(null),o=PY(gv(n_),gv(r_)),s=h=>{const{active:p}=h;i(p.id)},a=h=>{const{active:p,over:m}=h;p.id!==m.id&&t(v=>{const b=v.findIndex(C=>C.id===p.id),x=v.findIndex(C=>C.id===m.id);return v9(v,b,x)}),i(null)},c=h=>{h.preventDefault(),t(p=>[...p,{id:`${b6()}`,name:"Input",value:"",required:!0}])},u=h=>{t(p=>p.filter(m=>m.id!==h))},d=(h,p,m,v)=>{t(b=>b.map(x=>x.id===h?{...x,name:p,value:m,required:v}:x))},f=e.length<n;return g(P,{css:{gap:"$4"},children:[g(XY,{onDragStart:s,onDragEnd:a,collisionDetection:RY,sensors:o,children:[l(iQ,{items:e,strategy:tQ,children:l(P,{css:{gap:"$4"},children:e.map(h=>l(UL,{id:h.id,name:h.name,value:h.value,required:h.required,onChange:d,onDelete:()=>u(h.id)},h.id))})}),l(JY,{children:r?l(UL,{id:r,name:e.find(h=>h.id===r).name,value:e.find(h=>h.id===r).value,required:e.find(h=>h.id===r).required}):null})]}),l(Et,{enabled:!f,content:g(ce,{children:["You are limited to ",g("strong",{children:[n," fields"]})," in your Application Form."]}),children:g(Y,{variant:"primary",onClick:c,disabled:!f,css:{textAlign:"center",justifyContent:"center",width:"100%"},children:[l(W,{icon:ph}),"Add a field"]})})]})}function UL(e){const[t,n]=Ae.useState(!1),{attributes:r,listeners:i,setNodeRef:o,isDragging:s,transform:a,transition:c}=sQ({id:e.id}),u={transform:Fl.Transform.toString(a),transition:c?`${c}`:void 0,opacity:s?"0":"1"},d=p=>{e.onChange(e.id,p.target.value,e.value,e.required)},f=p=>{e.onChange(e.id,e.name,p.target.value,e.required)},h=p=>{e.onChange(e.id,e.name,e.value,p)};return l(MQ.div,{ref:o,style:u,...r,children:l(FNe,{open:t,onOpenChange:n,children:g(P,{css:{border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",borderRadius:8},children:[g(M,{css:{alignItems:"center"},children:[l(ce,{...i,style:{cursor:"move"},css:{px:"$4",py:"$2"},children:l(W,{icon:qH})}),g(HNe,{css:{display:"flex",alignItems:"center"},children:[l(M,{css:{flexGrow:1},children:g(A,{children:[e.name,e.required?l(Zf,{}):""]})}),l(NNe,{icon:jH,open:t})]})]}),l(M,{children:l(BNe,{children:g(P,{css:{gap:"$3"},children:[g(P,{children:[l(ae,{children:"Field name"}),l(Ke,{type:"text",name:"name-"+e.id,value:e.name,onChange:d})]}),g(P,{children:[l(ae,{children:"Field description"}),l(Ke,{type:"text",name:"value-"+e.id,value:e.value,onChange:f})]}),g(M,{css:{alignItems:"center"},children:[l(IQ,{id:"required-"+e.id,defaultChecked:e.required,onCheckedChange:h,css:{cursor:"pointer"},children:l(LQ,{})}),l(ae,{htmlFor:"required-"+e.id,css:{paddingLeft:15,cursor:"pointer"},children:"Required"})]}),g(Y,{variant:"softDanger",css:{textAlign:"center",justifyContent:"center"},onClick:e.onDelete,children:[l(W,{icon:so}),"Delete"]})]})})})]})})})}const NNe=de(W,{transition:"transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",width:16,height:16,marginLeft:"auto",variants:{open:{true:{transform:"rotate(180deg)"}}}}),FNe=de(cQ,{}),BNe=de(dQ,{backgroundColor:"$backgroundColor",width:"100%",borderBottomRightRadius:8,borderBottomLeftRadius:8,p:"$4"}),HNe=de(uQ,{p:"$4",cursor:"pointer",width:"100%"}),IQ=de(tg,{all:"unset",width:42,height:25,backgroundColor:"$gray400",borderRadius:"9999px",position:"relative",boxShadow:"0 2px 10px $gray800",'&[data-state="checked"]':{backgroundColor:"$yellow400"}}),LQ=de(ng,{display:"block",width:21,height:21,backgroundColor:"white",borderRadius:"9999px",boxShadow:"0 2px 2px $gray900",transition:"transform 100ms",transform:"translateX(2px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(19px)"}});function zNe(){const e=te(),t=Ee(),n=Tn.exports.useMediaQuery({maxWidth:992}),[r,i]=y.exports.useState(null),{isLoading:o,data:s}=ms(),{isLoading:a,data:c}=_t(["store","designers-application"],()=>e.get("/settings/store/designers-application").then(d=>d.data)),u=ve({mutationFn:d=>{d.preventDefault();const f=new FormData(d.target),h=f.get("applicationOpen")==="on",p=f.get("applicationFormDescription");return e.patch("/settings/store/designers-application",{applicationOpen:h,applicationFormData:r,applicationFormDescription:p}).then(m=>{F({type:"success",title:m.data.title,message:m.data.message}),t.invalidateQueries({queryKey:["store"]})}).catch(function(m){var v,b,x,C;(b=(v=m.response)==null?void 0:v.data)!=null&&b.error?F({type:"error",title:(x=m.response.data)==null?void 0:x.error.title,message:(C=m.response.data)==null?void 0:C.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return a||o?l(z,{}):(r===null&&i(c.applicationFormData?c.applicationFormData:[]),l(dt,{onSubmit:u.mutate,children:g(P,{css:{gap:"$8"},children:[g(P,{children:[g(M,{css:{marginRight:n?0:"$4",alignItems:n?"left":"center",flexDirection:n?"column":"row"},children:[l(br,{css:{order:n?2:0},children:"Designers Application Form"}),l(Pi,{css:{marginLeft:n?0:"$4",marginRight:n?"auto":0},badge:c.applicationOpen?"Active":"Closed",children:c.applicationOpen?"Active":"Closed"})]}),l(ce,{children:l("p",{children:l(ie,{to:c.applicationUrl,target:"_blank",rel:"noopener",children:c.applicationUrl})})})]}),g(P,{children:[l(ae,{children:"Description on the form"}),l(Ti,{css:{height:300},defaultValue:c.applicationFormDescription,name:"applicationFormDescription"})]}),g(P,{css:{gap:"$4"},children:[g(P,{children:[l(ae,{children:"Custom Fields"}),g(Uq,{children:[l(A,{children:"From this interface, you are able to customize the form for your future bloggers to apply. Start by clicking `Add a field` and enter a name and description. You are able to organize your fields as well."}),g(A,{css:{marginTop:"$2",fontStyle:"italic"},children:["Note: The name of the blogger is ",l("strong",{children:"always asked"})," on the form, you don't need to add it yourself."]})]})]}),l(UNe,{items:r,setItems:i,customQuestionsCountMax:s.subscription.applicationFormLimitation.countCustomDesignersQuestions})]}),g(M,{css:{alignItems:"center"},children:[l(NQ,{id:"applicationOpen",defaultChecked:c.applicationOpen,name:"applicationOpen",css:{cursor:"pointer"},children:l(FQ,{})}),l(ae,{htmlFor:"applicationOpen",css:{paddingLeft:15,cursor:"pointer"},children:"Open the form for designers to apply"})]}),l(Y,{variant:"primary",disabled:u.isLoading,css:{marginLeft:"auto",marginTop:"$6"},children:"Apply your changes"})]})}))}function UNe({items:e,setItems:t,customQuestionsCountMax:n}){const[r,i]=y.exports.useState(null),o=PY(gv(n_),gv(r_)),s=h=>{const{active:p}=h;i(p.id)},a=h=>{const{active:p,over:m}=h;p.id!==m.id&&t(v=>{const b=v.findIndex(C=>C.id===p.id),x=v.findIndex(C=>C.id===m.id);return v9(v,b,x)}),i(null)},c=h=>{h.preventDefault(),t(p=>[...p,{id:`${b6()}`,name:"Input",value:"",required:!0}])},u=h=>{t(p=>p.filter(m=>m.id!==h))},d=(h,p,m,v)=>{t(b=>b.map(x=>x.id===h?{...x,name:p,value:m,required:v}:x))},f=e.length<n;return g(P,{css:{gap:"$4"},children:[g(XY,{onDragStart:s,onDragEnd:a,collisionDetection:RY,sensors:o,children:[l(iQ,{items:e,strategy:tQ,children:l(P,{css:{gap:"$4"},children:e.map(h=>l(VL,{id:h.id,name:h.name,value:h.value,required:h.required,onChange:d,onDelete:()=>u(h.id)},h.id))})}),l(JY,{children:r?l(VL,{id:r,name:e.find(h=>h.id===r).name,value:e.find(h=>h.id===r).value,required:e.find(h=>h.id===r).required}):null})]}),l(Et,{enabled:!f,content:g(ce,{children:["You are limited to ",g("strong",{children:[n," fields"]})," in your Application Form."]}),children:g(Y,{variant:"primary",onClick:c,disabled:!f,css:{textAlign:"center",justifyContent:"center",width:"100%"},children:[l(W,{icon:ph}),"Add a field"]})})]})}function VL(e){const[t,n]=Ae.useState(!1),{attributes:r,listeners:i,setNodeRef:o,isDragging:s,transform:a,transition:c}=sQ({id:e.id}),u={transform:Fl.Transform.toString(a),transition:c?`${c}`:void 0,opacity:s?"0":"1"},d=p=>{e.onChange(e.id,p.target.value,e.value,e.required)},f=p=>{e.onChange(e.id,e.name,p.target.value,e.required)},h=p=>{e.onChange(e.id,e.name,e.value,p)};return l(MQ.div,{ref:o,style:u,...r,children:l(jNe,{open:t,onOpenChange:n,children:g(P,{css:{border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",borderRadius:8},children:[g(M,{css:{alignItems:"center"},children:[l(ce,{...i,style:{cursor:"move"},css:{px:"$4",py:"$2"},children:l(W,{icon:qH})}),g(qNe,{css:{display:"flex",alignItems:"center"},children:[l(M,{css:{flexGrow:1},children:g(A,{children:[e.name,e.required?l(Zf,{}):""]})}),l(VNe,{icon:jH,open:t})]})]}),l(M,{children:l(WNe,{children:g(P,{css:{gap:"$3"},children:[g(P,{children:[l(ae,{children:"Field name"}),l(Ke,{type:"text",name:"name-"+e.id,value:e.name,onChange:d})]}),g(P,{children:[l(ae,{children:"Field description"}),l(Ke,{type:"text",name:"value-"+e.id,value:e.value,onChange:f})]}),g(M,{css:{alignItems:"center"},children:[l(NQ,{id:"required-"+e.id,defaultChecked:e.required,onCheckedChange:h,css:{cursor:"pointer"},children:l(FQ,{})}),l(ae,{htmlFor:"required-"+e.id,css:{paddingLeft:15,cursor:"pointer"},children:"Required"})]}),g(Y,{variant:"softDanger",css:{textAlign:"center",justifyContent:"center"},onClick:e.onDelete,children:[l(W,{icon:so}),"Delete"]})]})})})]})})})}const VNe=de(W,{transition:"transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",width:16,height:16,marginLeft:"auto",variants:{open:{true:{transform:"rotate(180deg)"}}}}),jNe=de(cQ,{}),WNe=de(dQ,{backgroundColor:"$backgroundColor",width:"100%",borderBottomRightRadius:8,borderBottomLeftRadius:8,p:"$4"}),qNe=de(uQ,{p:"$4",cursor:"pointer",width:"100%"}),NQ=de(tg,{all:"unset",width:42,height:25,backgroundColor:"$gray400",borderRadius:"9999px",position:"relative",boxShadow:"0 2px 10px $gray800",'&[data-state="checked"]':{backgroundColor:"$yellow400"}}),FQ=de(ng,{display:"block",width:21,height:21,backgroundColor:"white",borderRadius:"9999px",boxShadow:"0 2px 2px $gray900",transition:"transform 100ms",transform:"translateX(2px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(19px)"}});function KNe(){const e=te(),{isLoading:t,data:n}=_t(["store","audit"],()=>e.get("/settings/store/audit").then(i=>i.data));Z.extend(Pn),Z.extend(On);const r={delivery_success:{icon:fce,color:"$success600"},delivery_error:{icon:jle,color:"$amber600"},post_created:{icon:Kle,color:"$success600"},post_completed:{icon:Hce,color:"$success600"},post_accepted:{icon:vce,color:"$success600"},post_rejected:{icon:KH,color:"$destructive600"},blogger_removed:{icon:cp,color:"$destructive600"},blogger_invited:{icon:My,color:"$sky600"},blogger_invited_accept:{icon:rm,color:"$success600"},blogger_invited_refuse:{icon:Yle,color:"$destructive600"},blogger_joined:{icon:rm,color:"$success600"},blogger_rejected:{icon:Dle,color:"$destructive600"},mail_created:{icon:tce,color:"$success600"},mail_edited:{icon:zle,color:"$sky600"},mail_deleted:{icon:Cce,color:"$destructive600"},store_name_edited:{icon:Ole,color:"$primary700"},store_picture_edited:{icon:nce,color:"$primary700"},store_manager_added:{icon:RD,color:"$success600"},store_co_owner_added:{icon:RD,color:"$success600"},store_co_owner_removed:{icon:cp,color:"$destructive600"},store_manager_removed:{icon:cp,color:"$destructive600"},store_removed_from_event:{icon:cp,color:"$destructive600"},store_friend_added:{icon:Jle,color:"$success600"},store_friend_removed:{icon:qle,color:"$destructive600"},product_created:{icon:Rce,color:"$success600"},product_archived:{icon:Hle,color:"$gray400"},product_edited:{icon:LD,color:"$primary700"},package_sent:{icon:Od,color:"$primary700"},package_sent_to_store_owner:{icon:Od,color:"$primary700"},removed_deadline_from_post:{icon:Ice,color:"$primary700"},blogger_invitation_cancelled:{icon:cp,color:"$gray400"},store_notification_edited:{icon:Xm,color:"$gray400"},location_created:{icon:Lle,color:"$gray400"},location_archived:{icon:Mle,color:"$gray400"},location_edited:{icon:UE,color:"$gray400"},products_limitation_edited:{icon:Ace,color:"$gray400"},timeout_priority_edited:{icon:_ce,color:"$gray400"},post_cancelled:{icon:w8,color:"$gray400"},event_removed_all_products:{icon:w8,color:"$gray400"},event_removed_product:{icon:w8,color:"$gray400"},store_joined_event:{icon:q4,color:"$success600"},event_rejected_designer_application:{icon:Wle,color:"$destructive600"},event_received_designer_application:{icon:ice,color:"$gray400"},designers_application_form_edited:{icon:Pce,color:"$gray400"},bloggers_application_form_edited:{icon:LD,color:"$gray400"},store_rules_edited:{icon:Xz,color:"$gray400"},store_socials_edited:{icon:Vie,color:"$gray400"},user_leave:{icon:xC,color:"$destructive600"},prevent_product_assignment:{icon:iU,color:"$gray400"},event_invite_store:{icon:q4,color:"$gray400"},store_accepted_event_invitation:{icon:q4,color:"$success600"},store_rejected_event_invitation:{icon:Zle,color:"$destructive600"},minimum_post_per_month_edited:{icon:Fle,color:"$gray400"}};return t?l(z,{}):l(P,{css:{gap:"$8"},children:l(Ll,{children:n.map((i,o)=>{var s;return((s=r[i.action])==null?void 0:s.icon)===void 0?null:g(Il,{css:{borderBottom:"1px solid $borderColor"},children:[g(Jt,{css:{verticalAlign:"inherit"},children:[l(W,{icon:r[i.action].icon,css:{color:r[i.action].color,marginRight:"$2"}}),l(Ne,{title:Z(i.createdAt).format("LLL"),children:Z(i.createdAt).fromNow()})]}),g(Jt,{css:{whiteSpace:"inherit",width:"100%"},children:[i.action==="delivery_error"&&l(GNe,{event:i}),i.action==="delivery_success"&&l(YNe,{event:i}),i.action==="post_created"&&l(QNe,{event:i}),i.action==="post_completed"&&l(XNe,{event:i}),i.action==="post_accepted"&&l(ZNe,{event:i}),i.action==="post_rejected"&&l(eFe,{event:i}),i.action==="blogger_joined"&&l(oFe,{event:i}),i.action==="blogger_rejected"&&l(sFe,{event:i}),i.action==="blogger_removed"&&l(tFe,{event:i}),i.action==="blogger_invited"&&l(nFe,{event:i}),i.action==="blogger_invited_accept"&&l(rFe,{event:i}),i.action==="blogger_invited_refuse"&&l(iFe,{event:i}),i.action==="mail_created"&&l(lFe,{event:i}),i.action==="mail_edited"&&l(cFe,{event:i}),i.action==="mail_deleted"&&l(dFe,{event:i}),i.action==="store_name_edited"&&l(fFe,{event:i}),i.action==="store_picture_edited"&&l(gFe,{event:i}),i.action==="store_manager_added"&&l(vFe,{event:i}),i.action==="store_manager_removed"&&l(yFe,{event:i}),i.action==="store_co_owner_added"&&l(bFe,{event:i}),i.action==="store_co_owner_removed"&&l(xFe,{event:i}),i.action==="store_friend_added"&&l(CFe,{event:i}),i.action==="store_friend_removed"&&l(EFe,{event:i}),i.action==="product_created"&&l(kFe,{event:i}),i.action==="product_archived"&&l(_Fe,{event:i}),i.action==="product_edited"&&l(DFe,{event:i}),i.action==="package_sent"&&l(wFe,{event:i}),i.action==="package_sent_to_store_owner"&&l(SFe,{event:i}),i.action==="removed_deadline_from_post"&&l(qFe,{event:i}),i.action==="blogger_invitation_cancelled"&&l(aFe,{event:i}),i.action==="store_notification_edited"&&l(uFe,{event:i}),i.action==="location_created"&&l(BFe,{event:i}),i.action==="location_edited"&&l(HFe,{event:i}),i.action==="location_archived"&&l(zFe,{event:i}),i.action==="post_cancelled"&&l(JNe,{event:i}),i.action==="products_limitation_edited"&&l(UFe,{event:i}),i.action==="minimum_post_per_month_edited"&&l(VFe,{event:i}),i.action==="timeout_priority_edited"&&l(jFe,{event:i}),i.action==="prevent_product_assignment"&&l(WFe,{event:i}),i.action==="store_removed_from_event"&&l(TFe,{event:i}),i.action==="event_removed_all_products"&&l(AFe,{event:i}),i.action==="event_removed_product"&&l($Fe,{event:i}),i.action==="store_joined_event"&&l(IFe,{event:i}),i.action==="event_invite_store"&&l(LFe,{event:i}),i.action==="store_accepted_event_invitation"&&l(NFe,{event:i}),i.action==="store_rejected_event_invitation"&&l(FFe,{event:i}),i.action==="event_rejected_designer_application"&&l(OFe,{event:i}),i.action==="event_received_designer_application"&&l(PFe,{event:i}),i.action==="bloggers_application_form_edited"&&l(RFe,{event:i}),i.action==="designers_application_form_edited"&&l(MFe,{event:i}),i.action==="store_rules_edited"&&l(hFe,{event:i}),i.action==="store_socials_edited"&&l(pFe,{event:i}),i.action==="user_leave"&&l(mFe,{event:i})]})]},"event-"+o)})})})}function GNe({event:e}){return g(z,{children:[g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","requested a deliver for"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.objectName})," ","but the system were unable to deliver the item."]}),g(A,{children:["Reason: ",e.eventData.reason]})]})}function YNe({event:e}){return g(z,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","requested a deliver for"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.objectName})]})}function QNe({event:e}){return g(A,{children:["A post has been created by"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","for the product"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.productName})]})}function XNe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","completed its post for the product"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.productName})]})}function ZNe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","accepted the post of"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","for the product"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.productName})]})}function JNe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","cancelled the post of"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","for the product"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.productName})]})}function eFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","rejected the post of"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","for the product"," ",l(Ne,{css:{fontWeight:"$bold",whiteSpace:"break-spaces"},children:e.eventData.productName})]})}function tFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","from the store."]})}function nFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","invited"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","to join the store."]})}function rFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","accepted the invitation to join your store."]})}function iFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","refused the invitation to join your store."]})}function oFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","joined your store through your application form."]})}function sFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","rejected the application of"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}}),"."]})}function aFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","cancelled the store invitation for"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","."]})}function lFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","created a mail: ",l("strong",{children:e.eventData.mail.title}),"."]})}function cFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the mail: ",l("strong",{children:e.eventData.mail.title}),"."]})}function uFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the object to deliver for ",l("strong",{children:e.eventData.notification}),"."]})}function dFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","archived the mail: ",l("strong",{children:e.eventData.mail.title}),"."]})}function fFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}}),g(Ne,{children:[" ","edited the store name to: ",l("strong",{children:e.eventData.store.name}),"."]})]})}function hFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}}),l(Ne,{children:" edited the store rules."})]})}function pFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}}),l(Ne,{children:" edited the store socials links."})]})}function mFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}}),g(Ne,{children:[" left your store. Comment: ",e.eventData.comment]})]})}function gFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the store picture to:"," ",l(bi,{pictureUuid:e.eventData.store.pictureUuid,size:24}),"."]})}function vFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","added"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","to the managers team."]})}function yFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","from the managers team."]})}function bFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","added"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","to the co-owners."]})}function xFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","from the co-owners."]})}function CFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","added"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","to the friends team."]})}function wFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","sent a package to"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.recipient.id,name:e.eventData.recipient.name,pictureUuid:e.eventData.recipient.pictureProfileUuid}})," ","."]})}function SFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","sent a package to the store"," ",l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},pictureSize:24,inline:!0,nameBold:!0}),", owner"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.recipient.id,name:e.eventData.recipient.name,pictureUuid:e.eventData.recipient.pictureProfileUuid}})," ","."]})}function EFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.originUser.id,name:e.eventData.originUser.name,pictureUuid:e.eventData.originUser.pictureProfileUuid}})," ","from the friends team."]})}function TFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed the store"," ",l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},pictureSize:24,inline:!0,nameBold:!0}),"."]})}function kFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","created a new product:"," ",l(bi,{pictureUuid:e.eventData.product.pictureUuid,size:24})," ",l("strong",{children:e.eventData.product.name}),"."]})}function _Fe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","archived the product:"," ",l(bi,{pictureUuid:e.eventData.product.pictureUuid,size:24})," ",l("strong",{children:e.eventData.product.name}),"."]})}function AFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed all products from the event listing."]})}function $Fe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed the product"," ",l(bi,{pictureUuid:e.eventData.product.pictureUuid,size:24})," ",l("strong",{children:e.eventData.product.name})," from the event listing."]})}function DFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the product:"," ",l(bi,{pictureUuid:e.eventData.product.pictureUuid,size:24})," ",l("strong",{children:e.eventData.product.name}),"."]})}function OFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","rejected the application for the store:"," ",l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},pictureSize:24,inline:!0,nameBold:!0}),"."]})}function PFe({event:e}){return g(A,{children:[l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},pictureSize:24,inline:!0,nameBold:!0})," ","applied to your event."]})}function RFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the bloggers form."]})}function MFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the designers form."]})}function IFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","accepted the application for the store:"," ",l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},inline:!0,pictureSize:24,nameBold:!0}),"."]})}function LFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","invited the store"," ",l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},inline:!0,pictureSize:24,nameBold:!0}),"."]})}function NFe({event:e}){return g(A,{children:[l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},inline:!0,pictureSize:24,nameBold:!0})," ","accepted to join your event as a new designer."]})}function FFe({event:e}){return g(A,{children:[l(Dn,{store:{id:e.eventData.store.id,name:e.eventData.store.name,pictureUuid:e.eventData.store.pictureProfileUuid},inline:!0,pictureSize:24,nameBold:!0})," ","refused to join your event as a new designer."]})}function BFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","created a new location: ",l("strong",{children:e.eventData.location.name}),"."]})}function HFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited a location: ",l("strong",{children:e.eventData.location.name}),"."]})}function zFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","archived a location: ",l("strong",{children:e.eventData.location.name}),"."]})}function UFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the Products limitation setting to"," ",l("strong",{children:e.eventData.value===0?"Unlimited":e.eventData.value}),"."]})}function VFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the Minimum post per month setting to"," ",l("strong",{children:e.eventData.value===0?"No requirement":e.eventData.value}),"."]})}function jFe({event:e}){const t={Never:0,"2 days":2,"3 days":3,"5 days":5,"7 days":7,"15 days":15,"1 month":30,"2 months":60,"3 months":90,"4 months":120,"5 months":150,"6 months":180,"1 year":365},r=(i=>{for(const o in t)if(t[o]===i)return o;return"Unknown"})(e.eventData.value);return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the Timeout Priority setting to ",l("strong",{children:r}),"."]})}function WFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","edited the Prevent Designers Product Assignment setting to"," ",l("strong",{children:e.eventData.value.toString()}),"."]})}function qFe({event:e}){return g(A,{children:[l(Be,{nameBold:!0,inline:!0,user:{id:e.user.id,name:e.user.name,pictureUuid:e.user.profilePictureUuid}})," ","removed the deadline for the post"," ",l(pK,{label:e.eventData.post.product.name,picture:e.eventData.post.product.pictureUuid,boldLabel:!0})," ","by"," ",l(Be,{nameBold:!0,inline:!0,user:{id:e.eventData.post.owner.id,name:e.eventData.post.owner.name,pictureUuid:e.eventData.post.owner.profilePictureUuid}}),"."]})}function KFe(){const{selectedStore:e}=st();return g(P,{css:{gap:"$8"},children:[g(P,{children:[l(Wl,{children:"Preferences"}),l(A,{type:"light",children:"Edit your preferences for your store, like your products limitation."})]}),l(gze,{}),l(xze,{}),e.type==="store"&&l(fze,{}),e.type==="event"&&l(yze,{})]})}function BQ(){const e=te(),[t,n]=y.exports.useState(""),[r,i]=y.exports.useState(!1),[o,s]=y.exports.useState(!1),[a,c]=y.exports.useState(!1),[u,d]=y.exports.useState(!1),[f,h]=y.exports.useState(""),[p,m]=y.exports.useState(!1);y.exports.useEffect(()=>{i(t.length>=12),s(/[a-z]/.test(t)),c(/[A-Z]/.test(t)),d(t===f&&t.length>0&&f.length>0),m(r&&o&&a&&u)},[r,o,u,a,t,f]);const v=C=>{n(C.target.value)},b=C=>{h(C.target.value)},x=ve({mutationFn:C=>(C.preventDefault(),e.patch("/pf/settings/user/password",{password:t,repeatedPassword:f}).then(()=>{n(""),h(""),F({type:"success",title:"Update successful!",message:"Your password has been changed and you can now login using it."})}).catch(function(w){var S,T,E,k;(T=(S=w.response)==null?void 0:S.data)!=null&&T.error?F({type:"error",title:(E=w.response.data)==null?void 0:E.error.title,message:(k=w.response.data)==null?void 0:k.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})}))});return g(dt,{onSubmit:x.mutate,children:[l(Qn,{children:"Change your password"}),g(P,{children:[l("div",{children:l("strong",{children:"New password"})}),l(Ke,{type:"password",placeholder:"Enter password",value:t,onChange:v})]}),t!==""&&g(z,{children:[g(P,{children:[l("div",{children:l("strong",{children:"Confirm new password"})}),l(Ke,{type:"password",placeholder:"Enter password",value:f,onChange:b})]}),g(P,{children:[l(n4,{rule:r,message:"Password should be at least 12 characters long."}),l(n4,{rule:o,message:"Password should contain at least one lowercase letter."}),l(n4,{rule:a,message:"Password should contain at least one uppercase letter."}),l(n4,{rule:u,message:"Passwords needs to be the same."})]}),l(M,{children:l(Y,{variant:"primary",type:"submit",disabled:!p||x.isLoading,css:{marginRight:"auto"},children:"Change the password"})})]})]})}function n4({rule:e,message:t}){return g(M,{css:{color:e?"$success600":"$destructive500",alignItems:"center",gap:"$3"},children:[!e&&l(W,{icon:Ul,css:{width:20,height:20}}),e&&l(W,{icon:Pa,css:{width:20,height:20}}),t]})}function GFe(){const e=te(),{selectedStore:t}=st(),{isLoading:n,data:r}=_t(["settings","quota"],()=>e.get("/subscription/quota").then(i=>i.data));return n?l(z,{}):g(P,{css:{gap:"$8"},children:[g(Ep,{label:"Team",icon:eU,children:[l(sl,{label:"Managers",current:r.team.managers.current,max:r.team.managers.max}),l(sl,{label:"Co-Owners",current:r.team.coOwners.current,max:r.team.coOwners.max}),l(sl,{label:"Members",current:r.team.members.current,max:r.team.members.max})]}),g(Ep,{label:"Contents",icon:Iy,children:[l(sl,{label:"Products",current:r.contents.products.current,max:r.contents.products.max}),l(sl,{label:"Locations",current:r.contents.locations.current,max:r.contents.locations.max})]}),l(Ep,{label:"Mailbox",icon:tU,children:l(sl,{label:"Mails per week",current:r.mailbox.mailsPerWeek.current,max:r.mailbox.mailsPerWeek.max})}),t.role==="Creator"&&l(Ep,{label:"EasySubscribers",icon:VE,children:l(sl,{label:"Subscribers",current:r.subscribers.count.current,max:r.subscribers.count.max})}),g(Ep,{label:"Application Form",icon:Tce,children:[l(sl,{label:"Bloggers custom questions",current:r.applicationForm.customBloggersQuestions.current,max:r.applicationForm.customBloggersQuestions.max}),t.type==="event"&&l(sl,{label:"Designers custom questions",current:r.applicationForm.customDesignersQuestions.current,max:r.applicationForm.customDesignersQuestions.max})]})]})}function Ep({label:e,icon:t,children:n}){return g(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8},children:[g(Tt,{css:{borderBottom:"1px solid $borderColor",py:"$4",px:"$6"},children:[l(W,{icon:t,css:{marginRight:"$2"}}),e]}),l(P,{css:{"& > *":{py:"$4",px:"$6","&:not(:last-child)":{borderBottom:"1px solid $borderColor"}}},children:n})]})}function sl({label:e,current:t,max:n}){return g(M,{css:{alignItems:"end"},children:[l(A,{css:{flex:.3},children:e}),l(YFe,{current:t,max:n})]})}function YFe({current:e,max:t}){const n=e/t*100;return g(P,{css:{flex:.7},children:[g(M,{css:{fontSize:"12px"},children:[l(A,{css:{marginRight:"auto"},children:e}),l(A,{children:t})]}),l(uxe,{value:n,css:{width:"100%"},children:l(pw,{currentPercentage:n,color:"$amber400"})})]})}function HQ(){const e=te(),{pageTitle:t,setPageTitle:n}=Ar(),{subscription:r}=st(),{mutate:i,isLoading:o}=CBe(),[s,a]=y.exports.useState(r.type),[c,u]=y.exports.useState(null),[d,f]=y.exports.useState(null),[h,p]=y.exports.useState(null),[m,v]=y.exports.useState(null),[b,x]=y.exports.useState(null);y.exports.useEffect(()=>{r.addons&&r.addons.map(E=>{E.name.includes("-products-pack")&&p(E.name),E.name.includes("-members-pack")&&v(E.name),E.name.includes("-subscribers-pack")&&x(E.name)})},[]),y.exports.useEffect(()=>{n("Upgrade your subscription")},[t,n]),Z.extend(Pn),Z.extend(On);const C=E=>{a(E),w(null),S(null),T(null)},w=E=>{p(E===h?null:E)},S=E=>{v(E===m?null:E)},T=E=>{x(E===b?null:E)};return y.exports.useEffect(()=>{e.get("/subscription/get-quote?"+new URLSearchParams({planType:s,productsAddon:h,membersAddon:m,subscribersAddon:b})).then(E=>{u(E.data.price),f(E.data.expirationDate)})},[m,s,h,b]),g(Kl,{children:[l(ie,{to:"/settings/billing/subscription",css:{width:"fit-content"},children:"<- Go back"}),g(P,{css:{display:"flex",backgroundColor:"$cardBackgroundColor",flexDirection:"column",width:"100%",border:"1px solid $borderColor",borderRadius:8,boxShadow:"$xsmall",p:"$6",gap:"$4"},children:[l(Qn,{children:"Choose your plan"}),g(A,{children:["You are currently on the plan ",r.type,". To upgrade your plan, please select a higher plan, or purchase more add-ons that you currently have."]}),g(M,{css:{gap:"$4",justifyContent:"space-around"},children:[r.type==="free"&&l(r4,{name:"Free",description:"Use Kynno products for free, with limited features",price:0,active:s==="free",onClick:()=>C("free")}),l(r4,{name:"Starter",description:"Start to manage your bloggers and subscribers",price:500,active:s==="starter",onClick:()=>C("starter")}),l(r4,{name:"Pro",description:"Get most of all features, for bigger Second Life brands",price:900,active:s==="pro",onClick:()=>C("pro")}),l(r4,{name:"Ultra",description:"Empower your brand, for big businesses",price:1250,active:s==="ultra",onClick:()=>C("ultra")})]}),l(A,{css:{textAlign:"center"},children:l(ie,{to:"https://www.kynno.app/easybloggers/pricing?utm_source=web_subscription",target:"_blank",rel:"noopener",children:"Review the detailed features"})}),l(Qn,{css:{marginTop:"$4"},children:"Add some add-ons"}),l(A,{children:"Not quite ready to upgrade to a higher plan? EasyBloggers and EasySubscribers scale with you, get the adapted add-ons."}),l(A,{children:"Note: To remove an add-on from your subscription, click on it."}),g(M,{css:{gap:"$4",justifyContent:"space-around"},children:[l(Iu,{name:"10 Members",price:100,addonId:"10-members-pack",currentSelection:m,onClick:S}),l(Iu,{name:"25 Members",price:200,addonId:"25-members-pack",currentSelection:m,onClick:S}),l(Iu,{name:"50 Members",price:300,addonId:"50-members-pack",currentSelection:m,onClick:S})]}),g(M,{css:{gap:"$4",justifyContent:"space-around"},children:[l(Iu,{name:"20 Products",price:100,addonId:"20-products-pack",currentSelection:h,onClick:w}),l(Iu,{name:"50 Products",price:200,addonId:"50-products-pack",currentSelection:h,onClick:w}),l(Iu,{name:"150 Products",price:300,addonId:"150-products-pack",currentSelection:h,onClick:w})]}),l(M,{css:{gap:"$4",justifyContent:"space-around"},children:l(Iu,{name:"2000 subscribers",price:250,addonId:"2k-subscribers-pack",currentSelection:b,onClick:T})}),c!==null&&d!==null&&g(M,{css:{alignItems:"center",justifyContent:"space-between",marginTop:"$4"},children:[g(Ne,{children:[g(Tt,{children:["New price: L$",c," / week"]}),g(A,{children:["Your new subscription will expires ",Z().to(d)]})]}),l(Y,{variant:"primary",disabled:o||c===0,onClick:()=>i({planType:s,productsAddon:h,membersAddon:m,subscribersAddon:b}),children:"Confirm the upgrade"})]})]})]})}function r4({name:e,description:t,price:n,active:r=!1,onClick:i}){return g(P,{onClick:i,css:{p:"$6",gap:"$4",borderRadius:8,position:"relative",flex:1,transition:"all 200ms",border:r?"1px solid $yellow400":"1px solid $borderColor","&:hover":{cursor:"pointer",boxShadow:"$small",transition:"all 200ms",border:r?"1px solid $yellow400":"1px solid $gray300"}},children:[r&&l(ce,{css:{position:"absolute",right:"$6",top:"$6"},children:l(W,{icon:vE,css:{height:22,width:22,color:"$yellow400"}})}),l(br,{children:e}),l(A,{css:{fontWeight:"$semiBold",fontFamily:"$redHatDisplay"},children:t}),g(A,{children:[g(Ne,{css:{fontWeight:"$bold",fontFamily:"$redHatDisplay",fontSize:24},children:["L$",n]}),n>0&&l(Ne,{css:{color:"$gray500",marginLeft:"$2"},children:"/week"})]})]})}function Iu({name:e,price:t,addonId:n,currentSelection:r,onClick:i}){const o=n===r;return g(P,{onClick:()=>i(n),css:{p:"$6",gap:"$4",borderRadius:8,position:"relative",flex:1,transition:"all 200ms",border:o?"1px solid $yellow400":"1px solid $borderColor","&:hover":{cursor:"pointer",boxShadow:"$small",transition:"all 200ms",border:o?"1px solid $yellow400":"1px solid $gray300"}},children:[o&&l(ce,{css:{position:"absolute",right:"$6",top:"$6"},children:l(W,{icon:vE,css:{height:22,width:22,color:"$yellow400"}})}),l(br,{children:e}),g(A,{children:[g(Ne,{css:{fontWeight:"$bold",fontFamily:"$redHatDisplay",fontSize:24},children:["+L$",t]}),l(Ne,{css:{color:"$gray500",marginLeft:"$2"},children:"/week"})]})]})}function QFe(){const{subscription:e,selectedStore:t,permissions:n}=st();Z.extend(Pn),Z.extend(On);const r=e.type,i=r.charAt(0).toUpperCase()+r.slice(1),o=!(e.type==="free"&&e.addons===null);return g(P,{css:{gap:"$8",alignItems:"center"},children:[l(Qn,{css:{textAlign:"center"},children:"Current subscription"}),g(P,{css:{width:"100%"},children:[g(Tt,{children:["Your plan for ",l("strong",{children:t.name})]}),!o&&g(A,{children:["You are currently using the ",l("strong",{children:i})," plan."]}),o&&g(z,{children:[g(A,{children:["Your subscription for the plan ",l("strong",{children:i})," will expire"," ",g(Ne,{title:Z(e.expiresAt).format("LLL"),css:{color:"$yellow500"},children:[l(Ne,{css:{fontWeight:"$bold",fontSize:"1.2rem"},children:Z().to(e.expiresAt)})," "]})]}),e.addons&&g(z,{children:[l(Tt,{css:{marginTop:"$3"},children:"Your add-ons"}),l(A,{children:e.addons.map((s,a)=>l(A,{children:s.displayName},"addon-"+a))})]}),n.features.settings.billing.subscription.upgrade===!0&&g(z,{children:[l(A,{css:{color:"$gray400",fontSize:"$pmedium",fontStyle:"italic",marginTop:"$2"},children:"Note: After your plan subscription expires, you will be automatically downgraded to the free plan with limited features."}),g(P,{children:[l(ie,{to:"/settings/billing/upgrade-subscription",css:{marginTop:"$6",mx:"auto"},children:l(Y,{css:{width:"fit-content",px:"$10"},variant:"subscription",children:"Upgrade your plan or purchase add-ons"})}),l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/60/35/28",target:"_blank",css:{marginTop:"$6",mx:"auto"},children:l(Y,{css:{width:"fit-content",px:"$10"},variant:"subscription",children:"Renew your subscription"})})]})]})]})]}),l(A,{children:l(ie,{to:"https://www.kynno.app/easybloggers/pricing?utm_source=web_subscription",target:"_blank",rel:"noopener",children:"Review the detailed features and pricing"})})]})}function XFe(){return g(P,{css:{gap:"$8"},children:[g(P,{children:[l(Wl,{children:"Auto-renew"}),l(A,{type:"light",children:"Configure and activate the auto-renew feature for your store. If activated, the system will try to auto-renew every 3 hours the subscription starting 2 days before it expires."}),l(A,{type:"light",children:"To activate the feature, you will need to have at least one dropbox with a minimum version v1.4, and allowing the debit permission."})]}),l(pze,{})]})}function ZFe(){const{selectedStore:e}=st();return g(P,{css:{gap:"$8"},children:[g(P,{children:[l(Wl,{children:"Notifications"}),l(A,{type:"light",children:"For specific notifications, along the in-world local chat, EasyBloggers can send objects to notify your team when there is a specific notification to be sent. You can select an object to deliver from your Dropboxes, or click the X to remove the current object. Only Notecards and Textures will show up in the selects."})]}),l(IBe,{}),e.type==="store"&&l(NBe,{}),l(BBe,{}),l(zBe,{}),e.type==="event"&&l(VBe,{}),e.type==="event"&&l(WBe,{})]})}function JFe(){const{data:e,isLoading:t}=RBe();return g(P,{css:{gap:"$8"},children:[g(P,{children:[l(Wl,{children:"Locations"}),g(A,{type:"light",children:["Manage the locations where your products are available. Your bloggers can find where your products are and add the links of the locations to their posts on social media. See our"," ",l(ie,{to:"https://docs.kynno.app/easybloggers/settings/store-locations",target:"_blank",children:"documentation"}),"."]})]}),l(iBe,{}),l(eBe,{children:!t&&e.map((n,r)=>l(zQ,{location:n},"location-"+r))})]})}const eBe=de("div",{display:"grid",gridGap:"24px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"});function zQ({location:e,cancelCreation:t=null}){const[n,r]=y.exports.useState(!1),i=ABe(),o=jQ(),s=Ee(),a=()=>{F({type:"success",title:"Location successfully updated"})};return l(P,{css:{border:"1px solid $borderColor",p:"$4",borderRadius:8,gap:"$4",boxShadow:"$xsmall"},children:g(dt,{onSubmit:c=>{c.preventDefault();const u=new FormData(c.target),d=c.nativeEvent.submitter.value,f=u.get("name"),h=u.get("url");d==="create"?o.mutate({name:f,url:h},{onSuccess:()=>{r(!1),t(),a(),s.invalidateQueries({queryKey:["store","locations"]}),s.invalidateQueries({queryKey:["me"]})}}):i.mutate({id:e.id,name:f,url:h},{onSuccess:()=>{r(!1),a(),s.invalidateQueries({queryKey:["store","locations"]})}})},children:[l(tBe,{isUpdating:i.isLoading||o.isLoading,isEditing:n,location:e}),e!==null&&l(nBe,{isUpdating:i.isLoading,location:e,isEditing:n,setIsEditing:r}),e===null&&l(rBe,{cancelCreation:t,isUpdating:o.isLoading})]})})}function tBe({location:e,isEditing:t,isUpdating:n}){const r=e===null?"":e.name,i=e===null?"":e.url;return g(P,{css:{gap:"$2"},children:[e&&!t&&g(z,{children:[l(Tt,{children:r}),l(A,{type:"light",children:l(I6e,{url:i})})]}),(!e||t)&&g(z,{children:[g(P,{children:[l(ae,{children:"Name"}),l(Ke,{name:"name",type:"text",placeholder:"Event, mainstore, etc\u2026",autoComplete:"off",readOnly:n,defaultValue:r})]}),g(P,{children:[l(ae,{children:"URL"}),l(Ke,{name:"url",type:"text",autoComplete:"off",readOnly:n,defaultValue:i,placeholder:"Marketplace, or maps.secondlife.com"})]})]})]})}function nBe({location:e,isEditing:t,setIsEditing:n,isUpdating:r}){return g(M,{css:{gap:"$2",justifyContent:"flex-end",alignItems:"center"},children:[!e&&g(z,{children:[l(Y,{type:"button",variant:"onlyTextGray",css:{py:0,px:"$2"},onClick:()=>n(!1),children:"Cancel"}),l(Y,{disabled:r,name:"submitButton",value:"create",variant:"primary",type:"submit",children:"Create the location"})]}),e&&t&&g(z,{children:[l(Y,{type:"button",variant:"onlyTextGray",css:{py:0,px:"$2"},onClick:()=>n(!1),children:"Cancel"}),l(Y,{disabled:r,name:"submitButton",value:"save",variant:"primary",type:"submit",children:"Save the location"})]}),!t&&g(z,{children:[l(oBe,{location:e,children:l(Y,{variant:"onlyTextGray",css:{py:0,px:"$2"},type:"button",children:"Archive"})}),l(Y,{type:"button",variant:"onlyTextPrimary",css:{py:0,px:"$2"},onClick:()=>n(!0),children:"Edit"})]})]})}function rBe({cancelCreation:e,isUpdating:t}){return g(M,{css:{gap:"$2",justifyContent:"flex-end",alignItems:"center"},children:[l(Y,{type:"button",variant:"onlyTextGray",css:{py:0,px:"$2"},onClick:e,children:"Cancel"}),l(Y,{disabled:t,name:"submitButton",value:"create",variant:"primary",type:"submit",children:"Create the location"})]})}function iBe(){const[e,t]=y.exports.useState(!1),{quota:n}=st(),r=n.locations.canCreate,i={cursor:"not-allowed",boxShadow:"$xsmall",color:"$textColor",border:"1px dashed $borderColor"},o={cursor:"pointer",boxShadow:"$xsmall",color:"$textColor",border:"1px dashed $borderColor"};return e?l(zQ,{location:null,cancelCreation:()=>t(!1)}):l(Tm,{content:l(pxe,{}),openDelay:0,disabled:r,children:g(P,{css:{gap:"$2",borderRadius:8,border:"1px dashed $borderColor",color:"$gray400",py:"$4",justifyContent:"center",alignItems:"center",transition:"all 200ms","&:hover":{transition:"all 200ms",...r?o:i}},onClick:()=>{r&&t(!0)},children:[l(W,{icon:oU,css:{height:32,width:32}}),l(A,{children:"Create a location"})]})})}function oBe({children:e,location:t}){const[n,r]=y.exports.useState(!1),i=Ee(),o=$Be(),s=()=>{r(!1),F({type:"success",title:"Location archived"}),i.invalidateQueries({queryKey:["store","locations"]}),i.invalidateQueries({queryKey:["me"]})};return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Archive a location"}),g(ht,{children:[g("p",{children:["You are about to archive the location ",l("strong",{children:t.name}),"."]}),l("p",{children:"Do you want to continue and archive this location? Keep in mind that if this location is used, it will still show on older products."})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",type:"button",children:"Cancel"})}),l(Y,{disabled:o.isLoading,variant:"danger",type:"button",onClick:()=>o.mutate(t,{onSuccess:s}),children:"Archive the location"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function S9(){const e=te();return _t(["store","preferences"],()=>e.get("/settings/store/preferences").then(t=>t.data))}function E9(){const e=Ee(),t=te();return ve(i=>t.patch("/settings/store/preferences/"+P6(i.key),{value:i.value}),{onMutate:i=>{const o=e.getQueryData(["store","preferences"]);return e.setQueryData(["store","preferences"],s=>({...s,[O6(i.key)]:i.value})),{previousLocations:o}},onError:(i,o,s)=>{Rt(i),s!=null&&s.previousPreferences&&e.setQueryData(["store","preferences"],s.previousPreferences)}})}function UQ({filter:e=null,all:t=!1,dropbox:n=null}){const r=te();let i=null;e&&(i={...i,type:e.toString()}),t&&(i={...i,includeAll:t.toString()}),n&&(i={...i,dropbox:n.id});const o=i?"/inventory?"+new URLSearchParams(i).toString():"/inventory",s=n?["inventory",n.id]:["inventory"];return _t(s,()=>r.get(o).then(a=>a.data))}function sBe(){const e=te(),t=Ee();return ve(n=>e.patch("/subscribers/newsletters/"+n.id,n),{onError:n=>Rt(n),onSuccess:(n,r)=>{F({type:"success",title:"The newsletter has been successfully saved"}),t.setQueryData(["newsletters",r.id],()=>r);const i=t.getQueryData(["newsletters"])||[],o=i[r.status].findIndex(s=>r.id===s.id);if(o!==-1){const s=i;s[r.status][o]=r,t.setQueryData(["newsletters"],s)}}})}function aBe(){const e=te();return ve(({id:t,reason:n})=>e.patch("/subscribers/unsubscribe/"+t+"/confirm",{reason:n}),{onError:t=>Rt(t)})}function lBe({hash:e,user:t}){const n=te();return _t(["unsubscribe"],{queryFn:async()=>await n.get("/subscribers/unsubscribe/"+t+"/"+e).then(r=>r.data),retry:0})}function cBe(){const e=te(),t=Ee();return ve(n=>e.patch("/subscribers/newsletters/"+n.id+"/publish",n),{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"The newsletter has been successfully published and will soon start sending to your subscribers."}),t.invalidateQueries({queryKey:["newsletters"]})}})}function uBe(){const e=te(),t=Ee();return ve(n=>e.patch("/subscribers/newsletters/"+n.id+"/pause",n),{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"The newsletter has been successfully paused, you are now able to edit it, or archive it."}),t.invalidateQueries({queryKey:["newsletters"]})}})}function dBe(){const e=te();return _t(["store","auto-renew"],()=>e.get("/settings/store/auto-renew").then(t=>t.data))}function fBe(){const e=te(),t=Ee();return ve(n=>e.post("/subscribers/newsletters",n),{onError:n=>Rt(n),onSuccess:(n,r)=>{F({type:"success",title:"The newsletter has been successfully created"});const i=t.getQueryData(["newsletters"])||[];i.draft||(i.draft=[]),r={...r,status:"draft"},i.draft.push(r),t.setQueryData(["newsletters"],i)}})}function hBe(){const e=te(),t=Ee();return ve(n=>e.delete("/subscribers/newsletters/"+n.id,n),{onError:n=>Rt(n),onSuccess:(n,r)=>{F({type:"success",title:"The newsletter has been successfully archived"}),t.setQueryData(["newsletters",r.id],()=>null);const i=t.getQueryData(["newsletters"])||[],o=Object.keys(i).findIndex(s=>i[s].some(c=>c.id===r.id));if(o!==-1){const s=i;s[r.status].splice(o-1,o-1),s[r.status]=[...s[r.status].slice(0,o-1),...s[r.status].slice(o)],t.setQueryData(["newsletters"],s)}}})}function pBe(){const e=te();return ve(t=>{var i,o;const n=t.locations.map(s=>s.id),r={productName:t.name,productPictureUuid:t.pictureUuid,productToDeliverName:t.objectToDeliver.name,productToDeliverType:t.objectToDeliver.type,demoToDeliverName:(i=t.demoToDeliver)==null?void 0:i.name,demoToDeliverType:(o=t.demoToDeliver)==null?void 0:o.type,deadlineInDays:t.deadlineInDays,autoDeadline:t.autoDeadline,productComment:t.comment,optionalBlogging:t.optionalBlogging,priority:t.priority,locations:n,event:t.event};return t.id?e.patch("/products/"+t.id,r):e.post("/products",r)})}function mBe({minimalVersion:e}){const t=te(),n="/dropboxes/select?minimalVersion="+e;return _t(["dropboxes-select"],()=>t.get(n).then(r=>r.data))}function VQ({id:e}){const t=te();return _t(["entity-public",e],()=>t.get("/entity/public/"+e).then(n=>n.data),{enabled:!1})}function gBe(){const e=te();return ve(t=>e.post("/subscribers/subscribers/import-csv",t,{headers:{"Content-Type":"multipart/form-data"}}),{onSuccess:t=>{F({type:"success",title:t.data.title,message:t.data.message})},onError:t=>{var n,r,i;(n=t.response.data)!=null&&n.error?F({type:"error",title:(r=t.response.data)==null?void 0:r.error.title,message:(i=t.response.data)==null?void 0:i.error.message}):F({type:"error",title:"Unexpected error",message:"We were unable to import your subscribers. Please reload your page and try again."})}})}function vBe(){const e=te();return ve(t=>e.post("/subscribers/subscribers",{value:t}),{onSuccess:()=>{F({type:"success",title:"Subscriber added",message:"Your subscriber has been successfully added to your listing."})},onError:t=>{var n,r,i;(n=t.response.data)!=null&&n.error?F({type:"error",title:(r=t.response.data)==null?void 0:r.error.title,message:(i=t.response.data)==null?void 0:i.error.message}):F({type:"error",title:"Unexpected error",message:"We were unable to add the subscriber. Please make sure the name exists in-world."})}})}function yBe(){const e=te(),[t]=Jn();return zl(["stores-and-events"],({pageParam:n=1})=>e.get("/stores-and-events?page="+n+"&"+t.toString()).then(r=>r.data),{getPreviousPageParam:n=>{var r;return(r=n.previousId)!=null?r:void 0},getNextPageParam:n=>{if(!(t.get("search")!==""&&t.get("search")!==null||n.currentPage+1>n.maxPages))return n.currentPage+1}})}function bBe(){const e=te();return _t(["stores-select"],()=>e.get("/stores-select").then(t=>t.data))}function xBe(){const e=te();return ve(t=>e.delete("/subscribers/subscribers/"+t.id),{onSuccess:()=>{F({type:"success",title:"Subscriber unactive",message:"Your subscriber has been successfully unsubscribed from your listing. They will no longer receive your newsletter"})},onError:()=>{F({type:"error",title:"Unexpected error",message:"We were unable to remove the subscriber from your listing. Please refresh your page and try again."})}})}function CBe(){const e=te(),t=Ee();return ve(n=>e.post("/subscription/upgrade",n),{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"Upgrade successful.",message:"Your subscription has been correctly upgraded. You can now enjoy your new limits, thank you for your trust."}),t.invalidateQueries({queryKey:["me"]})}})}function wBe(){const e=te();return ve(r=>e.post("/deliver-product",{product:r}),{onError:r=>{var i,o,s;(i=r.response.data)!=null&&i.error?F({type:"error",title:(o=r.response.data)==null?void 0:o.error.title,message:(s=r.response.data)==null?void 0:s.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})},onSuccess:()=>{F({type:"success",title:"Delivery successful",message:"The product has been delivered, please check your inventory."})}})}function SBe(){const e=te();return _t(["products-select"],()=>e.get("/products-available").then(t=>t.data))}function EBe(){const e=te();return _t(["members-select"],()=>e.get("/bloggers-select").then(t=>t.data))}function TBe(){const e=te();return ve(r=>e.post("/deliver-product-demo",{product:r}),{onError:r=>{var i,o,s;(i=r.response.data)!=null&&i.error?F({type:"error",title:(o=r.response.data)==null?void 0:o.error.title,message:(s=r.response.data)==null?void 0:s.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})},onSuccess:()=>{F({type:"success",title:"Delivery successful",message:"The demo of this product has been delivered, please check your inventory."})}})}function kBe(){const e=te(),[t]=Jn();return zl(["users"],({pageParam:n=1})=>e.get("/user/users?page="+n+"&"+t.toString()).then(r=>r.data),{getPreviousPageParam:n=>{var r;return(r=n.previousId)!=null?r:void 0},getNextPageParam:n=>{if(!(t.get("search")!==""&&t.get("search")!==null||n.currentPage+1>n.maxPages))return n.currentPage+1}})}function _Be(){const e=te();return _t(["products"],async()=>await e.get("/products").then(t=>t.data))}function ABe(){const e=te();return ve(t=>e.patch("/settings/store/locations/"+t.id,{name:t.name,url:t.url}),{onError:t=>Rt(t)})}function $Be(){const e=te();return ve(t=>e.delete("/settings/store/locations/"+t.id))}function jQ(){const e=te();return ve(t=>e.post("/settings/store/locations",{name:t.name,url:t.url}),{onError:t=>Rt(t)})}function DBe(){const e=te(),t=Ee(),{user:n}=st();return ve(r=>{r.preventDefault();const i=new FormData(r.target),o=i.get("daysAway"),s=i.get("status");return e.post("/user/update-status",{daysAway:parseInt(o),status:s})},{onError:r=>Rt(r),onSuccess:()=>{F({type:"success",title:"Your status has been changed."}),t.invalidateQueries({queryKey:["me"]}),t.invalidateQueries({queryKey:["posts"]}),t.invalidateQueries({queryKey:["user",n.id]})}})}function OBe(){const e=te(),t=Ee(),{user:n}=st();return ve(r=>(r.preventDefault(),e.delete("/user/update-status")),{onError:r=>Rt(r),onSuccess:()=>{F({type:"success",title:"Welcome back.",message:"Your status has been canceled."}),t.invalidateQueries({queryKey:["me"]}),t.invalidateQueries({queryKey:["user",n.id]})}})}function PBe({id:e}){const t=te();return _t(["store-public",e],()=>t.get("/store/public/"+e).then(n=>n.data),{enabled:!1})}function RBe(){const e=te();return _t(["store","locations"],async()=>await e.get("/settings/store/locations").then(t=>t.data))}function MBe(){const e=Ee(),t=te();return ve(i=>t.patch("/settings/store/auto-renew/"+P6(i.key),{value:i.value}),{onMutate:i=>{const o=e.getQueryData(["store","auto-renew"]);return e.setQueryData(["store","auto-renew"],s=>({...s,[O6(i.key)]:i.value})),{previousAutoRenew:o}},onError:(i,o,s)=>{Rt(i),s!=null&&s.previousAutoRenew&&e.setQueryData(["store","auto-renew"],s.previousAutoRenew)}})}function Vh(){const e=te();return _t(["store","notifications"],()=>e.get("/settings/store/notifications").then(t=>t.data))}function jh(){const e=Ee(),t=te();return ve(o=>{var s,a;return t.patch("/settings/store/notifications/"+P6(o.key),{type:(s=o.value)==null?void 0:s.type,name:(a=o.value)==null?void 0:a.name})},{onMutate:o=>{const s=e.getQueryData(["store","notifications"]);return e.setQueryData(["store","notifications"],a=>({...a,[O6(o.key)]:o.value})),{previousNotifications:s}},onError:(o,s,a)=>{Rt(o),a!=null&&a.previousNotifications&&e.setQueryData(["store","notifications"],a.previousNotifications)},onSuccess:()=>{F({type:"success",title:"Object to deliver updated"})}})}function IBe(){return l(ai,{title:"New Mail",description:l(z,{children:l(A,{children:"Trigger when a new Mail is created by the creator or the manager. Editing an existing Mail won't send any notification."})}),children:l(LBe,{})})}function LBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"new-mail",value:i}),value:e?null:t.newMail,menuPortalTarget:document.body,isClearable:!0})}function NBe(){return l(ai,{title:"New Product",description:l(z,{children:l(A,{children:"Trigger when a new Product is created by the creator or the manager. Editing an existing Product won't send any notification."})}),children:l(FBe,{})})}function FBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"new-product",value:i}),value:e?null:t.newProduct,menuPortalTarget:document.body,isClearable:!0})}function BBe(){return l(ai,{title:"Application Accepted",description:l(z,{children:l(A,{children:"Trigger when a blogger get accepted from their Application."})}),children:l(HBe,{})})}function HBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"blogger-application-accepted",value:i}),menuPortalTarget:document.body,isClearable:!0,value:e?null:t.bloggerApplicationAccepted})}function zBe(){return l(ai,{title:"Application Rejected",description:l(z,{children:l(A,{children:"Trigger when a blogger get rejected from their Application."})}),children:l(UBe,{})})}function UBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"blogger-application-rejected",value:i}),value:e?null:t.bloggerApplicationRejected,menuPortalTarget:document.body,isClearable:!0})}function VBe(){return l(ai,{title:"Designer Application Accepted",description:l(z,{children:l(A,{children:"Trigger when a designer get accepted from their Application for your event."})}),children:l(jBe,{})})}function jBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"designer-application-accepted",value:i}),menuPortalTarget:document.body,isClearable:!0,value:e?null:t.designerApplicationAccepted})}function WBe(){return l(ai,{title:"Designer Application Rejected",description:l(z,{children:l(A,{children:"Trigger when a designer get rejected from their Application for your event."})}),children:l(qBe,{})})}function qBe(){const{isLoading:e,data:t}=Vh(),{isLoading:n,mutate:r}=jh();return l(Gl,{firstLoad:e,isDisabled:e||n,options:e?null:t.inventory,onChange:i=>r({key:"designer-application-rejected",value:i}),menuPortalTarget:document.body,isClearable:!0,value:e?null:t.designerApplicationRejected})}function KBe({open:e,setOpen:t,children:n}){const{activeStatus:r}=st();return g(Ye,{open:e,onOpenChange:t,children:[l(pt,{asChild:!0,children:n}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:i=>i.preventDefault(),children:[r===null&&l(GBe,{setOpen:t}),r!==null&&l(YBe,{setOpen:t}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function GBe({setOpen:e}){const t=DBe();return g(z,{children:[l(nt,{children:"Update your status"}),g(ht,{children:[l(A,{children:"You may need to be away for a few days. Updating your status will let your team(s) know why and how many days."}),l(A,{children:"It will lead to extending all of your deadlines if any is in progress. Ensure you write a clear message to let your sponsor know why you're away."})]}),g(dt,{onSubmit:n=>t.mutate(n,{onSuccess:()=>e(!1)}),children:[g(P,{children:[l(ae,{children:"What's going on?"}),l(Ke,{name:"status",placeholder:"Taking a few days off because\u2026",maxLength:250,autoComplete:"off"})]}),g(P,{children:[l(ae,{children:"How many days would you be away?"}),l(Ke,{name:"daysAway",type:"number",defaultValue:7,min:1,max:365})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:t.isLoading,variant:"primary",children:"Update your status"})]})]})]})}function YBe({setOpen:e}){const t=OBe(),{activeStatus:n}=st();return g(z,{children:[l(nt,{children:"Cancel current status"}),g(ht,{children:[l(A,{children:"You have an active status, are you back? This won't change your current deadlines."}),g(P,{children:[l(ae,{children:"Status"}),l(A,{children:n.status})]}),g(P,{children:[l(ae,{children:"Expiration date"}),l(A,{children:Z(n.expirationDate).format("LLL")})]})]}),l(dt,{onSubmit:r=>t.mutate(r,{onSuccess:()=>e(!1)}),children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:t.isLoading,variant:"primary",children:"Yes I'm back"})]})})]})}function ai({children:e,title:t,description:n}){return g(P,{children:[l(Tt,{children:t}),g(M,{css:{gap:"$2",alignContent:"flex-start"},children:[l(A,{type:"light",css:{flex:1},children:n}),l(ce,{css:{marginLeft:"$5"},children:e})]})]})}function QBe({productId:e}){const{isLoading:t,mutate:n}=wBe();return l(Y,{css:{width:"100%",justifyContent:"center"},variant:"primary",disabled:t,type:"button",onClick:r=>{r.preventDefault(),n(e)},children:"Request delivery"})}function XBe({productId:e}){const{isLoading:t,mutate:n}=TBe();return l(Y,{css:{width:"100%",justifyContent:"center"},variant:"primary",disabled:t,type:"button",onClick:r=>{r.preventDefault(),n(e)},children:"Request demo"})}function ZBe({size:e=42}){return g("svg",{width:e,height:e,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("rect",{width:"42",height:"42",rx:"21",fill:"#FFB63B"}),l("g",{clipPath:"url(#clip0_58_867)",children:l("path",{d:"M20.9993 13.8608L22.0923 14.9538L29.8304 22.6919L30.9282 23.7898L28.7373 25.9806L27.6443 24.8876L20.9993 18.2425L14.3542 24.8828L13.2612 25.9806L11.0703 23.7898L12.1633 22.6968L19.9014 14.9587L20.9993 13.8608Z",fill:"white"})}),l("defs",{children:l("clipPath",{id:"clip0_58_867",children:l("rect",{width:"20",height:"12.5",fill:"white",transform:"translate(11 13.75)"})})})]})}function JBe({size:e=42}){return g("svg",{width:e,height:e,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("rect",{width:"42",height:"42",rx:"21",fill:"#3B85BC"}),l("circle",{cx:"21",cy:"21",r:"8",stroke:"white",strokeWidth:"4"})]})}function eHe({size:e=42}){return g("svg",{width:e,height:e,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("rect",{width:"42",height:"42",rx:"21",fill:"#EF4444"}),l("g",{clipPath:"url(#clip0_58_226)",children:l("path",{d:"M22.101 10.4581L21.0003 9.35254L19.8997 10.4581L12.1075 18.2503L11.002 19.3509L13.2081 21.5571L14.3088 20.4564L21.0003 13.7649L27.6919 20.4516L28.7925 21.5571L30.9987 19.3509L29.8981 18.2503L22.1058 10.4581H22.101ZM22.101 19.8087L21.0003 18.7032L19.8997 19.8038L12.1075 27.596L11.002 28.7016L13.2081 30.9077L14.3088 29.8071L21.0003 23.1155L27.6919 29.8022L28.7925 30.9077L30.9987 28.7016L29.8981 27.6009L22.1058 19.8087H22.101Z",fill:"white"})}),l("defs",{children:l("clipPath",{id:"clip0_58_226",children:l("rect",{width:"20",height:"21.8182",fill:"white",transform:"translate(11 9.09082)"})})})]})}function E0({priority:e,size:t,label:n=!1}){return l(Et,{enabled:n===!1,small:!0,content:g(ce,{children:["Priority: ",{10:"normal",20:"high",30:"very high"}[e.toString()]]}),children:g(M,{css:{marginRight:"$1",alignItems:"center",gap:"$2"},children:[e===30&&l(eHe,{size:t}),e===20&&l(ZBe,{size:t}),e===10&&l(JBe,{size:t}),n&&e===30&&l(A,{children:"Very high"}),n&&e===20&&l(A,{children:"High"}),n&&e===10&&l(A,{children:"Normal"})]})})}function tHe({product:e,open:t,setOpen:n}){const r=te(),i=Ee(),o=e.pictureUuid!==null;function s(){n(!1),r.post("/deliver-product",{product:e.id}).then(()=>{i.invalidateQueries({queryKey:["products"]}),F({type:"success",title:"Product requested.",message:"The product is being delivered. Please wait allow a few seconds to receive it inworld."})}).catch(function(c){var u,d,f;(u=c.response.data)!=null&&u.error?F({type:"error",title:(d=c.response.data)==null?void 0:d.error.title,message:(f=c.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}function a(){r.post("/deliver-product-demo",{product:e.id}).then(()=>{i.invalidateQueries({queryKey:["products"]}),F({type:"success",title:"Delivery successful",message:"The demo of this product has been delivered, please check your inventory."}),n(!1)}).catch(function(c){var u,d,f;(u=c.response.data)!=null&&u.error?F({type:"error",title:(d=c.response.data)==null?void 0:d.error.title,message:(f=c.response.data)==null?void 0:f.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}return l(Ye,{open:t,onOpenChange:n,children:g(Qe,{children:[l(Xe,{}),g(Ze,{size:o?"large":"regular",onOpenAutoFocus:c=>c.preventDefault(),children:[l(nt,{children:"Deliver the product"}),l(ht,{css:{marginBottom:0},children:l(M,{css:{display:"flex",justifyContent:"normal",gap:"$6"},children:g(M,{css:{gap:"$2","@md":{flexDirection:"column"}},children:[o&&l(M,{css:{flexShrink:0},children:l(P,{css:{gap:"$2",maxWidth:650,minWidth:650,"@md":{maxWidth:"100%",width:"100%"}},children:l(rHe,{product:e})})}),g(P,{children:[g(Tt,{children:["Product name"," ",l(Et,{enabled:!0,content:l("span",{children:"Copy"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{px:"$1",cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(e.name).then(()=>F({type:"success",title:"The product name "+e.name+" has been copied to your clipboard"}))},children:l(W,{icon:y3,css:{color:"$gray400",width:12}})})})]}),l(A,{children:e.name}),e.locations.length>0&&g(z,{children:[l(Tt,{css:{marginTop:"$4"},children:"Locations"}),l(P,{css:{gap:"$4"},children:e.locations.map((c,u)=>g(ce,{children:[g(A,{css:{fontWeight:"bold"},children:[c.name," ",l(Et,{enabled:!0,content:l("span",{children:"Copy the URL"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{px:"$1",cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(c.url).then(()=>F({type:"success",title:"The location URL for "+c.name+" has been copied to your clipboard"}))},children:l(W,{icon:y3,css:{color:"$gray400",width:12}})})})]}),l(ie,{to:c.url,target:"_blank",children:c.url})]},"location-"+u))})]}),e.comment&&g(ce,{children:[l(Tt,{css:{marginTop:"$4"},children:"Comment"}),l("p",{children:e.comment.split(`
`).map((c,u)=>g(Ae.Fragment,{children:[c,l("br",{})]},u))})]}),e.priority&&g(ce,{children:[l(Tt,{css:{marginTop:"$4"},children:"Priority"}),l(A,{children:l(Ne,{children:l(E0,{priority:e.priority,size:14,label:!0})})})]}),l(nHe,{product:e}),g(M,{css:{height:"100%",marginTop:"$6",marginLeft:"auto",alignItems:"end",gap:"$4"},children:[e.demoToDeliver&&l(Y,{variant:"gray",onClick:a,children:"Request demo"}),l(Y,{variant:"primary",onClick:s,children:"Deliver the product"})]})]})]})})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function nHe({product:e}){const t=e.optionalBlogging,n=e.deadlineInDays&&e.deadlineInDays>0,r=e.autoDeadline&&e.autoDeadline>0,i=!r&&!n,o=e.isFriend;return g(P,{css:{marginTop:"$4"},children:[l(Tt,{children:"Deadline"}),!o&&n&&!t&&g(P,{css:{gap:"$2"},children:[g(A,{children:["This product has a deadline associated to it. If you request this product, you will need to blog about it before"," ",l("strong",{children:Z().add(e.deadlineInDays,"days").format("LLL")}),"."]}),l(A,{children:"Are you certain you want to request this product now?"})]}),!o&&r&&!t&&g(P,{css:{gap:"$2"},children:[g(A,{children:["This product has an auto-deadline associated to it. If you request this product, you will need to blog it every"," ",g("strong",{children:[e.autoDeadline," days"]}),", starting just after the delivery."]}),g(A,{children:["Once your first post has been rejected or accepted, a new post with a deadline of ",g("strong",{children:[e.autoDeadline," days"]})," will be created."]}),l(A,{}),l(A,{children:"Are you certain you want to request this product now?"})]}),!o&&i&&!t&&l(A,{children:"While there is no specific deadline associated with this product, a post will be automatically created."}),o&&!t&&l(A,{children:"You are a friend for this store, you can freely take this product."}),!o&&t&&l(A,{children:"This product is free to take, while you will be able to create a poste about it, it won't automatically create a new post upon delivery."})]})}function rHe({product:e}){const t=e.pictureUuid!==null?e.pictureUuid:"product";return t==="product"?l(z,{}):l(Dt,{loading:"lazy",src:kn({uuid:t,size:1024}),css:{objectFit:"contain",width:"70%",mx:"auto",borderRadius:4,"@sm":{height:300}}})}function iHe({product:e,open:t,setOpen:n}){const r=te(),i=Ee(),o=e.pictureUuid!==null;function s(){n(!1),r.post("/deliver-product",{product:e.id}).then(()=>{i.invalidateQueries({queryKey:["products"]}),F({type:"success",title:"Product requested.",message:"The product is being delivered. Please wait allow a few seconds to receive it inworld."})}).catch(function(u){var d,f,h;(d=u.response.data)!=null&&d.error?F({type:"error",title:(f=u.response.data)==null?void 0:f.error.title,message:(h=u.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}function a(u){n(!1),r.delete("/products/remove-from-event/"+u).then(()=>{i.invalidateQueries({queryKey:["products"]}),F({type:"success",title:"Product removed successfully.",message:"The product has been removed successfully from your event, your bloggers are not able to request it anymore."})}).catch(function(d){var f,h,p;(f=d.response.data)!=null&&f.error?F({type:"error",title:(h=d.response.data)==null?void 0:h.error.title,message:(p=d.response.data)==null?void 0:p.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}function c(){r.post("/deliver-product-demo",{product:e.id}).then(()=>{i.invalidateQueries({queryKey:["products"]}),F({type:"success",title:"Delivery successful",message:"The demo of this product has been delivered, please check your inventory."}),n(!1)}).catch(function(u){var d,f,h;(d=u.response.data)!=null&&d.error?F({type:"error",title:(f=u.response.data)==null?void 0:f.error.title,message:(h=u.response.data)==null?void 0:h.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}return l(Ye,{open:t,onOpenChange:n,children:g(Qe,{children:[l(Xe,{}),g(Ze,{size:o?"large":"regular",onOpenAutoFocus:u=>u.preventDefault(),children:[l(ht,{css:{marginBottom:0},children:l(M,{css:{display:"flex",justifyContent:"normal",gap:"$6"},children:g(M,{css:{gap:"$2","@md":{flexDirection:"column"}},children:[o&&l(M,{css:{flexShrink:0},children:l(P,{css:{gap:"$2",maxWidth:650,minWidth:650,"@md":{maxWidth:"100%",width:"100%"}},children:l(oHe,{product:e})})}),g(P,{css:{gap:"$4"},children:[g(ce,{children:[g(Tt,{children:["Product name"," ",l(Et,{enabled:!0,content:l("span",{children:"Copy"}),children:l(Ne,{"data-prevent-card-actions":!0,css:{px:"$1",cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(e.name).then(()=>F({type:"success",title:"The product name "+e.name+" has been copied to your clipboard"}))},children:l(W,{icon:y3,css:{color:"$gray400",width:12}})})})]}),l(A,{children:e.name})]}),g(ce,{children:[l(Tt,{children:"Store"}),l(Dn,{store:{id:e.store.id,name:e.store.name,pictureUuid:e.store.pictureUuid}})]}),e.comment&&g(ce,{children:[l(Tt,{css:{marginTop:"$4"},children:"Comment"}),l("p",{children:e.comment.split(`
`).map((u,d)=>g(Ae.Fragment,{children:[u,l("br",{})]},d))})]}),g(M,{css:{height:"100%",marginTop:"$6",alignItems:"end",gap:"$4"},children:[e.demoToDeliver&&l(Y,{variant:"gray",onClick:c,children:"Request demo"}),l(Y,{variant:"gray",onClick:()=>a(e.id),children:"Remove from event"}),l(Y,{variant:"primary",onClick:s,children:"Deliver the product"})]})]})]})})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function oHe({product:e}){const t=e.pictureUuid!==null?e.pictureUuid:"product";return t==="product"?l(z,{}):l(Dt,{loading:"lazy",src:kn({uuid:t,size:1024}),css:{objectFit:"contain",width:"70%",mx:"auto",borderRadius:4,"@sm":{height:300}}})}function af({fieldLabel:e,fieldHelpText:t=null,formInputType:n,...r}){return g(P,{children:[l(ae,{children:e}),t&&l(ae,{type:"help",children:t}),n==="textarea"&&l(Ti,{...r}),n==="simple-input"&&l(Ke,{...r})]})}var sHe={year:0,month:1,day:2,hour:3,minute:4,second:5},jL={},aHe=function(t,n){n===void 0&&(n={});var r=n.timeZoneName||"short",i=t+"|"+r,o=jL[i];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),jL[i]=o),o};const T9=function(e,t,n){var r,i=function(d,f,h){h===void 0&&(h={});var p=new Date(d),m=aHe(f,h);return m.formatToParts(p)},o=function(d,f){for(var h=i(d,f),p=[],m=0;m<h.length;m+=1){var v=h[m],b=v.type,x=v.value,C=sHe[b];C>=0&&(p[C]=parseInt(x,10))}var w=p[3],S=w===24?0:w,T=p[0]+"-"+p[1]+"-"+p[2]+" "+S+":"+p[4]+":"+p[5]+":000",E=n.utc(T).valueOf(),k=+d,_=k%1e3;return k-=_,(E-k)/6e4},s=function(d,f,h){var p=d-f*60*1e3,m=o(p,h);if(f===m)return[p,f];p-=(m-f)*60*1e3;var v=o(p,h);return m===v?[p,m]:[d-Math.min(m,v)*60*1e3,Math.max(m,v)]},a=t.prototype;a.tz=function(u,d){u===void 0&&(u=r);var f=this.utcOffset(),h=this.toDate(),p=h.toLocaleString("en-US",{timeZone:u}),m=Math.round((h-new Date(p))/1e3/60),v=n(p,{locale:this.$L}).$set(Py,this.$ms).utcOffset(-Math.round(h.getTimezoneOffset()/15)*15-m,!0);if(d){var b=v.utcOffset();v=v.add(f-b,va)}return v.$x.$timezone=u,v},a.offsetName=function(u){var d=this.$x.$timezone||n.tz.guess(),f=i(this.valueOf(),d,{timeZoneName:u}).find(function(h){return h.type.toLowerCase()==="timezonename"});return f&&f.value};var c=a.startOf;a.startOf=function(u,d){if(!this.$x||!this.$x.$timezone)return c.call(this,u,d);var f=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L}),h=c.call(f,u,d);return h.tz(this.$x.$timezone,!0)},n.tz=function(u,d,f){var h=f&&d,p=f||d||r,m=o(+n(),p);if(typeof u!="string")return n(u).tz(p);var v=n.utc(u,h).valueOf(),b=s(v,m,p),x=b[0],C=b[1],w=n(x).utcOffset(C);return w.$x.$timezone=p,w},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(u){r=u}};var lHe=/[+-]\d\d(?::?\d\d)?/g,cHe=/([+-]|\d\d)/g;function uHe(e){e===void 0&&(e="");var t=e.match(lHe);if(!t)return null;var n=(""+t[0]).match(cHe)||["-",0,0],r=n[0],i=n[1],o=n[2],s=+i*60+ +o;return s===0?0:r==="+"?s:-s}const k9=function(e,t,n){var r=t.prototype;n.utc=function(f){var h={date:f,utc:!0,args:arguments};return new t(h)},r.utc=function(f){var h=n(this.toDate(),{locale:this.$L,utc:!0});return f?h.add(this.utcOffset(),va):h},r.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var i=r.parse;r.parse=function(f){f.utc&&(this.$u=!0),this.$utils().u(f.$offset)||(this.$offset=f.$offset),i.call(this,f)};var o=r.init;r.init=function(){if(this.$u){var f=this.$d;this.$y=f.getUTCFullYear(),this.$M=f.getUTCMonth(),this.$D=f.getUTCDate(),this.$W=f.getUTCDay(),this.$H=f.getUTCHours(),this.$m=f.getUTCMinutes(),this.$s=f.getUTCSeconds(),this.$ms=f.getUTCMilliseconds()}else o.call(this)};var s=r.utcOffset;r.utcOffset=function(f,h){var p=this.$utils(),m=p.u;if(m(f))return this.$u?0:m(this.$offset)?s.call(this):this.$offset;if(typeof f=="string"&&(f=uHe(f),f===null))return this;var v=Math.abs(f)<=16?f*60:f,b=this;if(h)return b.$offset=v,b.$u=f===0,b;if(f!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();b=this.local().add(v+x,va),b.$offset=v,b.$x.$localOffset=x}else b=this.utc();return b};var a=r.format,c="YYYY-MM-DDTHH:mm:ss[Z]";r.format=function(f){var h=f||(this.$u?c:"");return a.call(this,h)},r.valueOf=function(){var f=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-f*j4},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var u=r.toDate;r.toDate=function(f){return f==="s"&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var d=r.diff;r.diff=function(f,h,p){if(f&&this.$u===f.$u)return d.call(this,f,h,p);var m=this.local(),v=n(f).local();return d.call(m,v,h,p)}};Z.extend(k9);Z.extend(T9);const dHe="America/Los_Angeles",WQ=y.exports.forwardRef(function({onValueChange:e,defaultInputValue:t,...n},r){const[i,o]=y.exports.useState(t!=null?t:""),[s,a]=y.exports.useState(""),c=Z.tz.guess();y.exports.useEffect(()=>{if(i){const f=Z.tz(i,dHe).tz(c).format("MMMM D, YYYY h:mm A");a(f)}},[i,c]);const u=d=>{o(d.target.value)};return g(ce,{children:[l(Ke,{type:"datetime-local",value:i,ref:r,onChange:d=>{u(d),e&&e(d.target.value)},...n}),s!==""&&g(M,{css:{color:"$gray500",mt:"$1",gap:"$1",alignItems:"center"},children:[l(W,{icon:Nie,css:{height:"12px"}}),g(A,{css:{fontSize:12},children:[c,": ",s]})]})]})}),fHe=["image/jpeg","image/png","image/webp"],WL=4,hHe=de("div",{display:"flex",flexWrap:"wrap",gap:"8px",width:"100%",variants:{elements:{1:{flexDirection:"column"},2:{flexDirection:"row","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}},3:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(1), & > :nth-child(2)":{flex:"1 1 calc(50% - 8px)"},"& > :nth-child(3)":{flex:"1 1 100%"}},4:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}}}}});function pHe(e,t,n){const r=[];for(const i of e){if(!fHe.includes(i.type)){F({type:"error",title:"Error while uploading your image",message:"Only JPG, PNG, and WEBP files are allowed."});continue}if(i.size>n*1024*1024){F({type:"error",title:"Error while uploading your image",message:`Your image is exceeding the limit of ${n}MB.`});continue}if(r.length+1>t){F({type:"error",title:"Error while uploading your image",message:`You can only upload a maximum of ${t} images`});continue}r.push(i)}return r}function mHe({name:e,nbImagesAllowed:t=1,maxImageSizeMB:n=50,defaultValue:r=[]}){const i=te();if(t>WL)throw new Error(`nbImagesAllowed should not be greater than ${WL}`);const[o,s]=y.exports.useState(r.map(h=>({id:h.id,preview:h.url,image:h.id,progress:100,abortController:null}))),a=(h,p,m)=>{s(v=>v.map(b=>b.id===h.id?{...b,abortController:m,progress:p}:b))},c=(h,p)=>{s(m=>m.map(v=>v.id===h.id?{...v,image:p.data,progress:100}:v))},u=h=>{s(p=>p.filter(m=>(m.id===h.id&&m.abortController&&m.abortController.abort(),m.id!==h.id)))},d=async(h,p)=>{const m=new FormData;m.append("file",h);const v=new AbortController;return i.post("/pf/upload-image/event",m,{signal:v.signal,onUploadProgress:b=>{const x=b.loaded/b.total*100;a(p,x,v)}}).then(b=>{c(p,b)}).catch(b=>{b.message!=="canceled"&&F({type:"error",title:"Upload failed",message:"The upload of your picture failed, please try again."}),u(p)})},f=h=>{const p=Array.from(h);pHe(p,t,n).forEach(v=>{const b=new FileReader;let x={id:`${b6()}`,abortController:null,image:null,preview:null,progress:0};b.onloadend=()=>{uq(v,1024,1024,C=>{x={...x,preview:C},s(w=>[...w,x]),d(v,x)})},v instanceof Blob&&b.readAsDataURL(v)})};return o.length>0?l(hHe,{elements:o.length,children:o.map(h=>g(M,{css:{position:"relative",paddingBottom:o.length>1?300:0,overflow:"hidden",borderRadius:8,maxHeight:o.length>1?300:600,width:"fit-content",mx:"auto",aspectRatio:"3/4",height:300},children:[h.image&&l(Ke,{type:"hidden",name:t===1?e:`${e}[]`,value:h.image}),l(Dt,{css:{position:o.length>1?"absolute":"initial",top:"0",left:"0",width:"100%",height:"100%",maxHeight:o.length>1?300:"100%",objectFit:"cover"},src:h.preview,alt:""}),l(Y,{onClick:()=>u(h),"aria-label":"Close",css:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:8,right:8,p:"$2",width:32,height:32,background:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",borderRadius:1e3,cursor:"pointer"},children:l(W,{icon:Ul,css:{width:20,height:20}})}),h.progress!==void 0&&h.image===null&&l(M,{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:10},children:l(ce,{css:{width:`${h.progress}%`,height:"100%",backgroundColor:"$amber500"}})})]},h.id))}):g(ae,{htmlFor:"hiddenPicturesInput",css:{alignItems:"center",display:"flex",justifyContent:"center",transition:"0.2s background-color ease",width:"fit-content",mx:"auto",aspectRatio:"3/4",height:300,borderRadius:"8px",cursor:"pointer",border:"1px dashed $borderColor",backgroundColor:"$cardBackgroundColor","&:hover":{backgroundColor:"$hoveringItem"}},children:[l(Ke,{type:"file",accept:"image/*",multiple:t>1,css:{display:"none"},id:"hiddenPicturesInput",onChange:h=>f(h.target.files)}),l(W,{icon:Die,css:{opacity:.3,width:32,height:32,color:"$gray300"}})]})}const gHe={mauve1:"hsl(300, 20.0%, 99.0%)",mauve2:"hsl(300, 7.7%, 97.5%)",mauve3:"hsl(294, 5.5%, 95.3%)",mauve4:"hsl(289, 4.7%, 93.3%)",mauve5:"hsl(283, 4.4%, 91.3%)",mauve6:"hsl(278, 4.1%, 89.1%)",mauve7:"hsl(271, 3.9%, 86.3%)",mauve8:"hsl(255, 3.7%, 78.8%)",mauve9:"hsl(252, 4.0%, 57.3%)",mauve10:"hsl(253, 3.5%, 53.5%)",mauve11:"hsl(252, 4.0%, 44.8%)",mauve12:"hsl(260, 25.0%, 11.0%)"},vHe={violet1:"hsl(255, 65.0%, 99.4%)",violet2:"hsl(252, 100%, 99.0%)",violet3:"hsl(252, 96.9%, 97.4%)",violet4:"hsl(252, 91.5%, 95.5%)",violet5:"hsl(252, 85.1%, 93.0%)",violet6:"hsl(252, 77.8%, 89.4%)",violet7:"hsl(252, 71.0%, 83.7%)",violet8:"hsl(252, 68.6%, 76.3%)",violet9:"hsl(252, 56.0%, 57.5%)",violet10:"hsl(251, 48.1%, 53.5%)",violet11:"hsl(250, 43.0%, 48.0%)",violet12:"hsl(254, 60.0%, 18.5%)"},yHe={blackA1:"hsla(0, 0%, 0%, 0.012)",blackA2:"hsla(0, 0%, 0%, 0.027)",blackA3:"hsla(0, 0%, 0%, 0.047)",blackA4:"hsla(0, 0%, 0%, 0.071)",blackA5:"hsla(0, 0%, 0%, 0.090)",blackA6:"hsla(0, 0%, 0%, 0.114)",blackA7:"hsla(0, 0%, 0%, 0.141)",blackA8:"hsla(0, 0%, 0%, 0.220)",blackA9:"hsla(0, 0%, 0%, 0.439)",blackA10:"hsla(0, 0%, 0%, 0.478)",blackA11:"hsla(0, 0%, 0%, 0.565)",blackA12:"hsla(0, 0%, 0%, 0.910)"};function Tv(e,[t,n]){return Math.min(n,Math.max(t,e))}const bHe=[" ","Enter","ArrowUp","ArrowDown"],xHe=[" ","Enter"],_9="Select",[A9,$9,CHe]=M6(_9),[Wh,GGe]=ii(_9,[CHe,wu]),C_=wu(),[wHe,r1]=Wh(_9),[SHe,EHe]=Wh(_9),THe=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p}=e,m=C_(t),[v,b]=y.exports.useState(null),[x,C]=y.exports.useState(null),[w,S]=y.exports.useState(!1),T=fg(u),[E=!1,k]=$o({prop:r,defaultProp:i,onChange:o}),[_,O]=$o({prop:s,defaultProp:a,onChange:c}),D=y.exports.useRef(null),L=v?Boolean(v.closest("form")):!0,[N,j]=y.exports.useState(new Set),G=Array.from(N).map(X=>X.props.value).join(";");return y.exports.createElement(ug,m,y.exports.createElement(wHe,{required:p,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:es(),value:_,onValueChange:O,open:E,onOpenChange:k,dir:T,triggerPointerDownPosRef:D,disabled:h},y.exports.createElement(A9.Provider,{scope:t},y.exports.createElement(SHe,{scope:e.__scopeSelect,onNativeOptionAdd:y.exports.useCallback(X=>{j(re=>new Set(re).add(X))},[]),onNativeOptionRemove:y.exports.useCallback(X=>{j(re=>{const oe=new Set(re);return oe.delete(X),oe})},[])},n)),L?y.exports.createElement(QQ,{key:G,"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:_,onChange:X=>O(X.target.value),disabled:h},_===void 0?y.exports.createElement("option",{value:""}):null,Array.from(N)):null))},kHe="SelectTrigger",_He=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=C_(n),s=r1(kHe,n),a=s.disabled||r,c=zt(t,s.onTriggerChange),u=$9(n),[d,f,h]=XQ(m=>{const v=u().filter(C=>!C.disabled),b=v.find(C=>C.value===s.value),x=ZQ(v,m,b);x!==void 0&&s.onValueChange(x.value)}),p=()=>{a||(s.onOpenChange(!0),h())};return y.exports.createElement(x6,ue({asChild:!0},o),y.exports.createElement(Pt.button,ue({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":YQ(s.value)?"":void 0},i,{ref:c,onClick:Ue(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:Ue(i.onPointerDown,m=>{const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(p(),s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:Ue(i.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(v&&m.key===" ")&&bHe.includes(m.key)&&(p(),m.preventDefault())})})))}),AHe="SelectValue",$He=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...a}=e,c=r1(AHe,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=zt(t,c.onValueNodeChange);return ri(()=>{u(d)},[u,d]),y.exports.createElement(Pt.span,ue({},a,{ref:f,style:{pointerEvents:"none"}}),YQ(c.value)?y.exports.createElement(y.exports.Fragment,null,s):o)}),DHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return y.exports.createElement(Pt.span,ue({"aria-hidden":!0},i,{ref:t}),r||"\u25BC")}),nh="SelectContent",OHe=y.exports.forwardRef((e,t)=>{const n=r1(nh,e.__scopeSelect),[r,i]=y.exports.useState();if(ri(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Lr.exports.createPortal(y.exports.createElement(qQ,{scope:e.__scopeSelect},y.exports.createElement(A9.Slot,{scope:e.__scopeSelect},y.exports.createElement("div",null,e.children))),o):null}return y.exports.createElement(PHe,ue({},e,{ref:t}))}),dl=10,[qQ,i1]=Wh(nh),PHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...x}=e,C=r1(nh,n),[w,S]=y.exports.useState(null),[T,E]=y.exports.useState(null),k=zt(t,ye=>S(ye)),[_,O]=y.exports.useState(null),[D,L]=y.exports.useState(null),N=$9(n),[j,G]=y.exports.useState(!1),X=y.exports.useRef(!1);y.exports.useEffect(()=>{if(w)return GE(w)},[w]),qE();const re=y.exports.useCallback(ye=>{const[_e,...$e]=N().map(we=>we.ref.current),[J]=$e.slice(-1),fe=document.activeElement;for(const we of ye)if(we===fe||(we==null||we.scrollIntoView({block:"nearest"}),we===_e&&T&&(T.scrollTop=0),we===J&&T&&(T.scrollTop=T.scrollHeight),we==null||we.focus(),document.activeElement!==fe))return},[N,T]),oe=y.exports.useCallback(()=>re([_,w]),[re,_,w]);y.exports.useEffect(()=>{j&&oe()},[j,oe]);const{onOpenChange:U,triggerPointerDownPosRef:H}=C;y.exports.useEffect(()=>{if(w){let ye={x:0,y:0};const _e=J=>{var fe,we,Le,He;ye={x:Math.abs(Math.round(J.pageX)-((fe=(we=H.current)===null||we===void 0?void 0:we.x)!==null&&fe!==void 0?fe:0)),y:Math.abs(Math.round(J.pageY)-((Le=(He=H.current)===null||He===void 0?void 0:He.y)!==null&&Le!==void 0?Le:0))}},$e=J=>{ye.x<=10&&ye.y<=10?J.preventDefault():w.contains(J.target)||U(!1),document.removeEventListener("pointermove",_e),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",$e,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",$e,{capture:!0})}}},[w,U,H]),y.exports.useEffect(()=>{const ye=()=>U(!1);return window.addEventListener("blur",ye),window.addEventListener("resize",ye),()=>{window.removeEventListener("blur",ye),window.removeEventListener("resize",ye)}},[U]);const[R,se]=XQ(ye=>{const _e=N().filter(fe=>!fe.disabled),$e=_e.find(fe=>fe.ref.current===document.activeElement),J=ZQ(_e,ye,$e);J&&setTimeout(()=>J.ref.current.focus())}),ee=y.exports.useCallback((ye,_e,$e)=>{const J=!X.current&&!$e;(C.value!==void 0&&C.value===_e||J)&&(O(ye),J&&(X.current=!0))},[C.value]),I=y.exports.useCallback(()=>w==null?void 0:w.focus(),[w]),me=y.exports.useCallback((ye,_e,$e)=>{const J=!X.current&&!$e;(C.value!==void 0&&C.value===_e||J)&&L(ye)},[C.value]),Se=r==="popper"?qL:RHe,pe=Se===qL?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return y.exports.createElement(qQ,{scope:n,content:w,viewport:T,onViewportChange:E,itemRefCallback:ee,selectedItem:_,onItemLeave:I,itemTextRefCallback:me,focusSelectedItem:oe,selectedItemText:D,position:r,isPositioned:j,searchRef:R},y.exports.createElement(KE,{as:Pd,allowPinchZoom:!0},y.exports.createElement(WE,{asChild:!0,trapped:C.open,onMountAutoFocus:ye=>{ye.preventDefault()},onUnmountAutoFocus:Ue(i,ye=>{var _e;(_e=C.trigger)===null||_e===void 0||_e.focus({preventScroll:!0}),ye.preventDefault()})},y.exports.createElement(Zm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:ye=>ye.preventDefault(),onDismiss:()=>C.onOpenChange(!1)},y.exports.createElement(Se,ue({role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ye=>ye.preventDefault()},x,pe,{onPlaced:()=>G(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ue(x.onKeyDown,ye=>{const _e=ye.ctrlKey||ye.altKey||ye.metaKey;if(ye.key==="Tab"&&ye.preventDefault(),!_e&&ye.key.length===1&&se(ye.key),["ArrowUp","ArrowDown","Home","End"].includes(ye.key)){let J=N().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(ye.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(ye.key)){const fe=ye.target,we=J.indexOf(fe);J=J.slice(we+1)}setTimeout(()=>re(J)),ye.preventDefault()}})}))))))}),RHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=r1(nh,n),s=i1(nh,n),[a,c]=y.exports.useState(null),[u,d]=y.exports.useState(null),f=zt(t,k=>d(k)),h=$9(n),p=y.exports.useRef(!1),m=y.exports.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:x,focusSelectedItem:C}=s,w=y.exports.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&v&&b&&x){const k=o.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),O=o.valueNode.getBoundingClientRect(),D=x.getBoundingClientRect();if(o.dir!=="rtl"){const fe=D.left-_.left,we=O.left-fe,Le=k.left-we,He=k.width+Le,Ge=Math.max(He,_.width),Pe=window.innerWidth-dl,rt=Tv(we,[dl,Pe-Ge]);a.style.minWidth=He+"px",a.style.left=rt+"px"}else{const fe=_.right-D.right,we=window.innerWidth-O.right-fe,Le=window.innerWidth-k.right-we,He=k.width+Le,Ge=Math.max(He,_.width),Pe=window.innerWidth-dl,rt=Tv(we,[dl,Pe-Ge]);a.style.minWidth=He+"px",a.style.right=rt+"px"}const L=h(),N=window.innerHeight-dl*2,j=v.scrollHeight,G=window.getComputedStyle(u),X=parseInt(G.borderTopWidth,10),re=parseInt(G.paddingTop,10),oe=parseInt(G.borderBottomWidth,10),U=parseInt(G.paddingBottom,10),H=X+re+j+U+oe,R=Math.min(b.offsetHeight*5,H),se=window.getComputedStyle(v),ee=parseInt(se.paddingTop,10),I=parseInt(se.paddingBottom,10),me=k.top+k.height/2-dl,Se=N-me,pe=b.offsetHeight/2,ye=b.offsetTop+pe,_e=X+re+ye,$e=H-_e;if(_e<=me){const fe=b===L[L.length-1].ref.current;a.style.bottom="0px";const we=u.clientHeight-v.offsetTop-v.offsetHeight,Le=Math.max(Se,pe+(fe?I:0)+we+oe),He=_e+Le;a.style.height=He+"px"}else{const fe=b===L[0].ref.current;a.style.top="0px";const Le=Math.max(me,X+v.offsetTop+(fe?ee:0)+pe)+$e;a.style.height=Le+"px",v.scrollTop=_e-me+v.offsetTop}a.style.margin=`${dl}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,a,u,v,b,x,o.dir,r]);ri(()=>w(),[w]);const[S,T]=y.exports.useState();ri(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const E=y.exports.useCallback(k=>{k&&m.current===!0&&(w(),C==null||C(),m.current=!1)},[w,C]);return y.exports.createElement(MHe,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:E},y.exports.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},y.exports.createElement(Pt.div,ue({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),qL=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=dl,...o}=e,s=C_(n);return y.exports.createElement(C6,ue({},s,o,{ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[MHe,w_]=Wh(nh,{}),KL="SelectViewport",IHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=i1(KL,n),o=w_(KL,n),s=zt(t,i.onViewportChange),a=y.exports.useRef(0);return y.exports.createElement(y.exports.Fragment,null,y.exports.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),y.exports.createElement(A9.Slot,{scope:n},y.exports.createElement(Pt.div,ue({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ue(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const h=Math.abs(a.current-u.scrollTop);if(h>0){const p=window.innerHeight-dl*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),b=Math.max(m,v);if(b<p){const x=b+h,C=Math.min(p,x),w=x-C;d.style.height=C+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}a.current=u.scrollTop})}))))}),LHe="SelectGroup";Wh(LHe);const zw="SelectItem",[NHe,KQ]=Wh(zw),FHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=r1(zw,n),c=i1(zw,n),u=a.value===r,[d,f]=y.exports.useState(o!=null?o:""),[h,p]=y.exports.useState(!1),m=zt(t,x=>{var C;return(C=c.itemRefCallback)===null||C===void 0?void 0:C.call(c,x,r,i)}),v=es(),b=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.exports.createElement(NHe,{scope:n,value:r,disabled:i,textId:v,isSelected:u,onItemTextChange:y.exports.useCallback(x=>{f(C=>{var w;return C||((w=x==null?void 0:x.textContent)!==null&&w!==void 0?w:"").trim()})},[])},y.exports.createElement(A9.ItemSlot,{scope:n,value:r,disabled:i,textValue:d},y.exports.createElement(Pt.div,ue({role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:m,onFocus:Ue(s.onFocus,()=>p(!0)),onBlur:Ue(s.onBlur,()=>p(!1)),onPointerUp:Ue(s.onPointerUp,b),onPointerMove:Ue(s.onPointerMove,x=>{if(i){var C;(C=c.onItemLeave)===null||C===void 0||C.call(c)}else x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ue(s.onPointerLeave,x=>{if(x.currentTarget===document.activeElement){var C;(C=c.onItemLeave)===null||C===void 0||C.call(c)}}),onKeyDown:Ue(s.onKeyDown,x=>{var C;((C=c.searchRef)===null||C===void 0?void 0:C.current)!==""&&x.key===" "||(xHe.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})}))))}),i4="SelectItemText",BHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=r1(i4,n),a=i1(i4,n),c=KQ(i4,n),u=EHe(i4,n),[d,f]=y.exports.useState(null),h=zt(t,x=>f(x),c.onItemTextChange,x=>{var C;return(C=a.itemTextRefCallback)===null||C===void 0?void 0:C.call(a,x,c.value,c.disabled)}),p=d==null?void 0:d.textContent,m=y.exports.useMemo(()=>y.exports.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return ri(()=>(v(m),()=>b(m)),[v,b,m]),y.exports.createElement(y.exports.Fragment,null,y.exports.createElement(Pt.span,ue({id:c.textId},o,{ref:h})),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Lr.exports.createPortal(o.children,s.valueNode):null)}),HHe="SelectItemIndicator",zHe=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return KQ(HHe,n).isSelected?y.exports.createElement(Pt.span,ue({"aria-hidden":!0},r,{ref:t})):null}),GL="SelectScrollUpButton",UHe=y.exports.forwardRef((e,t)=>{const n=i1(GL,e.__scopeSelect),r=w_(GL,e.__scopeSelect),[i,o]=y.exports.useState(!1),s=zt(t,r.onScrollButtonChange);return ri(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollTop>0;o(d)};var a=u;const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?y.exports.createElement(GQ,ue({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}})):null}),YL="SelectScrollDownButton",VHe=y.exports.forwardRef((e,t)=>{const n=i1(YL,e.__scopeSelect),r=w_(YL,e.__scopeSelect),[i,o]=y.exports.useState(!1),s=zt(t,r.onScrollButtonChange);return ri(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;o(f)};var a=u;const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?y.exports.createElement(GQ,ue({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}})):null}),GQ=y.exports.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=i1("SelectScrollButton",n),s=y.exports.useRef(null),a=$9(n),c=y.exports.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return y.exports.useEffect(()=>()=>c(),[c]),ri(()=>{var u;const d=a().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[a]),y.exports.createElement(Pt.div,ue({"aria-hidden":!0},i,{ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ue(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Ue(i.onPointerMove,()=>{var u;(u=o.onItemLeave)===null||u===void 0||u.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Ue(i.onPointerLeave,()=>{c()})}))});function YQ(e){return e===""||e===void 0}const QQ=y.exports.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.exports.useRef(null),o=zt(t,i),s=Jm(n);return y.exports.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[s,n]),y.exports.createElement(fq,{asChild:!0},y.exports.createElement("select",ue({},r,{ref:o,defaultValue:n})))});QQ.displayName="BubbleSelect";function XQ(e){const t=Ao(e),n=y.exports.useRef(""),r=y.exports.useRef(0),i=y.exports.useCallback(s=>{const a=n.current+s;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=y.exports.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.exports.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function ZQ(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=jHe(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function jHe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const WHe=THe,qHe=$He,KHe=OHe,GHe=IHe,YHe=FHe,QHe=BHe,XHe=zHe,ZHe=UHe,JHe=VHe;function Ln({children:e=null,value:t,name:n=null,onValueChange:r,disabled:i=!1,required:o=!1,css:s=null,cssContent:a=null}){return g(nze,{value:t,required:o,onValueChange:r||null,disabled:i,name:n,children:[g(eze,{css:{...s},children:[l(qHe,{placeholder:t}),l(tze,{children:l(KD,{})})]}),e&&g(rze,{position:"popper",css:{...a},children:[l(sze,{children:l(yde,{})}),e,l(aze,{children:l(KD,{})})]})]})}const eze=wi(_He,{all:"unset",display:"inline-flex",alignItems:"center",justifyContent:"space-between",borderRadius:10,padding:"0 15px",fontWeight:500,lineHeight:1,height:35,gap:5,backgroundColor:"$cardBackgroundColor",color:"$textColor",cursor:"pointer",border:"1px solid $borderColor",transition:"background-color 0.2s",boxShadow:"$xsmall","&:hover:not([data-disabled])":{backgroundColor:"$disabledBackgroundColor"},"&:focus":{border:"1px solid $borderColor"},"&[data-disabled]":{backgroundColor:"$disabledBackgroundColor","&:hover":{cursor:"not-allowed"}},"&[data-placeholder]":{color:"$textColor"}}),tze=wi(DHe,{color:"$textColor"}),nze=wi(WHe,{color:"$textColor"}),rze=wi(KHe,{overflow:"hidden",backgroundColor:"$cardBackgroundColor",borderRadius:10,marginTop:"$2",width:"100%",border:"1px solid $borderColor",boxShadow:"$xsmall",fontWeight:500}),Nn=wi(GHe,{padding:5,backgroundColor:"$cardBackgroundColor"}),Ft=y.exports.forwardRef(({children:e,...t},n)=>g(ize,{...t,ref:n,children:[l(QHe,{children:l(M,{css:{alignItems:"center"},children:e})}),l(oze,{children:l(mde,{})})]})),ize=wi(YHe,{lineHeight:0,color:"$textColor",borderRadius:8,display:"flex",alignItems:"center",height:27,padding:"0 35px 0 25px",position:"relative",userSelect:"none",cursor:"pointer","&[data-disabled]":{color:gHe.mauve8,pointerEvents:"none"},'&[data-state="checked"]':{fontWeight:"$bold"},"&[data-highlighted]":{outline:"none",backgroundColor:"$hoveringItem"}}),oze=wi(XHe,{position:"absolute",left:0,width:25,display:"inline-flex",alignItems:"center",justifyContent:"center"}),JQ={display:"flex",alignItems:"center",justifyContent:"center",height:25,backgroundColor:"white",color:vHe.violet11,cursor:"default","&:hover":{backgroundColor:"$hoveringItem"}},sze=wi(ZHe,JQ),aze=wi(JHe,JQ);var eX=(e=>(e[e.Object=6]="Object",e[e.Texture=0]="Texture",e[e.Landmark=3]="Landmark",e[e.Notecard=7]="Notecard",e))(eX||{});function lze({product:e,open:t,setOpen:n}){var b;const r={id:null,deadlineInDays:null,autoDeadline:null,name:"",comment:"",pictureUuid:"",objectToDeliver:null,demoToDeliver:null,priority:10,locations:[],optionalBlogging:!1,event:null},i=Ee(),[o,s]=Ae.useState("deadline-once"),a=st(),c=a.quota.locations.canCreate,{isLoading:u,mutate:d}=pBe(),[f,h]=y.exports.useState(e?{id:e.id,deadlineInDays:e.deadlineInDays,autoDeadline:e.autoDeadline,name:e.name,comment:e.comment,pictureUuid:e.pictureUuid,objectToDeliver:e.inventory,demoToDeliver:e.demo,priority:e.priority,locations:e.locations,optionalBlogging:e.optionalBlogging,event:(b=e.event)==null?void 0:b.id}:r);y.exports.useEffect(()=>{f.deadlineInDays>0?s("deadline-once"):f.autoDeadline>0?s("auto-deadline"):s("none"),f.optionalBlogging&&s("none")},[f]);const p=a.subscription.allowedAutoDeadlineValues.length>0,m=()=>{F({type:"success",title:"Product updated"}),i.invalidateQueries({queryKey:["me"]}),i.invalidateQueries({queryKey:["products"]}),n(!1)},v=x=>{var C;F({type:"error",title:x.response.data.error.title,message:(C=x.response.data.error)==null?void 0:C.message}),i.invalidateQueries({queryKey:["inventory"]})};return l(Ye,{open:t,onOpenChange:n,children:g(Qe,{children:[l(Xe,{}),g(Ze,{size:"medium",onOpenAutoFocus:x=>x.preventDefault(),children:[l(nt,{}),g(dt,{id:"createProduct",onSubmit:x=>{x.preventDefault(),f.objectToDeliver===null?F({type:"error",title:"Please select an object to deliver"}):d(f,{onSuccess:m,onError:v})},css:{display:"flex",justifyContent:"normal",gap:"$6"},children:[g(M,{css:{gap:"$6","@sm":{flexDirection:"column"}},children:[l(M,{css:{flexShrink:0},children:g(P,{css:{gap:"$2",maxWidth:350,"@sm":{maxWidth:"100%",width:"100%"}},children:[l(cze,{pictureUuid:f.pictureUuid}),f.id&&l(QBe,{productId:f.id}),f.id&&f.demoToDeliver&&l(XBe,{productId:f.id}),l(af,{fieldLabel:"Texture UUID",fieldHelpText:"Right click on a texture in-world > Copy Asset UUID",formInputType:"simple-input",name:"productPictureUuid",value:f.pictureUuid,onChange:x=>h({...f,pictureUuid:x.target.value})}),g(P,{children:[l(ae,{children:"Options"}),g(M,{css:{cursor:"pointer",gap:"$2",justifyContent:"center"},children:[l(Xd,{id:"checkbox-option-optional-blogging",checked:f.optionalBlogging,onCheckedChange:()=>h({...f,optionalBlogging:!f.optionalBlogging}),children:l(Zd,{children:l(W,{icon:Pa})})}),l("label",{htmlFor:"checkbox-option-optional-blogging",children:"Optional blogging, set this product as a gift for your bloggers"})]})]})]})}),g(P,{css:{flex:1,gap:"$4"},children:[l("input",{name:"productId",value:f.id?f.id:"",hidden:!0,readOnly:!0}),g(P,{children:[l(ae,{children:"Object to deliver"}),l(ae,{type:"help",children:"If you don't see your object here, make sure that your Dropbox is online and assigned to this store."}),l(QL,{inventorySelected:f.objectToDeliver,onChange:x=>{h({...f,name:x.name,objectToDeliver:{type:x.type,name:x.name}})}})]}),g(P,{children:[l(ae,{children:"Demo to deliver"}),l(ae,{type:"help",children:"Bloggers can request a demo for this product, and it won't create any post, and is not subject to any restriction."}),l(QL,{isClearable:!0,inventorySelected:f.demoToDeliver,onChange:x=>{h(x?{...f,demoToDeliver:{type:x.type,name:x.name}}:{...f,demoToDeliver:null})}})]}),l(af,{fieldLabel:"Product name",formInputType:"simple-input",name:"productName",type:"text",value:f.name,onChange:x=>h({...f,name:x.target.value})}),g(P,{css:{width:"fit-content"},children:[l(ae,{children:"Locations"}),g(M,{css:{display:"inline-flex",flexWrap:"wrap",gap:"$2"},children:[f.locations.map(x=>l(XL,{callbackDelete:()=>{h({...f,locations:f.locations.filter(function(C){return C.id!==x.id})})},children:x.name},"location-pill-"+x.id)),g(gs,{children:[l(vs,{children:l(XL,{children:"+ Add a Location"})}),g(ys,{sideOffset:8,align:"start",alignOffset:-8,children:[a.selectedStore.locations.map((x,C)=>g(Xt,{onClick:()=>{f.locations.some(w=>w.id===x.id)?h({...f,locations:f.locations.filter(w=>w.name!==x.name)}):h({...f,locations:[...f.locations,x]})},children:[f.locations.some(w=>w.id===x.id)&&l(W,{icon:Vd}),!f.locations.some(w=>w.id===x.id)&&l(W,{icon:Ud}),x.name]},"location-"+C)),c&&l(dze,{})]})]})]})]}),a.selectedStore.events.length>0&&g(P,{children:[l(M,{css:{justifyContent:"flex-start",alignItems:"center"},children:l(ae,{children:"Event"})}),l(Ln,{value:f.event?f.event:"none",name:"event",onValueChange:x=>{const C=a.selectedStore.events.find(w=>w.id===x);h({...f,event:C?C.id:null})},css:{width:"fit-content"},children:g(Nn,{defaultValue:"none",children:[l(Ft,{value:"none",children:"None"}),a.selectedStore.events.map(x=>l(Ft,{value:x.id,children:x.name},"event-"+x.id))]})})]}),g(P,{children:[l(M,{css:{justifyContent:"flex-start",alignItems:"center"},children:l(ae,{children:"Priority"})}),l(Ln,{name:"priority",value:f.priority.toString(),onValueChange:x=>{h({...f,priority:x})},css:{width:"fit-content"},children:g(Nn,{children:[g(Ft,{value:"30",children:[l(E0,{priority:30,size:14}),"Very High"]}),g(Ft,{value:"20",children:[l(E0,{priority:20,size:14}),"High"]}),g(Ft,{value:"10",children:[l(E0,{priority:10,size:14}),"Normal"]})]})})]}),g(P,{children:[g(M,{css:{justifyContent:"flex-start",alignItems:"center"},children:[l(ae,{children:"Deadline"}),!p&&l(xxe,{children:l(fxe,{})})]}),l(Ln,{disabled:!p||f.optionalBlogging,value:o,onValueChange:x=>{x==="auto-deadline"?h({...f,deadlineInDays:null,autoDeadline:a.subscription.allowedAutoDeadlineValues[0].toString()}):x==="deadline-once"?h({...f,autoDeadline:null,deadlineInDays:7}):x==="none"&&h({...f,deadlineInDays:null,autoDeadline:null}),s(x)},css:{width:"fit-content"},children:g(Nn,{children:[l(Ft,{value:"none",children:"None"}),l(Ft,{value:"deadline-once",children:"Deadline once, when delivered"}),l(Ft,{value:"auto-deadline",children:"Auto-deadline"})]})})]}),o==="auto-deadline"&&g(P,{children:[l(ae,{children:"Auto-deadline, in days"}),g(ae,{type:"help",children:["This parameter will require the blogger to blog this product each ",f.autoDeadline," days. This is useful when you have a product that needs to consistency be featured on socials."]}),l(Ln,{value:f.autoDeadline===null?a.subscription.allowedAutoDeadlineValues[0].toString():f.autoDeadline.toString(),name:"autoDeadline",css:{width:"fit-content"},onValueChange:x=>h({...f,autoDeadline:x,deadlineInDays:null}),children:l(Nn,{children:a.subscription.allowedAutoDeadlineValues.map(x=>g(Ft,{value:x.toString(),children:[x," days"]},"selected-autodeadline-"+x))})})]}),o==="deadline-once"&&l(af,{fieldLabel:"Deadline once, in days",fieldHelpText:g(z,{children:["When a blogger will request a delivery for this product, a post will be automatically created. If this setting is set, the post will have a"," ",f.deadlineInDays," days deadline associated to it."]}),onChange:x=>h({...f,autoDeadline:null,deadlineInDays:x.target.value}),formInputType:"simple-input",name:"deadlineInDays",type:"number",min:0,readOnly:!p,defaultValue:f.deadlineInDays?f.deadlineInDays:0}),l(af,{fieldLabel:"Comment",formInputType:"textarea",name:"comment",value:f.comment,onChange:x=>h({...f,comment:x.target.value})})]})]}),g(wt,{css:{flex:1,alignItems:"flex-end","@sm":{flexDirection:"column"}},children:[f.id&&l(uze,{product:f,setOpen:n,children:l(Y,{variant:"onlyTextGray",type:"button",disabled:u,children:"Archive the product"})}),l(Y,{variant:"primary",type:"submit",disabled:u,children:f.id?"Save the changes":"Create your product"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function cze({pictureUuid:e}){const t=wb({uuid:e,size:1024}),[n,r]=y.exports.useState(t);return y.exports.useEffect(()=>{r(wb({uuid:e,size:1024}))},[e]),l(Dt,{loading:"lazy",src:n,onError:()=>{r(wb({uuid:"product",size:1024}))},css:{objectFit:"fill",width:350,height:350,borderRadius:4,"@sm":{width:"100%"}}})}function QL({inventorySelected:e=null,onChange:t=null,isClearable:n=!1}){const{isLoading:r,isFetching:i,data:o}=UQ({filter:eX.Object});return l(Gl,{placement:"bottom",name:"objectToDeliver",width:"100%",firstLoad:r,isDisabled:i,isClearable:n,options:r?null:o,onChange:t?s=>t(s):null,value:r?null:e})}function uze({children:e,product:t,setOpen:n}){const[r,i]=y.exports.useState(!1),o=Ee(),s=te(),a=ve({mutationFn:c=>{c.preventDefault();const d=new FormData(c.target).get("productId");return s.delete("/products/"+d).then(()=>{i(!1),F({type:"success",title:"Product successfully archived"}),o.invalidateQueries({queryKey:["products"]}),o.invalidateQueries({queryKey:["me"]})}).catch(function(f){var h,p,m,v;(p=(h=f.response)==null?void 0:h.data)!=null&&p.error?F({type:"error",title:(m=f.response.data)==null?void 0:m.error.title,message:(v=f.response.data)==null?void 0:v.error.message}):F({type:"error",title:"An unexpected error occured. Please try again."})})}});return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:c=>c.preventDefault(),children:[l(nt,{children:"Archive a product"}),g(ht,{children:[g("p",{children:["You are about to archive the product ",l("strong",{children:t.name}),"."]}),l("p",{children:"Do you want to continue and archive your product?"})]}),g(dt,{onSubmit:c=>{a.mutate(c,{onSuccess:()=>{n(!1)}}),c.stopPropagation()},children:[l("input",{name:"productId",defaultValue:t.id,hidden:!0}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",type:"submit",children:"Cancel"})}),l(Y,{disabled:a.isLoading,variant:"danger",type:"submit",children:"Archive the product"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function dze(){const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(""),[i,o]=y.exports.useState(""),s=jQ(),a=Ee(),c=()=>{F({type:"success",title:"Location successfully created"})};return g(Ye,{open:e,onOpenChange:t,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:u=>u.preventDefault(),children:[l(W,{icon:Wie}),"Create a location"]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{children:[l(nt,{children:"Create a location"}),g(ht,{children:[g(A,{children:["Manage the locations where your products are available. Your bloggers can find where your products are and add the links of the locations to their posts on social media. See our"," ",l(ie,{to:"https://docs.kynno.app/easybloggers/settings/store-locations",target:"_blank",children:"documentation"}),"."]}),g(P,{children:[l(ae,{children:"Name"}),l(Ke,{name:"name",type:"text",value:n,onChange:u=>r(u.target.value),placeholder:"Event, mainstore, etc\u2026",autoComplete:"off",readOnly:s.isLoading})]}),g(P,{children:[l(ae,{children:"URL"}),l(Ke,{name:"url",type:"text",value:i,onChange:u=>o(u.target.value),autoComplete:"off",readOnly:s.isLoading,placeholder:"Marketplace, or maps.secondlife.com"})]})]}),l(wt,{children:g(M,{css:{gap:"$2",justifyContent:"flex-end",alignItems:"center"},children:[l(Y,{type:"button",variant:"onlyTextGray",css:{py:0,px:"$2"},onClick:()=>t(!1),children:"Cancel"}),l(Y,{disabled:s.isLoading,variant:"primary",onClick:()=>{s.mutate({name:n,url:i},{onSuccess:()=>{t(!1),c(),o(""),r(""),a.invalidateQueries({queryKey:["me"]})}})},children:"Create the location"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function XL({children:e,callbackDelete:t=null}){return g(ce,{css:{px:"$3",py:"$1",border:"1px solid $borderColor",borderRadius:10},children:[e,t&&l(W,{onClick:t,icon:Ul,css:{cursor:"pointer",marginLeft:"$2",color:"$gray400"}})]})}function fze(){const{isLoading:e,data:t}=S9();return g(ai,{title:"Timeout priority",description:g(z,{children:[g(A,{children:["This setting will apply the normal priority to products after the specified duration, starting from their creation time. One of the recommended usage is to set this setting to 1 month (depending on your release frequency) and set your last release to ",l("strong",{children:"Very High"})," or ",l("strong",{children:"High"})," ","priority."]}),l(A,{css:{marginTop:"$5"},children:"This ensures that bloggers will always blog about your latest release, and once they are done, they will be able to blog older releases from your store."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(hze,{preferences:t})]})}function hze({preferences:e}){const{isLoading:t,mutate:n}=E9(),r=()=>{F({type:"success",title:"Timeout priority updated."})},i={Never:0,"2 days":2,"3 days":3,"5 days":5,"7 days":7,"15 days":15,"1 month":30,"2 months":60,"3 months":90,"4 months":120,"5 months":150,"6 months":180,"1 year":365};return l(z,{children:l(Ln,{value:e.timeoutPriority,disabled:t,onValueChange:o=>{n({key:"timeoutPriority",value:o},{onSuccess:r})},children:l(Nn,{children:Object.keys(i).map(o=>l(Ft,{value:i[o],children:o},"selected-timeout-priority-"+o))})})})}function pze(){const{isLoading:e,data:t}=dBe();return g(ai,{title:"Duration added to subscription",description:g(z,{children:[l(A,{children:"Choose the duration of subscription you want to add when renewing your subscription. The system will begin to try to renew your subscription 2 days before it will expires, every 3 hours. Make sure to have enough funds!"}),l(A,{css:{marginTop:"$5"},children:"In order for the system to process the payment, you will need at least one online dropbox v1.4, with the debit permission accepted."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(mze,{autoRenew:t})]})}function mze({autoRenew:e}){const{isLoading:t,mutate:n}=MBe(),r=()=>{F({type:"success",title:"Auto renew updated."})};return l(z,{children:l(Ln,{value:e.daysAdded,disabled:t,onValueChange:i=>{n({key:"daysAdded",value:i},{onSuccess:r})},children:g(Nn,{children:[l(Ft,{value:0,children:"Disabled"}),[{daysAdded:7,description:"1 week"},{daysAdded:28,description:"4 weeks"},{daysAdded:28*6,description:"6 months (-12% on price)"}].map(i=>l(Ft,{value:i.daysAdded,children:i.description},"selected-products-limitation-"+i.daysAdded))]})})})}function gze(){const{isLoading:e,data:t}=S9();return g(ai,{title:"Products limitation",description:g(z,{children:[g(A,{children:["It restricts the quantity of products a blogger can acquire at one time. For instance, if you have a limit of 3, the blogger will be able to request 3 products at once. If they want to take a 4th product, they will have to have an accepted post for one of the 3 products they took first."," ",l("strong",{children:"Friends are not affected by this setting."})]}),l(A,{css:{marginTop:"$5"},children:"It's important to note that posts categorized as In Progress or Waiting For Review are not considered completed."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(vze,{preferences:t})]})}function vze({preferences:e}){const{isLoading:t,mutate:n}=E9(),r=()=>{F({type:"success",title:"Products limitation updated."})};return l(z,{children:l(Ln,{value:e.productsLimitation,disabled:t,onValueChange:i=>{n({key:"productsLimitation",value:i},{onSuccess:r})},children:g(Nn,{children:[l(Ft,{value:0,children:"Unlimited"}),[1,2,3,4,5,6,7,8,9,10].map(i=>l(Ft,{value:i,children:i},"selected-products-limitation-"+i))]})})})}function yze(){const{isLoading:e,data:t}=S9();return g(ai,{title:"Prevent designers to assign products",description:l(z,{children:l(A,{children:"With this setting set to ON, you will prevent any designers to assign a product to your event. This is useful between rounds, so bloggers don't start blogging the products set for the next round."})}),children:[e&&l(tX,{defaultChecked:!1,disabled:!0,children:l(nX,{})}),!e&&l(bze,{preferences:t})]})}function bze({preferences:e}){const{isLoading:t,mutate:n}=E9(),r=()=>{F({type:"success",title:"Setting updated."})};return l(tX,{id:"eventPreventProductsAssignment",defaultChecked:e.preventProductsAssignment,name:"prevent-products-assignment",disabled:t,onCheckedChange:i=>{n({key:"prevent-products-assignment",value:i},{onSuccess:r})},children:l(nX,{})})}const tX=de(tg,{all:"unset",width:42,cursor:"pointer",height:25,backgroundColor:"$gray400",borderRadius:"9999px",position:"relative",boxShadow:"0 2px 10px $gray800",'&[data-state="checked"]':{backgroundColor:"$yellow400"}}),nX=de(ng,{display:"block",width:21,height:21,backgroundColor:"white",borderRadius:"9999px",boxShadow:"0 2px 2px $gray900",transition:"transform 100ms",transform:"translateX(2px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(19px)"}});function xze(){const{isLoading:e,data:t}=S9();return g(ai,{title:"Minimum post per month",description:g(z,{children:[l(A,{children:"Set the minimum posts a blogger must create for the current month. Bloggers not filling this requirement will be highlighted in your members page."}),l(A,{css:{marginTop:"$5"},children:"To have info on others months, visit the user's profile."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(Cze,{preferences:t})]})}function Cze({preferences:e}){const{isLoading:t,mutate:n}=E9(),r=()=>{F({type:"success",title:"Minimum post per month updated."})};return l(z,{children:l(Ln,{value:e.minimumPostPerMonth,disabled:t,onValueChange:i=>{n({key:"minimumPostPerMonth",value:i},{onSuccess:r})},children:g(Nn,{children:[l(Ft,{value:0,children:"No requirement"}),[1,2,3,4,5].map(i=>l(Ft,{value:i,children:i},"minimum-post-per-month-"+i))]})})})}function wze({children:e,store:t,openDelay:n=100,enabled:r=!0}){const[i,o]=y.exports.useState(!1),s=PBe({id:t.id}),a=t.pictureUuid!==null&&t.pictureUuid!==void 0?t.pictureUuid:"store";return g(S6,{openDelay:n,open:i,onOpenChange:c=>{c&&t.id&&s.refetch(),o(c)},children:[r&&l(E6,{asChild:!0,onClick:()=>o(c=>!c),onFocus:()=>setTimeout(()=>o(!0),0),onBlur:()=>o(!1),children:e}),!r&&e,l(T6,{container:document.body,children:s.isFetched&&l(_ze,{sideOffset:5,onClick:c=>c.stopPropagation(),children:g(P,{css:{gap:"$2"},children:[g(P,{css:{gap:"$2"},children:[l(Dt,{css:{borderRadius:8,display:"block",marginRight:"$2"},alt:"",width:48,height:48,src:kn({uuid:a,size:128})}),l(ie,{to:"/store/"+s.data.id,onClick:()=>o(!1),css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:16,"&:hover":{cursor:"pointer",textDecoration:"underline"}},children:s.data.name})]}),s.data.about&&l(A,{children:s.data.about.split(`
`).map((c,u)=>g(Ae.Fragment,{children:[c,l("br",{})]},u))}),(s.data.socials.flickrUrl||s.data.socials.deviantArtUrl||s.data.socials.blueskyUrl||s.data.socials.facebookUrl||s.data.socials.instagramUrl||s.data.socials.xUrl||s.data.socials.personalUrl)&&g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[s.data.socials.flickrUrl&&l(ie,{to:s.data.socials.flickrUrl,target:"_blank",children:l(Ua,{})}),s.data.socials.deviantArtUrl&&l(ie,{to:s.data.socials.deviantArtUrl,target:"_blank",children:l(Ha,{})}),s.data.socials.blueskyUrl&&l(ie,{to:s.data.socials.blueskyUrl,target:"_blank",children:l(Ba,{})}),s.data.socials.facebookUrl&&l(ie,{to:s.data.socials.facebookUrl,target:"_blank",children:l(za,{})}),s.data.socials.instagramUrl&&l(ie,{to:s.data.socials.instagramUrl,target:"_blank",children:l(Va,{})}),s.data.socials.xUrl&&l(ie,{to:s.data.socials.xUrl,target:"_blank",children:l(ja,{})}),s.data.socials.personalUrl&&l(ie,{to:s.data.socials.personalUrl,target:"_blank",children:l(W,{icon:Ia})})]})]})})})]})}const Sze=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),Eze=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),Tze=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),kze=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),_ze=wi(k6,{borderRadius:12,padding:"$4",width:300,zIndex:1e3,backgroundColor:"white",border:"1px solid $borderColor",boxShadow:"$large",animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:Tze},'&[data-side="right"]':{animationName:kze},'&[data-side="bottom"]':{animationName:Sze},'&[data-side="left"]':{animationName:Eze}}});function Dn({store:e,showPicture:t=!0,showName:n=!0,inline:r=!1,nameBold:i=!1,css:o=null,pictureSize:s=24,showHoverCard:a=!0,openDelay:c=500}){const u=ar(),d=e.pictureUuid?e.pictureUuid:e.picture,f=d!=null?d:"store",h=r?null:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return l(wze,{store:{id:e.id,name:e.name,pictureUuid:e.pictureUuid},enabled:a,openDelay:c,children:g(M,{css:{...o,display:r?"inline":"flex",position:"relative",whiteSpace:"nowrap",width:"fit-content",maxWidth:"100%",alignItems:"center","&:hover":{cursor:a?"pointer":"auto",textDecoration:"underline"}},onClick:()=>{u("/store/"+e.id)},title:e.name,children:[t&&l(Dt,{css:{left:0,position:r?"absolute":"relative",borderRadius:4,marginRight:n?"$2":0},alt:"",width:s,height:s,src:kn({uuid:f,size:128})}),n&&e.name&&l(Ne,{css:{...h,marginLeft:r?s+4:0,fontWeight:i?"$bold":"inherit"},children:e.name})]})})}function b7({product:e,onClick:t,style:n="none"}){const{quota:r}=st(),i={cursor:"not-allowed",boxShadow:"$xsmall",color:"$textColor",border:"1px dashed $borderColor"},o={cursor:"pointer",boxShadow:"$xsmall",border:"1px dashed $hoveringCard"};return e?g($ze,{onClick:t,product:e,children:[l(Aze,{product:e}),l(Pze,{product:e}),l(Dze,{product:e})]}):n=="button"?l(Tm,{content:l(BR,{}),openDelay:0,disabled:r.canCreateProducts,children:g(Y,{variant:"primary",onClick:r.canCreateProducts?t:null,css:{mx:"auto",marginTop:"$6"},children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:Iy}),"Create your first product"]})}):l(Tm,{content:l(BR,{}),openDelay:0,disabled:r.canCreateProducts,children:g(P,{onClick:r.canCreateProducts?t:null,css:{gap:"$2",borderRadius:8,border:"1px dashed $borderColor",color:"$textColor",minHeight:150,justifyContent:"center",alignItems:"center",transition:"all 200ms","&:hover":{transition:"all 200ms",...r.canCreateProducts?o:i}},children:[l(W,{icon:oU,css:{height:32,width:32}}),l(A,{children:"Add a product"})]})})}function Aze({product:e}){const t=e.pictureUuid!==null?e.pictureUuid:"product";return l(Dt,{loading:"lazy",src:kn({uuid:t,size:512}),css:{objectFit:"fill",height:200,borderRadius:4,"@sm":{height:300}}})}function $ze({children:e,onClick:t,product:n}){var o,s;const r=(o=n.latestPostStatus)!=null&&o.name?"status"+n.latestPostStatus.name:"borderColor",i=(s=n.latestPostStatus)!=null&&s.name?"status"+n.latestPostStatus.name+"Hover":"hoveringCard";return l(P,{onClick:t,css:{p:12,backgroundColor:"$cardBackgroundColor",gap:"$2",borderRadius:8,border:"1px solid $"+r,transition:"all 200ms","&:hover":{cursor:"pointer",boxShadow:"$xsmall",border:"1px solid $"+i,transition:"all 200ms"}},children:e})}function Dze({product:e}){const{permissions:t}=st();Z.extend(Pn),Z.extend(On);const n=(e==null?void 0:e.eventName)===void 0||(e==null?void 0:e.eventName)===null;return g(P,{css:{gap:"$2",width:"100%",flexGrow:1,justifyContent:"flex-end"},children:[e.eventName&&l(Dn,{store:{id:e.eventId,name:e.eventName,pictureUuid:e.eventPictureUuid}}),t.features.products.showStore&&l(Dn,{store:{id:e.store.id,name:e.store.name,pictureUuid:e.store.pictureUuid}}),!e.eventName&&t.features.products.showDeadline&&l(Oze,{product:e}),g(M,{title:Z(e.createdAt).format("LLL"),css:{mt:"$3",alignItems:"center",fontSize:12,justifyContent:n&&t.features.products.priority?"space-between":"flex-end",width:"100%",textAlign:"right",color:"$gray400"},children:[n&&t.features.products.priority&&l(E0,{priority:e.priority,size:18}),!e.isFriend&&!e.isBlogger&&g(Ne,{children:["Created: ",Z(e.createdAt).fromNow()]}),(e.isFriend||e.isBlogger)&&e.latestPostStatus&&l(Pi,{badge:e.latestPostStatus.name,size:"small",children:e.latestPostStatus.label}),(e.isFriend||e.isBlogger)&&!e.latestPostStatus&&l(Pi,{badge:"gray",size:"small",children:"Missing post"})]})]})}function Oze({product:e}){return g(M,{css:{alignItems:"center",gap:"$2"},children:[e.isFriend&&g(z,{children:[l(W,{icon:ez,css:{width:24}}),l(A,{children:"Friend"})]}),!e.isFriend&&e.deadlineInDays&&g(z,{children:[l(W,{icon:My,css:{width:24}}),g(A,{children:[e.deadlineInDays," days"]})]}),!e.isFriend&&e.autoDeadline&&g(z,{children:[l(W,{icon:wce,css:{width:24}}),g(A,{children:[e.autoDeadline," days"]})]}),!e.isFriend&&!e.autoDeadline&&!e.deadlineInDays&&!e.optionalBlogging&&g(z,{children:[l(W,{icon:Bce,css:{width:24}}),l(A,{children:"No deadline"})]}),!e.isFriend&&e.optionalBlogging&&g(z,{children:[l(W,{icon:Fce,css:{width:24}}),l(A,{children:"Optional blogging"})]})]})}function Pze({product:e}){return l(A,{css:{flexGrow:1,fontWeight:"$bold",marginTop:"$2",fontFamily:"$redHatDisplay"},children:e.name})}Z.extend(Pn);function Rze({children:e,scheduledAt:t,setScheduledAt:n}){const[r,i]=Ae.useState(!1),o=Ae.useRef(null);return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Schedule your post"}),l(ht,{children:g(P,{children:[l(ae,{children:"Scheduled date (SLT)"}),l(ae,{type:"help",children:"Choose the date when the post should be posted"}),l(WQ,{ref:o,defaultInputValue:t!=null?t:Z.tz(Z(),"America/Los_Angeles").format("YYYY-MM-DDTHH:mm"),min:Z.tz(Z(),"America/Los_Angeles").format("YYYY-MM-DDTHH:mm")})]})}),g(wt,{css:{alignItems:"center","@sm":{flexDirection:"column"}},children:[l(Y,{variant:"inline",onClick:()=>i(!1),children:"Cancel"}),t&&l(Y,{variant:"softDanger",onClick:()=>{n(null),i(!1)},children:"Remove scheduled date"}),l(Y,{variant:"primary",onClick:()=>{n(o.current.value),i(!1)},children:"Schedule post"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function rX({quotedPost:e=null,forcedRating:t=null}){const{selectedEntity:n,subscription:r,perms:i}=st(),[o,s]=y.exports.useState(""),[a,c]=y.exports.useState(t),[u,d]=y.exports.useState(!1),[f,h]=y.exports.useState(!1),[p,m]=y.exports.useState(!1),[v,b]=y.exports.useState(!1),[x,C]=y.exports.useState([]),{isLoading:w,mutate:S}=Iqe(),[T,E]=y.exports.useState([]),{setSharingPost:k}=BE(),{setCreatePost:_}=Ym(),O=ar(),D=te(),[L,N]=y.exports.useState(null);Z.extend(Pn),Z.extend(On);const j=y.exports.useRef(null),G=()=>{j.current&&(j.current.style.height="auto",j.current.style.height=`${j.current.scrollHeight+10}px`)},X=ee=>{E(I=>I.filter(me=>(me.id===ee.id&&me.abortController&&me.abortController.abort(),me.id!==ee.id)))},re=async ee=>{const I=Array.from(ee),me=["image/jpeg","image/png","image/webp"],Se=I.filter(pe=>me.includes(pe.type)&&pe.size<=r.maximumMbUploadSize*1e3*1e3);if(T.length+Se.length>4){F({type:"error",title:"Error while uploading your image",message:"You can only upload a maximum of 4 images"});return}if(Se.length!==I.length){const pe=I.filter($e=>!me.includes($e.type)||$e.size>r.maximumMbUploadSize*1e3*1e3),ye=pe.filter($e=>!me.includes($e.type)),_e=pe.filter($e=>$e.size>r.maximumMbUploadSize*1e3*1e3);if(ye.length>0&&F({type:"error",title:"Error while uploading your image",message:"Only JPG, PNG, and WEBP files are allowed"}),_e.length>0){let $e;n.isUser?r.type==="free"?$e=`Your image is exceeding the limit of ${r.maximumMbUploadSize}MB. Consider upgrading to Primfeed Pro to unlock 100MB.`:$e=`Your image is exceeding the limit of ${r.maximumMbUploadSize}MB.`:r.type==="free"?$e=`Your image is exceeding the limit of ${r.maximumMbUploadSize}MB. Consider upgrading to any paid EasyBloggers plans to unlock 100MB.`:$e=`Your image is exceeding the limit of ${r.maximumMbUploadSize}MB.`,F({type:"error",title:"Error while uploading your image",message:$e})}return}Se.forEach(pe=>{const ye=new FileReader;let _e={id:`${b6()}`,abortController:null,image:null,preview:null,progress:0};ye.onloadend=()=>{uq(pe,1024,1024,$e=>{_e={..._e,preview:$e},E(J=>[...J,_e]),oe(pe,_e)})},pe instanceof Blob&&ye.readAsDataURL(pe)})},oe=(ee,I)=>{const me=new FormData;me.append("file",ee);const Se=new AbortController;return D.post("/pf/upload-image",me,{signal:Se.signal,onUploadProgress:pe=>{const ye=pe.loaded/pe.total*100;E(_e=>_e.map($e=>$e.id===I.id?{...$e,abortController:Se,progress:ye}:$e))}}).then(pe=>{E(ye=>ye.map(_e=>_e.id===I.id?{..._e,image:pe.data,progress:100}:_e))}).catch(pe=>{pe.message!=="canceled"&&F({type:"error",title:"Upload failed",message:"The upload of your picture failed, please try again."}),X(I)})},U=ee=>{const I=ee.clipboardData.items;for(let me=0;me<I.length;me++)if(I[me].type.indexOf("image")!==-1){const Se=I[me].getAsFile(),pe=new DataTransfer;pe.items.add(Se);const ye=pe.files;re(ye)}},H=ee=>{ee.preventDefault(),ee.stopPropagation(),re(ee.dataTransfer.files)},R=ee=>{ee.preventDefault(),ee.stopPropagation()};y.exports.useEffect(()=>{G()},[o]);const se=o1({content:null,editable:!0,targetMention:e?"create-share-modal":"create-post-modal"});return g(dt,{css:{display:"flex",flexDirection:"column",marginTop:"$4",gap:"$3",alignItems:"flex-start",minWidth:"100%",'.tiptap.ProseMirror[contenteditable="true"]':{minHeight:200,maxHeight:400,overflow:"auto"}},onSubmit:ee=>{ee.preventDefault()},children:[g(M,{css:{width:"100%",alignItems:"flex-start",gap:"$4","@xs":{flexDirection:"column"}},children:[l(en,{css:{flexShrink:0},sizePicture:40,showName:!1,entity:n}),g(P,{css:{width:"100%",wordBreak:"break-word"},onDrop:H,onDragOver:R,onPaste:U,children:[l(Gd,{editor:se}),l(Dg,{editor:se}),l(Mze,{postImages:T,handleImageChange:re,removeImage:X}),T.length>0&&g(P,{css:{fontSize:13},children:[g(P,{css:{gap:"$1",marginTop:"$4",marginBottom:"$2"},children:[g(M,{css:{gap:"$1",alignItems:"center"},children:[l(A,{css:{fontWeight:"$bold"},children:T.length>1?"Does your medias contain a vendor ad?":"Does your media contain a vendor ad?"}),l(o4,{id:"vendorAd",defaultChecked:v,onCheckedChange:b,name:"vendor-ad",children:l(s4,{})})]}),v&&g(P,{children:[g(A,{children:["Vendor ads must follow the"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#vendors-a-ds",children:"content guidelines"}),"."]}),g(M,{css:{marginTop:"$2",gap:"$1",alignItems:"center"},children:["- Use of AI"," ",l(o4,{id:"isAi",defaultChecked:f,onCheckedChange:h,name:"is-ai",children:l(s4,{})})]}),g(M,{css:{gap:"$1",alignItems:"center"},children:["- Rendered in 3D using external software"," ",l(o4,{id:"isRender",defaultChecked:p,onCheckedChange:m,name:"is-render",children:l(s4,{})})]})]})]}),g(P,{css:{gap:"$1",marginTop:"$2",marginBottom:"$2"},children:[g(M,{css:{gap:"$1",alignItems:"center"},children:[g(A,{css:{fontWeight:"$bold"},children:["Add the picture",T.length>1?"s":""," to the Public Gallery?"]}),l(o4,{id:"publicGallery",defaultChecked:u,onCheckedChange:d,name:"public-gallery",children:l(s4,{})})]}),g(A,{children:["Residents will see your picture",T.length>1?"s":""," in the Public Gallery, see its"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#maturity-rating",target:"_blank",rel:"noopener",children:"guidelines"}),"."]})]})]}),i.canAddProducts===!0&&T.length===1&&l(z,{children:g(P,{css:{gap:"$1",marginTop:"$2",marginBottom:"$2",maxWidth:"100%"},children:[l(M,{css:{gap:"$1"},children:l(A,{css:{fontWeight:"$bold",fontSize:13},children:"Is there a product in this picture?"})}),l(A,{css:{fontSize:13},children:"Add an EasyBloggers product to this picture, and provide a direct link to your followers to the presented product."}),l(Nze,{products:x,setProducts:C,children:g(Y,{variant:"primary",size:"small",css:{gap:"$1"},children:[l(W,{icon:q4}),"Add a product"]})})]})}),T.length>0&&r.type==="free"&&g(M,{css:{maxWidth:"100%",backgroundColor:"$pfPremiumBackgroundColor",px:"$3",py:"$2",gap:"$3",borderRadius:8,marginTop:"$4"},children:[l(W,{icon:Nf}),g(P,{children:[g(A,{children:["Consider upgrading to"," ",l("strong",{children:n.isUser?"Primfeed Pro":"any EasyBloggers subscription"})," ","to unlock a maximum resolution of ",l("strong",{children:"10,000x10,000"})," ","for your pictures."]}),g(A,{children:["You are currently limited to a maximum resolution of"," ",l("strong",{children:"1500x1500"})," for your pictures."]}),g(A,{css:{marginTop:"$4"},children:["See more at"," ",l(ie,{css:{color:"$textColor",fontWeight:"$bold"},to:n.isUser?"https://docs.primfeed.com/primfeed-pro":"https://www.kynno.app/easybloggers/pricing?utm_source=primfeed",children:"this link"}),"."]})]})]})]})]}),i.canAddProducts===!0&&x.length>0&&g(P,{css:{maxWidth:"100%",paddingLeft:56},children:[l(A,{css:{fontWeight:"$bold",fontSize:13},children:"Displayed Products"}),x.map((ee,I)=>l(Q3,{name:ee.label},"product-id-selected-"+I))]}),l(io,{css:{mx:"auto"}}),g(M,{css:{alignItems:"center",gap:"$4",width:"100%",flexWrap:"wrap"},children:[l(P,{css:{gap:"$2"},children:g(z,{children:[g(M,{css:{fontWeight:"$medium",gap:"$1",alignItems:"center"},children:[l(A,{children:"Maturity rating"}),l(Et,{small:!0,delayDuration:400,content:g(A,{children:["Your post and media should follow our rules, please review"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#maturity-rating",target:"_blank",children:"Terms of Service"})," ","to know how to set the correct maturity rating for your post."]}),children:l(W,{icon:Nf,css:{width:12}})})]}),t!==null&&l(ur,{rating:a}),t===null&&l(wg,{"aria-label":"Maturity rating of your post",onValueChange:ee=>c(ee),value:a,css:{flexDirection:"row"},children:[{value:"general",label:l(ur,{rating:"general"})},{value:"moderate",label:l(ur,{rating:"moderate"})},{value:"adult",label:l(ur,{rating:"adult"})},{value:"adult_plus",label:l(ur,{rating:"adult_plus"})}].map((ee,I)=>g(Fc,{css:{paddingRight:"$1"},children:[l(Lc,{value:ee.value,id:"c"+I,css:{width:10,height:10},children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c"+I,children:ee.label})]},"c"+I))})]})}),l(M,{css:{justifyContent:"flex-end",flex:1},children:g(P,{css:{gap:"$2"},children:[L&&l(M,{css:{color:"$subTextColor"},children:l(Et,{small:!0,content:g(ce,{children:[Z.tz.guess(),":"," ",Z.tz(L,"America/Los_Angeles").tz(Z.tz.guess()).format("LLL")," "]}),children:g(A,{css:{fontSize:12},children:["Post scheduled at ",Z(L).format("LLL")," SLT"]})})}),g(M,{css:{gap:"$3",justifyContent:"flex-end"},children:[!i.canSchedulePost&&l(Et,{content:l("p",{children:"Only premium members can schedule posts."}),small:!0,children:l(M,{css:{alignItems:"center",justifyContent:"center",marginBottom:0,cursor:"pointer",transition:"color 0.2s, background-color 0.2s",p:"$2",borderRadius:9999,"&:hover":{cursor:"not-allowed"}},children:l(W,{css:{height:18,width:18,color:"$textColor"},icon:Xx})})}),i.canSchedulePost&&l(Rze,{scheduledAt:L,setScheduledAt:N,children:l(M,{css:{alignItems:"center",justifyContent:"center",marginBottom:0,cursor:"pointer",transition:"color 0.2s, background-color 0.2s",p:"$2",borderRadius:9999,"&:hover":{transition:"color 0.2s, background-color 0.2s",backgroundColor:"$uploadBackgroundColorHover"}},children:l(W,{css:{height:18,width:18,color:"$textColor"},icon:Xx})})}),l(ae,{htmlFor:"hiddenPicturesInput",css:{marginBottom:0,cursor:"pointer",transition:"color 0.2s, background-color 0.2s",p:"$2",borderRadius:100,"&:hover":{transition:"color 0.2s, background-color 0.2s",backgroundColor:"$uploadBackgroundColorHover"}},children:l(W,{css:{height:16,marginTop:2,width:18,color:"$textColor"},icon:aoe})}),g(Y,{variant:"primary",css:{borderRadius:1e5,py:"$2",px:"$4",fontSize:13},onClick:()=>S({content:se.getHTML(),images:T.map(ee=>ee.image),rating:a,quotedPost:e==null?void 0:e.data.id,publicGallery:u,products:x,ai:f,render:p,vendorAd:v,scheduledAt:L},{onSuccess:ee=>{s(""),c(null),E([]),C([]),d(!1),b(!1),h(!1),m(!1),k(null),G(),N(null),se.commands.clearContent(),F({type:"success",title:"Success",message:"Your post have been posted.",Button:l(Y,{variant:"white",size:"small",onClick:()=>{O(ee.data.url)},css:{marginLeft:"auto"},children:"View post"})}),_(!1)}}),disabled:w||!T.every(ee=>ee.image!==null),children:[l(W,{icon:Q0}),L?"Schedule":"Post"]})]})]})})]})]})}function Mze({postImages:e,handleImageChange:t,removeImage:n}){return g(z,{children:[l(Ke,{type:"file",accept:"image/*",onChange:r=>t(r.target.files),multiple:!0,disabled:e.length>=4,css:{display:"none"},id:"hiddenPicturesInput"}),e.length>0&&l(Lze,{elements:e.length,children:e.map(r=>g(M,{css:{position:"relative",width:"100%",paddingBottom:e.length>1?300:0,overflow:"hidden",borderRadius:12,maxHeight:e.length>1?300:600},children:[l(Ize,{css:{position:e.length>1?"absolute":"initial",top:"0",left:"0",width:"100%",height:"100%",maxHeight:e.length>1?300:"100%",objectFit:"cover"},src:r.preview,alt:""}),l(Y,{onClick:()=>n(r),"aria-label":"Close",css:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:8,right:8,p:"$2",width:32,height:32,background:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",borderRadius:1e3,cursor:"pointer"},children:l(W,{icon:Ul,css:{width:20,height:20}})}),r.progress!==void 0&&r.image===null&&l(M,{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:10},children:l(ce,{css:{width:`${r.progress}%`,height:"100%",backgroundColor:"$amber500"}})})]},r.id))})]})}const Ize=de("img",{}),Lze=de("div",{display:"flex",flexWrap:"wrap",gap:"8px",width:"100%",my:"$2",variants:{elements:{1:{flexDirection:"column"},2:{flexDirection:"row","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}},3:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(1), & > :nth-child(2)":{flex:"1 1 calc(50% - 8px)"},"& > :nth-child(3)":{flex:"1 1 100%"}},4:{flexDirection:"row",flexWrap:"wrap","& > :nth-child(n)":{flex:"1 1 calc(50% - 8px)"}}}}});function Nze({children:e,products:t,setProducts:n}){const[r,i]=y.exports.useState(!1),o=te();function s(a){return o.get("/pf/search/products?q="+encodeURIComponent(a)).then(c=>c.data)}return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),css:{height:"70vh"},children:[l(nt,{children:"Add products"}),l(ht,{children:"As an EasyBloggers user, you can add products and link them to your post. This is the perfect way to promote a product, and give your viewers the location to buy it."}),g(P,{css:{marginBottom:"$4"},children:[l(ae,{children:"Product:"}),l(OW,{name:"product",defaultOptions:!0,loadOptions:s,isMulti:!0,value:t,onChange:a=>{n(a)},styles:{menuPortal:a=>({...a,pointerEvents:"auto"}),placeholder:a=>({...a,color:"var(--colors-colorText)"}),control:a=>({...a,cursor:"pointer",borderRadius:"8px",borderColor:"var(--colors-borderColor)",backgroundColor:"var(--colors-cardBackgroundColor)",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05);","&:hover":{borderColor:"var(--colors-borderColor)"}}),menuList:a=>({...a,borderRadius:"8px",backgroundColor:"var(--colors-backgroundColor)",color:"var(--colors-textColor)"}),menu:a=>({...a,borderRadius:"8px",backgroundColor:"var(--colors-backgroundColor)",border:"1px solid var(--colors-borderColor)",color:"var(--colors-textColor)"}),valueContainer:a=>({...a,padding:"4px",borderColor:"var(--colors-borderColor)"}),clearIndicator:a=>({...a,paddingLeft:"4px"}),option:a=>({...a,cursor:"pointer",borderRadius:"8px",backgroundColor:"var(--colors-cardBackgroundColor)","&:hover":{backgroundColor:"var(--colors-hoverItem)",fontWeight:"bold"}}),multiValue:a=>({...a,cursor:"pointer",backgroundColor:"var(--colors-cardBackgroundColor)",border:"1px solid var(--colors-borderColor)","&:hover":{backgroundColor:"var(--colors-hoverItem)"}}),multiValueLabel:a=>({...a,color:"var(--colors-textColor)"})}})]}),l(wt,{children:l(Y,{variant:"primary",onClick:()=>i(!1),children:"Add products"})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const o4=de(tg,{all:"unset",width:26,cursor:"pointer",height:14,backgroundColor:"$gray400",borderRadius:"9999px",position:"relative",boxShadow:"0 2px 10px $gray800",'&[data-state="checked"]':{backgroundColor:"$yellow400"}}),s4=de(ng,{display:"block",width:10,height:10,backgroundColor:"white",borderRadius:"9999px",boxShadow:"0 2px 2px $gray900",transition:"transform 100ms",transform:"translateX(2px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(14px)"}});function en({entity:e,showPicture:t=!0,showName:n=!0,inline:r=!1,nameBold:i=!1,css:o=null,sizePicture:s=24,openDelay:a=500,profileMediaSize:c=256,showHoverCard:u=!0,showHandle:d=!1,link:f=!0,infiniteScrollRef:h=null}){const{setViewingMedia:p}=Ra(),m=Ee(),v=e.picture!==null&&e.picture!==void 0?e.picture:e.type;let b=e.profileMedia+`_x${c}.webp`;e.profileMedia===null&&(b=kn({uuid:v,size:Math.min(128*2,512)}));const x=r?null:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},C=g(z,{children:[t&&l(Dt,{css:{borderRadius:e.isUser===!0?100:6},alt:"",width:s,height:s,src:b}),n&&g(z,{children:[l(Ne,{css:{...x,fontWeight:i?"$bold":"inherit",display:"inline",maxWidth:"100%","&:hover":{textDecoration:f?"underline":"none"}},children:e.displayName}),e.verified&&l(Bl,{isUser:e.isUser,marginLeft:0})]}),d&&g(Ne,{css:{fontWeight:"$semiBold",fontSize:13,fontFamily:"$redHatDisplay",color:"$handleColor","&:hover":{textDecoration:"none"}},children:["@",e.handle]})]}),w=g(M,{ref:h,css:{display:r?"inline-flex":"flex",position:"relative",alignItems:"center",minWidth:0,width:"fit-content",whiteSpace:"nowrap",flexShrink:0,maxWidth:"100%",...o,"&:hover":{cursor:"pointer"}},onClick:S=>{f===!0&&S.stopPropagation()},children:[f===!1&&l(Ne,{css:{display:"inline-flex",alignItems:"center",gap:"$2",maxWidth:"100%"},children:C}),f===!0&&l(ie,{to:"/"+e.handle,onClick:()=>{p(null),m.resetQueries(["feed",e.id])},noStyle:!0,css:{display:"inline-flex",alignItems:"center",gap:6,maxWidth:"100%"},children:C})]});return u===!1?w:l(bX,{entity:e,openDelay:a,children:w})}var Xo=function(e,t){return Number(e.toFixed(t))},Fze=function(e,t){return typeof e=="number"?e:t},Wn=function(e,t,n){n&&typeof n=="function"&&n(e,t)},Bze=function(e){return-Math.cos(e*Math.PI)/2+.5},Hze=function(e){return e},zze=function(e){return e*e},Uze=function(e){return e*(2-e)},Vze=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},jze=function(e){return e*e*e},Wze=function(e){return--e*e*e+1},qze=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},Kze=function(e){return e*e*e*e},Gze=function(e){return 1- --e*e*e*e},Yze=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},Qze=function(e){return e*e*e*e*e},Xze=function(e){return 1+--e*e*e*e*e},Zze=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},iX={easeOut:Bze,linear:Hze,easeInQuad:zze,easeOutQuad:Uze,easeInOutQuad:Vze,easeInCubic:jze,easeOutCubic:Wze,easeInOutCubic:qze,easeInQuart:Kze,easeOutQuart:Gze,easeInOutQuart:Yze,easeInQuint:Qze,easeOutQuint:Xze,easeInOutQuint:Zze},oX=function(e){typeof e=="number"&&cancelAnimationFrame(e)},pa=function(e){!e.mounted||(oX(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function sX(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;pa(e),e.animation=function(){if(!e.mounted)return oX(e.animation);var s=new Date().getTime()-i,a=s/n,c=iX[t],u=c(a);s>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Jze(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(Number.isNaN(t)||Number.isNaN(n)||Number.isNaN(r))}function Au(e,t,n,r){var i=Jze(t);if(!(!e.mounted||!i)){var o=e.setTransformState,s=e.transformState,a=s.scale,c=s.positionX,u=s.positionY,d=t.scale-a,f=t.positionX-c,h=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):sX(e,r,n,function(p){var m=a+d*p,v=c+f*p,b=u+h*p;o(m,v,b)})}}function eUe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,s=t.offsetHeight,a=o*n,c=s*n,u=r-a,d=i-c;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:a,newDiffWidth:u,newContentHeight:c,newDiffHeight:d}}var tUe=function(e,t,n,r,i,o,s){var a=e>t?n*(s?1:.5):0,c=r>i?o*(s?1:.5):0,u=e-t-a,d=a,f=r-i-c,h=c;return{minPositionX:u,maxPositionX:d,minPositionY:f,maxPositionY:h}},S_=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=eUe(n,r,t),s=o.wrapperWidth,a=o.wrapperHeight,c=o.newContentWidth,u=o.newDiffWidth,d=o.newContentHeight,f=o.newDiffHeight,h=tUe(s,c,u,a,d,f,Boolean(i));return h},Uw=function(e,t,n,r){return r?e<t?Xo(t,2):e>n?Xo(n,2):Xo(e,2):Xo(e,2)},rh=function(e,t){var n=S_(e,t);return e.bounds=n,n};function D9(e,t,n,r,i,o,s){var a=n.minPositionX,c=n.minPositionY,u=n.maxPositionX,d=n.maxPositionY,f=0,h=0;s&&(f=i,h=o);var p=Uw(e,a-f,u+f,r),m=Uw(t,c-h,d+h,r);return{x:p,y:m}}function O9(e,t,n,r,i,o){var s=e.transformState,a=s.scale,c=s.positionX,u=s.positionY,d=r-a;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:c,y:u};var f=c-t*d,h=u-n*d,p=D9(f,h,i,o,0,0,null);return p}function $g(e,t,n,r,i){var o=i?r:0,s=t-o;return!Number.isNaN(n)&&e>=n?n:!Number.isNaN(t)&&e<=s?s:e}var ZL=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,s="shadowRoot"in o&&"composedPath"in t,a=s?t.composedPath().some(function(d){return d instanceof Element?i==null?void 0:i.contains(d):!1}):i==null?void 0:i.contains(o),c=r&&o&&a;if(!c)return!1;var u=P9(o,n);return!u},JL=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},nUe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,s=t.clientY;e.startCoords={x:o-r,y:s-i}},rUe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var s=n.length===1;if(s){var a=n[0].clientX,c=n[0].clientY;e.startCoords={x:a-i,y:c-o}}};function iUe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,s=o.disabled,a=o.limitToBounds,c=o.centerZoomedOut,u=e.wrapperComponent;if(!(s||!u||!e.bounds)){var d=e.bounds,f=d.maxPositionX,h=d.minPositionX,p=d.maxPositionY,m=d.minPositionY,v=n>f||n<h,b=r>p||r<m,x=n>f?u.offsetWidth:e.setup.minPositionX||0,C=r>p?u.offsetHeight:e.setup.minPositionY||0,w=O9(e,x,C,i,e.bounds,a||c),S=w.x,T=w.y;return{scale:i,positionX:v?S:n,positionY:b?T:r}}}function aX(e,t,n,r,i){var o=e.setup.limitToBounds,s=e.wrapperComponent,a=e.bounds,c=e.transformState,u=c.scale,d=c.positionX,f=c.positionY;if(!(s===null||a===null||t===d&&n===f)){var h=D9(t,n,a,o,r,i,s),p=h.x,m=h.y;e.setTransformState(u,p,m)}}var oUe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,s=o.lockAxisX,a=o.lockAxisY,c=i.positionX,u=i.positionY;if(!r)return{x:c,y:u};var d=t-r.x,f=n-r.y,h=s?c:d,p=a?u:f;return{x:h,y:p}},ih=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale,s=n.disablePadding;return t>0&&i>=o&&!s?t:0},sUe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,s=i.disabled,a=!s||o>1||!r||t;return!!a},aUe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,s=i.velocityAnimation,a=e.transformState.scale,c=s.disabled,u=!c||a>1||!o||t;return!(!u||!n||!r)};function lUe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function eN(e,t,n,r,i,o,s,a,c,u){if(i){if(t>s&&n>s){var d=s+(e-s)*u;return d>c?c:d<s?s:d}if(t<o&&n<o){var d=o+(e-o)*u;return d<a?a:d>o?o:d}}return r?t:Uw(e,o,s,i)}function cUe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function uUe(e,t){var n=sUe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,s=e.wrapperComponent,a=o.velocityAnimation.equalToMove,c=Date.now();if(r&&i&&s){var u=cUe(s,a),d=t.x-r.x,f=t.y-r.y,h=d/u,p=f/u,m=c-i,v=d*d+f*f,b=Math.sqrt(v)/m;e.velocity={velocityX:h,velocityY:p,total:b}}e.lastMousePosition=t,e.velocityTime=c}}function dUe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=aUe(e);if(!(!o||!t||!n||!i)){var s=t.velocityX,a=t.velocityY,c=t.total,u=n.maxPositionX,d=n.minPositionX,f=n.maxPositionY,h=n.minPositionY,p=r.limitToBounds,m=r.alignmentAnimation,v=r.zoomAnimation,b=r.panning,x=b.lockAxisY,C=b.lockAxisX,w=v.animationType,S=m.sizeX,T=m.sizeY,E=m.velocityAlignmentTime,k=E,_=lUe(e,c),O=Math.max(_,k),D=ih(e,S),L=ih(e,T),N=D*i.offsetWidth/100,j=L*i.offsetHeight/100,G=u+N,X=d-N,re=f+j,oe=h-j,U=e.transformState,H=new Date().getTime();sX(e,w,O,function(R){var se=e.transformState,ee=se.scale,I=se.positionX,me=se.positionY,Se=new Date().getTime()-H,pe=Se/k,ye=iX[m.animationType],_e=1-ye(Math.min(1,pe)),$e=1-R,J=I+s*$e,fe=me+a*$e,we=eN(J,U.positionX,I,C,p,d,u,X,G,_e),Le=eN(fe,U.positionY,me,x,p,h,f,oe,re,_e);(I!==J||me!==fe)&&e.setTransformState(ee,we,Le)})}}function tN(e,t){var n=e.transformState.scale;pa(e),rh(e,n),window.TouchEvent!==void 0&&t instanceof TouchEvent?rUe(e,t):nUe(e,t)}function lX(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,s=i.sizeX,a=i.sizeY,c=i.animationTime,u=i.animationType,d=o||t<r||!s&&!a;if(!d){var f=iUe(e);f&&Au(e,f,c,u)}}function nN(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,s=o.sizeX,a=o.sizeY;if(!!r){var c=oUe(e,t,n),u=c.x,d=c.y,f=ih(e,s),h=ih(e,a);uUe(e,{x:u,y:d}),aX(e,u,d,f,h)}}function fUe(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r==null?void 0:r.getBoundingClientRect(),s=i==null?void 0:i.getBoundingClientRect(),a=(o==null?void 0:o.width)||0,c=(o==null?void 0:o.height)||0,u=(s==null?void 0:s.width)||0,d=(s==null?void 0:s.height)||0,f=a<u||c<d,h=!t&&n&&(n==null?void 0:n.total)>.1&&f;h?dUe(e):lX(e)}}function E_(e,t,n,r){var i=e.setup,o=i.minScale,s=i.maxScale,a=i.limitToBounds,c=$g(Xo(t,2),o,s,0,!1),u=rh(e,c),d=O9(e,n,r,c,u,a),f=d.x,h=d.y;return{scale:c,positionX:f,positionY:h}}function cX(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,s=o.minScale,a=o.limitToBounds,c=o.zoomAnimation,u=c.disabled,d=c.animationTime,f=c.animationType,h=u||r>=s;if((r>=1||a)&&lX(e),!(h||!i||!e.mounted)){var p=t||i.offsetWidth/2,m=n||i.offsetHeight/2,v=E_(e,s,p,m);v&&Au(e,v,d,f)}}var nu=function(){return nu=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},nu.apply(this,arguments)};function rN(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var a4={previousScale:1,scale:1,positionX:0,positionY:0},Tp={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,disablePadding:!1,smooth:!0,wheel:{step:.2,disabled:!1,smoothStep:.001,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,allowLeftClickPan:!0,allowMiddleClickPan:!0,allowRightClickPan:!0,wheelPanning:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},uX=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:a4.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:a4.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:a4.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:a4.positionY}},iN=function(e){var t=nu({},Tp);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Tp[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Tp[n]),s=o==="[object Object]",a=o==="[object Array]";s?t[n]=nu(nu({},Tp[n]),e[n]):a?t[n]=rN(rN([],Tp[n],!0),e[n],!0):t[n]=e[n]}}),t},dX=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,s=o.maxScale,a=o.minScale,c=o.zoomAnimation,u=o.smooth,d=c.size;if(!i)throw new Error("Wrapper is not mounted");var f=u?r*Math.exp(t*n):r+t*n,h=$g(Xo(f,3),a,s,d,!1);return h};function fX(e,t,n,r,i){var o=e.wrapperComponent,s=e.transformState,a=s.scale,c=s.positionX,u=s.positionY;if(!o)return console.error("No WrapperComponent found");var d=o.offsetWidth,f=o.offsetHeight,h=(d/2-c)/a,p=(f/2-u)/a,m=dX(e,t,n),v=E_(e,m,h,p);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Au(e,v,r,i)}function hX(e,t,n,r){var i=e.setup,o=e.wrapperComponent,s=i.limitToBounds,a=uX(e.props),c=e.transformState,u=c.scale,d=c.positionX,f=c.positionY;if(!!o){var h=S_(e,a.scale),p=D9(a.positionX,a.positionY,h,s,0,0,o),m={scale:a.scale,positionX:p.x,positionY:p.y};u===a.scale&&d===a.positionX&&f===a.positionY||(r==null||r(),Au(e,m,t,n))}}function hUe(e,t,n,r){var i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=n.getBoundingClientRect(),a=o.x*r.scale,c=o.y*r.scale;return{x:(i.x-s.x+a)/r.scale,y:(i.y-s.y+c)/r.scale}}function pUe(e,t,n){var r=e.wrapperComponent,i=e.contentComponent,o=e.transformState,s=e.setup,a=s.limitToBounds,c=s.minScale,u=s.maxScale;if(!r||!i)return o;var d=r.getBoundingClientRect(),f=t.getBoundingClientRect(),h=hUe(t,r,i,o),p=h.x,m=h.y,v=f.width/o.scale,b=f.height/o.scale,x=r.offsetWidth/v,C=r.offsetHeight/b,w=$g(n||Math.min(x,C),c,u,0,!1),S=(d.width-v*w)/2,T=(d.height-b*w)/2,E=(d.left-p)*w+S,k=(d.top-m)*w+T,_=S_(e,w),O=D9(E,k,_,a,0,0,r),D=O.x,L=O.y;return{positionX:D,positionY:L,scale:w}}var mUe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),fX(e,1,t,n,r)}},gUe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),fX(e,-1,t,n,r)}},vUe=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var s=e.transformState,a=s.positionX,c=s.positionY,u=s.scale,d=e.wrapperComponent,f=e.contentComponent,h=e.setup.disabled;if(!(h||!d||!f)){var p={positionX:Number.isNaN(t)?a:t,positionY:Number.isNaN(n)?c:n,scale:Number.isNaN(r)?u:r};Au(e,p,i,o)}}},yUe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),hX(e,t,n)}},bUe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,s=e.contentComponent;if(o&&s){var a=pX(t||i.scale,o,s);Au(e,a,n,r)}}},xUe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),pa(e);var o=e.wrapperComponent,s=typeof t=="string"?document.getElementById(t):t;if(o&&s&&o.contains(s)){var a=pUe(e,s,n);Au(e,a,r,i)}}},kv=function(e){return{instance:e,zoomIn:mUe(e),zoomOut:gUe(e),setTransform:vUe(e),resetTransform:yUe(e),centerView:bUe(e),zoomToElement:xUe(e)}},CUe=function(e){return{instance:e,state:e.transformState}},_n=function(e){var t={};return Object.assign(t,CUe(e)),Object.assign(t,kv(e)),t},x7=!1;function C7(){try{var e={get passive(){return x7=!0,!1}};return e}catch{return x7=!1,x7}}var P9=function(e,t){return t.some(function(n){return e.matches("".concat(n,", .").concat(n,", ").concat(n," *, .").concat(n," *"))})},Vw=function(e){e&&clearTimeout(e)},wUe=function(e,t,n){return"translate(".concat(e,"px, ").concat(t,"px) scale(").concat(n,")")},pX=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,s=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:s}};function SUe(e){return function(t){e.forEach(function(n){typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var EUe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,s=n.excluded,a=e.isInitialized,c=e.isPanning,u=t.target,d=a&&!c&&!r&&u;if(!d||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var f=P9(u,s);return!f},TUe=function(e){return e?e.deltaY<0?1:-1:0};function kUe(e,t){var n=TUe(e),r=Fze(t,n);return r}function mX(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var s=e.touches[0];i=(s.clientX-r.left)/n,o=(s.clientY-r.top)/n}return(Number.isNaN(i)||Number.isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var _Ue=function(e,t,n,r,i){var o=e.transformState.scale,s=e.wrapperComponent,a=e.setup,c=a.maxScale,u=a.minScale,d=a.zoomAnimation,f=a.disablePadding,h=d.size,p=d.disabled;if(!s)throw new Error("Wrapper is not mounted");var m=o+t*n;if(i)return m;var v=r?!1:!p,b=$g(Xo(m,3),u,c,h,v&&!f);return b},AUe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,s=i.minScale;return n?r<o||r>s||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},$Ue=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,s=t.target,a=o&&!r&&s;if(!a)return!1;var c=P9(s,i);return!c},DUe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},OUe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Xo(i[0].clientX-r.left,5),s=Xo(i[0].clientY-r.top,5),a=Xo(i[1].clientX-r.left,5),c=Xo(i[1].clientY-r.top,5);return{x:(o+a)/2/t,y:(s+c)/2/t}},gX=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},PUe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,s=i.minScale,a=i.zoomAnimation,c=i.disablePadding,u=a.size,d=a.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var f=t/r,h=f*n;return $g(Xo(h,2),s,o,u,!d&&!c)},RUe=160,MUe=100,IUe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(pa(e),Wn(_n(e),t,r),Wn(_n(e),t,i))},LUe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,s=e.setup,a=e.transformState,c=a.scale,u=s.limitToBounds,d=s.centerZoomedOut,f=s.zoomAnimation,h=s.wheel,p=s.disablePadding,m=s.smooth,v=f.size,b=f.disabled,x=h.step,C=h.smoothStep;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var w=kUe(t,null),S=m?C*Math.abs(t.deltaY):x,T=_Ue(e,w,S,!t.ctrlKey);if(c!==T){var E=rh(e,T),k=mX(t,o,c),_=b||v===0||d||p,O=u&&_,D=O9(e,k.x,k.y,T,E,O),L=D.x,N=D.y;e.previousWheelEvent=t,e.setTransformState(T,L,N),Wn(_n(e),t,r),Wn(_n(e),t,i)}},NUe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;Vw(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(cX(e,t.x,t.y),e.wheelAnimationTimer=null)},MUe);var o=AUe(e,t);o&&(Vw(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,Wn(_n(e),t,r),Wn(_n(e),t,i))},RUe))},FUe=function(e,t){var n=gX(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,pa(e)},BUe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,s=o.limitToBounds,a=o.centerZoomedOut,c=o.zoomAnimation,u=c.disabled,d=c.size;if(!(r===null||!n)){var f=OUe(t,i,n);if(!(!Number.isFinite(f.x)||!Number.isFinite(f.y))){var h=gX(t),p=PUe(e,h);if(p!==i){var m=rh(e,p),v=u||d===0||a,b=s&&v,x=O9(e,f.x,f.y,p,m,b),C=x.x,w=x.y;e.pinchMidpoint=f,e.lastDistance=h,e.setTransformState(p,C,w)}}}},HUe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,cX(e,t==null?void 0:t.x,t==null?void 0:t.y)},vX=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;Vw(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout(function(){e.doubleClickStopEventTimer=null,Wn(_n(e),t,n)},r)},zUe=function(e,t){var n=e.props,r=n.onZoomStart,i=n.onZoom,o=e.setup.doubleClick,s=o.animationTime,a=o.animationType;Wn(_n(e),t,r),hX(e,s,a,function(){return Wn(_n(e),t,i)}),vX(e,t)};function UUe(e,t){return e==="toggle"?t===1?1:-1:e==="zoomOut"?-1:1}function VUe(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,i=e.transformState,o=e.contentComponent,s=i.scale,a=e.props,c=a.onZoomStart,u=a.onZoom,d=n.doubleClick,f=d.disabled,h=d.mode,p=d.step,m=d.animationTime,v=d.animationType;if(!f&&!r){if(h==="reset")return zUe(e,t);if(!o)return console.error("No ContentComponent found");var b=UUe(h,e.transformState.scale),x=dX(e,b,p);if(s!==x){Wn(_n(e),t,c);var C=mX(t,o,s),w=E_(e,x,C.x,C.y);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Wn(_n(e),t,u),Au(e,w,m,v),vX(e,t)}}}var jUe=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,s=o.disabled,a=o.excluded,c=t.target,u=i==null?void 0:i.contains(c),d=n&&c&&u&&!s;if(!d)return!1;var f=P9(c,a);return!f},WUe=function(){function e(t){var n=this;this.mounted=!0,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.isWheelPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){n.initializeWindowEvents()},this.unmount=function(){n.cleanupWindowEvents()},this.update=function(r){n.props=r,rh(n,n.transformState.scale),n.setup=iN(r)},this.initializeWindowEvents=function(){var r,i,o=C7(),s=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,a=s==null?void 0:s.defaultView;(i=n.wrapperComponent)===null||i===void 0||i.addEventListener("wheel",n.onWheelPanning,o),a==null||a.addEventListener("mousedown",n.onPanningStart,o),a==null||a.addEventListener("mousemove",n.onPanning,o),a==null||a.addEventListener("mouseup",n.onPanningStop,o),s==null||s.addEventListener("mouseleave",n.clearPanning,o),a==null||a.addEventListener("keyup",n.setKeyUnPressed,o),a==null||a.addEventListener("keydown",n.setKeyPressed,o)},this.cleanupWindowEvents=function(){var r,i,o=C7(),s=(r=n.wrapperComponent)===null||r===void 0?void 0:r.ownerDocument,a=s==null?void 0:s.defaultView;a==null||a.removeEventListener("mousedown",n.onPanningStart,o),a==null||a.removeEventListener("mousemove",n.onPanning,o),a==null||a.removeEventListener("mouseup",n.onPanningStop,o),s==null||s.removeEventListener("mouseleave",n.clearPanning,o),a==null||a.removeEventListener("keyup",n.setKeyUnPressed,o),a==null||a.removeEventListener("keydown",n.setKeyPressed,o),document.removeEventListener("mouseleave",n.clearPanning,o),pa(n),(i=n.observer)===null||i===void 0||i.disconnect()},this.handleInitializeWrapperEvents=function(r){var i=C7();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},this.handleInitialize=function(r){var i=n.setup.centerOnInit;n.applyTransformation(),n.onInitCallbacks.forEach(function(o){return o(_n(n))}),i&&(n.setCenter(),n.observer=new ResizeObserver(function(){var o,s=r.offsetWidth,a=r.offsetHeight;(s>0||a>0)&&(n.onInitCallbacks.forEach(function(c){return c(_n(n))}),n.setCenter(),(o=n.observer)===null||o===void 0||o.disconnect())}),setTimeout(function(){var o;(o=n.observer)===null||o===void 0||o.disconnect()},5e3),n.observer.observe(r))},this.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=EUe(n,r);if(!!o){var s=n.isPressingKeys(n.setup.wheel.activationKeys);!s||(IUe(n,r),LUe(n,r),NUe(n,r))}}},this.onWheelPanning=function(r){var i=n.setup,o=i.disabled,s=i.wheel,a=i.panning;if(!(!n.wrapperComponent||!n.contentComponent||o||!s.wheelDisabled||a.disabled||!a.wheelPanning||r.ctrlKey)){r.preventDefault(),r.stopPropagation();var c=n.transformState,u=c.positionX,d=c.positionY,f=u-r.deltaX,h=d-r.deltaY,p=a.lockAxisX?u:f,m=a.lockAxisY?d:h,v=n.setup.alignmentAnimation,b=v.sizeX,x=v.sizeY,C=ih(n,b),w=ih(n,x);p===u&&m===d||aX(n,p,m,C,w)}},this.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var s=ZL(n,r);if(!!s){var a=n.isPressingKeys(n.setup.panning.activationKeys);!a||r.button===0&&!n.setup.panning.allowLeftClickPan||r.button===1&&!n.setup.panning.allowMiddleClickPan||r.button===2&&!n.setup.panning.allowRightClickPan||(r.preventDefault(),r.stopPropagation(),pa(n),tN(n,r),Wn(_n(n),r,o))}}},this.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var s=JL(n);if(!!s){var a=n.isPressingKeys(n.setup.panning.activationKeys);!a||(r.preventDefault(),r.stopPropagation(),nN(n,r.clientX,r.clientY),Wn(_n(n),r,o))}}},this.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(fUe(n),Wn(_n(n),r,i))},this.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,s=o.onPinchingStart,a=o.onZoomStart;if(!i){var c=$Ue(n,r);!c||(FUe(n,r),pa(n),Wn(_n(n),r,s),Wn(_n(n),r,a))}},this.onPinch=function(r){var i=n.setup.disabled,o=n.props,s=o.onPinching,a=o.onZoom;if(!i){var c=DUe(n);!c||(r.preventDefault(),r.stopPropagation(),BUe(n,r),Wn(_n(n),r,s),Wn(_n(n),r,a))}},this.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,s=i.onZoomStop;n.pinchStartScale&&(HUe(n),Wn(_n(n),r,o),Wn(_n(n),r,s))},this.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var s=ZL(n,r);if(!!s){var a=n.lastTouch&&+new Date-n.lastTouch<200;if(a&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,pa(n);var c=r.touches,u=c.length===1,d=c.length===2;u&&(pa(n),tN(n,r),Wn(_n(n),r,o)),d&&n.onPinchStart(r)}}}},this.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var s=JL(n);if(!s)return;r.preventDefault(),r.stopPropagation();var a=r.touches[0];nN(n,a.clientX,a.clientY),Wn(_n(n),r,o)}else r.touches.length>1&&n.onPinch(r)},this.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},this.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=jUe(n,r);!o||VUe(n,r)}},this.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},this.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},this.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},this.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},this.setTransformState=function(r,i,o){var s=n.props.onTransformed;if(!Number.isNaN(r)&&!Number.isNaN(i)&&!Number.isNaN(o)){r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation();var a=_n(n);n.onChangeCallbacks.forEach(function(c){return c(a)}),Wn(a,{scale:r,positionX:i,positionY:o},s)}else console.error("Detected NaN set state values")},this.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=pX(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},this.handleTransformStyles=function(r,i,o){return n.props.customTransform?n.props.customTransform(r,i,o):wUe(r,i,o)},this.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,s=r.positionY,a=n.handleTransformStyles(o,s,i);n.contentComponent.style.transform=a}},this.getContext=function(){return _n(n)},this.onChange=function(r){return n.onChangeCallbacks.has(r)||n.onChangeCallbacks.add(r),function(){n.onChangeCallbacks.delete(r)}},this.onInit=function(r){return n.onInitCallbacks.has(r)||n.onInitCallbacks.add(r),function(){n.onInitCallbacks.delete(r)}},this.init=function(r,i){n.cleanupWindowEvents(),n.wrapperComponent=r,n.contentComponent=i,rh(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(i),n.initializeWindowEvents(),n.isInitialized=!0;var o=_n(n);Wn(o,void 0,n.props.onInit)},this.props=t,this.setup=iN(this.props),this.transformState=uX(this.props)}return e}(),R9=Ae.createContext(null),qUe=function(e,t){return typeof e=="function"?e(t):e},KUe=Ae.forwardRef(function(e,t){var n=y.exports.useRef(new WUe(e)).current,r=qUe(e.children,kv(n));return y.exports.useImperativeHandle(t,function(){return kv(n)},[n]),y.exports.useEffect(function(){n.update(e)},[n,e]),l(R9.Provider,{value:n,children:r})});Ae.forwardRef(function(e,t){var n=y.exports.useRef(null),r=y.exports.useContext(R9);return y.exports.useEffect(function(){return r.onChange(function(i){if(n.current){var o=0,s=0;n.current.style.transform=r.handleTransformStyles(o,s,1/i.instance.transformState.scale)}})},[r]),l("div",{...nu({},e,{ref:SUe([n,t])})})});function GUe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var YUe=`.transform-component-module_wrapper__SPB86 {
  position: relative;
  width: -moz-fit-content;
  width: fit-content;
  height: -moz-fit-content;
  height: fit-content;
  overflow: hidden;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  margin: 0;
  padding: 0;
}
.transform-component-module_content__FBWxo {
  display: flex;
  flex-wrap: wrap;
  width: -moz-fit-content;
  width: fit-content;
  height: -moz-fit-content;
  height: fit-content;
  margin: 0;
  padding: 0;
  transform-origin: 0% 0%;
}
.transform-component-module_content__FBWxo img {
  pointer-events: none;
}
`,oN={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};GUe(YUe);var QUe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,s=e.wrapperStyle,a=e.contentStyle,c=e.wrapperProps,u=c===void 0?{}:c,d=e.contentProps,f=d===void 0?{}:d,h=y.exports.useContext(R9),p=h.init,m=h.cleanupWindowEvents,v=y.exports.useRef(null),b=y.exports.useRef(null);return y.exports.useEffect(function(){var x=v.current,C=b.current;return x!==null&&C!==null&&p&&(p==null||p(x,C)),function(){m==null||m()}},[]),l("div",{...nu({},u,{ref:v,className:"react-transform-wrapper ".concat(oN.wrapper," ").concat(r),style:s}),children:l("div",{...nu({},f,{ref:b,className:"react-transform-component ".concat(oN.content," ").concat(o),style:a}),children:t})})},XUe=function(){var e=y.exports.useContext(R9);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e},ZUe=function(){var e=XUe();return kv(e)};const JUe=de(KUe,{maxWidth:"100%"}),eVe=de("div",{}),sN=de("div",{position:"absolute",top:"50%",transform:"translateY(-50%)",color:"white",backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:100,display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,cursor:"pointer"}),tVe=de("div",{position:"absolute",top:"calc(20px + env(safe-area-inset-top))",left:16,backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:100,display:"flex",width:48,height:48,alignItems:"center",justifyContent:"center",color:"white",fontSize:32,cursor:"pointer","&::after":{content:'"\xD7"',position:"absolute",top:"48%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"inherit",lineHeight:"0"}});function nVe(){const{viewingMedia:e,setViewingMedia:t}=Ra();y.exports.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}),[]);const n=8,[r,i]=y.exports.useState(null),[o,s]=y.exports.useState(0),[a,c]=y.exports.useState(0),[u,d]=y.exports.useState(0),[f,h]=y.exports.useState(0),p=y.exports.useMemo(()=>{if(o===0||a===0||u===0||f===0)return 0;const b=Math.min(o/u,a/f);return Math.min(b,1)},[o,a,u,f]),m=y.exports.useCallback(()=>{if(r!==null){const b=r.getBoundingClientRect();s(b.width),c(b.height)}else s(0),c(0)},[r]);y.exports.useEffect(()=>(m(),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}),[m,e]);const v=b=>{d(b.naturalWidth),h(b.naturalHeight)};return y.exports.useEffect(()=>{const b=new Image;b.onload=()=>v(b),b.src=e.post.media[e.selectedMediaIndex].url+"_original.webp?v"+e.post.media[e.selectedMediaIndex].version},[e]),g(eVe,{css:{position:"relative",width:"100%",height:"100vh",flexGrow:1,"@md":{height:"60%",flexGrow:0,flexShrink:0}},ref:b=>i(b),children:[p>0&&l(JUe,{initialScale:p,minScale:p,maxScale:p*n,centerOnInit:!0,children:l(rVe,{imageScale:p})}),l(tVe,{onClick:()=>t(null)})]})}function rVe({imageScale:e}){const{centerView:t}=ZUe(),{viewingMedia:n,setViewingMedia:r}=Ra();y.exports.useEffect(()=>{const o=s=>{s.key==="ArrowRight"?r({...n,selectedMediaIndex:(n.selectedMediaIndex+1)%n.post.media.length}):s.key==="ArrowLeft"&&r({...n,selectedMediaIndex:(n.selectedMediaIndex-1>=0?n.selectedMediaIndex-1:n.post.media.length-1)%n.post.media.length})};return window.addEventListener("keydown",o),()=>{window.removeEventListener("keydown",o)}},[n,r]);const i=_u(()=>{t(e)},100);return y.exports.useEffect(()=>{i()},[i,n]),g(z,{children:[l(QUe,{wrapperStyle:{position:"absolute",width:"100%",height:"100%"},children:l(Dt,{id:"post-image-"+n.selectedMediaIndex,alt:"",src:n.post.media[n.selectedMediaIndex].url+"_original.webp?v"+n.post.media[n.selectedMediaIndex].version,onLoad:i})}),n.post.media.length>1&&g(z,{children:[l(sN,{css:{right:16},onClick:()=>{r({...n,selectedMediaIndex:(n.selectedMediaIndex+1)%n.post.media.length})},children:l(W,{icon:Mie})}),l(sN,{css:{left:16},onClick:()=>{r({...n,selectedMediaIndex:(n.selectedMediaIndex-1>=0?n.selectedMediaIndex-1:n.post.media.length-1)%n.post.media.length})},children:l(W,{icon:Lie})})]})]})}function yX(){var c,u,d;const{viewingMedia:e,setViewingMedia:t}=Ra(),[n,r]=y.exports.useState(null),i=ao(),{isLoading:o,data:s}=rZ(e.post.id),{perms:a}=st();return y.exports.useEffect(()=>{const f=()=>{window.history.pushState({},null,n),t(null)};return window.addEventListener("popstate",f),()=>{window.removeEventListener("popstate",f)}},[n]),y.exports.useEffect(()=>{if(n){const f=h=>{h.key==="Escape"&&(window.history.pushState({},null,n),t(null))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}}},[n]),y.exports.useEffect(()=>{o||(r(i.pathname+decodeURI(i.search)),window.history.pushState({},null,`/${s.data.owner.handle}/posts/${s.data.id}`))},[o]),g(M,{css:{position:"fixed",top:0,left:0,bottom:0,right:0,width:"100%",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.9)",overflow:"auto","@md":{flexDirection:"column",overflow:"scroll"}},children:[l(nVe,{}),g(P,{css:{width:400,backgroundColor:"$cardBackgroundColor",flexShrink:0,p:"$4",overflow:"auto","@sm":{width:300},"@md":{flexGrow:1,paddingBottom:"$8",width:"100%"}},children:[o&&l(A,{children:"Loading\u2026"}),!o&&g(P,{css:{gap:"$2"},children:[g(M,{css:{gap:"$4"},children:[l(T_,{user:s.data.owner,date:s.data.createdAt,rating:s.data.rating,isAi:s.data.isAi,isRender:s.data.isRender,showPublicGalleryBadge:((c=a==null?void 0:a.mod)==null?void 0:c.editPost)&&s.data.publicGallery,showVendorBadge:((u=a==null?void 0:a.mod)==null?void 0:u.editPost)&&s.data.vendorAd}),l(OX,{post:s})]}),s.data.content&&l(k_,{content:s.data.content,showFull:!0}),((d=s.data.products)==null?void 0:d.length)>0&&l(XX,{products:s.data.products}),s.data.quotedPost&&l(Ma,{post:s.data.quotedPost,quotedPost:!0,showComments:!1}),l(_X,{post:s}),l(P,{children:l(ZX,{post:s})})]})]})]})}function bX({children:e,entity:t,openDelay:n=200,profileMediaSize:r=256}){const[i,o]=y.exports.useState(!1),s=VQ({id:t.id}),[a,c]=y.exports.useState(null),u=Ee();return y.exports.useEffect(()=>{s.isFetched&&(s.data.profileMedia===null?c(kn({uuid:s.data.picture,size:r})):c(s.data.profileMedia+`_x${r}.webp`))},[s,r]),g(S6,{openDelay:n,open:i,onOpenChange:d=>{d&&t.id&&!s.isFetched&&s.refetch(),o(d)},children:[l(E6,{asChild:!0,onClick:d=>{o(f=>!f),d.preventDefault()},onFocus:()=>setTimeout(()=>o(!0),0),onBlur:()=>o(!1),children:e}),l(T6,{container:document.body,children:l(cVe,{sideOffset:5,onClick:d=>d.stopPropagation(),children:g(P,{css:{gap:"$2"},children:[g(P,{css:{gap:"$2"},children:[l(M,{css:{alignItems:"center",justifyContent:"space-between"},children:s.isFetched&&g(z,{children:[l(Dt,{css:{borderRadius:s.data.isUser?100:6,display:"block",marginRight:"$2"},alt:"",width:48,height:48,src:a}),s.data.showFollowButton===!0&&l(NX,{user:s.data,refetch:s.refetch})]})}),s.isFetched&&g(P,{css:{maxWidth:"100%",minWidth:0},children:[g(M,{css:{alignItems:"center"},children:[l(ie,{to:"/"+s.data.handle,css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:16,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover":{cursor:"pointer",textDecoration:"underline"}},onClick:()=>{u.resetQueries(["feed",t.id])},children:s.data.displayName}),s.data.verified&&l(Bl,{isUser:s.data.isUser})]}),g(A,{css:{color:"$handleColor",fontSize:13,fontWeight:"$medium"},children:["@",s.data.handle]})]}),s.isFetched&&s.data.entityFollowsUser&&l(uVe,{}),!s.isFetched&&l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:16},children:"Loading\u2026"})]}),s.isFetched&&s.data.about&&l(iVe,{content:s.data.about}),s.isFetched&&s.data.name!=="Primfeed"&&g(M,{css:{gap:"$1"},children:[g(A,{children:[l(Ne,{css:{fontWeight:"$bold"},children:s.data.follow})," ","following"]}),l(A,{children:"\u2022"}),g(A,{children:[l(Ne,{css:{fontWeight:"$bold"},children:s.data.followers})," ","follower",s.data.followers>1?"s":""]})]})]})})})]})}function iVe({content:e}){const t=o1({content:e,editable:!1});return l(Gd,{editor:t})}const oVe=fn({"0%":{opacity:0,transform:"translateY(2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),sVe=fn({"0%":{opacity:0,transform:"translateX(-2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),aVe=fn({"0%":{opacity:0,transform:"translateY(-2px)"},"100%":{opacity:1,transform:"translateY(0)"}}),lVe=fn({"0%":{opacity:0,transform:"translateX(2px)"},"100%":{opacity:1,transform:"translateX(0)"}}),cVe=wi(k6,{borderRadius:12,padding:"$4",width:300,zIndex:1e3,backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",boxShadow:"$large",animationDuration:"400ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:aVe},'&[data-side="right"]':{animationName:lVe},'&[data-side="bottom"]':{animationName:oVe},'&[data-side="left"]':{animationName:sVe}}});function uVe(){return l(ce,{css:{backgroundColor:"$followsYouBackgroundColor",width:"fit-content",py:2,px:"$2",borderRadius:4,fontSize:12,fontWeight:"$medium"},children:"Follows you"})}const dVe=de("div",{display:"grid",gridTemplateColumns:"216px 1fr 216px",minHeight:"100svh",maxWidth:1080,width:"100%",mx:"$6","@md":{display:"flex",mx:"$2"},"@sm":{mx:0}});function Qa({children:e}){const t=Tn.exports.useMediaQuery({maxWidth:767}),{viewingMedia:n}=Ra(),{selectedEntity:r}=st(),{setCreatePost:i}=Ym();return g(dVe,{css:{position:"relative","@sm":{marginBottom:60},"@md":{gap:0,justifyContent:"center"}},children:[!t&&l(DX,{}),l(ce,{css:{width:"100%",px:"$4",minWidth:0,"@md":{display:"flex",maxWidth:600,justifyContent:"center",px:"$2"},"@sm":{maxWidth:"100%",px:0}},children:e}),g(P,{css:{marginTop:"$4",height:"fit-content",gap:"$4","@sm":{display:"none"}},children:[l(pVe,{}),g(M,{css:{flexWrap:"wrap",py:"$2",px:"$3",fontSize:12,fontWeight:"$medium",gap:"$2",color:"$textColor","*:hover":{opacity:"0.7",cursor:"pointer",textDecoration:"underline"}},children:[l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service",target:"_blank",children:"Terms of Service"}),l(ie,{to:"https://feedback.primfeed.com/",target:"_blank",children:"Roadmap"}),l(ie,{to:"https://docs.primfeed.com/legal/privacy-policy",target:"_blank",children:"Privacy policy"}),l(ie,{to:"https://docs.primfeed.com/",target:"_blank",children:"Documentation"}),l(ie,{to:"https://feedback.primfeed.com/changelog",target:"_blank",children:"Release note"}),l(ie,{to:"https://docs.primfeed.com/frequently-asked-questions",target:"_blank",children:"FAQ"})]}),r.isUser&&!r.verified&&l(fVe,{}),!r.isUser&&!r.verified&&l(hVe,{})]}),(n==null?void 0:n.post)&&l(yX,{}),t&&l(ce,{css:{position:"fixed",top:0,height:"env(safe-area-inset-top)",width:"100%",backdropFilter:"blur(5px)",backgroundColor:"$mobileTopBarBackgroundColor",transform:"translateZ(0)"}}),t&&n===null&&["/posts/"].some(o=>window.location.pathname.includes(o))===!1&&l(Y,{variant:"primary","data-action":"create-post",css:{position:"fixed",bottom:"calc(64px + env(safe-area-inset-bottom))",right:16,p:"$4",marginTop:"$2",borderRadius:999},onClick:()=>{i(!0)},children:l(W,{icon:Q0,css:{width:18,height:18}})}),t&&n===null&&l(RX,{})]})}function fVe(){return g(P,{css:{px:"$4",py:"$3",border:"1px solid $borderColor",borderRadius:12,backgroundColor:"$cardBackgroundColor",gap:"$2"},children:[g(M,{css:{gap:"$2",alignItems:"center"},children:[g(A,{css:{fontSize:16,fontWeight:"$bold",fontFamily:"$redHatDisplay"},children:["Primfeed Pro"," "]}),l(Bl,{isUser:!0,marginLeft:0})]}),l(A,{css:{fontSize:12,fontWeight:"$medium"},children:"Subscribe to Primfeed Pro and get exclusive perks with a verified badge."}),l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/42/30/28",target:"_blank",children:l(Y,{variant:"primary",size:"small",css:{borderRadius:999,marginTop:"$2"},children:"Subscribe"})})]})}function hVe(){return g(P,{css:{px:"$4",py:"$3",border:"1px solid $borderColor",borderRadius:12,backgroundColor:"$cardBackgroundColor",gap:"$1"},children:[g(M,{css:{gap:"$2",alignItems:"center"},children:[g(A,{css:{fontSize:16,fontWeight:"$bold",fontFamily:"$redHatDisplay"},children:["EasyBloggers"," "]}),l(Bl,{isUser:!1,marginLeft:0})]}),l(A,{css:{fontSize:12,fontWeight:"$medium"},children:"Subscribe to EasyBloggers and get exclusive Primfeed Pro perks with a verified badge and an included Bloggers Management System."}),l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/60/35/28",target:"_blank",children:l(Y,{variant:"primary",size:"small",css:{borderRadius:999,marginTop:"$2"},children:"Subscribe"})})]})}function pVe(){const e=Tqe(),[t,n]=y.exports.useState(""),[r,i]=y.exports.useState([]),o=_u(s=>{n(s),s.length>=3?e.mutate(s,{onSuccess:a=>i(a.data)}):s===""||F({type:"error",title:"Can't perform search",message:"Please make sure to have a minimum of 3 characters for your search"})},600);return g(P,{css:{gap:"$4"},children:[g(M,{css:{border:"1px solid $borderColor",px:"$2",py:"$1",borderRadius:1e3,boxShadow:"$xsmall",backgroundColor:"$inputBackgroundColor",maxWidth:"100%",overflow:"hidden",position:"relative"},children:[l(W,{icon:poe,css:{position:"absolute",cursor:"pointer",left:"$4",top:"50%",transform:"translateY(-50%)",px:"$1",marginRight:0}}),l(Ke,{placeholder:"Search",name:"search",type:"text",style:!1,autoComplete:"off",onChange:s=>o(s.target.value),css:{marginLeft:"$6",maxWidth:160}})]}),r.length>0&&t!==""&&l(P,{css:{backgroundColor:"$cardBackgroundColor",py:"$3",px:"$2",borderRadius:12,boxShadow:"$xsmall",border:"1px solid $borderColor",maxWidth:"100%",fontWeight:"$semiBold",gap:"$3"},children:r.map(s=>l(P,{children:g(M,{css:{alignItems:"start",gap:"$2",maxWidth:"100%",minWidth:0},children:[l(en,{entity:s,sizePicture:28,profileMediaSize:64,showName:!1}),g(P,{css:{minWidth:0},children:[l(en,{entity:s,sizePicture:28,profileMediaSize:64,showPicture:!1}),l(en,{entity:s,showPicture:!1,showName:!1,sizePicture:28,profileMediaSize:64,showHandle:!0})]})]})},"search-entity-"+s.id))}),r.length===0&&t!==""&&l(P,{css:{backgroundColor:"$cardBackgroundColor",py:"$3",px:"$4",borderRadius:12,boxShadow:"$xsmall",border:"1px solid $borderColor",maxWidth:"100%",fontWeight:"$semiBold",gap:"$3"},children:l(A,{children:"No results found"})})]})}function ua({value:e,setValue:t,label:n,labelUrl:r=null}){const[i,o]=Jn();return g(M,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,fontWeight:"$medium",alignItems:"center",cursor:"pointer",transition:"background-color 0.2s",p:"$1"},onClick:()=>{t(!e),r&&(i.set(r,e?"false":"true"),o(i))},children:[l(Xd,{checked:e,onCheckedChange:t,small:!0,css:{"&:hover":{backgroundColor:"none !important"}},children:l(Zd,{small:!0,children:l(W,{icon:Pa,css:{verticalAlign:0}})})}),l(A,{css:{userSelect:"none",px:"$2"},children:n})]})}function xX({maturityRatings:e,setMaturityRatings:t}){return g(M,{css:{gap:"$2",flexWrap:"wrap"},children:[l(ua,{value:e.includes("general"),setValue:n=>{t(n?[...e,"general"]:e.filter(r=>r!=="general"))},label:l(ur,{rating:"general"})}),l(ua,{value:e.includes("moderate"),setValue:n=>{t(n?[...e,"moderate"]:e.filter(r=>r!=="moderate"))},label:l(ur,{rating:"moderate"})}),l(ua,{value:e.includes("adult"),setValue:n=>{t(n?[...e,"adult"]:e.filter(r=>r!=="adult"))},label:l(ur,{rating:"adult"})}),l(ua,{value:e.includes("adult_plus"),setValue:n=>{t(n?[...e,"adult_plus"]:e.filter(r=>r!=="adult_plus"))},label:l(ur,{rating:"adult_plus"})})]})}const CX=({url:e,showIcon:t=!0,showCoordinates:n=!0})=>{const r=U6e(e,n);return g(Ne,{css:{whiteSpace:"break-spaces"},children:[t&&l(W,{icon:jm,css:{marginRight:6,height:12,color:"$destructive700",transform:"rotate(45deg)"}}),l(ie,{to:e,target:"_blank",rel:"noopener nofollow",primfeed:!0,onClick:i=>i.stopPropagation(),children:r!=null?r:"Location"})]})};Z.extend(k9);Z.extend(T9);function wX({event:e}){const t=Z.tz.guess();return g(P,{css:{gap:"$2",width:"fit-content",fontFamily:"$system",fontWeight:"$medium"},children:[l(en,{sizePicture:20,entity:e.data.owner}),l(Et,{enabled:!0,content:g(A,{children:[t,":"," ",Z.utc(e.data.startAtUTC).tz(t).format("LLL")]}),small:!0,children:g(M,{css:{alignItems:"center",gap:"$1",flexWrap:"wrap"},children:[l(M,{css:{width:"20px",height:"20px",alignItems:"center",justifyContent:"center"},children:l(W,{icon:bE,css:{width:16,height:16,color:"$eventIconColor"}})}),Z.utc(e.data.startAtUTC).tz("America/Los_Angeles").format("LLL")]})}),g(M,{css:{gap:"$1"},children:[l(M,{css:{width:"20px",height:"20px",alignItems:"center",justifyContent:"center"},children:l(W,{css:{width:16,height:16,color:"$eventIconColor"},icon:zie})}),l(M,{css:{gap:"$2",alignItems:"center"},children:cq(e.data.durationInMinutes)})]}),g(M,{css:{gap:"$1",alignItems:"center"},children:[l(M,{css:{width:"20px",height:"20px",alignItems:"center",justifyContent:"center"},children:l(ur,{rating:e.data.rating})}),l(CX,{url:e.data.location,showCoordinates:!1,showIcon:!1})]})]})}function mVe({event:e}){return Z.extend(Pn),Z.extend(On),l(ie,{css:{transition:"0.3s background-color ease",border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",borderRadius:8,"&:hover":{backgroundColor:"$hoveringItem"}},to:`/events/${e.data.id}`,children:g(M,{css:{px:"$5",py:"$4","@xs":{flexDirection:"column-reverse",gap:"$3"}},children:[g(P,{css:{gap:"$4"},children:[g(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:"$plarge"},children:[l(AX,{event:e}),e.data.name]}),l(wX,{event:e})]}),e.data.image!==null&&l(M,{css:{marginLeft:"auto",maxWidth:"200px","@xs":{mx:"auto",maxWidth:"100%"}},children:l(Dt,{loading:"lazy",css:{objectFit:"cover",aspectRatio:"3 / 4",height:150,borderRadius:8},src:e.data.image.urlSmall})})]})})}function gVe(){const{selectedEntity:e,perms:t}=st(),[n,r]=y.exports.useState(e.maturityRatings),{data:i}=Uqe({maturityRatings:n});return g(P,{css:{width:"100%",gap:"$5"},children:[g(P,{css:{gap:"$2"},children:[l(Tt,{children:"Filters"}),l(xX,{maturityRatings:n,setMaturityRatings:r})]}),(t==null?void 0:t.canCreateEvents)===!0&&l(ps,{to:"/events/new",children:g(Y,{variant:"primary",type:"button",children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:Zx}),"Create a new event"]})}),(t==null?void 0:t.canCreateEvents)===!1&&l(Et,{content:l("p",{children:"Only premium members can create Events."}),small:!0,children:g(Y,{variant:"primary",type:"button",disabled:!0,children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:Zx}),"Create a new event"]})}),g(P,{css:{gap:"$3"},children:[!i||i.length===0&&g(P,{css:{marginTop:"$6",textAlign:"center",gap:"$4"},children:[l(Qn,{children:"No events planned"}),l(A,{children:"There is no events to display. Try to change the filters above to show more available events."})]}),i&&i.length>0&&i.map(o=>l(mVe,{event:o},o.data.id))]})]})}Z.extend(k9);Z.extend(T9);const aN="America/Los_Angeles",vVe="30";function SX({event:e}){var h;const[t,n]=y.exports.useState(e?e.data.durationInMinutes.toString():null),[r,i]=y.exports.useState({}),o=ar(),s=p=>{const{[p]:m,...v}=r;i(v)},a=!!e,{mutate:c,isLoading:u}=Bqe(),{mutate:d,isLoading:f}=Hqe(a?e==null?void 0:e.data.id:void 0);return l(dt,{"aria-busy":u||f,onSubmit:p=>{p.preventDefault();const m=p.target,v=new FormData(p.target);if(a){d({formData:v,eventId:e.data.id},{onSuccess:()=>{m.reset(),o(`/events/${e.data.id}`,{})},onError:b=>{var x,C,w;(w=(C=(x=b==null?void 0:b.response)==null?void 0:x.data)==null?void 0:C.error)!=null&&w.formErrors&&i(b.response.data.error.formErrors)}});return}c(v,{onSuccess:()=>{m.reset(),o("/events",{})},onError:b=>{var x,C,w;(w=(C=(x=b==null?void 0:b.response)==null?void 0:x.data)==null?void 0:C.error)!=null&&w.formErrors&&i(b.response.data.error.formErrors)}})},children:g(P,{css:{gap:"$5"},children:[g(P,{children:[l(ae,{css:{color:r.name?"$destructive600":void 0},children:"Name"}),l(Ke,{name:"name",onChange:()=>{s("name")},type:"text",placeholder:"Enter the name of your event",required:!0,autoComplete:"off",css:r.name?{border:"1px solid $destructive600"}:{},defaultValue:a?e.data.name:""}),r.name&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.name})]}),g(P,{children:[g(ae,{css:{color:r.image?"$destructive600":void 0},children:["Image"," ",l(Ne,{css:{color:"$handleColor",fontSize:12},children:"(Ratio 3/4, optional)"})]}),l(mHe,{name:"image",defaultValue:a&&e.data.image?[{id:e.data.image.id,url:e.data.image.urlBig}]:[]}),r.image&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.image})]}),g(P,{children:[l(ae,{css:{color:r.description?"$destructive600":void 0},children:"Description"}),l(Ti,{css:{minHeight:100},name:"description",type:"text",error:r.description!==void 0,placeholder:"Enter a description of your event",required:!0,autoComplete:"off",defaultValue:a?e.data.description:"",onChange:()=>{s("description")}}),r.description&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.description})]}),g(P,{children:[l(ae,{css:{color:r.location?"$destructive600":void 0},children:"Event location"}),l(Ke,{name:"location",type:"text",placeholder:"http://maps.secondlife.com/secondlife/Printemps/162/144/999",required:!0,autoComplete:"off",defaultValue:a?e.data.location:"",onChange:()=>{s("location")},css:r.location?{border:"1px solid $destructive600"}:{}}),r.location&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.location})]}),g(P,{css:{gap:"$1"},children:[g(M,{css:{gap:"$1",alignItems:"center"},children:[l(ae,{css:{color:r.maturity_rating?"$destructive600":void 0},children:"Maturity Rating"}),l(Et,{small:!0,content:g(A,{children:["Your event should follow our rules, please review"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#maturity-rating",children:"Terms of Service"})," ","to know how to set the correct maturity rating for your event."]}),children:l(W,{icon:Nf,css:{width:12}})})]}),l(wg,{"aria-label":"Maturity rating of your event",name:"maturity_rating",defaultValue:a?e.data.rating:null,onChange:()=>{s("maturity_rating")},required:!0,css:{flexDirection:"row"},children:[{value:"general",label:l(ur,{rating:"general"})},{value:"moderate",label:l(ur,{rating:"moderate"})},{value:"adult",label:l(ur,{rating:"adult"})},{value:"adult_plus",label:l(ur,{rating:"adult_plus"})}].map((p,m)=>g(Fc,{css:{paddingRight:"$1"},children:[l(Lc,{value:p.value,id:"c"+m,css:{width:15,height:15},children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c"+m,children:p.label})]},"c"+m))}),r.maturity_rating&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.maturity_rating})]}),g(P,{children:[l(ae,{css:{color:r.start_date_time_pst?"$destructive600":void 0},children:"Start date & time (SLT)"}),l(WQ,{name:"start_date_time_pst",defaultInputValue:a?Z(e.data.startAtPST).format("YYYY-MM-DDTHH:mm"):Z().tz(aN).format("YYYY-MM-DDTHH:mm"),required:!0,onValueChange:()=>{s("start_date_time_pst")},min:Z().tz(aN).format("YYYY-MM-DDTHH:mm"),css:{border:r.start_date_time_pst?"1px solid $destructive600":void 0}}),r.start_date_time_pst&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.start_date_time_pst})]}),g(P,{children:[l(ae,{css:{color:r.duration?"$destructive600":void 0},children:"Duration"}),g(ce,{children:[l(Ln,{name:"duration",required:!0,css:{border:r.duration?"1px solid red":void 0},value:(h=t==null?void 0:t.toString())!=null?h:vVe,onValueChange:p=>{s("duration"),n(p.toString())},children:l(Nn,{children:[10,15,20,25,30,45,60,90,120,150,180,240,300,360,420,480,540,600,660,720].map(p=>l(Ft,{value:p.toString(),children:cq(p)},p))})}),r.duration&&l(ce,{css:{color:"$destructive600",marginTop:"$1"},children:r.duration})]})]}),Object.keys(r).length>0&&l(P,{css:{gap:"$1"},children:Object.keys(r).map(p=>l(ce,{css:{color:"$destructive600"},children:r[p]},p))}),g(M,{css:{gap:"$3",marginLeft:"auto"},children:[a&&l(ie,{to:`/events/${e.data.id}`,children:l(Y,{variant:"gray",type:"submit",disabled:u||f,"aria-busy":u||f,children:"Cancel"})}),g(Y,{variant:"primary",type:"submit",disabled:u||f,"aria-busy":u||f,children:[l(W,{css:{marginRight:"$2",width:16,height:16},icon:a?Rie:Zx}),e?"Update":"Create"]})]})]})})}function yVe(){const{eventId:e}=Na(),{data:t,isLoading:n}=nZ(e);return n?"Loading...":t?g(P,{css:{width:"100%"},children:[g(M,{css:{gap:"$2",mt:"$2",mb:"$3"},children:[l(ie,{to:"/events",css:{color:"$gray500"},children:"\u2190 Events listing"}),l(A,{css:{color:"$gray800"},children:"/"}),l(ie,{to:`/events/${t.data.id}`,css:{color:"$gray500"},children:t.data.name}),l(A,{css:{color:"$gray800"},children:"/"}),l(A,{css:{color:"$gray500"},children:"Edit"})]}),l(Wl,{css:{marginBottom:"$4"},children:"Edit event"}),t.perms.canEdit?l(SX,{event:t}):"Access forbidden"]}):null}function bVe(){return g(P,{css:{width:"100%"},children:[l(ie,{to:"/events",css:{color:"$gray500",mt:"$2",mb:"$3"},children:"\u2190 Events listing"}),l(Wl,{css:{marginBottom:"$4"},children:"Create a new event"}),l(SX,{})]})}function xVe({children:e,event:t}){const[n,r]=y.exports.useState(!1),{mutate:i,isLoading:o}=zqe(t.data.id),s=ar();return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Delete event?"}),g(ht,{children:[g(A,{children:["You are about to delete the event ",l("strong",{children:t.data.name}),"."," "]}),l(A,{children:"This cannot be undone."})]}),l(dt,{onSubmit:a=>{a.preventDefault(),i(null,{onSuccess:()=>{s("/events")}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o,variant:"danger",children:"Delete event"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function CVe(){const{eventId:e}=Na();y.exports.useEffect(()=>{window.scrollTo(0,0)},[e]),Z.extend(k9),Z.extend(T9),Z.extend(On);const{data:t,isLoading:n}=nZ(e);return n?g(P,{css:{gap:"$5"},children:[l(M,{css:{alignItems:"center"},children:l(ie,{to:"/events",css:{color:"$gray500"},children:"\u2190 Events listing"})}),"Loading..."]}):t?g(P,{css:{gap:"$5",width:"100%"},children:[g(M,{css:{alignItems:"center",flexWrap:"wrap"},children:[g(M,{css:{gap:"$2",mt:"$2",mb:"$3"},children:[l(ie,{to:"/events",css:{color:"$gray500"},children:"\u2190 Events listing"}),l(A,{css:{color:"$gray800"},children:"/"}),l(ie,{to:`/events/${t.data.id}`,css:{color:"$gray500"},children:t.data.name})]}),g(M,{css:{alignItems:"center",marginLeft:"auto",gap:"$2"},children:[t.perms.canEdit&&l(ps,{to:`/events/${t.data.id}/edit`,children:l(Y,{variant:"soft",children:"Edit"})}),t.perms.canDelete&&l(xVe,{event:t,children:l(Y,{variant:"softDanger",children:"Delete"})})]})]}),g(M,{css:{gap:"$2","@md":{flexDirection:"column-reverse"}},children:[g(P,{css:{gap:"$2"},children:[l(AX,{event:t}),l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:"$h1"},children:t.data.name}),l(wX,{event:t})]}),t.data.image!==null&&l(M,{css:{marginLeft:"auto","@md":{mx:"auto"}},children:l(Dt,{loading:"lazy",css:{objectFit:"cover",aspectRatio:"3 / 4",height:300,borderRadius:8},src:t.data.image.urlBig})})]}),g(P,{css:{gap:"$2"},children:[l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold",fontSize:"$h4"},children:"Description"}),l(A,{css:{whiteSpace:"pre-line"},children:t.data.description})]})]}):g(P,{css:{gap:"$5",width:"100%"},children:[l(M,{css:{alignItems:"center"},children:l(ie,{to:"/events",css:{color:"$gray500"},children:"\u2190 Events listing"})}),g(P,{css:{gap:"$5",alignItems:"center",mx:"auto",my:"$4"},children:[l(Qn,{children:"Event not found"})," ",l(ie,{to:"/events",children:l(Y,{variant:"primary",children:"Go back to the events list"})})]})]})}const wVe=de("div",{display:"grid",gridTemplateColumns:"200px 1fr",minHeight:"100svh",width:"100%",mx:"$6","@md":{display:"flex",mx:"$2"},"@sm":{mx:0}});function SVe({children:e}){const{viewingMedia:t}=Ra(),[n,r]=y.exports.useState(null),i=Tn.exports.useMediaQuery({maxWidth:767}),{setCreatePost:o}=Ym();return g(wVe,{css:{position:"relative",gap:"$4","@sm":{marginBottom:60},"@md":{gap:0}},children:[g(Oy.Provider,{value:{sharingPost:n,setSharingPost:r},children:[!i&&l(DX,{}),l(ce,{css:{width:"100%",px:"$4","@sm":{px:"$2"}},children:e}),(t==null?void 0:t.post)&&l(yX,{}),n!==null&&l(QX,{})]}),i&&l(ce,{css:{position:"fixed",top:0,height:"env(safe-area-inset-top)",width:"100%",zIndex:1e3,backdropFilter:"blur(5px)",backgroundColor:"$mobileTopBarBackgroundColor",transform:"translateZ(0)"}}),i&&t===null&&l(RX,{}),i&&t===null&&["/posts/"].some(s=>window.location.pathname.includes(s))===!1&&l(Y,{variant:"primary","data-action":"create-post",css:{position:"fixed",bottom:"calc(64px + env(safe-area-inset-bottom))",right:16,p:"$4",marginTop:"$2",borderRadius:999},onClick:()=>{o(!0)},children:l(W,{icon:Q0,css:{width:18,height:18}})})]})}function EX({children:e}){return l(Et,{delayDuration:100,content:e,small:!0,enabled:!0,children:l(W,{icon:Nf,css:{width:14,marginLeft:"$2"}})})}const EVe=de("div",{position:"relative",width:"100%",overflow:"hidden"}),TVe=de("div",{display:"flex",overflowX:"auto",scrollBehavior:"smooth",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},flexWrap:"nowrap",position:"relative"}),ju={small:30,medium:40,large:50},lN=de("button",{position:"absolute",top:"50%",transform:"translateY(-50%)",color:"buttonSoftColor",transition:"background-color 0.3s ease, opacity 0.5s ease-in-out, visibility 0.5s ease-in-out",backgroundColor:"$buttonSoftBackgroundColor","&:hover":{backgroundColor:"$buttonSoftBackgroundColorHover"},border:"none",borderRadius:"50%",padding:"10px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",variants:{isVisible:{true:{visibility:"show",opacity:1},false:{visibility:"hidden",opacity:0}},direction:{left:{left:"10px","@sm":{left:0}},right:{right:"10px","@sm":{right:0}}},size:{small:{width:`${ju.small}px`,height:`${ju.small}px`},medium:{width:`${ju.medium}px`,height:`${ju.medium}px`},large:{width:`${ju.large}px`,height:`${ju.large}px`}}}});function cN({children:e,css:t,buttonSize:n="large",autoScrollInterval:r=7e3}){const i=y.exports.useRef(null),[o,s]=y.exports.useState(!1),[a,c]=y.exports.useState(!1),[u,d]=y.exports.useState(!1),[f,h]=y.exports.useState(!1),p=y.exports.useRef(null),m=y.exports.useCallback(()=>{p.current=setTimeout(()=>{h(!1),d(!1)},r)},[r]),v=y.exports.useCallback(()=>{if(i.current){const{scrollLeft:S,scrollWidth:T,clientWidth:E}=i.current;s(S>0),c(S<T-E-1)}},[]),b=y.exports.useCallback(S=>{m();const T=window.matchMedia(Tie.media.sm).matches?0:10,E=8,k=ju[n]+T+E;if(i.current){const{scrollLeft:_,clientWidth:O,scrollWidth:D}=i.current,L=Array.from(i.current.children);let N=_;if(S==="right")if(_+O>=D-1)N=0;else for(const j of L){const G=j.getBoundingClientRect(),X=i.current.getBoundingClientRect();if(G.right>X.right){N=j.offsetLeft-k;break}}else if(S==="left")for(let j=L.length-1;j>=0;j--){const G=L[j],X=G.getBoundingClientRect(),re=i.current.getBoundingClientRect();if(X.left<re.left){N=G.offsetLeft-(O-G.offsetWidth)+k;break}}N=Math.max(0,Math.min(N,D-O)),i.current.scrollTo({left:N,behavior:"smooth"})}},[m,n]);return y.exports.useEffect(()=>(v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[v]),y.exports.useEffect(()=>{let S;return!u&&!f&&(S=setInterval(()=>{b("right")},r)),()=>clearInterval(S)},[b,r,u,f]),g(EVe,{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},onTouchStart:()=>{h(!0),p.current&&clearTimeout(p.current)},onTouchEnd:m,children:[l(TVe,{css:{...t},ref:i,onScroll:v,children:e}),l(lN,{isVisible:o,direction:"left",size:n,onClick:()=>b("left"),children:l(W,{icon:goe})}),l(lN,{isVisible:a,size:n,direction:"right",onClick:()=>b("right"),children:l(W,{icon:jd})})]})}const TX=(e,t={threshold:1})=>{const n=y.exports.useRef(null),[r,i]=y.exports.useState(!1),[o,s]=y.exports.useState(!1);return y.exports.useEffect(()=>{const a=new IntersectionObserver(u=>{u.forEach(d=>{d.isIntersecting&&d.intersectionRatio===1?i(!0):i(!1)})},t),c=n.current;return c&&a.observe(c),()=>{c&&a.unobserve(c)}},[t]),y.exports.useEffect(()=>{r&&!o&&(e(),s(!0))},[r,o,e]),{elementRef:n,isVisible:r}};function kVe({item:e}){const{trackEvent:t}=EZ(),{elementRef:n}=TX(()=>{t(e.id,"impression")}),r=220;return l(ps,{ref:n,to:e.destinationUrl,target:"_blank",onClick:()=>{t(e.id,"click")},children:g(P,{css:{padding:"$2",height:"100%",gap:"$3",transition:"0.3s background-color ease",border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor","&:hover":{backgroundColor:"$hoveringItem"},borderRadius:12,width:`${r}px`},children:[l(ce,{css:{aspectRatio:"3/2",overflow:"hidden"},children:l(Dt,{css:{borderRadius:4,width:"100%",height:"100%",objectFit:"cover"},src:e.imageUrl})}),g(P,{css:{gap:"$3",flex:1},children:[l(Tt,{css:{fontSize:"$plarge",height:"2lh"},children:e.title}),l(A,{css:{fontSize:"$pmedium",pb:"$2"},children:e.description})]})]})})}function _Ve({item:e}){var r,i;const{trackEvent:t}=EZ(),{elementRef:n}=TX(()=>{t(e.id,"impression")});return l(ps,{ref:n,to:e.destinationUrl,target:"_blank",onClick:()=>{t(e.id,"click")},children:g(M,{css:{py:"$1",px:"$2",height:"50px",gap:"$3",transition:"0.3s background-color ease",border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor","&:hover":{backgroundColor:"$hoveringItem"},borderRadius:8,width:"100%",alignItems:"center",whiteSpace:"nowrap"},children:[l(ce,{css:{aspectRatio:"16 / 9",overflow:"hidden",height:"100%"},children:l(Dt,{css:{width:"100%",height:"100%",objectFit:"cover"},src:(r=e.stickyImageUrl)!=null?r:e.imageUrl})}),l(Tt,{css:{fontSize:"$pmedium"},children:(i=e.stickyTitle)!=null?i:e.title})]})})}const kX=7e3,AVe=kX;function $Ve({size:e,maturityRatings:t}){const{options:n}=st(),r=n.publicGallery.showFeaturedContent,{data:i}=iqe({maturityRatings:t,enabled:r}),{viewingMedia:o}=Ra(),s=o!==null,[a,c]=y.exports.useState(!1),u=y.exports.useRef(null),d=a&&!s,f=n.publicGallery.canToggleFeaturedContent,h=!i||i.length===0;return y.exports.useEffect(()=>{if(!i||!u.current)return;const p=new IntersectionObserver(([m])=>{c(!m.isIntersecting)},{threshold:[.2]});return u.current&&p.observe(u.current),()=>{u.current&&p.unobserve(u.current)}},[i]),g(z,{children:[g(P,{css:{maxWidth:`${e}px`,gap:"$2",marginBottom:"$4"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Featured"}),g(EX,{children:[l(A,{children:"Featured Contents are curated content for residents. They can be filtered out by your Maturity Rating, and premium members can hide them."}),g(A,{css:{marginTop:"$2"},children:["Read more about the"," ",l(ie,{to:"https://docs.primfeed.com/featured-content/public-gallery",rel:"noopener nofollow",target:"_blank",children:"guidelines."})]})]}),f&&l(DVe,{})]}),g(ce,{ref:u,css:{maxWidth:`${e}px`,py:0},children:[!r&&l(A,{children:"Featured Contents are currently hidden."}),!h&&r&&l(cN,{css:{gap:"$2"},buttonSize:"large",autoScrollInterval:kX,children:i.map(p=>l(kVe,{item:p},p.id))})]}),!h&&r&&l(ce,{css:{position:"fixed",top:d?"env(safe-area-inset-top)":"calc(-80px - env(safe-area-inset-top))",transition:"all 0.3s ease",zIndex:2,maxWidth:`${e}px`,backgroundColor:"$backgroundColor",py:"$2",width:"100%"},children:l(cN,{css:{gap:"$2"},buttonSize:"small",autoScrollInterval:AVe,children:i.map(p=>l(_Ve,{item:p},p.id))})})]}),l(io,{})]})}function DVe(){const{options:e}=st(),{isLoading:t,mutate:n}=Sqe(),r=e.publicGallery.canToggleFeaturedContent,i=e.publicGallery.showFeaturedContent;return l(z,{children:g(Y,{variant:"showMore",size:"small",disabled:t,css:{marginLeft:"$4"},onClick:()=>n(!i),children:[r&&i===!1&&"Show",r&&i&&"Hide"]})})}const OVe=.75;function Lu({label:e,defaultValue:t,returnValue:n=!1}){const[r]=Jn(),i=JSON.parse(localStorage.getItem("pg_filters"));return i===null?t:r.get(e)?n?r.get(e):r.get(e)==="true":i[e]!==void 0?i[e]:t}function PVe(){const{selectedEntity:e}=st(),[t,n]=y.exports.useState(Lu({label:"f",defaultValue:!0})),[r,i]=y.exports.useState(Lu({label:"nf",defaultValue:!1})),[o,s]=y.exports.useState(Lu({label:"c",defaultValue:!0})),[a,c]=y.exports.useState(Lu({label:"r",defaultValue:!0})),[u,d]=y.exports.useState(Lu({label:"ac",defaultValue:e.showAiContent})),[f,h]=y.exports.useState(Lu({label:"rc",defaultValue:e.showRenderContent})),[p,m]=y.exports.useState(Lu({label:"mr",defaultValue:e.maturityRatings,returnValue:!0})),{setViewingMedia:v}=Ra(),{setPublicGalleryFilters:b}=CGe(),{isFetchedAfterMount:x,isLoading:C,isFetching:w,data:S,fetchNextPage:T,hasNextPage:E}=uqe({showFollowing:t,showNotFollowing:r,showAiContent:u,showRenderContent:f,showCommercial:o,showResidents:a,maturityRatings:p}),k=Ee(),_=te(),{ref:O,inView:D}=Ya({triggerOnce:!0});y.exports.useEffect(()=>{D&&E&&E&&T()},[T,E,D]);const L=y.exports.useRef(),[N,j]=y.exports.useState(600);y.exports.useLayoutEffect(()=>{L.current&&j(L.current.offsetWidth);const oe=()=>{L.current&&j(L.current.offsetWidth)};return window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[]);const G=(oe,U)=>{_.get("/pf/post/"+oe).then(H=>{const R=H.data.data.media.findIndex(se=>se.id===U);v({post:H.data.data,selectedMediaIndex:R>=0?R:0})})},X=5,re=_u(()=>{L.current&&j(L.current.offsetWidth)},100);return y.exports.useEffect(()=>{re()},[C,re]),y.exports.useEffect(()=>{b({showFollowing:t,showNotFollowing:r,showResidents:a,showCommercial:o,showRenderContent:f,showAiContent:u,maturityRatings:p}),localStorage.setItem("pg_filters",JSON.stringify({f:t,nf:r,c:o,r:a,ac:u,rc:f,mr:p})),x&&k.removeQueries(["feed","public-gallery"])},[t,r,u,f,o,a,p]),g(M,{ref:L,css:{fontSize:14,marginBottom:"$8",marginTop:"$6",flexDirection:"column",minWidth:"100%","@sm":{marginTop:"$4"}},children:[g(Qn,{css:{marginBottom:"$4"},children:["Public Gallery",l(EX,{children:g(A,{children:["These filters are persisted through your visits, are saved in the URL and on your device.",l("br",{}),l("br",{}),l("strong",{children:"Tip:"})," Change the filters at your liking and bookmark the page to save this set of filters."]})})]}),g(M,{css:{gap:"$4",flexWrap:"wrap"},children:[g(P,{css:{gap:"$2"},children:[l(Tt,{children:"Community"}),g(M,{css:{gap:"$2",flexWrap:"wrap"},children:[l(ua,{value:t,setValue:n,label:"Following",labelUrl:"f"}),l(ua,{value:r,setValue:i,label:"Not followed",labelUrl:"nf"}),l(ua,{value:a,setValue:c,label:"Residents",labelUrl:"r"}),l(ua,{value:o,setValue:s,label:"Commercial",labelUrl:"c"})]})]}),g(P,{css:{gap:"$2",flexWrap:"wrap"},children:[l(Tt,{children:"Vendor Ads"}),g(M,{css:{gap:"$2",flexWrap:"wrap"},children:[l(ua,{value:u,setValue:d,label:"AI"}),l(ua,{value:f,setValue:h,label:"Render",labelUrl:"rc"})]})]}),g(P,{css:{gap:"$2"},children:[l(Tt,{children:"Maturity"}),l(xX,{maturityRatings:p,setMaturityRatings:m})]})]}),l(io,{css:{my:"$4"}}),l($Ve,{size:N,maturityRatings:p}),C&&l(A,{children:"Loading pictures..."}),C===!1&&(S==null?void 0:S.pages.map((oe,U)=>{const H=MVe(oe.posts,N,400,X),R=U===S.pages.length-1,se=Math.floor(H.length*OVe);return l(ce,{css:{position:"relative",overflow:"hidden",width:N},children:H.map((ee,I)=>l(M,{ref:I===se&&R&&!w?O:void 0,css:{marginTop:X,gap:X},children:ee.map((Se,pe)=>l(RVe,{img:Se,onClick:()=>G(Se.postId,Se.mediaId)},`public-gallery-img-${I}-${pe}`))},"public-gallery-row-"+I))},"public-gallery-"+U)}))]})}function RVe({img:e,onClick:t}){const[n,r]=y.exports.useState(e.mediaUrl+"_x1024.webp"),[i,o]=y.exports.useState(!1),[s,a]=y.exports.useState(0),{selectedEntity:c}=st(),u=y.exports.useRef(),d=Tn.exports.useMediaQuery({maxWidth:992});return y.exports.useLayoutEffect(()=>{u.current&&a(u.current.offsetWidth);const f=()=>{u.current&&a(u.current.offsetWidth)};return window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]),y.exports.useEffect(()=>{r(e.mediaUrl+"_x1024.webp")},[s,e]),g(P,{css:{position:"relative",width:e.width},onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},children:[l(Dt,{ref:u,onClick:t,src:n,width:e.width,height:e.height,css:{cursor:"pointer",maxWidth:`${e.width}px`,maxHeight:`${e.height}px`}}),(i||d)&&g(P,{id:"info-media",css:{position:d?"relative":"absolute",backgroundColor:d?"black":"rgba(0, 0, 0, 0.7)",bottom:0,left:0,right:0,width:"100%",color:"white",px:"$2",py:"$1",gap:"$1"},children:[l(en,{entity:e.owner,nameBold:!0}),l(M,{css:{width:"100%"},children:g(M,{css:{alignItems:"center",gap:"$2",width:"100%"},children:[l(ur,{rating:e.maturityRating}),l(A,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,maxWidth:"100%"},children:e.postContent}),l(M,{css:{flexShrink:0,marginLeft:"auto"},children:l(MX,{defaultLiked:e.liked,defaultLikes:e.likes,postId:e.postId,isOwner:c.id===e.owner.id})})]})})]})]})}const MVe=(e,t,n,r)=>{let i=[];const o=[];let s=0;return e.forEach((a,c)=>{const u=a.width/a.height,d=n*u;i.push({...a,targetWidth:d}),s+=d+r,s>t&&(o.push(i),i=[],s=0),c===e.length-1&&i.length>0&&o.push(i)}),o.map(a=>{const c=a.reduce((d,f)=>d+f.width/f.height,0),u=Math.min(n,(t-r*(a.length-1))/c);return a.map(d=>({...d,width:u*(d.width/d.height),height:u}))})};function T_({user:e,date:t,rating:n,linkDate:r=null,isFollowingOwner:i=!1,isAi:o=!1,isRender:s=!1,pinned:a=!1,onlyRepost:c=!1,showPublicGalleryBadge:u=!1,showVendorBadge:d=!1,showFullDate:f=!1}){return Z.extend(Pn),Z.extend(On),Z.extend(zE),Z.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1 min",mm:"%d min",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}}),g(P,{css:{gap:"$1",minWidth:0},children:[c&&g(M,{css:{marginLeft:48,alignItems:"center",gap:"$2",fontSize:12,position:"relative"},children:[l(W,{icon:eC,css:{position:"absolute",height:12,left:-20}}),g(M,{css:{gap:"$1"},children:[l(en,{sizePicture:20,showPicture:!1,profileMediaSize:128,entity:e}),l(A,{children:"reposted"})]})]}),a&&g(M,{css:{marginLeft:48,alignItems:"center",gap:"$2",fontSize:13,position:"relative",color:"$handleColor"},children:[l(W,{icon:jm,css:{position:"absolute",height:12,left:-14}}),"Pinned"]}),c===!1&&g(M,{css:{gap:"$2",minWidth:0,maxWidth:"100%"},children:[l(en,{sizePicture:40,showName:!1,profileMediaSize:128,entity:e}),g(P,{css:{maxWidth:"100%",minWidth:0,lineHeight:1.4},children:[l(Ne,{css:{fontWeight:"$semiBold",minWidth:0},children:l(en,{showPicture:!1,nameBold:!1,entity:e,showHandle:!1})}),l(A,{css:{color:"$subTextColor",fontSize:12,marginTop:2},children:g(M,{css:{gap:"$1",alignItems:"center",fontWeight:"inherit"},children:[i&&l(Ne,{children:"Following \u2022"}),r&&l(ie,{to:r,noStyle:!0,children:l(Ne,{title:Z.unix(t).format("LLL"),children:f?Z.unix(t).format("LLL"):Z.unix(t).fromNow()})}),!r&&l(Ne,{title:Z.unix(t).format("LLL"),children:Z.unix(t).fromNow()}),l(ur,{rating:n}),o&&l(Et,{delayDuration:200,content:l(A,{children:"The product being sold or the avatar wearing it might look different in-world. Try a demo to see the product before purchasing."}),small:!0,children:l(Ne,{children:l(lf,{color:"gray",css:{width:"fit-content"},children:"AI"})})}),s&&l(Et,{delayDuration:200,content:l(A,{children:"The product being sold or the avatar wearing it are rendered outside of Second Life. Try a demo to see the product before purchasing."}),small:!0,children:l(Ne,{children:l(lf,{color:"gray",css:{width:"fit-content"},children:"RENDER"})})}),u&&l(Et,{delayDuration:200,content:l(A,{children:"[MOD ONLY] The pictures of this post are in the Public Gallery."}),small:!0,children:l(Ne,{children:l(lf,{color:"gray",css:{width:"fit-content"},children:"PG"})})}),d&&l(Et,{delayDuration:200,content:l(A,{children:"[MOD ONLY] This post is marked as vendor ad"}),small:!0,children:l(Ne,{children:l(lf,{color:"gray",css:{width:"fit-content"},children:"VENDOR"})})})]})})]})]})]})}function _X({post:e,fromSharesDialog:t=!1}){const{isLoading:n,mutate:r}=tqe(e.data.id),{mutate:i}=_qe(e.data.id),{mutate:o}=Aqe(e.data.id),{setSharingPost:s}=BE(),{selectedEntity:a}=st(),[c,u]=y.exports.useState(e.repostedByEntity),[d,f]=y.exports.useState(e.liked),[h,p]=y.exports.useState(e.bookmarked),[m,v]=y.exports.useState(e.likes);return y.exports.useEffect(()=>{f(e.liked),v(e.likes),p(e.bookmarked)},[e]),g(M,{css:{width:"100%",marginBottom:"$1"},children:[g(M,{css:{flexGrow:1,gap:"$2"},children:[l(l4,{children:l(ie,{to:`/${e.data.owner.handle}/posts/${e.data.id}`,children:g(M,{css:{display:"flex",alignItems:"center",gap:"$1",cursor:"pointer",paddingRight:"$2"},children:[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",children:l("g",{fill:"#F7F7F7",children:l("path",{d:"M9,1.75C4.996,1.75,1.75,4.996,1.75,9c0,1.319,.358,2.552,.973,3.617,.43,.806-.053,2.712-.973,3.633,1.25,.068,2.897-.497,3.633-.973,.489,.282,1.264,.656,2.279,.848,.433,.082,.881,.125,1.338,.125,4.004,0,7.25-3.246,7.25-7.25S13.004,1.75,9,1.75Z",fill:"none",stroke:"#737373",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}),l(A,{css:{fontSize:12},children:e.commentsCount})]})})}),l(l4,{children:l(MX,{defaultLiked:d,defaultLikes:m,postId:e.data.id,isOwner:a.id===e.data.owner.id})}),t===!1&&g(gs,{modal:!1,children:[l(vs,{children:g(l4,{css:{px:"$2",py:"$1",color:c?"$success600":"$primfeedPostButtons",svg:{fill:c?"$success600":"none"},path:{stroke:c?"$success600":"$primfeedPostButtons"}},children:[l("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("path",{d:"M8.00635 11.5003V9.88529L8.00235 9.88829C7.00132 9.91298 6.02896 10.2276 5.20321 10.794C4.37747 11.3604 3.73382 12.1543 3.35035 13.0793C3.28714 13.2381 3.16803 13.3682 3.01547 13.4452C2.86292 13.5223 2.68746 13.5408 2.52218 13.4974C2.35689 13.454 2.2132 13.3516 2.11818 13.2096C2.02316 13.0675 1.98339 12.8956 2.00635 12.7263V11.3973C2.00635 7.72229 4.69435 4.74329 8.00635 4.74329V3.04329C7.98815 2.85879 8.02432 2.67299 8.11042 2.5088C8.19653 2.34461 8.32879 2.20921 8.49091 2.11927C8.65303 2.02933 8.83792 1.9888 9.0228 2.00266C9.20768 2.01652 9.38446 2.08418 9.53135 2.19729C9.53135 2.19729 14.5 5.5 14.5 7.5C14.5 9.5 9.53135 12.3453 9.53135 12.3453C9.38452 12.4583 9.20785 12.5259 9.02308 12.5398C8.83831 12.5537 8.65351 12.5133 8.49143 12.4235C8.32936 12.3337 8.19708 12.1984 8.11089 12.0344C8.02471 11.8704 7.98837 11.6847 8.00635 11.5003Z",stroke:"#737373",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),l(A,{css:{fontSize:12},children:e.shares})]})}),g(ys,{side:"top",children:[c&&g(Xt,{onSelect:()=>{o(null,{onSuccess:()=>u(!1)})},children:[l(W,{icon:eC}),l(A,{children:"Cancel repost"})]})," ",!c&&g(Xt,{onSelect:()=>{i(null,{onSuccess:()=>u(!0)})},children:[l(W,{icon:eC}),l(A,{children:"Repost"})]}),g(Xt,{onSelect:()=>s(e.data.quotedPost?e.data.quotedPost:e),children:[l(W,{icon:qie}),l(A,{children:"Quote post"})]}),e.shares>0&&l(HWe,{post:e.data})]})]})]}),l(l4,{css:{justifyContent:"center",width:32},children:l(Mje,{defaultBookmarked:h,callback:r,disabled:n})})]})}function l4({children:e,onClick:t=null,css:n=null}){return l(M,{onClick:t,css:{color:"$primfeedPostButtons",alignItems:"center",fontWeight:"$semiBold",gap:"$1",...n},children:e})}function IVe(){const{isLoading:e,data:t}=s1();return g(ai,{title:"Maturity rating",description:g(z,{children:[l(A,{children:"Primfeed uses 4 settings of maturity rating for its content. Please see our Terms of Service to learn more about the differences between the maturity ratings."}),l(A,{css:{marginTop:"$5"},children:"Using this setting, you can restrict the type of content you want to see in the different feeds. Please note that the post won't show at all if they don't follow your preference, even yours."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(LVe,{preferences:t})]})}function LVe({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=()=>{F({type:"success",title:"Maturity rating updated."})},i=[["general"],["general","moderate"],["general","moderate","adult"],["general","moderate","adult","adult_plus"],["moderate","adult","adult_plus"],["adult","adult_plus"],["adult_plus"]],o=(a,c)=>{if(a.length!==c.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==c[u])return!1;return!0},s=i.find(a=>o(a,e.maturityRatings))||i[0];return l(z,{children:l(Ln,{value:s,disabled:t,onValueChange:a=>{n({key:"maturity-ratings",value:a},{onSuccess:r})},children:l(Nn,{children:i.map((a,c)=>l(Ft,{value:a,children:a.map((u,d)=>l(ur,{css:{marginRight:"$1"},rating:u},d))},"maturity-rating-"+c))})})})}function Bl({isUser:e,size:t="normal",marginLeft:n=null}){let r=12,i=8;return t==="big"&&(r=16,i=10),l(M,{css:{borderRadius:100,width:r,height:r,flexShrink:0,marginLeft:n!==null?n:t==="big"?"$2":"$verifiedMargin",backgroundColor:e?"$userVerifiedBackground":"$entityVerifiedBackground",outline:`2px solid ${e?"$userVerifiedBorder":"$entityVerifiedBorder"}`,marginRight:3,alignItems:"center",justifyContent:"center",display:"inline-flex"},children:l(W,{icon:Pa,css:{width:i,height:i,color:e?"$userVerifiedColor":"$entityVerifiedColor"}})})}const NVe=de(M,{justifyContent:"center",alignItems:"center",width:"fit-content",height:14,px:"$1",fontWeight:"$semiBold",wordBreak:"normal",fontSize:9,lineHeight:0,color:"white",borderRadius:4,cursor:"help",variants:{color:{blue:{backgroundColor:"$sky600"},gray:{backgroundColor:"$gray700"},lightGray:{backgroundColor:"$gray500"},red:{backgroundColor:"$destructive700"},darkRed:{backgroundColor:"$destructive900"}}}});function lf({children:e,color:t,css:n=null}){return l(NVe,{color:t,css:{...n},children:e})}function k_({content:e,showFull:t=!1,fontSize:n=15,whenOpened:r=null}){const[i,o]=y.exports.useState(t),[s,a]=y.exports.useState(!1),c=y.exports.useRef(null),u=o1({content:e,editable:!1});return y.exports.useEffect(()=>{u.commands.setContent(e)},[e]),y.exports.useEffect(()=>{c.current&&c.current.scrollHeight>168&&a(!t)},[]),e===""||e===void 0||e===null?l(z,{}):g(ce,{css:{position:"relative"},children:[g(ce,{css:{paddingTop:"$1",paddingBottom:"$1",fontSize:n,maxHeight:i?"none":168,overflow:"hidden",position:"relative"},ref:c,children:[l(Gd,{editor:u}),s&&!i&&l("div",{style:{position:"absolute",bottom:-4,left:0,right:0,height:"50px",background:"linear-gradient(transparent, var(--colors-cardBackgroundColor)",pointerEvents:"none"}})]}),s&&!i&&l(Y,{onClick:()=>{o(!0),r&&r()},variant:"showMore",size:"small",css:{position:"absolute",bottom:3,left:"50%",transform:"translate(-50%, 0)"},children:"Show more"})]})}function FVe(e){const t=Z.utc(e.data.startAtUTC),n=t.add(e.data.durationInMinutes,"minute"),r=Z.utc();return r.isAfter(t)&&r.isBefore(n)}function AX({event:e}){return FVe(e)?g(Ne,{css:{display:"inline-flex",alignItems:"center",gap:"$2",border:"1px solid $destructive600",borderRadius:"99999px",width:"fit-content",py:2,paddingLeft:"$2",paddingRight:10,whiteSpace:"nowrap",backgroundColor:"$destructive600",color:"white",fontWeight:"$medium",fontFamily:"$system",fontSize:13,marginRight:"$2"},children:[l(xY,{size:6,ringSize:1,color:"white",enablePulse:!0}),"Live"]}):null}const BVe=.75;function $X({entityId:e,data:t,fetchNextPage:n,hasNextPage:r}){const{setViewingMedia:i}=Ra(),o=te(),s=y.exports.useRef(),[a,c]=y.exports.useState(400);y.exports.useLayoutEffect(()=>{s.current&&c(s.current.offsetWidth);const p=()=>{s.current&&c(s.current.offsetWidth)};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]);const{ref:u,inView:d}=Ya({triggerOnce:!0});y.exports.useEffect(()=>{d&&r&&r&&n()},[n,r,d]);const f=(p,m)=>{o.get("/pf/post/"+p).then(v=>{const b=v.data.data.media.findIndex(x=>x.id===m);i({post:v.data.data,selectedMediaIndex:b>=0?b:0})})},h=5;return l(M,{ref:s,css:{marginBottom:"$8",marginTop:"$2",flexDirection:"column",gap:"$4",flexShrink:0,width:"100%"},children:t==null?void 0:t.pages.map((p,m)=>{const v=zVe(p.posts,a,200,h),b=m===t.pages.length-1,x=Math.floor(v.length*BVe);return l(ce,{css:{position:"relative",overflow:"hidden",width:a},children:v.map((C,w)=>l(M,{ref:w===x&&b?u:void 0,css:{marginTop:h,gap:h},children:C.map((T,E)=>l(HVe,{img:T,onClick:()=>f(T.postId,T.mediaId)},e+`-page-personal-gallery-img-${w}-${E}`))},e+"-page-personal-gallery-row-"+w))},e+"-page-personal-gallery-"+m)})})}function HVe({img:e,onClick:t}){const[n,r]=y.exports.useState(e.mediaUrl+"_x1024.webp"),[i,o]=y.exports.useState(0),s=y.exports.useRef();return y.exports.useLayoutEffect(()=>{s.current&&o(s.current.offsetWidth);const a=()=>{s.current&&o(s.current.offsetWidth)};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),y.exports.useEffect(()=>{r(e.mediaUrl+"_x1024.webp")},[i,e]),l(Dt,{ref:s,onClick:t,src:n,width:e.width,height:e.height,css:{cursor:"pointer",width:`${e.width}px`,height:`${e.height}px`}})}const zVe=(e,t,n,r)=>{let i=[];const o=[];let s=0;return e.forEach((a,c)=>{const u=a.width/a.height,d=n*u;i.push({...a,targetWidth:d}),s+=d+r,s>t&&(o.push(i),i=[],s=0),c===e.length-1&&i.length>0&&o.push(i)}),o.map(a=>{const c=a.reduce((d,f)=>d+f.width/f.height,0),u=(t-r*(a.length-1))/c;return a.map(d=>({...d,width:u*(d.width/d.height),height:u}))})};function ur({rating:e,css:t=null}){const n={general:"blue",moderate:"gray",adult:"red",adult_plus:"darkRed"};return e===null?l(Et,{delayDuration:200,content:"Unknown",small:!0,enabled:!0,children:l(Ne,{children:l(lf,{color:"lightGray",css:{...t},children:"?"})})}):l(Et,{delayDuration:200,content:e!=="adult_plus"?e[0].toUpperCase()+e.slice(1):"Adult+",small:!0,enabled:!0,children:l(Ne,{children:g(lf,{color:n[e],css:{...t},children:[e!=="adult_plus"&&e.slice(0,1).toUpperCase(),e==="adult_plus"&&"A+"]})})})}const UVe=de(ps,{display:"block",px:"$2",marginTop:"$1",height:38,borderRadius:12,transition:"0.2s background-color","@md":{width:40,justifyContent:"center"},"&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"0.2s background-color"},variants:{active:{true:{fontWeight:"$bold"}}}});function DX(){const{selectedEntity:e,misc:t}=st(),n=ar(),r=Tn.exports.useMediaQuery({maxWidth:992}),{setCreatePost:i}=Ym(),{isLoading:o,data:s}=tZ(),{isLoading:a,data:c}=kqe(),u=Ee();return g(P,{css:{paddingTop:"$6",paddingBottom:"$4",position:"sticky",top:0,flexGrow:1,flexShrink:0,minHeight:"100svh",maxHeight:"100svh",gap:"$1",width:"100%","@md":{width:"fit-content",flexGrow:0,flexShrink:1}},children:[l(M,{css:{height:30,marginBottom:"$8",px:"$1",cursor:"pointer","@md":{px:0,justifyContent:"center"}},onClick:()=>n({pathname:"/"}),children:l(ak,{variant:r?"logo":"full",width:r?30:145})}),l(sc,{path:"/",active:window.location.pathname===""||window.location.pathname==="/",icon:Iie,iconActive:rz,title:"Home",onClick:()=>{u.resetQueries(["feed","public-gallery"])}}),l(sc,{path:"/feeds",active:window.location.pathname==="/feeds",icon:UH,iconActive:tz,title:"Feeds",onClick:()=>{u.resetQueries(["feed","following/all"]),u.resetQueries(["feed","following/text-only"]),u.resetQueries(["feed","following/pictures-only"]),u.resetQueries(["feed","discovery/all"]),u.resetQueries(["feed","discovery/text-only"]),u.resetQueries(["feed","discovery/pictures-only"])}}),l(sc,{path:"/events",active:window.location.pathname.startsWith("/events"),icon:bE,iconActive:oz,title:"Events",onClick:()=>{u.resetQueries(["events",e.maturityRatings])}}),l(sc,{path:"/bookmarks",active:window.location.pathname==="/bookmarks",icon:HH,iconActive:YH,title:"Bookmarks",onClick:()=>{u.resetQueries(["feed","bookmarks/all"]),u.resetQueries(["feed","bookmarks/text-only"])}}),l(sc,{path:"/notifications",active:window.location.pathname==="/notifications",icon:VH,iconActive:iz,title:"Notifications",badge:o?null:s}),l(sc,{path:"/primfeed",active:window.location.pathname==="/primfeed",icon:Oie,iconActive:noe,title:"News",badge:a?null:c,onClick:()=>{u.resetQueries(["feed",t.primfeedId])}}),l(sc,{path:"/"+e.handle,active:window.location.pathname==="/"+e.handle,icon:zH,iconActive:QH,title:"Profile",onClick:()=>{u.resetQueries(["feed",e.id])}}),l(sc,{path:"/settings",active:window.location.pathname==="/settings",icon:yE,iconActive:nz,title:"Settings"}),r===!1&&g(Y,{variant:"primary",css:{marginTop:"$2",borderRadius:999,px:"$8"},onClick:()=>{i(!0)},children:[l(W,{icon:Q0}),"New post"]}),r&&l(Y,{variant:"primary","data-action":"create-post",css:{position:"fixed",bottom:16,right:16,p:"$4",marginTop:"$2",borderRadius:999},onClick:()=>{i(!0)},children:l(W,{icon:Q0,css:{width:18,height:18}})}),l(M,{css:{flexGrow:1}}),l(Bq,{})]})}function sc({title:e,active:t,path:n,badge:r=null,openNewTab:i=!1,icon:o,iconActive:s,onClick:a=void 0,inCategory:c=!1,css:u=null}){const d=Tn.exports.useMediaQuery({maxWidth:992}),{setPostsOpened:f}=Dy();return l(Et,{content:e,small:!0,delayDuration:200,side:"right",enabled:d,children:g(UVe,{active:t,to:n,target:i?"_blank":"",css:{...u,color:"$textColor",display:"flex",alignItems:"center",width:"100%",paddingLeft:c?"$6":"$2","@md":{justifyContent:"center"}},onClick:()=>{window.scrollTo(0,0),f([]),a&&a()},children:[g(M,{css:{display:"inline-flex",position:"relative",marginRight:"$3","@md":{marginRight:0}},children:[l(W,{icon:t?s:o,css:{height:18,width:18}}),r>0&&l(M,{css:{position:"absolute",top:-8,right:-8,minWidth:14,height:14,backgroundColor:"$destructive500",px:"$1",color:"white",borderRadius:100,fontSize:9,alignItems:"center",justifyContent:"center"},children:r})]}),l(Ne,{css:{fontSize:18,fontWeight:t?"extrabold":"$medium","@md":{display:"none"}},children:e})]})})}function VVe(){const{id:e}=Na(),{isLoading:t,data:n,isError:r}=rZ(e);return y.exports.useEffect(()=>{window.scrollTo(0,0)},[e]),l(Qa,{children:g(P,{css:{marginBottom:"$8",marginTop:"$4",maxWidth:600,gap:"$4",flexShrink:0,width:"100%"},children:[r&&l(A,{css:{marginTop:"$4",textAlign:"center"},children:"Sorry, but that post could not be found."}),t&&!r&&l(A,{css:{marginTop:"$4",textAlign:"center"},children:"Loading\u2026"}),!t&&!r&&l(Ma,{post:n})]})})}function jVe(){const{data:e}=XWe(),[t,n]=Ae.useState(!1);return!e||e.length===0?(t===!0&&n(!1),null):g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(M,{css:{border:"1px dashed $borderColor",borderRadius:12,py:"$2",minWidth:"100%",gap:"$3",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"$hoveringItem",cursor:"pointer"}},children:[l(W,{css:{height:18,width:18,color:"$textColor"},icon:Xx}),e.length," scheduled"," ",e.length===1?"post":"posts"]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:r=>r.preventDefault(),children:[l(nt,{children:"Scheduled posts"}),l(ht,{children:e.map(r=>l(Ma,{post:{data:r,perms:{}},showComments:!1,fromScheduledList:!0},r.id))}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function OX({post:e}){var n,r;const{perms:t}=st();return e.data.isScheduled===!0?l(qVe,{postId:e.data.id}):l(M,{css:{marginLeft:"auto",alignItems:"start"},children:g(gs,{modal:!1,children:[l(vs,{children:l(Wa,{})}),g(ys,{align:"start",side:"left",sideOffset:16,children:[l(QVe,{post:e}),e.perms.canPin&&l(KVe,{postId:e.data.id}),e.perms.canUnpin&&l(GVe,{}),(e.perms.canEdit||((n=t==null?void 0:t.mod)==null?void 0:n.editPost))&&l(XVe,{post:e.data}),(e.perms.canDelete||((r=t==null?void 0:t.mod)==null?void 0:r.editPost))&&l(WVe,{postId:e.data.id}),e.perms.canReport&&l(YVe,{postId:e.data.id})]})]})})}function WVe({postId:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,mutate:i}=eZ(e);return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{type:"danger",onSelect:o=>o.preventDefault(),children:[l(W,{icon:so}),l(A,{children:"Delete"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:o=>o.preventDefault(),size:"small",children:[l(nt,{children:"Delete post"}),l(ht,{children:l(A,{children:"This action can't be undone. The post and its medias will be removed from your profile, the timeline of any accounts that follow you, and from search results."})}),l(dt,{onSubmit:o=>{o.preventDefault(),i(null,{onSuccess:()=>{n(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:r,variant:"danger",children:"Delete the post"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function qVe({postId:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,mutate:i}=eZ(e);return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(M,{css:{marginLeft:"auto",alignItems:"center"},children:l(Y,{variant:"softDanger",size:"small",children:"Cancel"})})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:o=>o.preventDefault(),size:"small",children:[l(nt,{children:"Cancel scheduled post"}),l(ht,{children:l(A,{children:"This action can't be undone. The post won't be posted at the selected time."})}),l(dt,{onSubmit:o=>{o.preventDefault(),i(null,{onSuccess:()=>{n(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Close"})}),l(Y,{disabled:r,variant:"danger",children:"Cancel the scheduled post"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function KVe({postId:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,mutate:i}=aqe(e);return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:o=>o.preventDefault(),children:[l(W,{icon:jm}),l(A,{children:"Pin to your profile"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:o=>o.preventDefault(),size:"small",children:[l(nt,{children:"Pin post"}),g(ht,{children:[l(A,{children:"This will appear at the top of your profile and replace any previously pinned post."}),l(A,{children:"It's useful when you need to highlight a specific post to the visitors of your profile."})]}),l(dt,{onSubmit:o=>{o.preventDefault(),i(null,{onSuccess:()=>{n(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:r,variant:"primary",children:"Pin the post"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function GVe(){const[e,t]=y.exports.useState(!1),{isLoading:n,mutate:r}=lqe();return g(Ye,{open:e,onOpenChange:t,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:i=>i.preventDefault(),children:[l(W,{icon:jm}),l(A,{children:"Unpin from profile"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:i=>i.preventDefault(),size:"small",children:[l(nt,{children:"Unpin post from profile?"}),l(ht,{children:l(A,{children:"This will no longer appear automatically at the top of your profile."})}),l(dt,{onSubmit:i=>{i.preventDefault(),r(null,{onSuccess:()=>{t(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:n,variant:"primary",children:"Unpin the post"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function YVe({postId:e}){const[t,n]=y.exports.useState(!1),[r,i]=y.exports.useState(""),[o,s]=y.exports.useState(null),{isLoading:a,mutate:c}=fqe();return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:u=>u.preventDefault(),children:[l(W,{icon:Xie}),l(A,{children:"Report"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:u=>u.preventDefault(),size:"regular",children:[l(nt,{children:"What type of issue are you reporting?"}),l(ht,{children:g(P,{css:{gap:"$8"},children:[l(wg,{onValueChange:u=>s(u),children:[{value:"against_tos",label:"Against Terms of Service"},{value:"wrong_maturity_rating",label:"Wrong Maturity Rating"},{value:"incorrect_commercial_tag",label:"Incorrect commercial tag"},{value:"post_incorrect_tag",label:"This post is not tagged correctly"},{value:"other",label:"Other"}].map((u,d)=>g(Fc,{children:[l(Lc,{value:u.value,id:"report-"+d,children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"report-"+d,children:u.label})]},"report-"+d))}),g(P,{children:[g(ae,{children:["Comment",o!=="other"?" (optional)":""]}),l(Ti,{value:r,onChange:u=>i(u.target.value),maximumCharacters:1024,css:{height:100}})]})]})}),l(dt,{onSubmit:u=>{u.preventDefault(),c({id:e,reason:o,comment:r},{onSuccess:()=>{i(""),s(null),n(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:a,variant:"primary",children:"Report the post"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function QVe({post:e}){return g(Xt,{onSelect:()=>{navigator.clipboard.writeText(window.location.origin+`/${e.data.owner.handle}/posts/${e.data.id}`).then(()=>F({type:"success",title:"Link copied to clipboard",message:"You can paste this link to share the post."}))},children:[l(W,{icon:hoe}),l(A,{children:"Copy link"})]})}function XVe({post:e}){const[t,n]=y.exports.useState(e.publicGallery),[r,i]=y.exports.useState(e.isAi),[o,s]=y.exports.useState(e.vendorAd),[a,c]=y.exports.useState(e.isRender),[u,d]=y.exports.useState(!1),[f,h]=y.exports.useState(e.rating),p=nqe(),m=o1({content:e.content,editable:!0,targetMention:"edit-post-modal"});return g(Ye,{open:u,onOpenChange:d,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:v=>v.preventDefault(),children:[l(W,{icon:Zz}),l(A,{children:"Edit my post"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:v=>v.preventDefault(),id:"edit-post-modal",children:[l(nt,{children:"Edit my post"}),l(P,{css:{gap:"$6"},children:g(dt,{css:{gap:"$4"},onSubmit:v=>{v.preventDefault()},children:[g(P,{css:{border:"1px solid $borderColor",borderRadius:8,p:"$3"},children:[l(Gd,{editor:m}),l(Dg,{editor:m})]}),g(M,{css:{fontSize:13,gap:"$1",alignItems:"center"},children:[l(A,{children:"Maturity rating"}),l(W,{icon:Nf,css:{width:12}})]}),l(wg,{"aria-label":"Maturity rating of your post",onValueChange:v=>h(v),value:f,css:{flexDirection:"row"},children:[{value:"general",label:l(ur,{rating:"general"})},{value:"moderate",label:l(ur,{rating:"moderate"})},{value:"adult",label:l(ur,{rating:"adult"})},{value:"adult_plus",label:l(ur,{rating:"adult_plus"})}].map((v,b)=>g(Fc,{css:{paddingRight:"$1"},children:[l(Lc,{value:v.value,id:"c"+b,css:{width:10,height:10},children:l(Nc,{})}),l(ae,{type:"groupChoice",htmlFor:"c"+b,children:v.label})]},"c"+b))}),e.media.length>0&&g(P,{css:{fontSize:13},children:[g(P,{css:{gap:"$1",marginTop:"$6",marginBottom:"$2"},children:[g(M,{css:{gap:"$1",alignItems:"center"},children:[l(A,{css:{fontWeight:"$bold"},children:e.media.length>1?"Does your medias contain a vendor ad?":"Does your media contain a vendor ad?"}),l(c4,{id:"vendorAd",defaultChecked:o,onCheckedChange:s,name:"vendor-ad",children:l(u4,{})})]}),o&&g(P,{children:[g(A,{children:["Vendor ads must follow the"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#vendors-a-ds",children:"content guidelines"}),"."]}),g(M,{css:{marginTop:"$2",gap:"$1",alignItems:"center"},children:["- Use of AI"," ",l(c4,{id:"isAi",defaultChecked:r,onCheckedChange:i,name:"is-ai",children:l(u4,{})})]}),g(M,{css:{gap:"$1",alignItems:"center"},children:["- Rendered in 3D using external software"," ",l(c4,{id:"isRender",defaultChecked:a,onCheckedChange:c,name:"is-render",children:l(u4,{})})]})]})]}),g(P,{css:{gap:"$1",marginTop:"$2",marginBottom:"$2"},children:[g(M,{css:{gap:"$1",alignItems:"center"},children:[g(A,{css:{fontWeight:"$bold"},children:["Add the picture",e.media.length>1?"s":""," to the Public Gallery?"]}),l(c4,{id:"publicGallery",defaultChecked:t,onCheckedChange:n,name:"public-gallery",children:l(u4,{})})]}),g(A,{children:["Residents will see your picture",e.media.length>1?"s":""," in the Public Gallery, see its"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service#maturity-rating",target:"_blank",rel:"noopener",children:"guidelines"}),"."]})]})]}),l(Y,{variant:"primary",disabled:p.isLoading,onClick:()=>{p.mutate({postId:e.id,content:m.getHTML(),rating:f,vendorAd:o,publicGallery:t,ai:r,render:a},{onSuccess:()=>{d(!1),F({type:"success",title:"Post updated",message:"Your post has been updated, refresh your page to see the changes"})}})},css:{ml:"auto",marginTop:"$2"},children:"Save"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}const c4=de(tg,{all:"unset",width:26,cursor:"pointer",height:14,backgroundColor:"$gray400",borderRadius:"9999px",position:"relative",boxShadow:"0 2px 10px $gray800",'&[data-state="checked"]':{backgroundColor:"$yellow400"}}),u4=de(ng,{display:"block",width:10,height:10,backgroundColor:"white",borderRadius:"9999px",boxShadow:"0 2px 2px $gray900",transition:"transform 100ms",transform:"translateX(2px)",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(14px)"}});function ZVe(){const{isLoading:e,data:t}=s1();return g(ai,{title:"Show in search",description:l(z,{children:l(A,{children:"Disable this setting to remove your profile from the search. Please note that Primfeed's users will still be able to access your profile from various places."})}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(JVe,{preferences:t})]})}function JVe({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=()=>{F({type:"success",title:"Show in search updated."})};return l(z,{children:l(Ln,{value:e.showInSearch,disabled:t,onValueChange:i=>{n({key:"show-in-search",value:i},{onSuccess:r})},children:g(Nn,{children:[l(Ft,{value:!0,children:"Enabled"}),l(Ft,{value:!1,children:"Disabled"})]})})})}function eje(){const{isLoading:e,data:t}=s1();return g(ai,{title:"Show Render content",description:g(z,{children:[l(A,{children:"Vendors ads must set a Render tag if the product being sold, or the avatar wearing the product being sold, was rendered in 3D using external software, outside of Second Life."}),l(A,{css:{marginTop:"$5"},children:"Setting this parameter to disabled, you won't be seeing the posts with a Render tag anymore from your feeds."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(tje,{preferences:t})]})}function tje({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=Ee(),i=()=>{r.invalidateQueries({queryKey:["me"]}),F({type:"success",title:"Show Render Content updated."})};return l(z,{children:l(Ln,{value:e.showRenderContent,disabled:t,onValueChange:o=>{n({key:"show-render-content",value:o},{onSuccess:i})},children:g(Nn,{children:[l(Ft,{value:!0,children:"Enabled"}),l(Ft,{value:!1,children:"Disabled"})]})})})}function nje(){const{isLoading:e,data:t}=s1();return g(ai,{title:"Show AI content",description:g(z,{children:[l(A,{children:"Vendors ads must set an AI tag when the product being sold have been altered or generated by AI."}),l(A,{css:{marginTop:"$5"},children:"Setting this parameter to disabled, you won't be seeing the posts with an AI tag anymore from your feeds."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(rje,{preferences:t})]})}function rje({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=Ee(),i=()=>{r.invalidateQueries({queryKey:["me"]}),F({type:"success",title:"Show AI Content updated."})};return l(z,{children:l(Ln,{value:e.showAiContent,disabled:t,onValueChange:o=>{n({key:"show-ai-content",value:o},{onSuccess:i})},children:g(Nn,{children:[l(Ft,{value:!0,children:"Enabled"}),l(Ft,{value:!1,children:"Disabled"})]})})})}function ije(){const{isLoading:e,data:t}=s1();return g(ai,{title:"OTP Login",description:g(z,{children:[l(A,{children:"Login with an in-world code can be convenient if you don't remember your password, or choose not to enter any password. However, in certain case, you may want to disable it, and this setting, when disabled, will prevent any login using the OTP code method."}),g(A,{css:{marginTop:"$5"},children:[l("strong",{children:"Warning:"})," If you didn't set a password before, you won't be able to log in back to your account, and will be locked out. Please set a password before enabling this setting."]})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(oje,{preferences:t})]})}function oje({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=()=>{F({type:"success",title:"Otp login updated."})};return l(z,{children:l(Ln,{value:e.allowOtpLogin,disabled:t,onValueChange:i=>{n({key:"allow-otp-login",value:i},{onSuccess:r})},children:g(Nn,{children:[l(Ft,{value:!0,children:"Enabled"}),l(Ft,{value:!1,children:"Disabled"})]})})})}function sje(){const{createPost:e,setCreatePost:t}=Ym();return l(Ye,{open:e,onOpenChange:t,children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:n=>n.preventDefault(),onPointerDownOutside:n=>n.preventDefault(),onEscapeKeyDown:n=>n.preventDefault(),onInteractOutside:n=>n.preventDefault(),id:"create-post-modal",css:{},children:[g(P,{css:{gap:"$6"},children:[l(rX,{}),l(jVe,{})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function PX(){const{isLoading:e,data:t}=s1();return g(ai,{title:"Theme",description:g(z,{children:[l(A,{children:"Choose a theme for your personal account. The Sync with OS option will sync the theme from your operating system, but you can force the dark or light using this menu."}),l(A,{css:{marginTop:"$5"},children:"Please note that the theme will be applied on a user level, so this option will be reflected on all your devices."})]}),children:[e&&l(Ln,{value:-1,disabled:!0,children:l(Nn,{children:l(Ft,{value:-1,children:"Loading\u2026"},"selected-item--1")})}),!e&&l(aje,{preferences:t})]})}function aje({preferences:e}){const{isLoading:t,mutate:n}=qh(),r=Ee();return l(z,{children:l(Ln,{value:e.theme,disabled:t,onValueChange:i=>{n({key:"theme",value:i},{onSuccess:()=>r.invalidateQueries(["me"])})},children:g(Nn,{children:[l(Ft,{value:"sync",children:"Sync with OS"}),l(Ft,{value:"dark",children:"Dark"}),l(Ft,{value:"light",children:"Light"})]})})})}function lje({canAddManager:e,maximumManagers:t}){const[n,r]=y.exports.useState(!1),{mutate:i,isLoading:o}=Vqe();return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{children:l(Et,{enabled:!e,content:g(ce,{children:["You are limited to"," ",g("strong",{children:[t," ",t<=1?"manager":"managers"]})," ","for this store."]}),children:g(Y,{variant:"primary",disabled:!e,css:{width:"100%",textAlign:"center",justifyContent:"center"},children:[l(W,{icon:ph}),"Add a manager"]})})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),children:[l(nt,{children:"Add a manager"}),l(ht,{children:l(A,{children:"The manager will have the rights to post, comment, like and change the information about your store page. Make sure you trust them before adding anyone as manager."})}),g(dt,{onSubmit:s=>{s.preventDefault();const a=s.target,u=new FormData(a).get("name");i(u,{onSuccess:()=>r(!1)})},children:[g(P,{children:[l(ae,{children:"Avatar name"}),l(Ke,{type:"text",name:"name",placeholder:"Luke Rowley"})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o,variant:"primary",children:"Add the manager"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function cje({manager:e}){const[t,n]=y.exports.useState(!1),{mutate:r,isLoading:i}=Fqe(e.id);return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(ce,{css:{p:"$2",transition:"color 200ms",marginLeft:"auto","&:hover":{color:"$destructive800",cursor:"pointer"}},children:l(W,{icon:so})})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:o=>o.preventDefault(),children:[l(nt,{children:"Delete the manager"}),g(ht,{children:[g(A,{children:["You are about to remove ",l("strong",{children:e.name})," as a manager of your store. Are you sure you want to continue?"]}),l(A,{children:"They won't have access to your store anymore."})]}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:i,variant:"danger",onClick:()=>{r()},children:"Confirm"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function uje({manager:e}){return g(M,{css:{alignItems:"center",gap:"$4"},children:[l(en,{sizePicture:32,entity:e}),l(cje,{manager:e})]},e.id)}function dje({managers:e}){const{subscription:t}=st(),n=t.maximumManagers,r=e.length<n;return g(P,{css:{gap:"$6"},children:[e.map(i=>l(uje,{manager:i},i.id)),l(lje,{canAddManager:r,maximumManagers:n})]})}function fje({managers:e}){return l(A,{css:{color:"$gray500"},children:g(M,{css:{"& > *":{marginRight:"-$3",outline:"2px solid white",borderRadius:100}},children:[e.length===0&&"No managers yet",e.map(t=>l(en,{sizePicture:32,entity:t,showName:!1},t.id))]})})}function hje(){const[e,t]=Ae.useState(!1),{selectedStore:n}=st(),{data:r}=jqe(n.id);return g(P,{css:{gap:"$2"},children:[g(M,{css:{alignItems:"center"},children:[l(Tt,{children:"Managers"}),l(A,{css:{marginLeft:"auto",color:"$gray400",fontSize:"0.875rem",transition:"color 200ms","&:hover":{cursor:"pointer",color:"$textColor"}},onClick:()=>t(!e),children:e?"Cancel":"Edit"})]}),!r&&"Loading...",r&&(e?l(dje,{managers:r}):l(fje,{managers:r}))]})}const pje=de(ps,{display:"block",px:"$2",height:40,borderRadius:12,transition:"0.2s background-color","@md":{width:40,justifyContent:"center"},"@media (hover: hover)":{"&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"0.2s background-color"}},variants:{active:{true:{fontWeight:"$bold"}}}});function RX({css:e=null}){const{selectedEntity:t}=st(),{isLoading:n,data:r}=tZ(),i=Ee();return g(M,{css:{...e,position:"fixed",bottom:0,justifyContent:"space-around",alignItems:"center",overflow:"hidden",width:"100%",height:"calc(60px + env(safe-area-inset-bottom))",borderTop:"1px solid $borderColor",paddingBottom:"calc(12px + env(safe-area-inset-bottom))",backdropFilter:"blur(5px)",backgroundColor:"$mobileBottomBarBackgroundColor",transform:"translateZ(0)"},children:[l(Nu,{path:"/",active:window.location.pathname===""||window.location.pathname==="/",icon:Bie,iconActive:rz,title:"Home",onClick:()=>{i.resetQueries(["feed","public-gallery"])}}),l(Nu,{path:"/feeds",active:window.location.pathname==="/feeds",icon:UH,iconActive:tz,title:"Feeds",onClick:()=>{i.resetQueries(["feed","following/all"]),i.resetQueries(["feed","following/text-only"]),i.resetQueries(["feed","following/pictures-only"]),i.resetQueries(["feed","discovery/all"]),i.resetQueries(["feed","discovery/text-only"]),i.resetQueries(["feed","discovery/pictures-only"])}}),l(Nu,{path:"/events",active:window.location.pathname.startsWith("/events"),icon:bE,iconActive:oz,title:"Events",onClick:()=>{i.resetQueries(["events",t.maturityRatings])}}),l(Nu,{path:"/bookmarks",active:window.location.pathname==="/bookmarks",icon:HH,iconActive:YH,title:"Bookmarks",onClick:()=>{i.resetQueries(["feed","bookmarks/all"]),i.resetQueries(["feed","bookmarks/text-only"])}}),l(Nu,{path:"/notifications",active:window.location.pathname==="/notifications",icon:VH,iconActive:iz,title:"Notifications",badge:n?null:r}),l(Nu,{path:"/"+t.handle,active:window.location.pathname==="/"+t.handle,icon:zH,iconActive:QH,title:"Profile",onClick:()=>{i.resetQueries(["feed",t.id])}}),l(Nu,{path:"/settings",active:window.location.pathname==="/settings",icon:yE,iconActive:nz,title:"Settings"}),l(Bq,{})]})}function Nu({title:e,active:t,path:n,badge:r=null,openNewTab:i=!1,icon:o,iconActive:s,onClick:a=void 0}){const{setPostsOpened:c}=Dy();return g(pje,{active:t,to:n,target:i?"_blank":"",css:{color:"$textColor",display:"flex",alignItems:"center","@sm":{backgroundColor:t?"$hoveringItem":"transparent"}},onClick:()=>{window.scrollTo(0,0),c([]),a&&a()},children:[g(M,{css:{display:"inline-flex",position:"relative",marginRight:16,"@md":{marginRight:0}},children:[r>0&&l(M,{css:{position:"absolute",top:-8,right:-8,minWidth:14,height:14,backgroundColor:"$destructive500",px:"$1",color:"white",borderRadius:100,fontSize:9,alignItems:"center",justifyContent:"center"},children:r}),l(W,{icon:t?s:o,css:{height:20,width:20}})]}),l(Ne,{css:{fontSize:20,"@md":{display:"none"}},children:e})]})}function mje(){var i,o;const{isLoading:e,data:t}=rqe(),n=te(),r=Ee();return n.patch("/pf/notifications/all").then(()=>{r.invalidateQueries({queryKey:["notifications-count"]})}),l(P,{css:{gap:"$8",flex:1,width:"100%"},children:g(P,{children:[l(Wl,{css:{marginBottom:"$4",marginLeft:"$4"},children:"Notifications"}),g(P,{children:[!e&&((i=t==null?void 0:t.notifications)==null?void 0:i.map((s,a)=>{if(s.type==="pf_new_follower")return l(wje,{groupedNotifications:s},"notification-group-"+a);if(s.type==="pf_new_post_like")return l(Sje,{groupedNotifications:s},"notification-group-"+a);if(s.type==="pf_new_post_share")return l(Eje,{groupedNotifications:s},"notification-group-"+a);if(s.type==="pf_new_post_quoted")return l(Cje,{notification:s},"notification-group-"+a);if(s.type==="pf_new_post_comment")return l(gje,{notification:s},"notification-group-"+a);if(s.type==="pf_new_comment_reply")return l(vje,{notification:s},"notification-group-"+a);if(s.type==="pf_new_mention_post")return l(bje,{notification:s},"notification-group-"+a);if(s.type==="pf_new_mention_comment")return l(yje,{notification:s},"notification-group-"+a);if(s.type==="pf_moderated_content")return l(xje,{notification:s},"notification-group-"+a);if(s.type==="pf_new_comment_like")return l(Tje,{groupedNotifications:s},"notification-group-"+a)})),!e&&((o=t==null?void 0:t.notifications)==null?void 0:o.length)===0&&l(P,{css:{mx:"auto",marginTop:"$6",textAlign:"center",gap:"$4",maxWidth:"90%"},children:l(A,{children:"This page will display notifications when you have any. New followers, new likes\u2026 Stay aware of what's happening with your profile."})}),e&&l(P,{css:{mx:"auto",marginTop:"$6",textAlign:"center",gap:"$4",maxWidth:"90%"},children:l(A,{children:"Loading your notifications\u2026"})})]})]})})}function gje({notification:e}){const{selectedEntity:t}=st();return l(ie,{to:`/${t.handle}/posts/${e.postId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",alignItems:"center",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_comment.png",width:28,height:28}),l(P,{css:{width:"100%",gap:"$3",minWidth:0},children:g(M,{css:{alignItems:"center",gap:"$2",minWidth:0},children:[l(en,{entity:e.origin,nameBold:!0,sizePicture:28}),l(A,{children:"commented on your post"})]})}),l(Xa,{date:e.createdAt})]})})}function vje({notification:e}){const{selectedEntity:t}=st();return l(ie,{to:`/${t.handle}/posts/${e.postId}?c=${e.comment.id}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_reply.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[g(M,{css:{alignItems:"center",gap:"$2"},children:[l(en,{entity:e.origin,nameBold:!0,sizePicture:28}),l(A,{children:"replied to a comment"})]}),l(A,{css:{opacity:.6},children:e.comment.content.length>50?e.comment.content.substring(0,50)+"\u2026":e.comment.content})]}),l(Xa,{date:e.createdAt})]})})}function yje({notification:e}){const{selectedEntity:t}=st();return l(ie,{to:`/${t.handle}/posts/${e.postId}?c=${e.comment.id}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_reply.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[g(M,{css:{alignItems:"center",gap:"$2"},children:[l(en,{entity:e.origin,nameBold:!0,sizePicture:28}),l(A,{children:"mentioned you in a comment"})]}),l(A,{css:{opacity:.6},children:e.comment.content.length>50?e.comment.content.substring(0,50)+"\u2026":e.comment.content})]}),l(Xa,{date:e.createdAt})]})})}function bje({notification:e}){const{selectedEntity:t}=st();return l(ie,{to:`/${t.handle}/posts/${e.postId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_comment.png",width:28,height:28}),l(P,{css:{width:"100%",gap:"$3"},children:g(M,{css:{alignItems:"center",gap:"$2"},children:[l(en,{entity:e.origin,nameBold:!0,sizePicture:28}),l(A,{children:"mentioned you in a post"})]})}),l(Xa,{date:e.createdAt})]})})}function xje({notification:e}){const{selectedEntity:t}=st(),n=g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:e.postId?"pointer":"inherit",backgroundColor:e.postId?"$hoveringItem":"none",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_moderated_content.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[l(Tt,{children:"The team updated your content"}),l(A,{children:"One of your post has been updated by the moderation team, and they did the following changes:"}),l(P,{css:{opacity:.6},children:l(A,{children:e.data.content&&e.data.content.split(`
`).map((r,i)=>g(Ae.Fragment,{children:[r,l("br",{})]},i))})}),l(io,{}),g(A,{children:["If you are not sure why your post has been updated, you can find an explanation"," ",l(ie,{to:"https://docs.primfeed.com/moderation/why-has-my-content-been-moderated",target:"_blank",onClick:r=>r.stopPropagation(),children:"here"}),"."]})]}),l(Xa,{date:e.createdAt})]});return e.postId?l(ie,{to:`/${t.handle}/posts/${e.postId}`,children:n}):n}function Cje({notification:e}){const{selectedEntity:t}=st();return l(ie,{to:`/${t.handle}/posts/${e.postId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_share.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[g(M,{css:{alignItems:"center",gap:"$2"},children:[l(en,{entity:e.origin,nameBold:!0,sizePicture:28}),l(A,{children:"quoted your post"})]}),l(A,{css:{opacity:.6},children:e.content.length>50?e.content.substring(0,50)+"\u2026":e.content})]}),l(Xa,{date:e.createdAt})]})})}function wje({groupedNotifications:e,key:t}){return g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_follower.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[l(M,{css:{gap:"$2",flexWrap:"wrap"},children:e==null?void 0:e.notifications.map((n,r)=>l(en,{entity:n.origin,showName:!1,sizePicture:28},"notification-entity-"+t+"-"+r))}),g(A,{children:[l(en,{entity:e.notifications[0].origin,showPicture:!1,inline:!0,nameBold:!0,css:{marginRight:"$1"}}),"  ",e.count-1>0&&g(z,{children:["and ",e.count-1," other",e.count-1>1?"s":""," "]}),"followed you."]})]}),l(Xa,{date:e.createdAt})]})}function Sje({groupedNotifications:e,key:t}){const n=e.notifications[0],{selectedEntity:r}=st();return l(ie,{to:`/${r.handle}/posts/${e.postId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_like.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[l(M,{css:{gap:"$2",flexWrap:"wrap"},children:e==null?void 0:e.notifications.map((i,o)=>l(en,{entity:i.origin,showName:!1,sizePicture:28},"notification-entity-"+t+"-"+o))}),g(A,{children:[l(en,{entity:n.origin,showPicture:!1,inline:!0,nameBold:!0,css:{marginRight:"$1"}})," ",e.count-1>0&&g(z,{children:["and ",e.count-1," other",e.count-1>1?"s":""," "]}),"liked your post."]}),l(A,{css:{opacity:.6},children:n.content.length>50?n.content.substring(0,50)+"\u2026":n.content})]}),l(Xa,{date:e.createdAt})]})})}function Eje({groupedNotifications:e,key:t}){const n=e.notifications[0],{selectedEntity:r}=st();return l(ie,{to:`/${r.handle}/posts/${e.postId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_new_share.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[l(M,{css:{gap:"$2",flexWrap:"wrap"},children:e==null?void 0:e.notifications.map((i,o)=>l(en,{entity:i.origin,showName:!1,sizePicture:28},"notification-entity-"+t+"-"+o))}),g(A,{children:[l(en,{entity:n.origin,showPicture:!1,inline:!0,nameBold:!0,css:{marginRight:"$1"}})," ",e.count-1>0&&g(z,{children:["and ",e.count-1," other",e.count-1>1?"s":""," "]}),"reposted your post."]}),l(A,{css:{opacity:.6},children:n.content.length>50?n.content.substring(0,50)+"\u2026":n.content})]}),l(Xa,{date:e.createdAt})]})})}function Tje({groupedNotifications:e,key:t}){const n=e.notifications[0],{selectedEntity:r}=st();return l(ie,{to:`/${r.handle}/posts/${e.postId}?c=${e.commentId}`,children:g(M,{css:{p:"$4",gap:"$4",borderBottom:"1px solid $borderColor",transition:"background-color 0.1s ease-in","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem",transition:"background-color 0.1s ease-in"}},children:[l(Dt,{css:{mx:0},src:"https://cdn.primfeed.com/notif_like_comment.png",width:28,height:28}),g(P,{css:{width:"100%",gap:"$3"},children:[l(M,{css:{gap:"$2",flexWrap:"wrap"},children:e==null?void 0:e.notifications.map((i,o)=>l(en,{entity:i.origin,showName:!1,sizePicture:28},"notification-entity-"+t+"-"+o))}),g(A,{children:[l(en,{entity:n.origin,showPicture:!1,inline:!0,nameBold:!0,css:{marginRight:"$1"}})," ",e.count-1>0&&g(z,{children:["and ",e.count-1," other",e.count-1>1?"s":""," "]}),"liked your comment."]}),l(A,{css:{opacity:.6},children:n.content.length>50?n.content.substring(0,50)+"\u2026":n.content})]}),l(Xa,{date:e.createdAt})]})})}function Xa({date:e}){return Z.extend(Pn),Z.extend(On),Z.extend(zE),Z.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}}),l(A,{css:{opacity:.6,fontSize:12,marginLeft:"auto",minWidth:"fit-content"},title:Z.unix(e).format("LLL"),children:Z(e).fromNow()})}function kje({user:e,refetch:t}){const{isLoading:n,mutate:r}=Cqe(),{isLoading:i,mutate:o}=xqe(),[s,a]=y.exports.useState(!1),[c,u]=y.exports.useState("Subscribed"),d=e.canFollow===!1?s===!1?{"&:hover":{color:"$buttonDangerColor",border:"1px solid $buttonDangerBorderColor",transition:"0.2s background-color",backgroundColor:"$buttonDangerBackgroundColor"}}:{"&:hover":{color:"white",border:"1px solid $gray800",transition:"0.2s background-color",backgroundColor:"$gray800"}}:{};return l(Et,{small:!0,enabled:e.canSubscribe,content:l(A,{children:"Subscribe to their newsletters and receive new releases or updates directly to your in-world avatar."}),children:l(Y,{variant:e.canSubscribe?"primary":"gray",onMouseEnter:()=>{e.canSubscribe?u("Subscribed"):u("Unsubscribe")},onMouseLeave:()=>{u("Subscribed"),s&&a(!1)},onClick:()=>{s||(e.canSubscribe?(a(!0),o(e.id,{onSuccess:()=>t()})):r(e.id,{onSuccess:()=>t()}))},disabled:n||i,css:{...d,borderRadius:1e3,userSelect:"none"},children:e.canSubscribe?"Subscribe":c})})}const _je=fn({"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.2)"},"100%":{transform:"scale(1)"}}),Aje=de("button",{display:"flex",alignItems:"center",gap:"$1",background:"transparent",border:"none",cursor:"pointer",overflow:"visible",position:"relative",stroke:"$primfeedPostButtons","@media (hover: hover)":{"&:hover":{stroke:"$primfeedPostLikeHover",overflow:"visible","& > svg":{boxShadow:"0px 0px 0px 4px $colors$primfeedPostLikeShadow",backgroundColor:"$primfeedPostLikeShadow",borderRadius:1e3}}},"&.liked":{color:"$primfeedPostLiked",g:{fill:"$primfeedPostLiked"},path:{stroke:"$primfeedPostLiked"}},"&.animate":{animation:`${_je} 0.3s ease-in-out`}});function MX({postId:e,defaultLiked:t,defaultLikes:n,isOwner:r=!1,small:i=!1,...o}){const[s,a]=y.exports.useState(t),[c,u]=y.exports.useState(n),[d,f]=y.exports.useState(!1),{isLoading:h,mutate:p}=eqe(e),{isLoading:m,mutate:v}=JWe(e);y.exports.useEffect(()=>{a(t)},[t]),y.exports.useEffect(()=>{u(n)},[n]);const x=l(Aje,{onClick:r?null:()=>{r&&(h||m)||(s?(f(!1),u(c-1),v()):(f(!0),u(c+1),p()),a(!s))},className:`${s?"liked":""} ${d?"animate":""}`,css:{cursor:"pointer",px:"$2",...o},children:l(IX,{likes:c,liked:s,small:i})});return r?l(LX,{postId:e,children:x}):x}function IX({liked:e,likes:t,small:n=!1}){return g(z,{children:[e?l("svg",{xmlns:"http://www.w3.org/2000/svg",width:n?14:20,height:n?14:20,viewBox:"0 0 20 20",children:l("g",{children:l("path",{shapeRendering:"optimizeQuality",d:"m9.529,16.474c.297.155.644.155.941,0,1.57-.819,6.53-3.788,6.53-8.614.008-2.12-1.704-3.847-3.827-3.86-1.277.016-2.464.66-3.173,1.72-.71-1.06-1.897-1.704-3.173-1.72-2.123.013-3.835,1.739-3.827,3.86,0,4.827,4.96,7.795,6.53,8.614h0Z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}):l("svg",{xmlns:"http://www.w3.org/2000/svg",width:n?14:20,height:n?14:20,viewBox:"0 0 18 18",children:l("g",{children:l("path",{d:"M8.529,15.222c.297,.155,.644,.155,.941,0,1.57-.819,6.529-3.787,6.529-8.613,.008-2.12-1.704-3.846-3.826-3.859-1.277,.016-2.464,.66-3.173,1.72-.71-1.06-1.897-1.704-3.173-1.72-2.123,.013-3.834,1.739-3.826,3.859,0,4.826,4.959,7.794,6.529,8.613Z",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}),l(A,{css:{fontSize:12,fontWeight:"$semiBold"},children:t})]})}const $je=fn({"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.2)"},"100%":{transform:"scale(1)"}}),Dje=de("button",{display:"flex",alignItems:"center",gap:"$1",background:"transparent",border:"none",cursor:"pointer",overflow:"visible",position:"relative",stroke:"$primfeedPostButtons","@media (hover: hover)":{"&:hover":{stroke:"$primfeedPostLikeHover",overflow:"visible","& > svg":{boxShadow:"0px 0px 0px 4px $colors$primfeedPostLikeShadow",backgroundColor:"$primfeedPostLikeShadow",borderRadius:1e3}}},"&.liked":{color:"$primfeedPostLiked",g:{fill:"$primfeedPostLiked"},path:{stroke:"$primfeedPostLiked"}},"&.animate":{animation:`${$je} 0.3s ease-in-out`}});function Oje({commentId:e,defaultLiked:t,defaultLikes:n,isOwner:r=!1,...i}){const[o,s]=y.exports.useState(t),[a,c]=y.exports.useState(n),[u,d]=y.exports.useState(!1),{isLoading:f,mutate:h}=Dqe(e);y.exports.useEffect(()=>{s(t)},[t]),y.exports.useEffect(()=>{c(n)},[n]);const m=l(Dje,{onClick:r?null:()=>{r&&f||(o?(d(!1),c(a-1)):(d(!0),c(a+1)),s(!o),h())},className:`${o?"liked":""} ${u?"animate":""}`,css:{cursor:"pointer",px:"$2",...i},children:l(IX,{likes:a,liked:o,small:!0})});return r?l(LX,{postId:e,children:m}):m}const Pje=fn({"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.2)"},"100%":{transform:"scale(1)"}}),Rje=de("button",{display:"flex",alignItems:"center",gap:"$1",background:"transparent",border:"none",cursor:"pointer",overflow:"visible",position:"relative",stroke:"$primfeedPostButtons","@media (hover: hover)":{"&:hover":{color:"$primfeedPostBookmarkHover",stroke:"$primfeedPostBookmarkHover",overflow:"visible","& > svg":{boxShadow:"0px 0px 0px 4px $colors$primfeedPostBookmarkShadow",backgroundColor:"$primfeedPostBookmarkShadow",borderRadius:1e3}}},"&.bookmarked":{color:"$primfeedPostBookmarked",g:{fill:"$primfeedPostBookmarked"},path:{stroke:"$primfeedPostBookmarked"}},"&.animate":{animation:`${Pje} 0.3s ease-in-out`}});function Mje({callback:e,defaultBookmarked:t,disabled:n,...r}){const[i,o]=y.exports.useState(t),[s,a]=y.exports.useState(!1);return y.exports.useEffect(()=>{o(t)},[t]),l(Rje,{onClick:()=>{n||(o(!i),a(!i),e&&e())},className:`${i?"bookmarked":""} ${s?"animate":""}`,css:{cursor:"pointer",px:"$2",...r},children:i?l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",children:l("g",{children:l("path",{d:"M12.25,1H5.75c-1.517,0-2.75,1.233-2.75,2.75v12.5c0,.276,.152,.531,.396,.661,.244,.131,.54,.117,.77-.037l4.834-3.223,4.834,3.223c.125,.083,.271,.126,.416,.126,.122,0,.243-.029,.354-.089,.244-.13,.396-.385,.396-.661V3.75c0-1.517-1.233-2.75-2.75-2.75Z"})})}):l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",children:l("g",{children:l("path",{d:"M14.25,16.25l-5.25-3.5-5.25,3.5V3.75c0-1.105,.895-2,2-2h6.5c1.105,0,2,.895,2,2v12.5Z",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})})})}const Ije=.75;function LX({postId:e,children:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,data:o,fetchNextPage:s,hasNextPage:a}=Mqe(e,n),{ref:c,inView:u}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{u&&a&&a&&s()},[s,a,u]),g(Ye,{open:n,onOpenChange:r,children:[l(pt,{children:t}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:d=>d.preventDefault(),children:[l(nt,{children:"Likes"}),i&&l(A,{children:"Loading\u2026"}),l(P,{css:{gap:"$4"},children:!i&&(o==null?void 0:o.pages.map((d,f)=>{const h=f===o.pages.length-1,p=Math.floor(d.likes.length*Ije);return d==null?void 0:d.likes.map((m,v)=>l(en,{infiniteScrollRef:h&&p===v?c:void 0,entity:m},"likes-post-"+e))}))}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function NX({user:e,refetch:t}){const{isLoading:n,mutate:r}=Pqe(),{isLoading:i,mutate:o}=Oqe(),[s,a]=y.exports.useState(!1),[c,u]=y.exports.useState("Following"),d=e.canFollow===!1?s===!1?{"&:hover":{color:"$buttonDangerColor",border:"1px solid $buttonDangerBorderColor",transition:"0.2s background-color",backgroundColor:"$buttonDangerBackgroundColor"}}:{"&:hover":{color:"white",border:"1px solid $gray800",transition:"0.2s background-color",backgroundColor:"$gray800"}}:{};return l(Y,{variant:e.canFollow?"primary":"gray",onMouseEnter:()=>{e.canFollow?u("Following"):u("Unfollow")},onMouseLeave:()=>{u("Following"),s&&a(!1)},onClick:()=>{s||(e.canFollow?(a(!0),o(e.id,{onSuccess:()=>t()})):r(e.id,{onSuccess:()=>t()}))},disabled:n||i,css:{...d,borderRadius:1e3,userSelect:"none"},children:e.canFollow?"Follow":c})}function Lje(){const{isLoading:e,data:t}=s1(),{selectedEntity:n}=st();return Z.extend(Pn),Z.extend(On),g(P,{css:{gap:"$8"},children:[l(Wl,{children:"Settings"}),l(Qn,{children:"Content"}),l(IVe,{}),l(eje,{}),l(nje,{}),l(Qn,{children:"Option"}),l(ZVe,{}),n.isUser&&g(z,{children:[l(Qn,{children:"User"}),l(ije,{}),l(PX,{})]}),n.type==="store"&&n.isOwner===!0&&g(z,{children:[l(Qn,{children:"Store"}),l(hje,{})]}),l(Qn,{children:"Subscription"}),!e&&t.subscription.isUser===!0&&g(P,{children:[t.subscription.data&&g(z,{children:[g(A,{children:["Your subscription for ",l("strong",{children:"Primfeed Pro"})," will expire"," ",g(Ne,{title:Z(t.subscription.data.expiresAt).format("LLL"),css:{color:"$yellow500"},children:[l(Ne,{css:{fontWeight:"$bold",fontSize:"1.2rem"},children:Z().to(t.subscription.data.expiresAt)})," "]})]}),l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/42/30/28",target:"_blank",rel:"noopener",children:l(Y,{css:{width:"fit-content",px:"$10",mx:"auto",marginTop:"$6"},variant:"subscription",children:"Renew your subscription"})})]}),!t.subscription.data&&g(P,{css:{gap:"$4"},children:[g(A,{children:["You don't have any active ",l("strong",{children:"Primfeed Pro"})," ","subscription."]}),g(A,{children:["Consider upgrading to a paid plan to unlock a higher picture quality and others perks. See more details for the perks on the"," ",l(ie,{to:"https://docs.primfeed.com/primfeed-pro",target:"_blank",rel:"noopener",children:"documentation"}),"."]}),l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/42/30/28",target:"_blank",rel:"noopener",children:l(Y,{css:{width:"fit-content",px:"$10",mx:"auto",marginTop:"$2"},variant:"subscription",children:"Buy Primfeed Pro"})})]})]}),!e&&t.subscription.isUser===!1&&g(P,{children:[t.subscription.data&&g(z,{children:[g(A,{children:["Your subscription for the plan"," ",l("strong",{children:t.subscription.data.type.charAt(0).toUpperCase()+t.subscription.data.type.slice(1)})," ","will expire"," ",g(Ne,{title:Z(t.subscription.data.expiresAt).format("LLL"),css:{color:"$yellow500"},children:[l(Ne,{css:{fontWeight:"$bold",fontSize:"1.2rem"},children:Z().to(t.subscription.data.expiresAt)})," "]})]}),t.subscription.data.addons&&g(z,{children:[l(Tt,{css:{marginTop:"$3"},children:"Your add-ons"}),l(A,{children:t.subscription.data.addons.map((r,i)=>l(A,{children:r.displayName},"addon-"+i))})]}),n.isOwner===!0&&l(ie,{to:"https://web.kynno.app/settings/billing/subscription",target:"_blank",rel:"noopener",children:l(Y,{css:{width:"fit-content",px:"$10",mx:"auto",marginTop:"$6"},variant:"subscription",children:"Manage your subscription"})})]}),!t.subscription.data&&g(z,{children:[g(A,{children:["You don't have any active ",l("strong",{children:"EasyBloggers"})," ","subscription for ",l("strong",{children:n.name}),"."]}),l(A,{children:"Consider upgrading to a paid plan to unlock a higher picture quality and others perks."})]})]}),l(BQ,{})]})}function FX({post:e,parentId:t=null}){const{selectedEntity:n}=st(),r=Ee(),{isLoading:i,mutate:o}=QWe(),s=o1({content:null,editable:!0,placeholder:"Comment as "+n.name,targetMention:"body"});return g(M,{css:{alignItems:"start",gap:"$2",'.tiptap.ProseMirror[contenteditable="true"]':{minHeight:40}},children:[l(en,{sizePicture:32,showName:!1,entity:n}),g(P,{css:{backgroundColor:i?"$inputBackgroundColorDisabled":"$commentBackgroundColor",width:"100%",py:"$2",px:"$3",borderRadius:12},children:[l(Gd,{editor:s}),l(Dg,{editor:s}),s.getText().length>0&&l(Y,{disabled:i,onClick:()=>o({postId:e.data.id,content:s.getHTML(),parentId:t},{onSuccess:()=>{r.invalidateQueries({queryKey:["post",e.data.id]}),s.commands.setContent(null)}}),variant:"transparent","aria-label":"Close",css:{marginLeft:"auto"},children:l(W,{icon:XH})})]})]})}const Nje=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Fje=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Bje=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Hje=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,zje=cu.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",xo(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[L3({find:Nje,type:this.type}),L3({find:Bje,type:this.type})]},addPasteRules(){return[fm({find:Fje,type:this.type}),fm({find:Hje,type:this.type})]}}),Uje=Dl.create({name:"doc",topNode:!0,content:"block+"}),Vje=Dl.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",xo(this.options.HTMLAttributes,e)]},renderText(){return`
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&c&&s){const f=c.filter(h=>a.includes(h.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var _v=200,Br=function(){};Br.prototype.append=function(t){return t.length?(t=Br.from(t),!this.length&&t||t.length<_v&&this.leafAppend(t)||this.length<_v&&t.leafPrepend(this)||this.appendInner(t)):this};Br.prototype.prepend=function(t){return t.length?Br.from(t).append(this):this};Br.prototype.appendInner=function(t){return new jje(this,t)};Br.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Br.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Br.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Br.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Br.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(t(o,s))},n,r),i};Br.from=function(t){return t instanceof Br?t:t&&t.length?new BX(t):Br.empty};var BX=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,s,a){for(var c=o;c<s;c++)if(i(this.values[c],a+c)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,s,a){for(var c=o-1;c>=s;c--)if(i(this.values[c],a+c)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=_v)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=_v)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Br);Br.empty=new BX([]);var jje=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Br);const Wje=500;class Is{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=t.tr,a,c,u=[],d=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,d.push(f);return}if(i){d.push(new ra(f.map));let p=f.step.map(i.slice(o)),m;p&&s.maybeStep(p).doc&&(m=s.mapping.maps[s.mapping.maps.length-1],u.push(new ra(m,void 0,void 0,u.length+d.length))),o--,m&&i.appendMap(m,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,c=new Is(this.items.slice(0,r).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,c=!i&&a.length?a.get(a.length-1):null;for(let d=0;d<t.steps.length;d++){let f=t.steps[d].invert(t.docs[d]),h=new ra(t.mapping.maps[d],f,n),p;(p=c&&c.merge(h))&&(h=p,d?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(s++,n=void 0),i||(c=h)}let u=s-r.depth;return u>Kje&&(a=qje(a,u),s-=u),new Is(a.append(o),s)}remapping(t,n){let r=new vf;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new Is(this.items.append(t.map(n=>new ra(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let c=n;this.items.forEach(h=>{let p=o.getMirror(--c);if(p==null)return;s=Math.min(s,p);let m=o.maps[p];if(h.step){let v=t.steps[p].invert(t.docs[p]),b=h.selection&&h.selection.map(o.slice(c+1,p));b&&a++,r.push(new ra(m,v,b))}else r.push(new ra(m))},i);let u=[];for(let h=n;h<s;h++)u.push(new ra(o.maps[h]));let d=this.items.slice(0,i).append(u).append(r),f=new Is(d,a);return f.emptyItemCount()>Wje&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let c=s.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let d=s.selection&&s.selection.map(n.slice(r));d&&o++;let f=new ra(u.invert(),c,d),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new Is(Br.from(i.reverse()),o)}}Is.empty=new Is(Br.empty,0);function qje(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class ra{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new ra(n.getMap().invert(),n,this.selection)}}}class Cc{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Kje=20;function Gje(e,t,n,r){let i=n.getMeta(Cd),o;if(i)return i.historyState;n.getMeta(Xje)&&(e=new Cc(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Cd))return s.getMeta(Cd).redo?new Cc(e.done.addTransform(n,void 0,r,y5(t)),e.undone,uN(n.mapping.maps),e.prevTime,e.prevComposition):new Cc(e.done,e.undone.addTransform(n,void 0,r,y5(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Yje(n,e.prevRanges)),u=s?w7(e.prevRanges,n.mapping):uN(n.mapping.maps);return new Cc(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,y5(t)),Is.empty,u,n.time,a==null?e.prevComposition:a)}else return(o=n.getMeta("rebased"))?new Cc(e.done.rebased(n,o),e.undone.rebased(n,o),w7(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Cc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),w7(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Yje(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function uN(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,s)=>t.push(o,s));return t}function w7(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function Qje(e,t,n){let r=y5(t),i=Cd.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),c=new Cc(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Cd,{redo:n,historyState:c})}let S7=!1,dN=null;function y5(e){let t=e.plugins;if(dN!=t){S7=!1,dN=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){S7=!0;break}}return S7}const Cd=new oi("history"),Xje=new oi("closeHistory");function Zje(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new zr({key:Cd,state:{init(){return new Cc(Is.empty,Is.empty,null,0,-1)},apply(t,n,r){return Gje(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?zX:r=="historyRedo"?UX:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function HX(e,t){return(n,r)=>{let i=Cd.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=Qje(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const zX=HX(!1,!0),UX=HX(!0,!0),Jje=as.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>zX(e,t),redo:()=>({state:e,dispatch:t})=>UX(e,t)}},addProseMirrorPlugins(){return[Zje(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),eWe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,tWe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,nWe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,rWe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,iWe=cu.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",xo(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[L3({find:eWe,type:this.type}),L3({find:nWe,type:this.type})]},addPasteRules(){return[fm({find:tWe,type:this.type}),fm({find:rWe,type:this.type})]}}),oWe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",sWe="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",oh=(e,t)=>{for(const n in t)e[n]=t[n];return e},jw="numeric",Ww="ascii",qw="alpha",b5="asciinumeric",d4="alphanumeric",Kw="domain",VX="emoji",aWe="scheme",lWe="slashscheme",fN="whitespace";function cWe(e,t){return e in t||(t[e]=[]),t[e]}function ld(e,t,n){t[jw]&&(t[b5]=!0,t[d4]=!0),t[Ww]&&(t[b5]=!0,t[qw]=!0),t[b5]&&(t[d4]=!0),t[qw]&&(t[d4]=!0),t[d4]&&(t[Kw]=!0),t[VX]&&(t[Kw]=!0);for(const r in t){const i=cWe(r,n);i.indexOf(e)<0&&i.push(e)}}function uWe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Ki(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Ki.groups={};Ki.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const i=t.jr[r][0],o=t.jr[r][1];if(o&&i.test(e))return o}return t.jd},has(e,t){return t===void 0&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r=r||Ki.groups;let i;return t&&t.j?i=t:(i=new Ki(t),n&&r&&ld(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const o=e.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(e[s]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){r=r||Ki.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let s,a=i.go(e);if(a?(s=new Ki,oh(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Ki,o){if(r)if(s.t&&typeof s.t=="string"){const c=oh(uWe(s.t,r),n);ld(o,c,r)}else n&&ld(o,n,r);s.t=o}return i.j[e]=s,s}};const Bt=(e,t,n,r,i)=>e.ta(t,n,r,i),Fo=(e,t,n,r,i)=>e.tr(t,n,r,i),hN=(e,t,n,r,i)=>e.ts(t,n,r,i),Ve=(e,t,n,r,i)=>e.tt(t,n,r,i),ll="WORD",Gw="UWORD",Mm="LOCALHOST",Yw="TLD",Qw="UTLD",x5="SCHEME",O1="SLASH_SCHEME",__="NUM",jX="WS",A_="NL",T0="OPENBRACE",k0="CLOSEBRACE",Av="OPENBRACKET",$v="CLOSEBRACKET",Dv="OPENPAREN",Ov="CLOSEPAREN",Pv="OPENANGLEBRACKET",Rv="CLOSEANGLEBRACKET",Mv="FULLWIDTHLEFTPAREN",Iv="FULLWIDTHRIGHTPAREN",Lv="LEFTCORNERBRACKET",Nv="RIGHTCORNERBRACKET",Fv="LEFTWHITECORNERBRACKET",Bv="RIGHTWHITECORNERBRACKET",Hv="FULLWIDTHLESSTHAN",zv="FULLWIDTHGREATERTHAN",Uv="AMPERSAND",Vv="APOSTROPHE",jv="ASTERISK",wc="AT",Wv="BACKSLASH",qv="BACKTICK",Kv="CARET",Ac="COLON",$_="COMMA",Gv="DOLLAR",ia="DOT",Yv="EQUALS",D_="EXCLAMATION",oa="HYPHEN",Qv="PERCENT",Xv="PIPE",Zv="PLUS",Jv="POUND",ey="QUERY",O_="QUOTE",P_="SEMI",sa="SLASH",_0="TILDE",ty="UNDERSCORE",WX="EMOJI",ny="SYM";var qX=Object.freeze({__proto__:null,WORD:ll,UWORD:Gw,LOCALHOST:Mm,TLD:Yw,UTLD:Qw,SCHEME:x5,SLASH_SCHEME:O1,NUM:__,WS:jX,NL:A_,OPENBRACE:T0,CLOSEBRACE:k0,OPENBRACKET:Av,CLOSEBRACKET:$v,OPENPAREN:Dv,CLOSEPAREN:Ov,OPENANGLEBRACKET:Pv,CLOSEANGLEBRACKET:Rv,FULLWIDTHLEFTPAREN:Mv,FULLWIDTHRIGHTPAREN:Iv,LEFTCORNERBRACKET:Lv,RIGHTCORNERBRACKET:Nv,LEFTWHITECORNERBRACKET:Fv,RIGHTWHITECORNERBRACKET:Bv,FULLWIDTHLESSTHAN:Hv,FULLWIDTHGREATERTHAN:zv,AMPERSAND:Uv,APOSTROPHE:Vv,ASTERISK:jv,AT:wc,BACKSLASH:Wv,BACKTICK:qv,CARET:Kv,COLON:Ac,COMMA:$_,DOLLAR:Gv,DOT:ia,EQUALS:Yv,EXCLAMATION:D_,HYPHEN:oa,PERCENT:Qv,PIPE:Xv,PLUS:Zv,POUND:Jv,QUERY:ey,QUOTE:O_,SEMI:P_,SLASH:sa,TILDE:_0,UNDERSCORE:ty,EMOJI:WX,SYM:ny});const S1=/[a-z]/,E7=/\p{L}/u,T7=/\p{Emoji}/u,k7=/\d/,pN=/\s/,mN=`
`,dWe="\uFE0F",fWe="\u200D";let f4=null,h4=null;function hWe(e){e===void 0&&(e=[]);const t={};Ki.groups=t;const n=new Ki;f4==null&&(f4=gN(oWe)),h4==null&&(h4=gN(sWe)),Ve(n,"'",Vv),Ve(n,"{",T0),Ve(n,"}",k0),Ve(n,"[",Av),Ve(n,"]",$v),Ve(n,"(",Dv),Ve(n,")",Ov),Ve(n,"<",Pv),Ve(n,">",Rv),Ve(n,"\uFF08",Mv),Ve(n,"\uFF09",Iv),Ve(n,"\u300C",Lv),Ve(n,"\u300D",Nv),Ve(n,"\u300E",Fv),Ve(n,"\u300F",Bv),Ve(n,"\uFF1C",Hv),Ve(n,"\uFF1E",zv),Ve(n,"&",Uv),Ve(n,"*",jv),Ve(n,"@",wc),Ve(n,"`",qv),Ve(n,"^",Kv),Ve(n,":",Ac),Ve(n,",",$_),Ve(n,"$",Gv),Ve(n,".",ia),Ve(n,"=",Yv),Ve(n,"!",D_),Ve(n,"-",oa),Ve(n,"%",Qv),Ve(n,"|",Xv),Ve(n,"+",Zv),Ve(n,"#",Jv),Ve(n,"?",ey),Ve(n,'"',O_),Ve(n,"/",sa),Ve(n,";",P_),Ve(n,"~",_0),Ve(n,"_",ty),Ve(n,"\\",Wv);const r=Fo(n,k7,__,{[jw]:!0});Fo(r,k7,r);const i=Fo(n,S1,ll,{[Ww]:!0});Fo(i,S1,i);const o=Fo(n,E7,Gw,{[qw]:!0});Fo(o,S1),Fo(o,E7,o);const s=Fo(n,pN,jX,{[fN]:!0});Ve(n,mN,A_,{[fN]:!0}),Ve(s,mN),Fo(s,pN,s);const a=Fo(n,T7,WX,{[VX]:!0});Fo(a,T7,a),Ve(a,dWe,a);const c=Ve(a,fWe);Fo(c,T7,a);const u=[[S1,i]],d=[[S1,null],[E7,o]];for(let f=0;f<f4.length;f++)ac(n,f4[f],Yw,ll,u);for(let f=0;f<h4.length;f++)ac(n,h4[f],Qw,Gw,d);ld(Yw,{tld:!0,ascii:!0},t),ld(Qw,{utld:!0,alpha:!0},t),ac(n,"file",x5,ll,u),ac(n,"mailto",x5,ll,u),ac(n,"http",O1,ll,u),ac(n,"https",O1,ll,u),ac(n,"ftp",O1,ll,u),ac(n,"ftps",O1,ll,u),ld(x5,{scheme:!0,ascii:!0},t),ld(O1,{slashscheme:!0,ascii:!0},t),e=e.sort((f,h)=>f[0]>h[0]?1:-1);for(let f=0;f<e.length;f++){const h=e[f][0],m=e[f][1]?{[aWe]:!0}:{[lWe]:!0};h.indexOf("-")>=0?m[Kw]=!0:S1.test(h)?k7.test(h)?m[b5]=!0:m[Ww]=!0:m[jw]=!0,hN(n,h,h,m)}return hN(n,"localhost",Mm,{ascii:!0}),n.jd=new Ki(ny),{start:n,tokens:oh({groups:t},qX)}}function pWe(e,t){const n=mWe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,c=null,u=0,d=null,f=-1,h=-1;for(;s<r&&(c=a.go(n[s]));)a=c,a.accepts()?(f=0,h=0,d=a):f>=0&&(f+=n[s].length,h++),u+=n[s].length,o+=n[s].length,s++;o-=f,s-=h,u-=f,i.push({t:d.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function mWe(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function ac(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const c=t[a];e.j[c]?o=e.j[c]:(o=new Ki(r),o.jr=i.slice(),e.j[c]=o),e=o}return o=new Ki(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function gN(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const Im={defaultProtocol:"http",events:null,format:vN,formatHref:vN,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function R_(e,t){t===void 0&&(t=null);let n=oh({},Im);e&&(n=oh(n,e instanceof R_?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}R_.prototype={o:Im,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Im[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function vN(e){return e}function KX(e,t){this.t="token",this.v=e,this.tk=t}KX.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Im.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),d=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),c&&(s.target=c),u&&(s.rel=u),d&&oh(s,d),{tagName:i,attributes:s,content:o,eventListeners:f}}};function M9(e,t){class n extends KX{constructor(i,o){super(i,o),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const yN=M9("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),bN=M9("text"),gWe=M9("nl"),p4=M9("url",{isLink:!0,toHref(e){return e===void 0&&(e=Im.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Mm&&e[1].t===Ac}}),Bo=e=>new Ki(e);function vWe(e){let{groups:t}=e;const n=t.domain.concat([Uv,jv,wc,Wv,qv,Kv,Gv,Yv,oa,__,Qv,Xv,Zv,Jv,sa,ny,_0,ty]),r=[Vv,Ac,$_,ia,D_,ey,O_,P_,Pv,Rv,T0,k0,$v,Av,Dv,Ov,Mv,Iv,Lv,Nv,Fv,Bv,Hv,zv],i=[Uv,Vv,jv,Wv,qv,Kv,Gv,Yv,oa,T0,k0,Qv,Xv,Zv,Jv,ey,sa,ny,_0,ty],o=Bo(),s=Ve(o,_0);Bt(s,i,s),Bt(s,t.domain,s);const a=Bo(),c=Bo(),u=Bo();Bt(o,t.domain,a),Bt(o,t.scheme,c),Bt(o,t.slashscheme,u),Bt(a,i,s),Bt(a,t.domain,a);const d=Ve(a,wc);Ve(s,wc,d),Ve(c,wc,d),Ve(u,wc,d);const f=Ve(s,ia);Bt(f,i,s),Bt(f,t.domain,s);const h=Bo();Bt(d,t.domain,h),Bt(h,t.domain,h);const p=Ve(h,ia);Bt(p,t.domain,h);const m=Bo(yN);Bt(p,t.tld,m),Bt(p,t.utld,m),Ve(d,Mm,m);const v=Ve(h,oa);Bt(v,t.domain,h),Bt(m,t.domain,h),Ve(m,ia,p),Ve(m,oa,v);const b=Ve(m,Ac);Bt(b,t.numeric,yN);const x=Ve(a,oa),C=Ve(a,ia);Bt(x,t.domain,a),Bt(C,i,s),Bt(C,t.domain,a);const w=Bo(p4);Bt(C,t.tld,w),Bt(C,t.utld,w),Bt(w,t.domain,a),Bt(w,i,s),Ve(w,ia,C),Ve(w,oa,x),Ve(w,wc,d);const S=Ve(w,Ac),T=Bo(p4);Bt(S,t.numeric,T);const E=Bo(p4),k=Bo();Bt(E,n,E),Bt(E,r,k),Bt(k,n,E),Bt(k,r,k),Ve(w,sa,E),Ve(T,sa,E);const _=Ve(c,Ac),O=Ve(u,Ac),D=Ve(O,sa),L=Ve(D,sa);Bt(c,t.domain,a),Ve(c,ia,C),Ve(c,oa,x),Bt(u,t.domain,a),Ve(u,ia,C),Ve(u,oa,x),Bt(_,t.domain,E),Ve(_,sa,E),Bt(L,t.domain,E),Bt(L,n,E),Ve(L,sa,E);const N=[[T0,k0],[Av,$v],[Dv,Ov],[Pv,Rv],[Mv,Iv],[Lv,Nv],[Fv,Bv],[Hv,zv]];for(let j=0;j<N.length;j++){const[G,X]=N[j],re=Ve(E,G);Ve(k,G,re),Ve(re,X,E);const oe=Bo(p4);Bt(re,n,oe);const U=Bo();Bt(re,r),Bt(oe,n,oe),Bt(oe,r,U),Bt(U,n,oe),Bt(U,r,U),Ve(oe,X,E),Ve(U,X,E)}return Ve(o,Mm,w),Ve(o,A_,gWe),{start:o,tokens:qX}}function yWe(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=e,c=null,u=null,d=0,f=null,h=-1;for(;i<r&&!(c=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(u=c||a.go(n[i].t));)c=null,a=u,a.accepts()?(h=0,f=a):h>=0&&h++,i++,d++;if(h<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(_7(bN,t,s)),s=[]),i-=h,d-=h;const p=f.t,m=n.slice(i-d,i);o.push(_7(p,t,m))}}return s.length>0&&o.push(_7(bN,t,s)),o}function _7(e,t,n){const r=n[0].s,i=n[n.length-1].e,o=t.slice(r,i);return new e(o,n)}const bWe=typeof console<"u"&&console&&console.warn||(()=>{}),xWe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Gn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function CWe(){Ki.groups={},Gn.scanner=null,Gn.parser=null,Gn.tokenQueue=[],Gn.pluginQueue=[],Gn.customSchemes=[],Gn.initialized=!1}function xN(e,t){if(t===void 0&&(t=!1),Gn.initialized&&bWe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${xWe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Gn.customSchemes.push([e,t])}function wWe(){Gn.scanner=hWe(Gn.customSchemes);for(let e=0;e<Gn.tokenQueue.length;e++)Gn.tokenQueue[e][1]({scanner:Gn.scanner});Gn.parser=vWe(Gn.scanner.tokens);for(let e=0;e<Gn.pluginQueue.length;e++)Gn.pluginQueue[e][1]({scanner:Gn.scanner,parser:Gn.parser});Gn.initialized=!0}function GX(e){return Gn.initialized||wWe(),yWe(Gn.parser.start,e,pWe(Gn.scanner.start,e))}function YX(e,t,n){if(t===void 0&&(t=null),n===void 0&&(n=null),t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new R_(n),i=GX(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}function SWe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function EWe(e){return new zr({key:new oi("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=Vpe(n.doc,[...t]);if(Zpe(a).forEach(({newRange:u})=>{const d=Wpe(r.doc,u,p=>p.isTextblock);let f,h;if(d.length>1?(f=d[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=d[0],h=r.doc.textBetween(f.pos,u.to,void 0," ")),f&&h){const p=h.split(" ").filter(x=>x!=="");if(p.length<=0)return!1;const m=p[p.length-1],v=f.pos+h.lastIndexOf(m);if(!m)return!1;const b=GX(m).map(x=>x.toObject(e.defaultProtocol));if(!SWe(b))return!1;b.filter(x=>x.isLink).map(x=>({...x,from:v+x.start+1,to:v+x.end+1})).filter(x=>r.schema.marks.code?!r.doc.rangeHasMark(x.from,x.to,r.schema.marks.code):!0).filter(x=>e.validate(x.value)).forEach(x=>{fT(x.from,x.to,r.doc).some(C=>C.mark.type===e.type)||s.addMark(x.from,x.to,e.type.create({href:x.href}))})}}),!!s.steps.length)return s}})}function TWe(e){return new zr({key:new oi("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||!t.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(h=>h.nodeName==="A"))return!1;const c=ej(t.state,e.type.name),u=r.target,d=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:c.href,f=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:c.target;return u&&d?(window.open(d,f),!0):!1}}})}function kWe(e){return new zr({key:new oi("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const c=YX(a,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!c?!1:(e.editor.commands.setMark(e.type,{href:c.href}),!0)}}})}const _We=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function CN(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(_We,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const AWe=cu.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){xN(e);return}xN(e.scheme,e.optionalSlashes)})},onDestroy(){CWe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!CN(t,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:e}){return CN(e.href,this.options.protocols)?["a",xo(this.options.HTMLAttributes,e),0]:["a",xo(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[fm({find:e=>{const t=[];if(e){const{validate:n}=this.options,r=YX(e).filter(i=>i.isLink&&n(i.value));r.length&&r.forEach(i=>t.push({text:i.value,data:{href:i.href},index:i.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(EWe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&e.push(TWe({type:this.type})),this.options.linkOnPaste&&e.push(kWe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function $We(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=M0e(n),c=new RegExp(`\\s${a}$`),u=o?"^":"",d=r?new RegExp(`${u}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${u}(?:^)?${a}[^\\s${a}]*`,"gm"),f=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!f)return null;const h=s.pos-f.length,p=Array.from(f.matchAll(d)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const m=p.input.slice(Math.max(0,p.index-1),p.index),v=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(m);if(i!==null&&!v)return null;const b=h+p.index;let x=b+p[0].length;return r&&c.test(f.slice(x-1,x+1))&&(p[0]+=" ",x+=1),b<s.pos&&x>=s.pos?{range:{from:b,to:x},query:p[0].slice(n.length),text:p[0]}:null}const DWe=new oi("suggestion");function OWe({pluginKey:e=DWe,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:c=()=>null,items:u=()=>[],render:d=()=>({}),allow:f=()=>!0,findSuggestionMatch:h=$We}){let p;const m=d==null?void 0:d(),v=new zr({key:e,view(){return{update:async(b,x)=>{var C,w,S,T,E,k,_;const O=(C=this.key)===null||C===void 0?void 0:C.getState(x),D=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),L=O.active&&D.active&&O.range.from!==D.range.from,N=!O.active&&D.active,j=O.active&&!D.active,G=!N&&!j&&O.query!==D.query,X=N||L&&G,re=G||L,oe=j||L&&G;if(!X&&!re&&!oe)return;const U=oe&&!X?O:D,H=b.dom.querySelector(`[data-decoration-id="${U.decorationId}"]`);p={editor:t,range:U.range,query:U.query,text:U.text,items:[],command:R=>c({editor:t,range:U.range,props:R}),decorationNode:H,clientRect:H?()=>{var R;const{decorationId:se}=(R=this.key)===null||R===void 0?void 0:R.getState(t.state),ee=b.dom.querySelector(`[data-decoration-id="${se}"]`);return(ee==null?void 0:ee.getBoundingClientRect())||null}:null},X&&((S=m==null?void 0:m.onBeforeStart)===null||S===void 0||S.call(m,p)),re&&((T=m==null?void 0:m.onBeforeUpdate)===null||T===void 0||T.call(m,p)),(re||X)&&(p.items=await u({editor:t,query:U.query})),oe&&((E=m==null?void 0:m.onExit)===null||E===void 0||E.call(m,p)),re&&((k=m==null?void 0:m.onUpdate)===null||k===void 0||k.call(m,p)),X&&((_=m==null?void 0:m.onStart)===null||_===void 0||_.call(m,p))},destroy:()=>{var b;!p||(b=m==null?void 0:m.onExit)===null||b===void 0||b.call(m,p)}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,x,C,w){const{isEditable:S}=t,{composing:T}=t.view,{selection:E}=b,{empty:k,from:_}=E,O={...x};if(O.composing=T,S&&(k||t.view.composing)){(_<x.range.from||_>x.range.to)&&!T&&!x.composing&&(O.active=!1);const D=h({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:E.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;D&&f({editor:t,state:w,range:D.range,isActive:x.active})?(O.active=!0,O.decorationId=x.decorationId?x.decorationId:L,O.range=D.range,O.query=D.query,O.text=D.text):O.active=!1}else O.active=!1;return O.active||(O.decorationId=null,O.range={from:0,to:0},O.query=null,O.text=null),O}},props:{handleKeyDown(b,x){var C;const{active:w,range:S}=v.getState(b.state);return w&&((C=m==null?void 0:m.onKeyDown)===null||C===void 0?void 0:C.call(m,{view:b,event:x,range:S}))||!1},decorations(b){const{active:x,range:C,decorationId:w}=v.getState(b);return x?mr.create(b.doc,[bo.inline(C.from,C.to,{nodeName:s,class:a,"data-decoration-id":w})]):null}}});return v}const PWe=new oi("mention"),RWe=Dl.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderText({options:e,node:t}){var n;return`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t}){var n;return["span",xo(this.HTMLAttributes,e.HTMLAttributes),`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`]},suggestion:{char:"@",pluginKey:PWe,command:({editor:e,range:t,props:n})=>{var r,i,o;const s=e.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(o=(i=e.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||o===void 0||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",xo({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})];const n={...this.options};n.HTMLAttributes=xo({"data-type":this.name},this.options.HTMLAttributes,t);const r=this.options.renderHTML({options:n,node:e});return typeof r=="string"?["span",xo({"data-type":this.name},this.options.HTMLAttributes,t),r]:r},renderText({node:e}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:e})):this.options.renderText({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return i?(t.doc.nodesBetween(o-1,o,(s,a)=>{if(s.type.name===this.name)return n=!0,e.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[OWe({editor:this.editor,...this.options.suggestion})]}}),MWe=Dl.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",xo(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),IWe=as.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new zr({key:new oi("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=this.editor.isEmpty;return e.descendants((s,a)=>{const c=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&Jy(s);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=bo.node(a,a+s.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:c}):this.options.placeholder});i.push(f)}return this.options.includeChildren}),mr.create(e,i)}}})]}}),LWe=Dl.create({name:"text",group:"inline"}),NWe=cu.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",xo(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),FWe=y.exports.forwardRef((e,t)=>{const[n,r]=y.exports.useState(0),i=c=>{const u=e.items[c];u&&e.command({id:u.id,"data-handle":u.handle,"data-is-user":u.isUser,label:u.label})},o=()=>{r((n+e.items.length-1)%e.items.length)},s=()=>{r((n+1)%e.items.length)},a=()=>{i(n)};return y.exports.useEffect(()=>r(0),[e.items]),y.exports.useImperativeHandle(t,()=>({onKeyDown:({event:c})=>c.key==="ArrowUp"?(o(),!0):c.key==="ArrowDown"?(s(),!0):c.key==="Enter"?(a(),!0):!1})),e.items===null?l(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",p:"$1",borderRadius:12},children:l(P,{css:{py:"$1",px:"$3"},children:"Enter at least 2 characters"})}):l(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",p:"$1",borderRadius:12},children:e.items.length?e.items.map((c,u)=>g(Y,{className:u===n?"is-selected":"",onClick:()=>i(u),css:{borderRadius:8,px:"$3",py:"$1",width:"100%",transition:"background-color 200ms",alignItems:"center",display:"flex",gap:"$2","&:hover, &.is-selected":{transition:"background-color 200ms",borderRadius:8,cursor:"pointer",backgroundColor:"$hoveringItem"}},children:[c.picture&&l(Dt,{css:{borderRadius:c.isUser?999:4},src:c.picture.startsWith("https://")?c.picture+"_x128.webp":kn({uuid:c.picture,size:128}),width:20,height:20}),!c.picture&&c.isUser&&l(Dt,{css:{borderRadius:999},src:kn({uuid:"user",size:128}),width:20,height:20}),!c.picture&&c.isUser===!1&&l(Dt,{css:{borderRadius:4},src:kn({uuid:"store",size:128}),width:20,height:20}),c.label]},u)):l(P,{css:{py:"$1",px:"$3"},children:"No result"})})});function o1({content:e,editable:t=!1,targetMention:n=null,placeholder:r=null}){const i=({node:u})=>l(Ej,{as:"span",children:l(UWe,{entity:{id:u.attrs.id,displayName:u.attrs.label,handle:u.attrs["data-handle"]}})}),{mutate:o}=YWe(),s=_u(u=>{u()},300),a=RWe.extend({addNodeView(){return kj(i)},addAttributes(){var u;return{...(u=this.parent)==null?void 0:u.call(this),"data-handle":null,"data-is-user":null}},parseHTML(){return[{tag:"mention"}]},renderHTML({HTMLAttributes:u,node:d}){return["mention",xo({href:"/"+d.attrs["data-handle"],"data-label":d.attrs.label,"data-id":d.attrs.id,"data-handle":d.attrs["data-handle"],"data-is-user":d.attrs["data-is-user"]},u),d.attrs.label||""]}}),c=[Uje,MWe,NWe,zje,iWe,LWe,Vje,Jje.configure({depth:5,newGroupDelay:100}),IWe.configure({placeholder:r!==null?r:"What do you have to share today?"}),a.configure({suggestion:{items:({query:u})=>u.length<2?null:new Promise(d=>{s(()=>o(u,{onSuccess:f=>d(Array.isArray(f.data)?f.data:[])}))}),render:()=>{let u,d;return{onStart:f=>{u=new Tj(FWe,{props:f,editor:f.editor}),f.clientRect&&(d=gh("body",{getReferenceClientRect:f.clientRect,appendTo:()=>n==="body"?document.body:document.getElementById(n),content:u.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(f){u.updateProps(f),f.clientRect&&d[0].setProps({getReferenceClientRect:f.clientRect})},onKeyDown(f){var h;if(f.event.key==="Escape")return d[0].hide(),!0;if(u)return(h=u.ref)==null?void 0:h.onKeyDown(f)},onExit(){d!==void 0&&d[0].destroy(),u.destroy()}}}}}),jWe,AWe.configure({autolink:!0,linkOnPaste:!1,defaultProtocol:"https",HTMLAttributes:{rel:"noopener nofollow",target:"_blank"}})];return _ge({extensions:c,editable:t,content:e,editorProps:{attributes:{translate:t?"no":"yes",spellcheck:"true"}}})}function Dg({editor:e}){const{subscription:t}=st(),n=t.type==="free";return l($ge,{tippyOptions:{duration:100},editor:e,children:g(M,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",p:"$1",borderRadius:12,gap:"$1",width:"fit-content"},children:[l(Et,{enabled:n,small:!0,content:l(P,{css:{gap:"$2",width:"fit-content"},children:l(A,{children:"Consider upgrading your subscription to unlock formatting for your post."})}),children:l(Y,{onClick:()=>e.chain().focus().toggleBold().run(),disabled:n,css:{borderRadius:8,px:"$3",py:"$1",transition:"background-color 200ms",fontWeight:e.isActive("bold")?"$bold":"inherit","&:hover":{transition:"background-color 200ms",borderRadius:8,cursor:"pointer",backgroundColor:"$hoveringItem"}},children:"Bold"})}),l(Et,{enabled:n,small:!0,content:l(P,{css:{gap:"$2"},children:l(A,{children:"Consider upgrading your subscription to unlock formatting for your post."})}),children:l(Y,{onClick:()=>e.chain().focus().toggleItalic().run(),disabled:n,css:{borderRadius:8,px:"$3",py:"$1",transition:"background-color 200ms",fontWeight:e.isActive("italic")?"$bold":"inherit","&:hover":{transition:"background-color 200ms",borderRadius:8,cursor:"pointer",backgroundColor:"$hoveringItem"}},children:"Italic"})}),l(Et,{enabled:n,small:!0,content:l(P,{css:{gap:"$2"},children:l(A,{children:"Consider upgrading your subscription to unlock formatting for your post."})}),children:l(Y,{onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:n,css:{borderRadius:8,px:"$3",py:"$1",transition:"background-color 200ms",fontWeight:e.isActive("underline")?"$bold":"inherit","&:hover":{transition:"background-color 200ms",borderRadius:8,cursor:"pointer",backgroundColor:"$hoveringItem"}},children:"Underline"})})]})})}function QX(){const[e,t]=y.exports.useState(!0),{sharingPost:n,setSharingPost:r}=BE();return l(Ye,{open:e,onOpenChange:i=>{i===!1&&r(null),t(i)},children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:i=>i.preventDefault(),id:"create-share-modal",children:[l(nt,{children:"Share a post"}),g(P,{css:{gap:"$2"},children:[l(rX,{forcedRating:n.data.rating,quotedPost:n}),l(Tt,{css:{marginTop:"$4"},children:"Quoted post"}),l(Ma,{post:n,quotedPost:!0,showComments:!1})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function XX({products:e}){const[t,n]=y.exports.useState(!1);return g(P,{css:{gap:"$2"},children:[l(Y,{variant:"inline",onClick:()=>{n(!t)},children:t?"Hide credits":"Show credits"}),t&&e.map(r=>g(P,{css:{border:"1px solid $borderColor",backgroundColor:"$cardBackgroundColor",p:"$3",borderRadius:8},children:[l(en,{entity:r.store,css:{marginBottom:"$2"}}),l(Et,{side:"left",enabled:r.pictureUuid!==null,content:l(Dt,{loading:"lazy",src:kn({uuid:r.pictureUuid,size:512}),css:{objectFit:"fill",height:200,borderRadius:4}}),children:l(ce,{children:l(Q3,{name:r.name})})}),r.locations.length>0&&l(io,{css:{my:"$2"}}),r.locations.length>0&&l(M,{css:{gap:"$2",flexWrap:"wrap"},children:r.locations.map(i=>l(ie,{primfeed:!0,to:i.url,target:"_blank",rel:"noopener",children:i.name},"url-credit-"+i.name))})]},"product-credit-"+r.name))]})}const BWe=.75;function HWe({post:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,data:i,fetchNextPage:o,hasNextPage:s}=hqe(e.id,t),{ref:a,inView:c}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{c&&s&&s&&o()},[o,s,c]),g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:g(Xt,{onSelect:u=>u.preventDefault(),children:[l(W,{icon:Pie}),l(A,{children:"View shares"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:u=>u.preventDefault(),children:[l(nt,{children:"Shares"}),r&&l(A,{children:"Loading\u2026"}),l(P,{css:{gap:"$4"},children:!r&&(i==null?void 0:i.pages.map((u,d)=>{const f=d===i.pages.length-1,h=Math.floor(u.posts.length*BWe);return u==null?void 0:u.posts.map((p,m)=>l(Ma,{infiniteScrollRef:f&&h===m?a:void 0,fromSharesDialog:!0,quotedPost:!0,post:p},"shares-post-"+p.data.id))}))}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function ZX({post:e}){const[t]=Jn(),n=t.get("c"),[r,i]=y.exports.useState(null),[o,s]=y.exports.useState(null);return y.exports.useEffect(()=>{n&&document.getElementById("comment-"+n)&&document.getElementById("comment-"+n).scrollIntoView()},[n]),g(P,{css:{gap:"$4"},children:[e.data.comments&&l(FX,{post:e}),e.data.comments&&e.data.comments.map((a,c)=>l(JX,{comment:a,post:e,active:n===a.id,replying:r,setReplying:i,editing:o,setEditing:s},"comment-"+a.id+"-"+c))]})}function JX({comment:e,post:t,active:n,replying:r,setReplying:i,editing:o,setEditing:s}){var C;const{perms:a,selectedEntity:c}=st(),{isLoading:u,mutate:d}=yqe(),[f,h]=y.exports.useState(e.content),[p]=Jn(),[m,v]=y.exports.useState(e.updatedAt!==null),b=p.get("c"),x=o1({content:f,targetMention:"body",editable:o===e.id,placeholder:"Write a comment"});return y.exports.useEffect(()=>{x.setEditable(o===e.id),o!==e.id&&x.commands.setContent(f)},[o]),g(P,{css:{gap:"$4"},children:[g(M,{id:"comment-"+e.id,css:{scrollMarginTop:"$8",alignItems:"start",gap:"$2",width:"100%"},children:[l(en,{sizePicture:32,showName:!1,entity:e.owner}),g(P,{css:{minWidth:0},children:[g(P,{css:{backgroundColor:n?"$commentSelectedBackgroundColor":"$commentBackgroundColor",py:"$2",px:"$3",borderRadius:12},children:[l(A,{css:{fontWeight:"$semiBold",fontSize:13},children:l(en,{showPicture:!1,nameBold:!1,entity:e.owner})}),l(Gd,{editor:x}),o===e.id&&g(P,{id:"comment-section-"+e.id,children:[l(Dg,{editor:x}),x.getText().length>0&&l(Y,{variant:"transparent","aria-label":"Close",css:{marginLeft:"auto"},disabled:u,onClick:()=>d({commentId:e.id,content:x.getHTML()},{onSuccess:()=>{s(null),v(!0),h(x.getHTML())}}),children:l(W,{icon:XH})})]})]}),g(M,{css:{fontWeight:"$medium",color:"$subTextColor",gap:"$2",maxWidth:"100%",fontSize:12,marginTop:"$1",marginLeft:"$3",marginRight:"$2"},children:[l(ie,{to:window.location.pathname+"?c="+e.id,css:{fontWeight:"$medium"},children:l(Ne,{title:Z(e.createdAt).format("LLL"),children:Z(e.createdAt).fromNow()})}),m&&l(A,{css:{fontWeight:"$medium"},children:"(edited)"}),(e.perms.canDelete===!0||((C=a==null?void 0:a.mod)==null?void 0:C.archiveComment)||t.data.owner.id===c.id)&&l(zWe,{commentId:e.id}),e.perms.canEdit&&g(Y,{css:{fontWeight:"$medium"},variant:"inline",onClick:()=>{s(o?null:e.id)},children:[o&&"cancel ","edit"]}),l(Y,{css:{fontWeight:"$medium"},variant:"inline",onClick:()=>{r===e.id?i(null):i(e.parent?e.parent:e.id)},children:"reply"}),l(ce,{css:{marginLeft:"auto"},children:l(Oje,{defaultLiked:e.likedByUser,defaultLikes:e.likesCount,commentId:e.id})})]})]})]}),e.children.length>0&&l(P,{css:{gap:"$4",marginLeft:"$9"},children:e.children.map(w=>l(JX,{comment:w,post:t,active:b===w.id,replying:r,setReplying:i,editing:o,setEditing:s},"comment-"+w.id))}),r===e.id&&l(P,{css:{gap:"$4",marginLeft:e.parent?0:"$9"},children:l(FX,{post:t,parentId:e.id})})]})}function zWe({commentId:e}){const[t,n]=y.exports.useState(!1),{isLoading:r,mutate:i}=$qe();return g(Ye,{open:t,onOpenChange:n,children:[l(pt,{asChild:!0,children:l(Ne,{css:{fontWeight:"$medium",cursor:"pointer"},children:"delete"})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:o=>o.preventDefault(),size:"small",children:[l(nt,{children:"Delete post"}),l(ht,{children:l(A,{children:"This action can't be undone. Your comment will be deleted and removed from the post."})}),l(dt,{onSubmit:o=>{o.preventDefault(),i(e,{onSuccess:()=>{n(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:r,variant:"danger",children:"Delete the comment"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function UWe({entity:e,openDelay:t=500}){const n=Ee();return l(bX,{entity:e,openDelay:t,children:l(ce,{css:{display:"inline",px:6,py:1,borderRadius:6,fontWeight:"$medium",backgroundColor:"$mentionBackgroundColor"},children:l(ie,{to:"/"+e.handle,onClick:()=>{n.resetQueries(["feed",e.id])},noStyle:!0,css:{display:"inline-flex",alignItems:"center",gap:6,maxWidth:"100%",color:"$mentionTextColor","&:hover":{color:"$mentionTextHoverColor"}},children:l(Ne,{css:{display:"inline",maxWidth:"100%"},children:e.displayName})})})})}const VWe=({node:e})=>l(Ej,{as:"span",children:l(CX,{url:e.attrs.href})}),A7=/https?:\/\/maps\.secondlife\.com\/secondlife\/([^/]+)\/(\d+)\/(\d+)\/(\d+)/g,jWe=Dl.create({name:"slurl",inline:!0,group:"inline",atom:!0,priority:1e4,addAttributes(){return{href:{default:null}}},parseHTML(){return[{tag:"slurl"}]},addNodeView(){return kj(VWe)},renderHTML({HTMLAttributes:e}){return["slurl",{...e,href:e.href},e.href]},addInputRules(){return[new KV({find:A7,handler:({state:e,range:t,match:n})=>{const{tr:r}=e,i=t.from+n.index,o=i+n[0].length;r.replaceWith(i,o,this.type.create({href:n[0]}))}})]},addProseMirrorPlugins(){return[new zr({key:new oi("slurl"),appendTransaction:(e,t,n)=>{if(!(e.some(a=>a.docChanged)&&!t.doc.eq(n.doc)))return null;const{tr:i}=n;let o=!1;const s=[];n.doc.descendants((a,c)=>{s.push({node:a,pos:c})});for(let a=s.length-1;a>=0;a--){const{node:c,pos:u}=s[a];if(c.isText){const d=Array.from(c.text.matchAll(A7));for(const f of d.reverse())if(f.length>0){const h=u+f.index,p=h+f[0].length;i.replaceWith(h,p,this.type.create({href:f[0]})),o=!0}}else if(c.type.name==="link"){const d=c.attrs.href.match(A7);d&&(i.replaceWith(u,u+c.nodeSize,this.type.create({href:d[0]})),o=!0)}}return o?i:null}})]}}),WWe=.75;function qWe(){var h;const[e,t]=Jn(),n=e.get("tab")||"following",r=e.get("type")||"all",{setPostsOpened:i}=Dy(),{isLoading:o,data:s,fetchNextPage:a,hasNextPage:c}=M_(n+"/"+r),u=Ee(),{ref:d,inView:f}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{f&&c&&c&&a()},[a,c,f]),y.exports.useEffect(()=>{i([])},[i,n,r]),g(P,{css:{marginBottom:"$8",marginTop:"$2",gap:"$2",width:"100%",height:"fit-content"},children:[g(M,{css:{gap:"$2"},children:[l(wN,{label:"Following",active:n==="following",setActiveTab:()=>{e.set("tab","following"),t(e)},onClick:()=>{u.resetQueries(["feed","following/all"]),u.resetQueries(["feed","following/text-only"]),u.resetQueries(["feed","following/pictures-only"])}}),l(wN,{label:"Discovery",active:n==="discovery",setActiveTab:()=>{e.set("tab","discovery"),t(e)},onClick:()=>{u.resetQueries(["feed","discovery/all"]),u.resetQueries(["feed","discovery/text-only"]),u.resetQueries(["feed","discovery/pictures-only"])}})]}),o&&l(A,{children:"Loading\u2026"}),!o&&g(P,{children:[g(M,{css:{justifyContent:"end",alignItems:"center"},children:[l(A,{children:"Includes"}),l(Ln,{value:r,css:{fontWeight:"$bold",border:"none !important",backgroundColor:"transparent !important",boxShadow:"none !important"},cssContent:{zIndex:1},onValueChange:p=>{e.set("type",p),t(e),u.resetQueries(["feed",n+"/"+p])},children:g(Nn,{children:[l(Ft,{value:"all",children:"pictures and text"}),l(Ft,{value:"text-only",children:"text only"}),l(Ft,{value:"pictures-only",children:"pictures only"})]})})]}),g(P,{css:{gap:"$4","@sm":{gap:0,marginTop:0}},children:[s==null?void 0:s.pages.map((p,m)=>{const v=m===s.pages.length-1,b=Math.floor(p.posts.length*WWe);return p==null?void 0:p.posts.map((x,C)=>l(Ma,{post:x,showComments:!1,infiniteScrollRef:v&&b===C?d:void 0},"feed-post-"+m+"-"+C+"-"+n+"-"+x.data.id))}),!o&&((h=s==null?void 0:s.pages[(s==null?void 0:s.pages.length)-1])==null?void 0:h.posts.length)===0&&(s==null?void 0:s.pages[(s==null?void 0:s.pages.length)-1].currentPage)===1&&g(P,{css:{marginTop:"$6",textAlign:"center",gap:"$4"},children:[l(Qn,{children:"Nothing in your feed yet"}),l(A,{children:"There is no posts to display in your feed yet. Go to the Discovery or Gallery page, and start following your favorite resident or stores."})]})]})]})]})}function wN({label:e,active:t,setActiveTab:n,onClick:r=null}){return l(M,{css:{cursor:"pointer",fontSize:16,fontWeight:t?"$bold":"inherit",color:t?"$textColor":"$subTextColor",py:"$4",height:"100%",borderRadius:8,transition:"color 0.1s, background-color 0.1s",width:"100%",justifyContent:"center","&:hover":{backgroundColor:"$tabulationBackgroundColorHover",color:"$textColor"}},onClick:()=>{n(e),r&&r()},children:l(M,{css:{boxShadow:t?"0 2px 0px 0 $colors$tabulationShadowActive":"none"},children:e})})}const KWe=.75;function GWe(){var d;const[e,t]=Jn(),n=e.get("activeTab")||"all",{isLoading:r,data:i,fetchNextPage:o,hasNextPage:s}=M_("bookmarks/"+n),a=Ee(),{ref:c,inView:u}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{u&&s&&s&&o()},[o,s,u]),g(M,{css:{marginBottom:"$8",marginTop:"$2",flexDirection:"column",gap:"$4",flexShrink:0,width:"100%","@sm":{gap:0,marginTop:0}},children:[g(M,{css:{gap:"$2"},children:[l(SN,{label:"All posts",active:n==="all",setActiveTab:()=>{e.set("activeTab","all"),t(e)},onClick:()=>a.resetQueries(["feed","bookmarks/all"])}),l(SN,{label:"Text only",active:n==="text-only",setActiveTab:()=>{e.set("activeTab","text-only"),t(e)},onClick:()=>a.resetQueries(["feed","bookmarks/text-only"])})]}),r&&l(A,{children:"Loading\u2026"}),!r&&(i==null?void 0:i.pages.map((f,h)=>{const p=h===i.pages.length-1,m=Math.floor(f.posts.length*KWe);return f==null?void 0:f.posts.map((v,b)=>l(Ma,{infiniteScrollRef:p&&m===b?c:void 0,post:v,showComments:!1},"bookmarks-post-"+h+"-"+b+"-"+n+"-"+v.data.id))})),!r&&((d=i==null?void 0:i.pages[(i==null?void 0:i.pages.length)-1])==null?void 0:d.posts.length)===0&&(i==null?void 0:i.pages[(i==null?void 0:i.pages.length)-1].currentPage)===1&&g(P,{css:{marginTop:"$6",textAlign:"center",gap:"$4"},children:[l(Qn,{children:"Nothing in your bookmarks yet"}),l(A,{children:"Did you see a viewer tips or you want to save the next product you\u2019re going to purchase? Bookmark it, and keep it for later."})]})]})}function SN({label:e,active:t,setActiveTab:n,onClick:r=null}){return l(M,{css:{cursor:"pointer",fontSize:16,fontWeight:t?"$bold":"inherit",color:t?"$textColor":"$subTextColor",py:"$4",height:"100%",borderRadius:8,transition:"color 0.1s, background-color 0.1s",width:"100%",justifyContent:"center","&:hover":{backgroundColor:"$tabulationBackgroundColorHover",color:"$textColor"}},onClick:()=>{n(e),r&&r()},children:l(M,{css:{boxShadow:t?"0 2px 0px 0 $colors$tabulationShadowActive":"none"},children:e})})}function YWe(){const e=te();return ve(t=>e.get("/pf/mention/suggestions?q="+t))}function QWe(){const e=te();return ve(({postId:t,content:n,parentId:r})=>e.post(`/pf/post/${t}/comment`,{parentId:r,content:n}),{onError:t=>Rt(t)})}function XWe(){const e=te();return _t(["scheduled_posts"],()=>e.get("/pf/scheduled_posts").then(t=>t.data),{})}function eZ(e){const t=te(),n=Ee();return ve(()=>t.delete(`/pf/post/${e}`),{onError:r=>Rt(r),onSuccess:()=>{n.invalidateQueries(["post",e]),n.invalidateQueries(["scheduled_posts"]),F({type:"success",title:"Success",message:"Your post has been deleted and removed from the feed"})}})}function ZWe(e){const t=te();return ve({mutationFn:({event:n,about:r})=>{n.preventDefault();const i=new FormData(n.target),o=i.get("display_name"),s=i.get("flickr_url"),a=i.get("facebook_url"),c=i.get("instagram_url"),u=i.get("personal_url"),d=i.get("deviant_art_url"),f=i.get("bluesky_url"),h=i.get("marketplace_url"),p=i.get("youtube_url"),m=i.get("discord_url"),v=i.get("mastodon_url"),b=i.get("x_url");return t.patch("/pf/entity/"+e,{displayName:o,flickrUrl:s,facebookUrl:a,instagramUrl:c,personalUrl:u,deviantArtUrl:d,blueskyUrl:f,marketplaceUrl:h,youtubeUrl:p,discordUrl:m,mastodonUrl:v,xUrl:b,about:r})},onError:n=>Rt(n)})}function JWe(e){const t=te(),n=Ee();return ve(()=>t.post(`/pf/post/${e}/unlike`),{onError:r=>Rt(r),onSuccess:()=>{n.invalidateQueries(["post",e]),Fu(n,["feed","public-gallery"],e),Fu(n,["feed","following/all"],e),Fu(n,["feed","following/text-only"],e),Fu(n,["feed","following/pictures-only"],e),Fu(n,["feed","discovery/all"],e),Fu(n,["feed","discovery/text-only"],e),Fu(n,["feed","discovery/pictures-only"],e)}})}function Fu(e,t,n){e.getQueryData(t)!==void 0&&e.setQueryData(t,i=>({...i,pages:i.pages.map(o=>({...o,posts:o.posts.map(s=>{var a;return s.postId===n||((a=s==null?void 0:s.data)==null?void 0:a.id)===n?{...s,liked:!1,likes:s.likes-1}:s})}))}))}function eqe(e){const t=te(),n=Ee();return ve(()=>t.post(`/pf/post/${e}/like`),{onError:r=>Rt(r),onSuccess:()=>{n.invalidateQueries(["post",e]),Bu(n,["feed","public-gallery"],e),Bu(n,["feed","following/all"],e),Bu(n,["feed","following/text-only"],e),Bu(n,["feed","following/pictures-only"],e),Bu(n,["feed","discovery/all"],e),Bu(n,["feed","discovery/text-only"],e),Bu(n,["feed","discovery/pictures-only"],e)}})}function Bu(e,t,n){e.getQueryData(t)!==void 0&&e.setQueryData(t,i=>({...i,pages:i.pages.map(o=>({...o,posts:o.posts.map(s=>{var a;return s.postId===n||((a=s==null?void 0:s.data)==null?void 0:a.id)===n?{...s,liked:!0,likes:s.likes+1}:s})}))}))}function tqe(e){const t=te(),n=Ee();return ve(()=>t.post(`/pf/post/${e}/bookmark`),{onError:r=>Rt(r),onSuccess:()=>n.invalidateQueries(["post",e])})}function nqe(){const e=te();return ve(({postId:t,vendorAd:n,content:r,rating:i,publicGallery:o,ai:s,render:a})=>e.patch(`/pf/post/${t}`,{content:r,vendorAd:n,rating:i,publicGallery:o,ai:s,render:a}),{onError:t=>Rt(t)})}function rqe(){const e=te();return _t(["notifications"],()=>e.get("/pf/notifications").then(t=>t.data))}function tZ(){const e=te();return _t(["notifications-count"],()=>e.get("/pf/notifications/count").then(t=>t.data))}function iqe({maturityRatings:e,enabled:t}){const n=te();return _t(["featured","public-gallery",e],()=>n.get("/pf/featured/public-gallery",{params:{maturityRatings:e.join(",")}}).then(r=>r.data),{refetchOnWindowFocus:!1,enabled:t})}function M_(e=null){const t=te(),n=e?"/pf/"+e+"/feed":"/pf/feed",r=Ee();return zl(["feed",e],({pageParam:i={nextPage:1,firstPostId:void 0}})=>{var a,c;const o=new URLSearchParams;i.firstPostId&&o.set("firstPostId",i.firstPostId);const s=r.getQueryData(["feed",e],{stale:!0});if(s&&!o.has("firstPostId")&&typeof s=="object"&&"pages"in s&&((c=(a=s==null?void 0:s.pages)==null?void 0:a[0])==null?void 0:c.firstPostId)){const u=s.pages[0].firstPostId;o.set("firstPostId",u)}return o.set("page",i.nextPage!==void 0?i.nextPage:1),t.get(n+"?"+o.toString()).then(u=>u.data)},{refetchOnWindowFocus:!1,cacheTime:1/0,staleTime:1/0,getPreviousPageParam:i=>{var o;return(o=i.previousId)!=null?o:void 0},getNextPageParam:i=>{var o;return{nextPage:(i==null?void 0:i.nextPage)!==null?i.nextPage:void 0,firstPostId:(o=i==null?void 0:i.firstPostId)!=null?o:null}}})}function oqe(){const e=te(),[t]=Jn(),n="/pf/feed/liked";return zl(["feed-liked-posts"],({pageParam:r={nextPage:1,firstPostId:void 0}})=>(r.firstPostId&&t.set("firstPostId",r.firstPostId),t.set("page",r.nextPage!==void 0?r.nextPage:1),e.get(n+"?"+t.toString()).then(i=>i.data)),{refetchOnWindowFocus:!1,cacheTime:0,getPreviousPageParam:r=>{var i;return(i=r.previousId)!=null?i:void 0},getNextPageParam:r=>{var i;return{nextPage:(r==null?void 0:r.nextPage)!==null?r.nextPage:void 0,firstPostId:(i=r==null?void 0:r.firstPostId)!=null?i:null}}})}function sqe(e){const t=te();return _t(["profile",e],()=>t.get("/pf/entity/"+e).then(n=>n.data),{refetchOnWindowFocus:!1})}function aqe(e){const t=te();return ve(()=>t.patch(`/pf/pinned-post/${e}`),{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"Success",message:"The post has been pinned to your profile."})}})}function lqe(){const e=te();return ve(()=>e.delete("/pf/pinned-post"),{onError:t=>Rt(t),onSuccess:()=>{F({type:"success",title:"Success",message:"The post has been unpinned from your profile."})}})}function cqe(e){const t=te(),[n]=Jn(),r=`/pf/${e}/gallery`;return zl(["personal-gallery",e],({pageParam:i={nextPage:1,firstPostId:void 0}})=>(i.firstPostId&&n.set("firstPostId",i.firstPostId),n.set("page",i.nextPage!==void 0?i.nextPage:1),t.get(r+"?"+n.toString()).then(o=>o.data)),{refetchOnWindowFocus:!1,cacheTime:0,getPreviousPageParam:i=>{var o;return(o=i.previousId)!=null?o:void 0},getNextPageParam:i=>{var o;return{nextPage:(i==null?void 0:i.nextPage)!==null?i.nextPage:void 0,firstPostId:(o=i==null?void 0:i.firstPostId)!=null?o:null}}})}function uqe({showFollowing:e,showNotFollowing:t,showAiContent:n,showRenderContent:r,showCommercial:i,showResidents:o,maturityRatings:s}){const a=te();return zl(["feed","public-gallery"],async({pageParam:c={nextPage:1,firstPostId:void 0,firstPostIdDiscovery:void 0,pageDiscovery:void 0}})=>{const u={infinite:"true",page:c.nextPage?c.nextPage:1,showFollowing:e,showNotFollowing:t,showAiContent:n,showRenderContent:r,showCommercial:i,showResidents:o,maturityRatings:s};return c.firstPostId&&(u.firstPostId=c.firstPostId),c.firstPostIdDiscovery&&(u.firstPostIdDiscovery=c.firstPostIdDiscovery),c.pageDiscovery&&(u.pageDiscovery=c.pageDiscovery),a.get("/pf/gallery?"+new URLSearchParams(u).toString()).then(d=>d.data)},{refetchOnWindowFocus:!1,cacheTime:1/0,staleTime:1/0,getPreviousPageParam:c=>{var u;return(u=c.previousId)!=null?u:void 0},getNextPageParam:c=>{var u,d,f;return{nextPage:c.nextPage,firstPostId:(u=c==null?void 0:c.firstPostId)!=null?u:null,firstPostIdDiscovery:(d=c==null?void 0:c.firstPostIdDiscovery)!=null?d:null,pageDiscovery:(f=c==null?void 0:c.pageDiscovery)!=null?f:null}}})}function dqe(e){const t=te(),[n]=Jn(),r=`/pf/${e}/products-gallery`;return zl(["products-gallery",e],({pageParam:i={nextPage:1,firstPostId:void 0}})=>(i.firstPostId&&n.set("firstPostId",i.firstPostId),n.set("page",i.nextPage!==void 0?i.nextPage:1),t.get(r+"?"+n.toString()).then(o=>o.data)),{getPreviousPageParam:i=>{var o;return(o=i.previousId)!=null?o:void 0},getNextPageParam:i=>{var o;return{nextPage:(i==null?void 0:i.nextPage)!==null?i.nextPage:void 0,firstPostId:(o=i==null?void 0:i.firstPostId)!=null?o:null}}})}function s1(){const e=te();return _t(["entity-preferences"],()=>e.get("/pf/settings/preferences").then(t=>t.data))}function fqe(){const e=te();return ve(({id:t,reason:n,comment:r})=>e.post(`/pf/post/${t}/report`,{reason:n,comment:r}),{onError:t=>Rt(t),onSuccess:()=>F({type:"success",title:"Success",message:"The post has been reported. Please keep in mind that it takes up to 3 days to be reviewed and the content removed."})})}function hqe(e,t){const n=te(),r="/pf/"+e+"/shares",i=Ee();return zl(["shares",e],({pageParam:o={nextPage:1,firstPostId:void 0}})=>{var c,u;const s=new URLSearchParams;o.firstPostId&&s.set("firstPostId",o.firstPostId);const a=i.getQueryData(["shares",e],{stale:!0});if(a&&!s.has("firstPostId")&&typeof a=="object"&&"pages"in a&&((u=(c=a==null?void 0:a.pages)==null?void 0:c[0])==null?void 0:u.firstPostId)){const d=a.pages[0].firstPostId;s.set("firstPostId",d)}return s.set("page",o.nextPage!==void 0?o.nextPage:1),n.get(r+"?"+s.toString()).then(d=>d.data)},{refetchOnWindowFocus:!1,cacheTime:1/0,enabled:t,getPreviousPageParam:o=>{var s;return(s=o.previousId)!=null?s:void 0},getNextPageParam:o=>{var s;return{nextPage:(o==null?void 0:o.nextPage)!==null?o.nextPage:void 0,firstPostId:(s=o==null?void 0:o.firstPostId)!=null?s:null}}})}function pqe(){const e=te();return ve(()=>e.patch("/pf/agree-terms"),{onError:()=>F({type:"error",title:"Error",message:"We are unable to agree to the terms of service. Please try again later."})})}function mqe(e){const t=te();return _t(["followed",e],()=>t.get(`/pf/entity/${e}/followed`).then(n=>n.data),{enabled:!1})}function gqe(e,t){const n=te(),r=Ee();return ve(()=>n.delete(`/pf/destinations/${e}`),{onError:i=>Rt(i),onSuccess:()=>{r.invalidateQueries({queryKey:["profile",t]}),F({type:"success",title:"Success",message:"The destination have been removed"})}})}function vqe(){const e=te();return ve(t=>e.post("/t",t))}function yqe(){const e=te();return ve(({commentId:t,content:n})=>e.patch(`/pf/comment/${t}`,{content:n}),{onError:t=>Rt(t)})}function bqe(e){const t=te(),n=Ee();return ve({mutationFn:r=>{r.preventDefault();const i=new FormData(r.target),o=i.get("name"),s=i.get("url");return t.post("/pf/destinations",{name:o,url:s})},onError:r=>Rt(r),onSuccess:()=>{n.invalidateQueries({queryKey:["profile",e]}),F({type:"success",title:"Success",message:"The destination have been added"})}})}function xqe(){const e=te();return ve(t=>e.post(`/pf/subscribe/${t}`))}function Cqe(){const e=te();return ve(t=>e.delete(`/pf/subscribe/${t}`))}function wqe(e){const t=te();return _t(["followers",e],()=>t.get(`/pf/entity/${e}/followers`).then(n=>n.data),{enabled:!1})}function Sqe(){const e=Ee(),t=te();return ve(n=>t.patch("/pf/settings/preferences/public-gallery/show-featured-content",{value:n}),{onSuccess:()=>e.invalidateQueries(["me"])})}function qh(){const e=Ee(),t=te();return ve(i=>t.patch("/pf/settings/preferences/"+P6(i.key),{value:i.value}),{onMutate:i=>{const o=e.getQueryData(["entity-preferences"]);return e.setQueryData(["entity-preferences"],s=>({...s,[O6(i.key)]:i.value})),{previousLocations:o}},onError:(i,o,s)=>{Rt(i),s!=null&&s.previousPreferences&&e.setQueryData(["entity-preferences"],s.previousPreferences)}})}function Eqe(){const e=te();return ve(t=>e.post(`/pf/user/${t}/ban`),{onError:t=>Rt(t),onSuccess:()=>F({type:"success",title:"Success",message:"User banned"})})}function nZ(e){const t=te();return _t(["events",e],async()=>t.get(`/pf/events/${e}`).then(n=>n.data),{retry:1})}function Tqe(){const e=te();return ve(t=>e.post("/pf/search?q="+encodeURIComponent(t)))}function rZ(e){const t=te();return _t(["post",e],()=>t.get("/pf/post/"+e).then(n=>n.data),{retry:0,cacheTime:0,refetchOnWindowFocus:!1})}function kqe(){const e=te();return _t(["new-updates-count"],()=>e.get("/pf/notifications/new-update").then(t=>t.data))}function _qe(e){const t=te();return ve(()=>t.post(`/pf/post/${e}/repost`),{onError:n=>Rt(n)})}function Aqe(e){const t=te();return ve(()=>t.delete(`/pf/post/${e}/repost`),{onError:n=>Rt(n)})}function $qe(){const e=te();return ve(t=>e.delete(`/pf/comment/${t}`),{onError:t=>Rt(t),onSuccess:()=>F({type:"success",title:"Success",message:"Your comment has been deleted"})})}function Dqe(e){const t=te();return ve(()=>t.post(`/pf/comment/${e}/like`),{onError:n=>Rt(n)})}function Oqe(){const e=te(),t=Ee(),n=i=>{const o=t.getQueryData(["user-public",i]);return t.setQueryData(["user-public",i],s=>({...s,canFollow:!1})),{previousUserPublicData:o,userId:i}},r=(i,o,s)=>{Rt(i),s!=null&&s.previousUserPublicData&&t.setQueryData(["user-public",s.userId],s.previousUserPublicData)};return ve(i=>e.post(`/pf/follow/${i}`),{onMutate:i=>n(i),onError:i=>r(i)})}function Pqe(){const e=te(),t=Ee(),n=i=>{const o=t.getQueryData(["user-public",i]);return t.setQueryData(["user-public",i],s=>({...s,canFollow:!0})),{previousUserPublicData:o,userId:i}},r=(i,o,s)=>{Rt(i),s!=null&&s.previousUserPublicData&&t.setQueryData(["user-public",s.userId],s.previousUserPublicData)};return ve(i=>e.delete(`/pf/follow/${i}`),{onMutate:i=>n(i),onError:i=>r(i)})}function Rqe(){const e=te();return ve({mutationFn:({featuredContentId:t,eventType:n})=>e.post(`/pf/featured/${t}/${n}`)})}function Mqe(e,t){const n=te(),r="/pf/"+e+"/likes",i=Ee();return zl(["likes",e],({pageParam:o={nextPage:1,firstLikeId:void 0}})=>{var c,u;const s=new URLSearchParams;o.firstLikeId&&s.set("firstLikeId",o.firstLikeId);const a=i.getQueryData(["likes",e],{stale:!0});if(a&&!s.has("firstLikeId")&&typeof a=="object"&&"pages"in a&&((u=(c=a==null?void 0:a.pages)==null?void 0:c[0])==null?void 0:u.firstLikeId)){const d=a.pages[0].firstLikeId;s.set("firstLikeId",d)}return s.set("page",o.nextPage!==void 0?o.nextPage:1),n.get(r+"?"+s.toString()).then(d=>d.data)},{refetchOnWindowFocus:!1,cacheTime:1/0,enabled:t,getPreviousPageParam:o=>{var s;return(s=o.previousId)!=null?s:void 0},getNextPageParam:o=>{var s;return{nextPage:(o==null?void 0:o.nextPage)!==null?o.nextPage:void 0,firstLikeId:(s=o==null?void 0:o.firstLikeId)!=null?s:null}}})}function Iqe(){const e=te(),t=Ee();return ve(n=>e.post(n.scheduledAt?"/pf/schedule_post":"/pf/post",{content:n.content,images:n.images,type:"post_image",rating:n.rating,quotedPost:n.quotedPost,publicGallery:n.publicGallery,vendorAd:n.vendorAd,ai:n.ai,render:n.render,products:n.products.map(r=>r.value),scheduledAt:n.scheduledAt}),{onSuccess:()=>{t.invalidateQueries({queryKey:["scheduled_posts"]})},onError:n=>Rt(n)})}function Lqe(e,t){const n=te(),r=Ee();return ve(()=>n.post(`/pf/entity/${e}/block`),{onError:i=>Rt(i),onSuccess:()=>{r.invalidateQueries(["profile",t]),F({type:"success",title:"Success",message:"Profile blocked"})}})}function Nqe(e,t){const n=te(),r=Ee();return ve(()=>n.post(`/pf/entity/${e}/unblock`),{onError:i=>Rt(i),onSuccess:()=>{r.invalidateQueries(["profile",t]),F({type:"success",title:"Success",message:"Profile unblocked"})}})}function Fqe(e){const t=te(),n=Ee();return ve(()=>t.delete(`/pf/managers/${e}`),{onError:r=>Rt(r),onSuccess:()=>{F({type:"success",title:"Success",message:"Manager removed"}),n.invalidateQueries(["managers"])}})}function Bqe(){const e=te(),t=Ee();return ve(n=>{const r={};return n.forEach((i,o)=>{r[o]=i}),e.post("/pf/events",r)},{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"Success",message:"Event created"}),t.invalidateQueries(["events"])}})}function Hqe(e){const t=te(),n=Ee();return ve(({formData:r})=>{if(!e)return;const i={};return r.forEach((o,s)=>{i[s]=o}),t.patch(`/pf/events/${e}`,i,{})},{onError:r=>Rt(r),onSuccess:()=>{F({type:"success",title:"Success",message:"Event updated"}),n.invalidateQueries(["events"])}})}function zqe(e){const t=te(),n=Ee();return ve(()=>t.delete(`/pf/events/${e}`),{onError:r=>Rt(r),onSuccess:()=>{F({type:"success",title:"Success",message:"Event deleted"}),n.invalidateQueries(["events"])}})}function Uqe({maturityRatings:e}){const t=te(),n=Ee();return _t(["events",e],async()=>{const r=await t.get("/pf/events",{params:{maturityRatings:e.join(",")}}).then(i=>i.data);return r.forEach(i=>{n.setQueryData(["events",i.data.id],i)}),r})}function Vqe(){const e=te(),t=Ee();return ve(n=>e.post("/pf/managers",{name:n}),{onError:n=>Rt(n),onSuccess:()=>{F({type:"success",title:"Success",message:"Manager added"}),t.invalidateQueries(["managers"])}})}function jqe(e){const t=te();return _t(["managers",e],()=>t.get("/pf/managers").then(n=>n.data))}function Wqe(){return l(Qa,{children:l(qWe,{})})}function qqe(){return l(Qa,{children:l(GWe,{})})}function Kqe(){return l(Qa,{children:l(M,{css:{marginBottom:"$8",marginTop:"$4",width:"100%",backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$4",px:"$4","@sm":{border:"none",borderRadius:0,py:"$2",marginTop:"$4"}},children:l(Lje,{})})})}function Gqe(){return l(Qa,{children:l(M,{css:{marginBottom:"$8",marginTop:"$4",width:"100%",backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$4","@sm":{border:"none",borderRadius:0,py:"$2",marginTop:"$4"}},children:l(mje,{})})})}function Yqe(){const[e,t]=y.exports.useState({});return l(L_.Provider,{value:{publicGalleryFilters:e,setPublicGalleryFilters:t},children:l(SVe,{children:l(PVe,{})})})}var iZ={exports:{}},EN=!1,Yu,Xw,Zw,C5,w5,oZ,S5,Jw,eS,tS,sZ,nS,rS,aZ,lZ;function Ui(){if(!EN){EN=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(nS=/\b(iPhone|iP[ao]d)/.exec(e),rS=/\b(iP[ao]d)/.exec(e),tS=/Android/i.exec(e),aZ=/FBAN\/\w+;/i.exec(e),lZ=/Mobile/i.exec(e),sZ=!!/Win64/.exec(e),t){Yu=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Yu&&document&&document.documentMode&&(Yu=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);oZ=r?parseFloat(r[1])+4:Yu,Xw=t[2]?parseFloat(t[2]):NaN,Zw=t[3]?parseFloat(t[3]):NaN,C5=t[4]?parseFloat(t[4]):NaN,C5?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),w5=t&&t[1]?parseFloat(t[1]):NaN):w5=NaN}else Yu=Xw=Zw=w5=C5=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);S5=i?parseFloat(i[1].replace("_",".")):!0}else S5=!1;Jw=!!n[2],eS=!!n[3]}else S5=Jw=eS=!1}}var iS={ie:function(){return Ui()||Yu},ieCompatibilityMode:function(){return Ui()||oZ>Yu},ie64:function(){return iS.ie()&&sZ},firefox:function(){return Ui()||Xw},opera:function(){return Ui()||Zw},webkit:function(){return Ui()||C5},safari:function(){return iS.webkit()},chrome:function(){return Ui()||w5},windows:function(){return Ui()||Jw},osx:function(){return Ui()||S5},linux:function(){return Ui()||eS},iphone:function(){return Ui()||nS},mobile:function(){return Ui()||nS||rS||tS||lZ},nativeApp:function(){return Ui()||aZ},android:function(){return Ui()||tS},ipad:function(){return Ui()||rS}},Qqe=iS,m4=!!(typeof window<"u"&&window.document&&window.document.createElement),Xqe={canUseDOM:m4,canUseWorkers:typeof Worker<"u",canUseEventListeners:m4&&!!(window.addEventListener||window.attachEvent),canUseViewport:m4&&!!window.screen,isInWorker:!m4},Zqe=Xqe,cZ=Zqe,uZ;cZ.canUseDOM&&(uZ=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */function Jqe(e,t){if(!cZ.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&uZ&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var eKe=Jqe,tKe=Qqe,nKe=eKe,TN=10,kN=40,_N=800;function dZ(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*TN,i=n*TN,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=kN,i*=kN):(r*=_N,i*=_N)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}dZ.getEventType=function(){return tKe.firefox()?"DOMMouseScroll":nKe("wheel")?"wheel":"mousewheel"};var rKe=dZ;(function(e){e.exports=rKe})(iZ);const iKe=Nm(iZ.exports);function oKe(e,t,n,r,i,o){o===void 0&&(o=0);var s=sh(e,t,o),a=s.width,c=s.height,u=Math.min(a,n),d=Math.min(c,r);return u>d*i?{width:d*i,height:d}:{width:u,height:u/i}}function sKe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function g4(e,t,n,r,i){i===void 0&&(i=0);var o=sh(t.width,t.height,i),s=o.width,a=o.height;return{x:AN(e.x,s,n.width,r),y:AN(e.y,a,n.height,r)}}function AN(e,t,n,r){var i=t*r/2-n/2;return I9(e,-i,i)}function $N(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function DN(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function aKe(e,t,n,r,i,o,s){o===void 0&&(o=0),s===void 0&&(s=!0);var a=s?lKe:cKe,c=sh(t.width,t.height,o),u=sh(t.naturalWidth,t.naturalHeight,o),d={x:a(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:a(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:a(100,n.width/c.width*100/i),height:a(100,n.height/c.height*100/i)},f=Math.round(a(u.width,d.width*u.width/100)),h=Math.round(a(u.height,d.height*u.height/100)),p=u.width>=u.height*r,m=p?{width:Math.round(h*r),height:h}:{width:f,height:Math.round(f/r)},v=qn(qn({},m),{x:Math.round(a(u.width-m.width,d.x*u.width/100)),y:Math.round(a(u.height-m.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:v}}function lKe(e,t){return Math.min(e,Math.max(0,t))}function cKe(e,t){return t}function uKe(e,t,n,r,i,o){var s=sh(t.width,t.height,n),a=I9(r.width/s.width*(100/e.width),i,o),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function dKe(e,t,n){var r=sKe(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function fKe(e,t,n,r,i,o){n===void 0&&(n=0);var s=sh(t.naturalWidth,t.naturalHeight,n),a=I9(dKe(e,t,r),i,o),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function ON(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function hKe(e){return e*Math.PI/180}function sh(e,t,n){var r=hKe(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function I9(e,t,n){return Math.min(Math.max(e,t),n)}function v4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var pKe=`.reactEasyCrop_Container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: move;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reactEasyCrop_Image,
.reactEasyCrop_Video {
  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}
.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  box-shadow: 0 0 0 9999em;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid::before {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
  border-top: 0;
  border-bottom: 0;
}

.reactEasyCrop_CropAreaGrid::after {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-left: 0;
  border-right: 0;
}
`,mKe=1,gKe=3,vKe=function(e){cue(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=y.exports.createRef(),n.videoRef=y.exports.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){!n.currentDoc||(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=uKe(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,s=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}else if(n.props.initialCroppedAreaPixels){var a=fKe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=a.crop,s=a.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}},n.computeSizes=function(){var r,i,o,s,a,c,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((s=n.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,p=u.offsetWidth<f||u.offsetHeight<h,m=f/h,v=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":v=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":v={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":v={width:n.containerRect.height*m,height:n.containerRect.height};break}else v={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=qn(qn({},v),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:oKe(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((a=n.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=n.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){!n.currentDoc||(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){!n.currentDoc||(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){!n.currentDoc||(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){!n.currentDoc||(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var s=n.gestureRotationStart+r.rotation;n.props.onRotationChange(s)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,s=r.x,a=r.y;n.dragStartPosition={x:s,y:a},n.dragStartCrop=qn({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;!n.currentWindow||(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(!!n.state.cropSize&&!(i===void 0||o===void 0)){var s=i-n.dragStartPosition.x,a=o-n.dragStartPosition.y,c={x:n.dragStartCrop.x+s,y:n.dragStartCrop.y+a},u=n.props.restrictPosition?g4(c,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):c;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(!!n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=iKe(r).pixelY,s=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(s,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=n.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=n.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,s=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(s-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,s=n.props,a=s.crop,c=s.zoom;return{x:(i+a.x)/c,y:(o+a.y)/c}},n.setNewZoom=function(r,i,o){var s=o===void 0?{}:o,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=I9(r,n.props.minZoom,n.props.maxZoom);if(c){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*u-d.x,y:f.y*u-d.y},p=n.props.restrictPosition?g4(h,n.mediaSize,n.state.cropSize,u,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?g4(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return aKe(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(!!r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(!!r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(!!n.state.cropSize){var r=n.props.restrictPosition?g4(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=pKe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,s,a,c,u,d,f;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=n.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=$N(r,i),this.lastPinchRotation=DN(r,i),this.onDragStart(ON(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),s=ON(i,o);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=$N(i,o),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=DN(i,o),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r=this.props,i=r.image,o=r.video,s=r.mediaProps,a=r.transform,c=r.crop,u=c.x,d=c.y,f=r.rotation,h=r.zoom,p=r.cropShape,m=r.showGrid,v=r.style,b=v.containerStyle,x=v.cropAreaStyle,C=v.mediaStyle,w=r.classes,S=w.containerClassName,T=w.cropAreaClassName,E=w.mediaClassName,k=this.state.mediaObjectFit;return g("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(O){return n.containerRef=O},"data-testid":"container",style:b,className:v4("reactEasyCrop_Container",S),children:[i?l("img",{...qn({alt:"",className:v4("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:i,ref:this.imageRef,style:qn(qn({},C),{transform:a||"translate(".concat(u,"px, ").concat(d,"px) rotate(").concat(f,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})}):o&&l("video",{...qn({autoPlay:!0,loop:!0,muted:!0,className:v4("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:qn(qn({},C),{transform:a||"translate(".concat(u,"px, ").concat(d,"px) rotate(").concat(f,"deg) scale(").concat(h,")")}),controls:!1}),children:(Array.isArray(o)?o:[{src:o}]).map(function(_){return l("source",{...qn({key:_.src},_)})})}),this.state.cropSize&&l("div",{style:qn(qn({},x),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:v4("reactEasyCrop_CropArea",p==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",T)})]})},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:gKe,minZoom:mKe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(y.exports.Component);function yKe(){return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 -28.5 256 256",version:"1.1",preserveAspectRatio:"xMidYMid",children:l("g",{children:l("path",{d:"M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z",fill:"#5865F2",fillRule:"nonzero"})})})}function bKe(){return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"-10 -5 1034 1034",version:"1.1",children:l("path",{fill:"#3088D4",d:"M499 112q-93 1 -166 11q-81 11 -128 33l-14 8q-16 10 -32 25q-22 21 -38 47q-21 33 -32 73q-14 47 -14 103v37q0 77 1 119q3 113 18 188q19 95 62 154q50 67 134 89q109 29 210 24q46 -3 88 -12q30 -7 55 -17l19 -8l-4 -75l-22 6q-28 6 -57 10q-41 6 -78 4q-53 -1 -80 -7 q-43 -8 -67 -30q-29 -25 -35 -72q-2 -14 -2 -29l25 6q31 6 65 10q48 7 93 9q42 2 92 -2q32 -2 88 -9t107 -30q49 -23 81.5 -54.5t38.5 -63.5q9 -45 13 -109q4 -46 5 -97v-41q0 -56 -14 -103q-11 -40 -32 -73q-16 -26 -38 -47q-15 -15 -32 -25q-12 -8 -14 -8 q-46 -22 -127 -33q-74 -10 -166 -11h-3zM367 267q73 0 109 56l24 39l24 -39q36 -56 109 -56q63 0 101 43t38 117v239h-95v-232q0 -74 -61 -74q-69 0 -69 88v127h-94v-127q0 -88 -69 -88q-61 0 -61 74v232h-95v-239q0 -74 38 -117t101 -43z"})})}function xKe(){return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",version:"1.1",id:"Layer_1",viewBox:"0 0 461.001 461.001",xmlSpace:"preserve",children:l("g",{children:l("path",{fill:"#F61C0D",d:"M365.257,67.393H95.744C42.866,67.393,0,110.259,0,163.137v134.728   c0,52.878,42.866,95.744,95.744,95.744h269.513c52.878,0,95.744-42.866,95.744-95.744V163.137   C461.001,110.259,418.135,67.393,365.257,67.393z M300.506,237.056l-126.06,60.123c-3.359,1.602-7.239-0.847-7.239-4.568V168.607   c0-3.774,3.982-6.22,7.348-4.514l126.06,63.881C304.363,229.873,304.298,235.248,300.506,237.056z"})})})}const fZ=["PageUp","PageDown"],hZ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pZ={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Og="Slider",[oS,CKe,wKe]=M6(Og),[mZ,YGe]=ii(Og,[wKe]),[SKe,L9]=mZ(Og),EKe=y.exports.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,...m}=e,[v,b]=y.exports.useState(null),x=zt(t,G=>b(G)),C=y.exports.useRef(new Set),w=y.exports.useRef(0),S=s==="horizontal",T=v?Boolean(v.closest("form")):!0,E=S?TKe:kKe,[k=[],_]=$o({prop:d,defaultProp:u,onChange:G=>{var X;(X=[...C.current][w.current])===null||X===void 0||X.focus(),f(G)}}),O=y.exports.useRef(k);function D(G){const X=IKe(k,G);j(G,X)}function L(G){j(G,w.current)}function N(){const G=O.current[w.current];k[w.current]!==G&&h(k)}function j(G,X,{commit:re}={commit:!1}){const oe=BKe(o),U=HKe(Math.round((G-r)/o)*o+r,oe),H=Tv(U,[r,i]);_((R=[])=>{const se=RKe(R,H,X);if(FKe(se,c*o)){w.current=se.indexOf(H);const ee=String(se)!==String(R);return ee&&re&&h(se),ee?se:R}else return R})}return y.exports.createElement(SKe,{scope:e.__scopeSlider,disabled:a,min:r,max:i,valueIndexToChangeRef:w,thumbs:C.current,values:k,orientation:s},y.exports.createElement(oS.Provider,{scope:e.__scopeSlider},y.exports.createElement(oS.Slot,{scope:e.__scopeSlider},y.exports.createElement(E,ue({"aria-disabled":a,"data-disabled":a?"":void 0},m,{ref:x,onPointerDown:Ue(m.onPointerDown,()=>{a||(O.current=k)}),min:r,max:i,inverted:p,onSlideStart:a?void 0:D,onSlideMove:a?void 0:L,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&j(r,0,{commit:!0}),onEndKeyDown:()=>!a&&j(i,k.length-1,{commit:!0}),onStepKeyDown:({event:G,direction:X})=>{if(!a){const U=fZ.includes(G.key)||G.shiftKey&&hZ.includes(G.key)?10:1,H=w.current,R=k[H],se=o*U*X;j(R+se,H,{commit:!0})}}})))),T&&k.map((G,X)=>y.exports.createElement(PKe,{key:X,name:n?n+(k.length>1?"[]":""):void 0,value:G})))}),[gZ,vZ]=mZ(Og,{startEdge:"left",endEdge:"right",size:"width",direction:1}),TKe=y.exports.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,h]=y.exports.useState(null),p=zt(t,w=>h(w)),m=y.exports.useRef(),v=fg(i),b=v==="ltr",x=b&&!o||!b&&o;function C(w){const S=m.current||f.getBoundingClientRect(),T=[0,S.width],k=I_(T,x?[n,r]:[r,n]);return m.current=S,k(w-S.left)}return y.exports.createElement(gZ,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width"},y.exports.createElement(yZ,ue({dir:v,"data-orientation":"horizontal"},d,{ref:p,style:{...d.style,["--radix-slider-thumb-transform"]:"translateX(-50%)"},onSlideStart:w=>{const S=C(w.clientX);s==null||s(S)},onSlideMove:w=>{const S=C(w.clientX);a==null||a(S)},onSlideEnd:()=>{m.current=void 0,c==null||c()},onStepKeyDown:w=>{const T=pZ[x?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:T?-1:1})}})))}),kKe=y.exports.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:c,...u}=e,d=y.exports.useRef(null),f=zt(t,d),h=y.exports.useRef(),p=!i;function m(v){const b=h.current||d.current.getBoundingClientRect(),x=[0,b.height],w=I_(x,p?[r,n]:[n,r]);return h.current=b,w(v-b.top)}return y.exports.createElement(gZ,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1},y.exports.createElement(yZ,ue({"data-orientation":"vertical"},u,{ref:f,style:{...u.style,["--radix-slider-thumb-transform"]:"translateY(50%)"},onSlideStart:v=>{const b=m(v.clientY);o==null||o(b)},onSlideMove:v=>{const b=m(v.clientY);s==null||s(b)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:v=>{const x=pZ[p?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:x?-1:1})}})))}),yZ=y.exports.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:c,...u}=e,d=L9(Og,n);return y.exports.createElement(Pt.span,ue({},u,{ref:t,onKeyDown:Ue(e.onKeyDown,f=>{f.key==="Home"?(s(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):fZ.concat(hZ).includes(f.key)&&(c(f),f.preventDefault())}),onPointerDown:Ue(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():r(f)}),onPointerMove:Ue(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:Ue(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),o(f))})}))}),_Ke="SliderTrack",AKe=y.exports.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=L9(_Ke,n);return y.exports.createElement(Pt.span,ue({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},r,{ref:t}))}),PN="SliderRange",$Ke=y.exports.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=L9(PN,n),o=vZ(PN,n),s=y.exports.useRef(null),a=zt(t,s),c=i.values.length,u=i.values.map(h=>bZ(h,i.min,i.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return y.exports.createElement(Pt.span,ue({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},r,{ref:a,style:{...e.style,[o.startEdge]:d+"%",[o.endEdge]:f+"%"}}))}),RN="SliderThumb",DKe=y.exports.forwardRef((e,t)=>{const n=CKe(e.__scopeSlider),[r,i]=y.exports.useState(null),o=zt(t,a=>i(a)),s=y.exports.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return y.exports.createElement(OKe,ue({},e,{ref:o,index:s}))}),OKe=y.exports.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,...i}=e,o=L9(RN,n),s=vZ(RN,n),[a,c]=y.exports.useState(null),u=zt(t,b=>c(b)),d=eg(a),f=o.values[r],h=f===void 0?0:bZ(f,o.min,o.max),p=MKe(r,o.values.length),m=d==null?void 0:d[s.size],v=m?LKe(m,h,s.direction):0;return y.exports.useEffect(()=>{if(a)return o.thumbs.add(a),()=>{o.thumbs.delete(a)}},[a,o.thumbs]),y.exports.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${v}px)`}},y.exports.createElement(oS.ItemSlot,{scope:e.__scopeSlider},y.exports.createElement(Pt.span,ue({role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":o.min,"aria-valuenow":f,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0},i,{ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Ue(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})}))))}),PKe=e=>{const{value:t,...n}=e,r=y.exports.useRef(null),i=Jm(t);return y.exports.useEffect(()=>{const o=r.current,s=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==t&&c){const u=new Event("input",{bubbles:!0});c.call(o,t),o.dispatchEvent(u)}},[i,t]),y.exports.createElement("input",ue({style:{display:"none"}},n,{ref:r,defaultValue:t}))};function RKe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function bZ(e,t,n){const o=100/(n-t)*(e-t);return Tv(o,[0,100])}function MKe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function IKe(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function LKe(e,t,n){const r=e/2,o=I_([0,50],[0,r]);return(r-o(t)*n)*n}function NKe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function FKe(e,t){if(t>0){const n=NKe(e);return Math.min(...n)>=t}return!0}function I_(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function BKe(e){return(String(e).split(".")[1]||"").length}function HKe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}const zKe=EKe,UKe=AKe,VKe=$Ke,jKe=DKe,WKe=de(zKe,{position:"relative",display:"flex",alignItems:"center",userSelect:"none",touchAction:"none",width:200,height:20}),qKe=de(UKe,{backgroundColor:"$sliderTrack",position:"relative",flexGrow:1,borderRadius:"9999px",height:3}),KKe=de(VKe,{position:"absolute",backgroundColor:"$sliderRange",borderRadius:"9999px",height:"100%"}),GKe=de(jKe,{display:"block",width:20,height:20,backgroundColor:"white",boxShadow:"$small",borderRadius:10,"&:focus":{outline:"none",boxShadow:`0 0 0 5px ${yHe.blackA5}`}}),xZ=.75;function YKe(){var v,b,x;const{handle:e}=Na(),{perms:t,selectedEntity:n}=st(),{isFetched:r,isLoading:i,data:o,refetch:s}=sqe(e),[a,c]=y.exports.useState("Posts"),u=Tn.exports.useMediaQuery({maxWidth:767}),d=Tn.exports.useMediaQuery({maxWidth:575}),f=st(),h=te(),p=Ee(),m=f&&o&&(o.id===f.selectedEntity.id&&f.selectedStore===null||o.id===((v=f.selectedStore)==null?void 0:v.id));return y.exports.useEffect(()=>{c("Posts")},[e]),window.scrollTo(0,0),y.exports.useEffect(()=>{!i&&o.handle==="primfeed"&&h.patch("/pf/notifications/set-last-update-seen").then(()=>{p.invalidateQueries({queryKey:["new-updates-count"]})})},[i,h,p,o]),l(Qa,{children:g(M,{css:{marginBottom:"$8",marginTop:"$4",flexDirection:"column",gap:"$4",flexShrink:0,width:"100%","@sm":{marginTop:0}},children:[i&&l(A,{children:"Loading\u2026"}),g(P,{css:{backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",overflow:"hidden",borderRadius:12,"@sm":{border:"none",borderRadius:0}},children:[!i&&g(z,{children:[g(ce,{css:{position:"relative",overflow:"hidden",borderRadius:"12px 12px 0 0","@sm":{borderRadius:0}},children:[!o.bannerMedia&&l(ce,{css:{height:u&&d?110:130}}),o.bannerMedia&&l(Dt,{css:{width:"100%",height:"100%",objectFit:"fill",aspectRatio:"3/1"},loading:"lazy",src:`${o.bannerMedia}_x2048.webp`})]}),r&&g(P,{css:{gap:"$4",px:"$4",position:"relative",marginBottom:"$4","@xs":{px:"$2"}},children:[l(bi,{pictureUuid:o.picture,profileMedia:o.profileMedia,size:u&&d?110:130,round:o.isUser,css:{border:"2px solid $borderColor",position:"absolute",top:u&&d?110/-2:130/-2}}),g(M,{css:{marginLeft:"auto",py:"$4",alignItems:"center",gap:"$2",minHeight:"60px","@xs":{py:"$2"}},children:[!m&&l(hGe,{profile:o}),((b=t==null?void 0:t.mod)==null?void 0:b.canBan)===!0&&o.banned===!1&&l(uGe,{profile:o,children:l(Y,{variant:"softDanger",css:{borderRadius:1e3,userSelect:"none"},children:"Ban"})}),((x=t==null?void 0:t.mod)==null?void 0:x.canBan)===!0&&o.banned===!0&&l(Y,{variant:"soft",disabled:!0,css:{borderRadius:1e3,userSelect:"none"},children:"Banned"}),o.isUser===!1&&o.showFollowButton===!0&&l(kje,{user:o,refetch:s}),o.showFollowButton===!0&&l(NX,{user:o,refetch:s}),m&&l(aGe,{profile:o,children:l(Y,{variant:"gray",css:{borderRadius:1e3,userSelect:"none"},children:"Edit my profile"})})]}),g(P,{children:[g(M,{css:{alignItems:"center",gap:"$2"},children:[g(br,{css:{display:"flex",alignItems:"center"},children:[o.displayName?o.displayName:o.name,o.verified&&l(Bl,{isUser:o.isUser,size:"big"})]}),m&&!o.verified&&o.isUser&&l(QKe,{}),m&&!o.verified&&!o.isUser&&l(XKe,{})]}),g(M,{css:{alignItems:"center",gap:"$2"},children:[g(A,{css:{color:"$handleColor",fontWeight:"$medium"},children:["@",o.handle]}),o.entityFollowsUser&&l(ce,{css:{backgroundColor:"$followsYouBackgroundColor",width:"fit-content",py:2,px:"$2",borderRadius:4,fontSize:12,fontWeight:"$medium"},children:"Follows you"})]})]}),l(P,{children:l(k_,{content:o.about,showFull:!0})}),o.follow!==null&&g(M,{css:{gap:"$1"},children:[l(nGe,{handle:o.handle,children:g(A,{css:{cursor:"pointer","&:hover":{}},children:[l(Ne,{css:{fontWeight:"$bold"},children:o.follow})," ","following"]})}),l(A,{children:"\u2022"}),l(tGe,{handle:o.handle,children:g(A,{css:{cursor:"pointer"},children:[l(Ne,{css:{fontWeight:"$bold"},children:o.followers})," ","follower",o.followers>1?"s":""]})})]}),(o.socials.flickrUrl||o.socials.deviantArtUrl||o.socials.blueskyUrl||o.socials.facebookUrl||o.socials.instagramUrl||o.socials.xUrl||o.socials.marketplaceUrl||o.socials.youtubeUrl||o.socials.discordUrl||o.socials.mastodonUrl||o.socials.personalUrl)&&l(z,{children:g(M,{css:{gap:"$1",alignItems:"center","& svg":{height:20,width:20},"& a":{lineHeight:1,p:"$1"}},children:[o.socials.flickrUrl&&l(ie,{to:o.socials.flickrUrl,target:"_blank",children:l(Ua,{})}),o.socials.deviantArtUrl&&l(ie,{to:o.socials.deviantArtUrl,target:"_blank",children:l(Ha,{})}),o.socials.blueskyUrl&&l(ie,{to:o.socials.blueskyUrl,target:"_blank",children:l(Ba,{})}),o.socials.facebookUrl&&l(ie,{to:o.socials.facebookUrl,target:"_blank",children:l(za,{})}),o.socials.instagramUrl&&l(ie,{to:o.socials.instagramUrl,target:"_blank",children:l(Va,{})}),o.socials.xUrl&&l(ie,{to:o.socials.xUrl,target:"_blank",children:l(ja,{})}),o.socials.personalUrl&&l(ie,{to:o.socials.personalUrl,target:"_blank",children:l(W,{icon:Ia})}),o.socials.marketplaceUrl&&l(ie,{to:o.socials.marketplaceUrl,target:"_blank",children:l(W,{icon:ooe})}),o.socials.youtubeUrl&&l(ie,{to:o.socials.youtubeUrl,target:"_blank",children:l(xKe,{})}),o.socials.discordUrl&&l(ie,{to:o.socials.discordUrl,target:"_blank",children:l(yKe,{})}),o.socials.mastodonUrl&&l(ie,{to:o.socials.mastodonUrl,target:"_blank",children:l(bKe,{})})]})}),g(M,{css:{width:"100%",gap:"$4",flexWrap:"wrap","@md":{flexDirection:"column"}},children:[o.destinations.map((C,w)=>l(eGe,{destination:C,handle:o.handle,canDelete:m},"destination-"+w)),m&&o.destinations.length<3&&l(JKe,{handle:o.handle,children:l(M,{css:{backgroundColor:"$backgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$3",px:"$4",flexGrow:1,justifyContent:"center",alignItems:"center",height:"100%","&:hover":{cursor:"pointer",backgroundColor:"$hoveringItem"}},children:g(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:[l(W,{icon:voe,css:{marginRight:"$2"}}),"Add a favorite destination"]})})})]})]})]}),l(io,{}),o&&o.displayFeed&&g(M,{css:{justifyContent:"space-around"},children:[l(y4,{label:"Posts",active:a==="Posts",setActiveTab:c,onClick:()=>p.resetQueries(["feed",o.id])}),l(y4,{label:"Gallery",active:a==="Gallery",setActiveTab:c}),r&&o.id===n.id&&l(y4,{label:"Liked",active:a==="Liked",setActiveTab:c}),r&&o.isUser===!1&&l(y4,{label:"Showcase",active:a==="Showcase",setActiveTab:c})]}),l(io,{}),o&&o.isBlockedByCurrentUser&&o.handle&&l(dGe,{handle:o.handle}),o&&!o.isBlockedByCurrentUser&&o.isBlockingCurrentUser&&o.handle&&l(fGe,{handle:o.handle}),r&&a==="Posts"&&o&&o.displayFeed&&l(rGe,{entityId:o.id}),r&&a==="Gallery"&&l(oGe,{handle:o.handle,entityId:o.id}),r&&a==="Liked"&&l(iGe,{}),r&&o.isUser===!1&&a==="Showcase"&&l(sGe,{handle:o.handle,entityId:o.id})]})]})})}function QKe(){return l(Et,{small:!0,content:g(z,{children:[l(A,{children:"Primfeed Pro gives you exclusive perks such as a verified blue badge, a higher picture resolution, more daily uploads to the Public Gallery, and more."}),l(A,{css:{marginTop:"$2"},children:g(ie,{to:"https://docs.primfeed.com/primfeed-pro",target:"_blank",children:["Learn more"," ",l(W,{icon:GH,css:{height:10}})]})})]}),children:l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/42/30/28",target:"_blank",children:g(M,{css:{alignItems:"center",border:"1px solid $borderColor",py:"$1",px:"$2",borderRadius:999},children:[l(Bl,{isUser:!0,marginLeft:0}),l(A,{css:{fontSize:12,fontFamily:"$redHatDisplay",fontWeight:"$bold",color:"$gray500",marginLeft:"$1"},children:"Get Primfeed Pro"})]})})})}function XKe(){return l(Et,{small:!0,content:g(z,{children:[l(A,{children:"EasyBloggers is a next-gen Bloggers Management System designed to simplify the management of bloggers teams."}),l(A,{css:{marginTop:"$2"},children:"An active EasyBloggers subscription gives you exclusive perks such as a verified yellow badge, a higher picture resolution, more daily uploads to the Public Gallery, and more."}),l(A,{css:{marginTop:"$2"},children:g(ie,{to:"https://www.kynno.app/easybloggers/pricing",target:"_blank",children:["Learn more"," ",l(W,{icon:GH,css:{height:10}})]})})]}),children:l(ie,{to:"https://maps.secondlife.com/secondlife/Printemps/60/35/28",target:"_blank",children:g(M,{css:{alignItems:"center",border:"1px solid $borderColor",py:"$1",px:"$2",borderRadius:999},children:[l(Bl,{isUser:!1,marginLeft:0}),l(A,{css:{fontSize:12,fontFamily:"$redHatDisplay",fontWeight:"$bold",color:"$gray500",marginLeft:"$1"},children:"Get EasyBloggers"})]})})})}function ZKe({destination:e,handle:t,children:n}){const[r,i]=y.exports.useState(!1),{isLoading:o,mutate:s}=gqe(e.id,t);return g(Ye,{open:r,onOpenChange:i,children:[l(pt,{children:n}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),size:"small",children:[l(nt,{children:"Remove the destination?"}),l(ht,{children:g(A,{children:["You are about to remove the destination"," ",l("strong",{children:e.name}),". This action can\u2019t be undone."]})}),l(dt,{onSubmit:a=>{a.preventDefault(),s(null,{onSuccess:()=>{i(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:o,variant:"danger",children:"Remove the destination"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function JKe({handle:e,children:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,mutate:o}=bqe(e);return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{children:t}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),size:"small",children:[l(nt,{children:"Create a favorite destination"}),l(ht,{children:l(A,{children:"The destinations on your profile are the perfect way to share the your favorite places in Second Life. Select a name, paste the SLURL and confirm."})}),g(dt,{onSubmit:s=>{s.preventDefault(),o(s,{onSuccess:()=>{r(!1)}})},children:[l(af,{fieldLabel:"Name",formInputType:"simple-input",name:"name",type:"text",autocomplete:"off"}),l(af,{fieldLabel:"SLURL",formInputType:"simple-input",name:"url",type:"text",autocomplete:"off"}),g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:i,variant:"primary",children:"Create the destination"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function eGe({destination:e,handle:t,canDelete:n}){const r=/maps\.secondlife\.com\/secondlife\/([^/]+)\/(\d+)\/(\d+)\/(\d+)$/,i=o=>{const s=o.match(r);if(s)try{const[a,c,u,d,f]=s;return`${decodeURIComponent(c).replace("%20"," ")}`}catch{return null}return null};return g(P,{css:{backgroundColor:"$backgroundColor",border:"1px solid $borderColor",position:"relative",borderRadius:8,py:"$2",px:"$4",flexGrow:1},children:[n&&l(ZKe,{destination:e,handle:t,children:l(ce,{css:{color:"$handleColor",position:"absolute",top:2,right:6,"&:hover":{cursor:"pointer",color:"$textColor"}},children:l(W,{icon:Ul})})}),l(A,{css:{fontFamily:"$redHatDisplay",fontWeight:"$bold"},children:e.name}),g(Ne,{css:{whiteSpace:"nowrap"},children:[l(W,{icon:jm,css:{marginRight:6,height:10,color:"$destructive700",transform:"rotate(45deg)"}}),l(ie,{to:e.url,target:"_blank",rel:"noopener",primfeed:!0,css:{fontSize:13},children:i(e.url)})]})]})}function tGe({children:e,handle:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,data:o,refetch:s}=wqe(t);return y.exports.useEffect(()=>{n&&s()},[n,s]),g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),size:"small",children:[g(P,{css:{gap:"$3"},children:[i&&l(A,{children:"Loading\u2026"}),(o==null?void 0:o.length)===0&&l(A,{children:"No followers"}),(o==null?void 0:o.length)>0&&o.map((a,c)=>l(en,{entity:a},"follower-profile-"+c))]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function nGe({children:e,handle:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,data:o,refetch:s}=mqe(t);return y.exports.useEffect(()=>{n&&s()},[n,s]),g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),size:"small",children:[g(P,{css:{gap:"$3"},children:[i&&l(A,{children:"Loading\u2026"}),(o==null?void 0:o.length)===0&&l(A,{children:"No followed"}),(o==null?void 0:o.length)>0&&o.map((a,c)=>l(en,{entity:a},"followed-profile-"+c))]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function y4({label:e,active:t,setActiveTab:n,onClick:r=null}){return l(M,{css:{cursor:"pointer",fontSize:16,fontWeight:t?"$bold":"inherit",color:t?"$textColor":"$subTextColor",py:"$4",height:"100%",transition:"color 0.1s, background-color 0.1s",width:"100%",justifyContent:"center","&:hover":{backgroundColor:"$tabulationBackgroundColorHover",color:"$textColor"}},onClick:()=>{n(e),r&&r()},children:l(M,{css:{boxShadow:t?"0 2px 0px 0 $colors$tabulationShadowActive":"none"},children:e})})}function rGe({entityId:e}){const{isLoading:t,data:n,fetchNextPage:r,hasNextPage:i}=M_(e),{ref:o,inView:s}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{s&&i&&i&&r()},[r,i,s]),g(z,{children:[t&&l(A,{css:{my:"$8",textAlign:"center"},children:"Loading..."}),!t&&(n==null?void 0:n.pages[0].posts.length)===0&&l(A,{css:{my:"$8",textAlign:"center"},children:"No posts."}),!t&&(n==null?void 0:n.pages.map((a,c)=>{const u=c===n.pages.length-1,d=Math.floor(a.posts.length*xZ);return a==null?void 0:a.posts.map((f,h)=>g(Ae.Fragment,{children:[l(Ma,{post:f,noBorder:!0,showComments:!1,infiniteScrollRef:u&&d===h?o:void 0}),l(io,{})]},"personal-feed-post-"+e+"-"+c+"-"+h+"-"+f.data.id))}))]})}function iGe(){const{isLoading:e,data:t,fetchNextPage:n,hasNextPage:r}=oqe(),{ref:i,inView:o}=Ya({triggerOnce:!0});return y.exports.useEffect(()=>{o&&r&&r&&n()},[n,r,o]),g(z,{children:[e&&l(A,{css:{my:"$8",textAlign:"center"},children:"Loading..."}),!e&&(t==null?void 0:t.pages[0].posts.length)===0&&l(A,{css:{my:"$8",textAlign:"center"},children:"No posts."}),!e&&(t==null?void 0:t.pages.map((s,a)=>{const c=a===t.pages.length-1,u=Math.floor(s.posts.length*xZ);return s==null?void 0:s.posts.map((d,f)=>g(z,{children:[l(Ma,{post:d,noBorder:!0,showComments:!1,infiniteScrollRef:c&&u===f?i:void 0},"personal-liked-post-"+d.data.id),l(io,{})]}))}))]})}function oGe({handle:e,entityId:t}){const{isLoading:n,data:r,fetchNextPage:i,hasNextPage:o}=cqe(t);return g(ce,{css:{px:"$1"},children:[n&&l(A,{css:{my:"$8",textAlign:"center"},children:"Loading..."}),!n&&r.pages[0].length===0&&l(A,{css:{marginTop:"$8",textAlign:"center"},children:"No media."}),!n&&l($X,{entityId:e,data:r,fetchNextPage:i,hasNextPage:o})]})}function sGe({handle:e,entityId:t}){const{isLoading:n,data:r,hasNextPage:i,fetchNextPage:o}=dqe(t);return g(ce,{css:{px:"$1"},children:[n&&l(A,{css:{my:"$8",textAlign:"center"},children:"Loading..."}),!n&&r.pages[0].length===0&&l(A,{css:{marginTop:"$8",textAlign:"center"},children:"No products to showcase."}),!n&&l($X,{entityId:e,data:r,hasNextPage:i,fetchNextPage:o})]})}function aGe({children:e,profile:t}){const[n,r]=y.exports.useState(!1),i=ZWe(t.handle),o=Ee(),s=o1({content:t.about,editable:!0,placeholder:"",targetMention:"profile-about-section"});return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:a=>a.preventDefault(),children:[l(nt,{children:"Edit my profile"}),g(P,{css:{gap:"$6"},children:[g(P,{css:{position:"relative",marginBottom:50},children:[l(lGe,{profile:t}),l(cGe,{profile:t})]}),g(dt,{css:{gap:"$4"},onSubmit:a=>i.mutate({event:a,about:s.getHTML()},{onSuccess:()=>{r(!1),F({type:"success",title:"Profile updated",message:"Your profile has been updated."}),o.invalidateQueries({queryKey:["profile",t.handle]})}}),children:[t.isUser&&g(P,{children:[l(ae,{children:"Display name"}),l(Ke,{name:"display_name",type:"text",placeholder:t.name,defaultValue:t.name===t.displayName?"":t.displayName})]}),g(P,{children:[l(ae,{children:"About"}),g(ce,{id:"profile-about-section",css:{display:"inline-block",borderRadius:8,border:"1px solid $borderColor",boxShadow:"$xsmall",px:"$3",py:"$2"},children:[l(Gd,{editor:s}),l(Dg,{editor:s})]})]}),g(P,{children:[l(ae,{children:"Flickr URL"}),l(Ke,{name:"flickr_url",type:"text",defaultValue:t.socials.flickrUrl})]}),g(P,{children:[l(ae,{children:"Facebook URL"}),l(Ke,{name:"facebook_url",type:"text",defaultValue:t.socials.facebookUrl})]}),g(P,{children:[l(ae,{children:"Instagram URL"}),l(Ke,{name:"instagram_url",type:"text",defaultValue:t.socials.instagramUrl})]}),g(P,{children:[l(ae,{children:"Twitter/X URL"}),l(Ke,{name:"x_url",type:"text",defaultValue:t.socials.xUrl})]}),g(P,{children:[l(ae,{children:"Personal Website URL"}),l(Ke,{name:"personal_url",type:"text",defaultValue:t.socials.personalUrl})]}),g(P,{children:[l(ae,{children:"Deviant Art URL"}),l(Ke,{name:"deviant_art_url",type:"text",defaultValue:t.socials.deviantArtUrl})]}),g(P,{children:[l(ae,{children:"BlueSky URL"}),l(Ke,{name:"bluesky_url",type:"text",defaultValue:t.socials.blueskyUrl})]}),g(P,{children:[l(ae,{children:"Marketplace URL"}),l(Ke,{name:"marketplace_url",type:"text",defaultValue:t.socials.marketplaceUrl})]}),g(P,{children:[l(ae,{children:"Youtube URL"}),l(Ke,{name:"youtube_url",type:"text",defaultValue:t.socials.youtubeUrl})]}),g(P,{children:[l(ae,{children:"Discord URL"}),l(Ke,{name:"discord_url",type:"text",defaultValue:t.socials.discordUrl})]}),g(P,{children:[l(ae,{children:"Mastodon URL"}),l(Ke,{name:"mastodon_url",type:"text",defaultValue:t.socials.mastodonUrl})]}),l(Y,{variant:"primary",type:"submit",disabled:i.isLoading,css:{ml:"auto",marginTop:"$2"},children:"Save my profile"})]})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function lGe({profile:e}){const[t,n]=y.exports.useState(null),r=y.exports.useRef(null),[i,o]=y.exports.useState({image:null,progress:null}),[s,a]=y.exports.useState(!1),c=te(),u=Ee();async function d(m){const b=await(await fetch(m)).blob();return new File([b],"banner.jpg",{type:b.type})}const f=m=>{d(m).then(v=>{const b=new FormData;b.append("file",v);const x=new AbortController;return c.post("/pf/upload-image/banner",b,{signal:x.signal,onUploadProgress:C=>{const w=C.loaded/C.total*100;o({image:null,progress:w})}}).then(()=>{o({image:null,progress:null}),a(!1),u.invalidateQueries({queryKey:["profile",e.handle]}),F({type:"success",title:"Banner picture updated",message:"Your profile banner has been updated."})}).catch(C=>{C.message!=="canceled"&&F({type:"error",title:"Upload failed",message:"The upload of your picture failed, please try again."})})})},h=m=>{const v=m.target.files[0];if(v){const b=new FileReader;b.onload=()=>{CZ(v,2048,2048,x=>{n(x),a(!0)})},b.readAsDataURL(v)}},p=()=>{r.current&&r.current.click()};return y.exports.useEffect(()=>{s===!1&&n(null)},[s]),g(z,{children:[l("input",{type:"file",accept:"image/*",onChange:h,ref:r,style:{display:"none"},onClick:m=>{m.target.value=null}}),g(ce,{css:{position:"relative",width:"100%"},children:[e.bannerMedia&&g(z,{children:[l(ce,{onClick:p,css:{position:"relative",width:"100%","&::after":{borderRadius:"12px 12px 0 0",content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)","@sm":{borderRadius:0}}},children:l(Dt,{loading:"lazy",src:`${e.bannerMedia}_x2048.webp`,onClick:p,css:{borderRadius:"12px 12px 0 0",bottom:-50,display:"block",width:"100%","@sm":{borderRadius:0}}})}),l(W,{onClick:p,icon:Jx,css:{position:"absolute",cursor:"pointer",color:"white",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:20,height:20}})]}),!e.bannerMedia&&g(z,{children:[l(ce,{onClick:p,css:{position:"relative",width:"100%",height:150,"&::after":{borderRadius:"12px 12px 0 0",content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)","@sm":{borderRadius:0}}}}),l(W,{onClick:p,icon:Jx,css:{position:"absolute",cursor:"pointer",color:"white",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:20,height:20}})]})]}),t&&l(wZ,{image:t,open:s,setOpen:a,uploadedImage:i,uploadImage:f,ratio:3})]})}function cGe({profile:e}){const[t,n]=y.exports.useState(null),r=y.exports.useRef(null),[i,o]=y.exports.useState({image:null,progress:null}),[s,a]=y.exports.useState(!1),c=te(),u=Ee(),d=Tn.exports.useMediaQuery({maxWidth:767}),f=Tn.exports.useMediaQuery({maxWidth:575});async function h(b){const C=await(await fetch(b)).blob();return new File([C],"profile.jpg",{type:C.type})}const p=b=>{h(b).then(x=>{const C=new FormData;C.append("file",x);const w=new AbortController;return c.post("/pf/upload-image/profile",C,{signal:w.signal,onUploadProgress:S=>{const T=S.loaded/S.total*100;o({image:null,progress:T})}}).then(S=>{o({image:S,progress:100}),a(!1),F({type:"success",title:"Profile picture updated",message:"Your profile picture has been updated."}),u.invalidateQueries({queryKey:["profile",e.handle]}),u.invalidateQueries({queryKey:["feed",e.id]}),u.invalidateQueries({queryKey:["me"]})}).catch(S=>{S.message!=="canceled"&&F({type:"error",title:"Upload failed",message:"The upload of your picture failed, please try again."})})})},m=b=>{const x=b.target.files[0];if(x){const C=new FileReader;C.onload=()=>{CZ(x,2048,2048,w=>{n(w),a(!0)})},C.readAsDataURL(x)}},v=()=>{r.current&&r.current.click()};return y.exports.useEffect(()=>{s===!1&&(n(null),o({image:null,progress:null}))},[s]),g(z,{children:[l("input",{type:"file",accept:"image/*",onChange:m,ref:r,style:{display:"none"},onClick:b=>{b.target.value=null}}),g(ce,{css:{position:"relative",width:d&&f?110:130,marginLeft:"$4"},children:[l(bi,{pictureUuid:e.picture,profileMedia:e.profileMedia,size:d&&f?110:130,round:e.isUser,css:{position:"absolute",bottom:d&&f?110/-2:130/-2,borderRadius:e.isUser?"50%":6}}),l(ce,{onClick:v,css:{position:"absolute",border:"2px solid $borderColor",bottom:d&&f?110/-2:130/-2,width:d&&f?110:130,height:d&&f?110:130,borderRadius:e.isUser?"50%":6,backgroundColor:"rgba(0, 0, 0, 0.4)",cursor:"pointer"}}),l(W,{onClick:v,icon:Jx,css:{position:"absolute",cursor:"pointer",color:"white",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:20,height:20}})]}),t&&l(wZ,{image:t,open:s,round:e.isUser,setOpen:a,uploadedImage:i,uploadImage:p})]})}function CZ(e,t=1024,n=1024,r){const i=new Image,o=new FileReader;o.onload=s=>{s.target&&typeof s.target.result=="string"&&(i.src=s.target.result)},i.onload=function(){const s=document.createElement("canvas"),a=s.getContext("2d");let c=i.width,u=i.height;c>u?c>t&&(u=Math.round(u*=t/c),c=t):u>n&&(c=Math.round(c*=n/u),u=n),s.width=c,s.height=u,a.drawImage(i,0,0,c,u);const d=s.toDataURL(e.type);r(d)},e instanceof Blob&&o.readAsDataURL(e)}function wZ({image:e,open:t,setOpen:n,uploadedImage:r,uploadImage:i,round:o=!1,ratio:s=1}){const[a,c]=y.exports.useState({x:0,y:0}),[u,d]=y.exports.useState(1),[f,h]=y.exports.useState(!1),[p,m]=y.exports.useState(null),v=_u(()=>{h(!0)},300);y.exports.useEffect(()=>{v()},[t]);const b=async()=>{try{const w=await M6e(e,p);i(w)}catch(w){console.error(w)}},x=(w,S)=>{m(S)},C=r.progress!==null;return l(Ye,{open:t,onOpenChange:n,children:g(Qe,{children:[l(Xe,{}),g(Ze,{size:"medium",css:{height:600,py:"$10",px:0,animation:"none"},children:[l(ce,{css:{height:"100%",width:"100%",position:"relative"},children:f&&l(vKe,{image:e,crop:a,zoom:u,aspect:s,maxZoom:5,cropShape:o?"round":"rect",showGrid:!1,onCropChange:c,onCropComplete:x,onZoomChange:d})}),g(WKe,{min:1,max:5,value:[u],step:.05,onValueChange:w=>{d(w[0])},css:{position:"absolute",bottom:14,width:"98%",left:"50%",transform:"translateX(-50%)"},children:[l(qKe,{children:l(KKe,{})}),l(GKe,{})]}),l(Y,{onClick:b,variant:"primary",disabled:C,css:{position:"absolute",right:6,top:6},children:"Apply"}),!C&&l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",css:{left:12},children:l(Je,{})})})]})]})})}function uGe({children:e,profile:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,mutate:o}=Eqe();return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:e}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),size:"small",children:[l(nt,{children:"Ban user"}),l(ht,{children:l(A,{children:"This action can't be undone. Are you sure?"})}),l(dt,{onSubmit:s=>{s.preventDefault(),o(t.id,{onSuccess:()=>{r(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:i,variant:"danger",children:"Ban user"})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function dGe({handle:e}){return l(M,{css:{alignItems:"center",justifyContent:"center"},children:l(A,{css:{padding:"$10",fontWeight:"$medium",fontSize:"$plarge",color:"$textColor"},children:`@${e} is blocked`})})}function fGe({handle:e}){return l(M,{css:{alignItems:"center",justifyContent:"center"},children:l(A,{css:{padding:"$10",fontWeight:"$medium",fontSize:"$plarge",color:"$textColor"},children:`You are blocked by @${e}`})})}function hGe({profile:e}){return g(gs,{modal:!1,children:[l(vs,{css:{height:"fit-content"},children:l(Wa,{})}),l(ys,{align:"start",side:"left",sideOffset:16,children:e.isBlockedByCurrentUser?l(mGe,{postOwnerId:e.id,handle:e.handle}):l(pGe,{postOwnerId:e.id,handle:e.handle})})]})}function pGe({postOwnerId:e,handle:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,mutate:o}=Lqe(e,t);return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:g(Xt,{type:"danger",onSelect:s=>s.preventDefault(),children:[l(W,{icon:foe}),l(A,{children:"Block profile"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),size:"small",children:[l(nt,{children:`Block @${t}?`}),l(ht,{children:g(A,{children:["Blocking this profile will prevent them from seeing your posts and comments, and you won\u2019t see theirs. ",l("br",{}),"You can unblock this profile anytime if you change your mind."]})}),l(dt,{onSubmit:s=>{s.preventDefault(),o(null,{onSuccess:()=>{r(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:i,variant:"danger",children:`Block @${t}`})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function mGe({postOwnerId:e,handle:t}){const[n,r]=y.exports.useState(!1),{isLoading:i,mutate:o}=Nqe(e,t);return g(Ye,{open:n,onOpenChange:r,children:[l(pt,{asChild:!0,children:g(Xt,{type:"danger",onSelect:s=>s.preventDefault(),children:[l(W,{icon:eoe}),l(A,{children:"Unblock profile"})]})}),g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:s=>s.preventDefault(),size:"small",children:[l(nt,{children:`Unblock @${t}?`}),l(ht,{children:g(A,{children:["Unblocking this profile will allow them to see your posts and comments again, and you\u2019ll be able to see theirs. ",l("br",{}),"You can block this profile anytime if needed."]})}),l(dt,{onSubmit:s=>{s.preventDefault(),o(null,{onSuccess:()=>{r(!1)}})},children:g(wt,{children:[l(Te,{asChild:!0,children:l(Y,{variant:"soft",children:"Cancel"})}),l(Y,{disabled:i,variant:"danger",children:`Unblock @${t}`})]})}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})]})}function gGe(){return l(Qa,{children:l(M,{css:{marginBottom:"$8",marginTop:"$6",width:"100%",backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$4",px:"$4","@sm":{border:"none",borderRadius:0,py:"$2",marginTop:"$4"}},children:l(bVe,{})})})}function vGe(){return l(Qa,{children:g(M,{css:{fontSize:14,marginBottom:"$8",marginTop:"$6",flexDirection:"column",minWidth:"100%","@sm":{px:"$2",marginTop:"$4"}},children:[l(Qn,{css:{marginTop:"$4"},children:"Events"}),l(M,{css:{marginBottom:"$8",width:"100%",gap:"$3",borderRadius:8,marginTop:"$4","@sm":{border:"none",borderRadius:0}},children:l(gVe,{})})]})})}function yGe(){return l(Qa,{children:l(M,{css:{marginBottom:"$8",marginTop:"$6",width:"100%",backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$4",px:"$4","@sm":{border:"none",borderRadius:0,py:"$2",marginTop:"$4"}},children:l(CVe,{})})})}function bGe(){return l(Qa,{children:l(M,{css:{marginBottom:"$8",marginTop:"$6",width:"100%",backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",borderRadius:8,py:"$4",px:"$4","@sm":{border:"none",borderRadius:0,py:"$2",marginTop:"$4"}},children:l(yVe,{})})})}const SZ=y.exports.createContext(void 0),xGe=({children:e})=>{const[t,n]=y.exports.useState({}),{mutate:r}=Rqe(),i=y.exports.useCallback((o,s)=>{n(a=>{const c=a[s]||[];return c.includes(o)?a:(r({featuredContentId:o,eventType:s}),{...a,[s]:[...c,o]})})},[r]);return l(SZ.Provider,{value:{eventsSent:t,trackEvent:i},children:e})},EZ=()=>{const e=y.exports.useContext(SZ);if(!e)throw new Error("useFeatureContentTracking must be used within a FeaturedContentTrackingContext");return e},L_=Ae.createContext(null);L_.displayName="PublicGalleryFiltersContext";function CGe(){return Ae.useContext(L_)}function TZ({children:e}){const t=hs(),n=ao();return t.token?e:l(xh,{to:"/login",state:{from:n},replace:!0})}function wGe(){return l(zW,{children:g(Ij,{children:[g(Nt,{element:l(TZ,{children:l(I7e,{})}),children:[l(Nt,{index:!0,path:"/dashboard",element:l(kxe,{})}),l(Nt,{path:"/explore/events-stores",element:l(DRe,{})}),l(Nt,{path:"/explore/users",element:l(kRe,{})}),l(Nt,{path:"/bloggers/bloggers",element:l(Cxe,{})}),l(Nt,{path:"/bloggers/applications",element:l(dRe,{})}),l(Nt,{path:"/designers/applications",element:l(hRe,{})}),l(Nt,{path:"/bloggers/products",element:l(Kxe,{})}),l(Nt,{path:"/bloggers/posts",element:l(Hxe,{})}),l(Nt,{path:"/bloggers/dropboxes",element:l(cCe,{})}),l(Nt,{path:"/invitations",element:l(oCe,{})}),l(Nt,{path:"/bloggers/mailbox",element:l(QPe,{})}),l(Nt,{path:"/subscribers/newsletters",element:l(gMe,{})}),l(Nt,{path:"/subscribers/newsletters/:id",element:l(VRe,{})}),l(Nt,{path:"/user/:id",element:l(mRe,{})}),l(Nt,{path:"/store/:id",element:l(MRe,{})}),l(Nt,{path:"/subscribers/subscribers",element:l(bMe,{})}),l(Nt,{path:"/settings/billing/upgrade-subscription",element:l(HQ,{})}),l(Nt,{path:"/settings/:type/:setting",element:l(Ab,{})}),l(Nt,{path:"/settings/:setting",element:l(Ab,{})}),l(Nt,{path:"/settings",element:l(Ab,{})}),l(Nt,{path:"*",element:l(nRe,{})})]}),l(Nt,{path:"/store/:id/application",element:l(dL,{})}),l(Nt,{path:"/:id/bloggers-application",element:l(dL,{})}),l(Nt,{path:"/es/u",element:l(hMe,{})}),l(Nt,{path:"/:id/designers-application",element:l(aRe,{})}),l(Nt,{path:"/login",element:l(H7e,{})})]})})}function SGe(){const e=hs(),[t]=Jn(),n=t.get("token"),r=t.get("companyID"),i=t.get("redirect"),[o,s]=y.exports.useState(null),{t:a}=Ks(),{isLoading:c,mutate:u}=L7e({companyID:r,redirect:i}),{isLoading:d,mutate:f}=zq();y.exports.useEffect(()=>{n?f({token:n}):r!==null&&e.signout()},[]);const h=p=>{p.preventDefault();const m=new FormData(p.target),v=m.get("username"),b=m.get("password");u({username:v,password:b})};return r===null&&(e==null?void 0:e.token)?l(xh,{to:"/",state:{from:"/"},replace:!0}):l(M,{css:{minHeight:"100svh",alignItems:"center",justifyContent:"center",py:"$10"},children:g(P,{children:[o==="login-inworld-code"&&l(EGe,{setModal:s}),o==="register"&&l(TGe,{setModal:s}),g(P,{css:{width:360,backgroundColor:"$cardBackgroundColor",border:"1px solid $borderColor",justifyContent:"center",px:"$8",paddingTop:"$10",paddingBottom:"$6",borderRadius:12},children:[l(M,{css:{mx:"auto",height:40,width:200,marginBottom:"$10"},children:l(ak,{})}),g(dt,{css:{height:"inherit"},onSubmit:h,children:[g(P,{children:[l(ae,{children:a("translation:login.username")}),l(Ke,{name:"username",type:"text",placeholder:"Luke Rowley",autoComplete:"username"})]}),g(P,{children:[g(M,{css:{justifyContent:"space-between"},children:[l(ae,{children:a("translation:login.password")}),l(kGe,{})]}),l(Ke,{name:"password",type:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",autoComplete:"current-password"})]}),l(Y,{disabled:c||d,variant:"primary",type:"submit",css:{marginTop:"$4",width:"100%"},children:"Sign in with password"})]}),g(M,{css:{alignItems:"center",my:"$4"},children:[l(io,{}),l(A,{css:{flexShrink:0,px:"$3"},children:"or"}),l(io,{})]}),g(Y,{disabled:c||d,variant:"white",type:"submit",css:{width:"100%"},onClick:()=>s("login-inworld-code"),children:[l(W,{icon:Zie}),"Login with in-world code"]}),g(A,{css:{marginTop:"$8"},children:["Don't have an account?"," ",l(ie,{to:"#",onClick:()=>s("register"),children:"Create an account"})]})]}),g(M,{css:{flexWrap:"wrap",py:"$2",px:"$3",fontSize:11,gap:"$1",justifyContent:"center","a:hover":{opacity:"0.7",cursor:"pointer",textDecoration:"underline"}},children:[l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service",target:"_blank",children:"Terms of Service"}),"\u2022",l(ie,{to:"https://docs.primfeed.com/legal/privacy-policy",target:"_blank",children:"Privacy policy"}),"\u2022",l(ie,{to:"https://docs.primfeed.com/",target:"_blank",children:"Documentation"}),"\u2022",l(ie,{to:"https://feedback.primfeed.com/",target:"_blank",children:"Roadmap"})]})]})})}function EGe({setModal:e=null}){const t=hs(),[n]=Jn(),[r,i]=y.exports.useState(!1),[o,s]=y.exports.useState(""),[a,c]=y.exports.useState(null),[u,d]=y.exports.useState(null),f=te(),h=ar(),p=ao(),m=n.get("companyID"),v=n.get("redirect"),b=ve({mutationFn:()=>f.post("/pf/login/create-inworld-request",{username:a}).then(C=>{i(!0),d(C.data.requestId)}).catch(function(C){var w,S,T,E,k,_,O;((w=C.response)==null?void 0:w.status)===401?F({type:"error",title:(S=C.response.data)==null?void 0:S.error.title,message:(T=C.response.data)==null?void 0:T.error.message}):(k=(E=C.response.data)==null?void 0:E.error)!=null&&k.title?F({type:"error",title:(_=C.response.data)==null?void 0:_.error.title,message:(O=C.response.data)==null?void 0:O.error.message}):F({type:"error",title:"Unable to send you an in-world code",message:"An unexpected error occured. Please try again."})})}),x=ve({mutationFn:()=>f.post("/pf/login/inworld-code",{requestId:u,username:a,otp:o,companyID:m,redirect:v}).then(C=>{var w;t.signin({token:C.data.token,selectedStore:(w=C.data)==null?void 0:w.selectedStore},()=>{var S;C.data.redirect.startsWith("http")?window.location.assign(C.data.redirect):(S=p.state)!=null&&S.from?h(p.state.from,{replace:!0}):h("/",{replace:!0})})}).catch(function(C){var w,S,T,E,k,_,O;((w=C.response)==null?void 0:w.status)===401?F({type:"error",title:(S=C.response.data)==null?void 0:S.error.title,message:(T=C.response.data)==null?void 0:T.error.message}):(k=(E=C.response.data)==null?void 0:E.error)!=null&&k.title?F({type:"error",title:(_=C.response.data)==null?void 0:_.error.title,message:(O=C.response.data)==null?void 0:O.error.message}):C.response.data.error==="no_account"?(F({type:"error",title:"Unable to login",message:"You don't have an account on Primfeed, please create your account using this new page."}),e("register")):F({type:"error",title:"Unable to login",message:"An unexpected error occured. Please try again."})})});return l(Ye,{open:!0,onOpenChange:C=>{C===!1&&e(null)},children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:C=>C.preventDefault(),children:[l(nt,{children:"Login with in-world code"}),g(ht,{children:[!r&&l(A,{children:"Please put your in-world legacy avatar name to receive your in-world code. You will receive your code in your local chat."}),r&&l(A,{children:"A OTP code has been sent to you in-world in your local chat. To login to Primfeed, please enter the code below."})]}),!r&&g(P,{children:[l(M,{children:l(ae,{children:"Username"})}),l(Ke,{name:"username",type:"text",placeholder:"Luke Rowley",value:a,onChange:C=>c(C.target.value)})]}),r&&g(P,{css:{py:"$4"},children:[l(ae,{children:"OTP Code"}),l(Qk,{value:o,onChange:s,numInputs:8,inputType:"number",containerStyle:{justifyContent:"space-between"},renderInput:C=>l(kZ,{...C})})]}),g(wt,{css:{marginTop:"$4"},children:[!r&&l(Y,{disabled:b.isLoading,variant:"white",type:"submit",onClick:()=>b.mutate(),children:"Send the in-world code"}),r&&l(Y,{disabled:b.isLoading,variant:"primary",type:"submit",onClick:()=>x.mutate(),children:"Login with code"})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function TGe({setModal:e=null}){const t=hs(),[n]=Jn(),[r,i]=y.exports.useState(!1),[o,s]=y.exports.useState(""),[a,c]=y.exports.useState(null),[u,d]=y.exports.useState(null),[f,h]=y.exports.useState(!1),p=te(),m=ar(),v=n.get("companyID"),b=n.get("redirect"),x=ve({mutationFn:()=>p.post("/pf/login/create-inworld-request",{username:a}).then(w=>{i(!0),d(w.data.requestId)}).catch(function(w){var S,T,E,k,_,O,D;((S=w.response)==null?void 0:S.status)===401?F({type:"error",title:(T=w.response.data)==null?void 0:T.error.title,message:(E=w.response.data)==null?void 0:E.error.message}):(_=(k=w.response.data)==null?void 0:k.error)!=null&&_.title?F({type:"error",title:(O=w.response.data)==null?void 0:O.error.title,message:(D=w.response.data)==null?void 0:D.error.message}):F({type:"error",title:"Unable to send you an in-world code",message:"An unexpected error occured. Please try again."})})}),C=ve({mutationFn:()=>p.post("/pf/login/inworld-code",{requestId:u,username:a,otp:o,companyID:v,redirect:b,tos:f}).then(w=>{var S;t.signin({token:w.data.token,selectedStore:(S=w.data)==null?void 0:S.selectedStore},()=>{w.data.redirect.startsWith("http")?window.location.assign(w.data.redirect):m(w.data.redirect,{replace:!0})})}).catch(function(w){var S,T,E,k,_,O,D;((S=w.response)==null?void 0:S.status)===401?F({type:"error",title:(T=w.response.data)==null?void 0:T.error.title,message:(E=w.response.data)==null?void 0:E.error.message}):(_=(k=w.response.data)==null?void 0:k.error)!=null&&_.title?F({type:"error",title:(O=w.response.data)==null?void 0:O.error.title,message:(D=w.response.data)==null?void 0:D.error.message}):F({type:"error",title:"Unable to create your account",message:"An unexpected error occured. Please try again."})})});return l(Ye,{open:!0,onOpenChange:w=>{w===!1&&e(null)},children:g(Qe,{children:[l(Xe,{}),g(Ze,{onOpenAutoFocus:w=>w.preventDefault(),children:[l(nt,{children:"Create an account"}),g(ht,{children:[!r&&l(A,{children:"To create your account, we will send you an in-world code to confirm you're the owner of the avatar. Please put your in-world legacy avatar name to receive your in-world code."}),r&&l(A,{children:"A OTP code has been sent to you in-world in your local chat. To create your account on Primfeed, please enter the code below."})]}),!r&&g(P,{children:[l(M,{children:l(ae,{children:"Username"})}),l(Ke,{name:"username",type:"text",placeholder:"Luke Rowley",value:a,onChange:w=>c(w.target.value)})]}),r&&g(P,{css:{py:"$4"},children:[l(ae,{children:"OTP Code"}),l(Qk,{value:o,onChange:s,numInputs:8,inputType:"number",containerStyle:{justifyContent:"space-between"},renderInput:w=>l(kZ,{...w})}),g(M,{css:{marginTop:"$6",cursor:"pointer",alignItems:"center",gap:"$2"},children:[l(Xd,{id:"tos",checked:f,onCheckedChange:()=>h(!f),css:{border:"2px solid $borderColor"},children:l(Zd,{children:l(W,{icon:Pa})})}),g("label",{htmlFor:"tos",children:["By creating an account on Primfeed, I agree to its"," ",l(ie,{to:"https://docs.primfeed.com/legal/terms-of-service",target:"_blank",primfeed:!0,children:"Terms of Service"}),". Your in-world profile picture will be pulled up upon creation, and you will be able to change it in your profile."]})]})]}),g(wt,{css:{marginTop:"$4"},children:[!r&&l(Y,{disabled:x.isLoading,variant:"white",type:"submit",onClick:()=>x.mutate(),children:"Send the in-world code"}),r&&l(Et,{enabled:!f,small:!0,content:l(P,{css:{gap:"$2"},children:l(A,{children:"You must agree to the new Terms of Service to create your Primfeed account."})}),children:l(Y,{disabled:x.isLoading||!f||o.length<8,variant:"primary",type:"submit",onClick:()=>C.mutate(),children:"Create my account"})})]}),l(Te,{asChild:!0,children:l(et,{"aria-label":"Close",children:l(Je,{})})})]})]})})}function kGe(){const{t:e}=Ks();return l(Et,{delayDuration:200,content:g(P,{css:{gap:"$2"},children:[l(A,{children:'If you forgot your Primfeed password account, click below on the button "Login with in-world code"'}),l(A,{children:"Once connected, you are able to change your password in the settings of your profile."})]}),children:l(ae,{css:{color:"$neutral400",userSelect:"none","&:hover":{cursor:"pointer",color:"$neutral500"}},children:e("translation:login.forgot_password.label")})})}const kZ=de("input",{border:"1px solid $borderColor",fontSize:"20px",width:"50px !important",height:"50px !important",borderRadius:12,"-moz-appearance":"textfield","&::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"@sm":{fontSize:16,borderRadius:4,width:"30px !important",height:"30px !important"},variants:{disabled:{true:{backgroundColor:"$gray200",cursor:"not-allowed"}}}});function _Ge(){return l(zW,{children:g(Ij,{children:[g(Nt,{element:l(TZ,{children:l(exe,{})}),children:[l(Nt,{index:!0,path:"/",element:l(Yqe,{})}),l(Nt,{path:"/feeds",element:l(Wqe,{})}),l(Nt,{path:"/bookmarks",element:l(qqe,{})}),l(Nt,{path:"/notifications",element:l(Gqe,{})}),l(Nt,{path:"/settings",element:l(Kqe,{})}),l(Nt,{path:"/events",element:l(vGe,{})}),l(Nt,{path:"/events/new",element:l(gGe,{})}),l(Nt,{path:"/events/:eventId",element:l(yGe,{})}),l(Nt,{path:"/events/:eventId/edit",element:l(bGe,{})}),l(Nt,{path:"/:handle/posts/:id",element:l(VVe,{})}),l(Nt,{path:"/:handle",element:l(YKe,{})}),l(Nt,{path:"*",element:l(rRe,{})})]}),l(Nt,{index:!0,path:"/login",element:l(SGe,{})})]})})}const AGe={sign_in:"Sign in",username:"Username",password:"Password",forgot_password:{label:"Forgot password?",help1:"In the package you received in-world, there is a Passwordless HUD login, that you can use to sign in to your account.",help2:"Click it, and from your account you will be able to change your password."},toast:{error:{title:"Unable to connect",unrecognized_username_or_password:"We're unable to recognize the username or password you entered.",bad_token:"We are unable to connect you through your unique link. Make sure to use the HUD in-world to get your link, otherwise please contact Luke Rowley.",unexpected_error:"An unexpected error occured. Please try again."}}},$Ge={blogger:{closed:"Sorry, but this store does not take bloggers application anymore.",success:"Thank you for your application, we will get back to you shortly."},designer:{choose_store:"What store do you want to apply with?",closed:"Sorry, but this event does not take designers application anymore.",success:"Thank you for your application, we will get back to you shortly.",apply:"Send your application",error:{not_connected:{title:"You are not connected with your EasyBloggers account",body1:"If you have already and account, and a store, please sign in on <1>https://web.kynno.app/login</1> and come back on this page.",body2:"Otherwise, please notice that this form is only for designers."}}}},DGe={login:AGe,application:$Ge},OGe=new $ne;Ci.use(Lre).init({resources:{en:{translation:DGe}},lng:"en",interpolation:{escapeValue:!1}});function PGe(){let e=l(_Ge,{}),t="https://cdn.primfeed.com/pf_favicon.png",n="https://cdn.primfeed.com/pf_maskable_x512.png",r="Primfeed",i="Upload pictures up to 8k resolution, share your thoughts, follow your loved creators and more. Its unique features are specially designed for residents' needs.",o="https://cdn.primfeed.com/pf_og_image.jpg";return(window.location.hostname==="web.kynno.app"||window.location.hostname==="kynno-app.localhost")&&(e=l(wGe,{}),r="EasyBloggers",t="https://cdn.primfeed.com/favicon.png",n="https://cdn.primfeed.com/maskable_x512.png",i="Save hours of work with EasyBloggers, a next-gen Bloggers Management System designed to simplify the management of bloggers teams for Second Life store owners.",o="https://cdn.primfeed.com/og_image.png"),N6e(t),B6e(i),F6e(n),L6e(r),H6e(o),$ie(),l(x9e,{children:l(Vne,{client:OGe,children:l(xGe,{children:g(V6e,{children:[l(sle,{}),e]})})})})}G7.createRoot(document.getElementById("app")).render(l(Ae.StrictMode,{children:l(fee,{client:Up,children:l(PGe,{})})}));