diff --git "a/out/_next/static/chunks/493-11aa77032d610cd8.js" "b/out/_next/static/chunks/493-11aa77032d610cd8.js" deleted file mode 100644--- "a/out/_next/static/chunks/493-11aa77032d610cd8.js" +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[493],{9967:function(e,t,n){"use strict";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 i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};m.initial(e),m.handler(t);var n={current:e},r=f(y)(n,t),i=f(g)(n),o=f(m.changes)(e),a=f(v)(n);function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return m.selector(e),e(n.current)}function l(e){c(r,i,o,a)(e)}return[u,l]}},w=b,x={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.25.2/min/vs"}};var E=function(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o{r.current=!1}:e,t)};function ne(){}function re(e,t,n,r){return function(e,t){return e.editor.getModel(ie(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r&&ie(e,r))}(e,t,n,r)}function ie(e,t){return e.Uri.parse(t)}function oe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:u,keepCurrentModifiedModel:l,theme:s,loading:c,options:f,height:d,width:p,className:h,wrapperClassName:m,beforeMount:v,onMount:g}){const[y,b]=(0,W.useState)(!1),[w,x]=(0,W.useState)(!0),E=(0,W.useRef)(null),k=(0,W.useRef)(null),S=(0,W.useRef)(null),C=(0,W.useRef)(g),_=(0,W.useRef)(v);ee((()=>{const e=U.init();return e.then((e=>(k.current=e)&&x(!1))).catch((e=>"cancelation"!==(null===e||void 0===e?void 0:e.type)&&console.error("Monaco initialization: error:",e))),()=>E.current?function(){const e=E.current.getModel();var t,n;u||null===(t=e.original)||void 0===t||t.dispose();l||null===(n=e.modified)||void 0===n||n.dispose();E.current.dispose()}():e.cancel()})),te((()=>{const e=E.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t,forceMoveMarkers:!0}]),e.pushUndoStop())}),[t],y),te((()=>{E.current.getModel().original.setValue(e)}),[e],y),te((()=>{const{original:e,modified:t}=E.current.getModel();k.current.editor.setModelLanguage(e,r||n),k.current.editor.setModelLanguage(t,i||n)}),[n,r,i],y),te((()=>{k.current.editor.setTheme(s)}),[s],y),te((()=>{E.current.updateOptions(f)}),[f],y);const O=(0,W.useCallback)((()=>{_.current(k.current);const u=k.current.editor.createModel(e,r||n,o&&k.current.Uri.parse(o)),l=k.current.editor.createModel(t,i||n,a&&k.current.Uri.parse(a));E.current.setModel({original:u,modified:l})}),[n,t,i,e,r,o,a]),M=(0,W.useCallback)((()=>{E.current=k.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...f}),O(),k.current.editor.setTheme(s),b(!0)}),[f,s,O]);return(0,W.useEffect)((()=>{y&&C.current(E.current,k.current)}),[y]),(0,W.useEffect)((()=>{!w&&!y&&M()}),[w,y,M]),W.createElement(J,{width:p,height:d,isEditorReady:y,loading:c,_ref:S,className:h,wrapperClassName:m})}oe.propTypes={original:q().string,modified:q().string,language:q().string,originalLanguage:q().string,modifiedLanguage:q().string,originalModelPath:q().string,modifiedModelPath:q().string,keepCurrentOriginalModel:q().bool,keepCurrentModifiedModel:q().bool,theme:q().string,loading:q().oneOfType([q().element,q().string]),options:q().object,width:q().oneOfType([q().number,q().string]),height:q().oneOfType([q().number,q().string]),className:q().string,wrapperClassName:q().string,beforeMount:q().func,onMount:q().func},oe.defaultProps={theme:"light",loading:"Loading...",options:{},keepCurrentOriginalModel:!1,keepCurrentModifiedModel:!1,width:"100%",height:"100%",beforeMount:ne,onMount:ne};var ae=function(e){const t=(0,W.useRef)();return(0,W.useEffect)((()=>{t.current=e}),[e]),t.current};const[ue,le]=w.create({backup:null}),se=new Map;function ce({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a,line:u,loading:l,options:s,overrideServices:c,saveViewState:f,keepCurrentModel:d,width:p,height:h,className:m,wrapperClassName:v,beforeMount:g,onMount:y,onChange:b,onValidate:w}){const[x,E]=(0,W.useState)(!1),[k,S]=(0,W.useState)(!0),C=(0,W.useRef)(null),_=(0,W.useRef)(null),O=(0,W.useRef)(null),M=(0,W.useRef)(y),T=(0,W.useRef)(g),P=(0,W.useRef)(null),I=(0,W.useRef)(r),A=ae(o);ee((()=>{const e=U.init();return e.then((e=>(C.current=e)&&S(!1))).catch((e=>"cancelation"!==(null===e||void 0===e?void 0:e.type)&&console.error("Monaco initialization: error:",e))),()=>_.current?function(){var e,t;null===(e=P.current)||void 0===e||e.dispose(),d?f&&se.set(o,_.current.saveViewState()):null===(t=_.current.getModel())||void 0===t||t.dispose();_.current.dispose()}():e.cancel()})),te((()=>{const n=re(C.current,e||r,t||i,o);n!==_.current.getModel()&&(f&&se.set(A,_.current.saveViewState()),_.current.setModel(n),f&&_.current.restoreViewState(se.get(o)))}),[o],x),te((()=>{_.current.updateOptions(s)}),[s],x),te((()=>{_.current.getOption(C.current.editor.EditorOption.readOnly)?_.current.setValue(r):r!==_.current.getValue()&&(_.current.executeEdits("",[{range:_.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),_.current.pushUndoStop())}),[r],x),te((()=>{C.current.editor.setModelLanguage(_.current.getModel(),i)}),[i],x),te((()=>{void 0!==u&&_.current.revealLine(u)}),[u],x),te((()=>{C.current.editor.setTheme(a)}),[a],x);const z=(0,W.useCallback)((()=>{T.current(C.current);const u=o||n,l=re(C.current,r||e,t||i,u);_.current=C.current.editor.create(O.current,{model:l,automaticLayout:!0,...s},c),f&&_.current.restoreViewState(se.get(u)),C.current.editor.setTheme(a),ue().backup||le({backup:C.current.editor.setModelMarkers}),E(!0)}),[e,t,n,r,i,o,s,c,f,a]);return(0,W.useEffect)((()=>{x&&M.current(_.current,C.current)}),[x]),(0,W.useEffect)((()=>{!k&&!x&&z()}),[k,x,z]),I.current=r,(0,W.useEffect)((()=>{var e,t;x&&b&&(null===(e=P.current)||void 0===e||e.dispose(),P.current=null===(t=_.current)||void 0===t?void 0:t.onDidChangeModelContent((e=>{const t=_.current.getValue();I.current!==t&&b(t,e)})))}),[x,b]),(0,W.useEffect)((()=>{x&&(C.current.editor.setModelMarkers=function(e,t,n){var r;null===(r=ue().backup)||void 0===r||r.call(C.current.editor,e,t,n),null===w||void 0===w||w(n)})}),[x,w]),W.createElement(J,{width:p,height:h,isEditorReady:x,loading:l,_ref:O,className:m,wrapperClassName:v})}ce.propTypes={defaultValue:q().string,defaultPath:q().string,defaultLanguage:q().string,value:q().string,language:q().string,path:q().string,theme:q().string,line:q().number,loading:q().oneOfType([q().element,q().string]),options:q().object,overrideServices:q().object,saveViewState:q().bool,keepCurrentModel:q().bool,width:q().oneOfType([q().number,q().string]),height:q().oneOfType([q().number,q().string]),className:q().string,wrapperClassName:q().string,beforeMount:q().func,onMount:q().func,onChange:q().func,onValidate:q().func},ce.defaultProps={theme:"light",loading:"Loading...",options:{},overrideServices:{},saveViewState:!0,keepCurrentModel:!1,width:"100%",height:"100%",beforeMount:ne,onMount:ne,onValidate:ne};var fe=ce,de=(0,W.memo)(fe)},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"===typeof e?r.loader=e:"object"===typeof e&&(r={...r,...e}),r={...r,...t};const u=r.loader;return r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!==typeof r.ssr||r.ssr?n({...r,loader:()=>null!=u?u().then(o):Promise.resolve(o((()=>null)))}):(delete r.webpack,delete r.modules,a(n,r))}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});const r=n(8754)._(n(7294)).default.createContext(null)},8976:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});const r=n(8754)._(n(7294)),i=n(2254);const o=[],a=[];let u=!1;function l(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((e=>(n.loading=!1,n.loaded=e,e))).catch((e=>{throw n.loading=!1,n.error=e,e})),n}function s(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function l(){if(!o){const t=new c(e,n);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!u){const e=n.webpack?n.webpack():n.modules;e&&a.push((t=>{for(const n of e)if(t.includes(n))return l()}))}function s(e,t){!function(){l();const e=r.default.useContext(i.LoadableContext);e&&Array.isArray(n.modules)&&n.modules.forEach((t=>{e(t)}))}();const a=r.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return r.default.useImperativeHandle(t,(()=>({retry:o.retry})),[]),r.default.useMemo((()=>{return a.loading||a.error?r.default.createElement(n.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:o.retry}):a.loaded?r.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null;var t}),[e,a])}return s.preload=()=>l(),s.displayName="LoadableComponent",r.default.forwardRef(s)}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:e,_opts:t}=this;e.loading&&("number"===typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout((()=>{this._update({pastDelay:!0})}),t.delay)),"number"===typeof t.timeout&&(this._timeout=setTimeout((()=>{this._update({timedOut:!0})}),t.timeout))),this._res.promise.then((()=>{this._update({}),this._clearTimeouts()})).catch((e=>{this._update({}),this._clearTimeouts()})),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach((e=>e()))}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function f(e){return s(l,e)}function d(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then((()=>{if(e.length)return d(e,t)}))}f.preloadAll=()=>new Promise(((e,t)=>{d(o).then(e,t)})),f.preloadReady=e=>(void 0===e&&(e=[]),new Promise((t=>{const n=()=>(u=!0,t());d(a,e).then(n,n)}))),window.__NEXT_PRELOADREADY=f.preloadReady;const p=f},5152:function(e,t,n){e.exports=n(5677)},2703:function(e,t,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){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}}function t(){return e}e.isRequired=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:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6083:function(e,t,n){"use strict";n.d(t,{J:function(){return go},Z:function(){return Eo}});var r=n(7462),i=n(4942);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=n(1413),f=n(7294),d=n(4184),p=n.n(d),h=n(9864);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return f.Children.forEach(e,(function(e){(void 0!==e&&null!==e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(m(e)):(0,h.isFragment)(e)&&e.props?n=n.concat(m(e.props.children,t)):n.push(e))})),n}var v=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))};function g(e){var t=f.useRef();t.current=e;var n=f.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:1,n=T+=1;function r(t){if(0===t)I(n),e();else{var i=O((function(){r(t-1)}));P.set(n,i)}}return r(t),n};A.cancel=function(e){var t=P.get(e);return I(t),M(t)};var z=A,N={},R=[];function D(e,t){}function L(e,t){}function F(e,t,n){t||N[n]||(e(!1,n),N[n]=!0)}function j(e,t){F(D,e,t)}j.preMessage=function(e){R.push(e)},j.resetWarned=function(){N={}},j.noteOnce=function(e,t){F(L,e,t)};var V=j;function Z(e,t){"function"===typeof e?e(t):"object"===(0,l.Z)(e)&&e&&"current"in e&&(e.current=t)}function H(){for(var e=arguments.length,t=new Array(e),n=0;n0},e.prototype.connect_=function(){q&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),G?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){q&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;X.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),J=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),fe="undefined"!==typeof WeakMap?new WeakMap:new K,de=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Q.getInstance(),r=new ce(t,n,this);fe.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){de.prototype[e]=function(){var t;return(t=fe.get(this))[e].apply(t,arguments)}}));var pe="undefined"!==typeof Y.ResizeObserver?Y.ResizeObserver:de,he=new Map;var me=new pe((function(e){e.forEach((function(e){var t,n=e.target;null===(t=he.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ge=n(3997);function ye(e,t){for(var n=0;n=Ne.F1&&t<=Ne.F12)return!1;switch(t){case Ne.ALT:case Ne.CAPS_LOCK:case Ne.CONTEXT_MENU:case Ne.CTRL:case Ne.DOWN:case Ne.END:case Ne.ESC:case Ne.HOME:case Ne.INSERT:case Ne.LEFT:case Ne.MAC_FF_META:case Ne.META:case Ne.NUMLOCK:case Ne.NUM_CENTER:case Ne.PAGE_DOWN:case Ne.PAGE_UP:case Ne.PAUSE:case Ne.PRINT_SCREEN:case Ne.RIGHT:case Ne.SHIFT:case Ne.UP:case Ne.WIN_KEY:case Ne.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ne.ZERO&&e<=Ne.NINE)return!0;if(e>=Ne.NUM_ZERO&&e<=Ne.NUM_MULTIPLY)return!0;if(e>=Ne.A&&e<=Ne.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Ne.SPACE:case Ne.QUESTION_MARK:case Ne.NUM_PLUS:case Ne.NUM_MINUS:case Ne.NUM_PERIOD:case Ne.NUM_DIVISION:case Ne.SEMICOLON:case Ne.DASH:case Ne.EQUALS:case Ne.COMMA:case Ne.PERIOD:case Ne.SLASH:case Ne.APOSTROPHE:case Ne.SINGLE_QUOTE:case Ne.OPEN_SQUARE_BRACKET:case Ne.BACKSLASH:case Ne.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Re=Ne;function De(e,t){var n,r=e.prefixCls,o=e.id,a=e.active,u=e.tab,l=u.key,s=u.tab,c=u.disabled,d=u.closeIcon,h=e.closable,m=e.renderWrapper,v=e.removeAriaLabel,g=e.editable,y=e.onClick,b=e.onRemove,w=e.onFocus,x=e.style,E="".concat(r,"-tab");f.useEffect((function(){return b}),[]);var k=g&&!1!==h&&!c;function S(e){c||y(e)}var C=f.createElement("div",{key:l,ref:t,className:p()(E,(n={},(0,i.Z)(n,"".concat(E,"-with-remove"),k),(0,i.Z)(n,"".concat(E,"-active"),a),(0,i.Z)(n,"".concat(E,"-disabled"),c),n)),style:x,onClick:S},f.createElement("div",{role:"tab","aria-selected":a,id:o&&"".concat(o,"-tab-").concat(l),className:"".concat(E,"-btn"),"aria-controls":o&&"".concat(o,"-panel-").concat(l),"aria-disabled":c,tabIndex:c?null:0,onClick:function(e){e.stopPropagation(),S(e)},onKeyDown:function(e){[Re.SPACE,Re.ENTER].includes(e.which)&&(e.preventDefault(),S(e))},onFocus:w},s),k&&f.createElement("button",{type:"button","aria-label":v||"remove",tabIndex:0,className:"".concat(E,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),g.onEdit("remove",{key:l,event:t})}},d||g.removeIcon||"\xd7"));return m?m(C):C}var Le=f.forwardRef(De),Fe={width:0,height:0,left:0,top:0};var je={width:0,height:0,left:0,top:0,right:0};var Ve=n(6774),Ze=n.n(Ve),He=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Be=void 0;function Ue(e,t){var n=e.prefixCls,i=e.invalidate,o=e.item,a=e.renderItem,u=e.responsive,l=e.responsiveDisabled,d=e.registerSize,h=e.itemKey,m=e.className,v=e.style,g=e.children,y=e.display,b=e.order,w=e.component,x=void 0===w?"div":w,E=s(e,He),k=u&&!y;function S(e){d(h,e)}f.useEffect((function(){return function(){S(null)}}),[]);var C,_=a&&o!==Be?a(o):g;i||(C={opacity:k?0:1,height:k?0:Be,overflowY:k?"hidden":Be,order:u?b:Be,pointerEvents:k?"none":Be,position:k?"absolute":Be});var O={};k&&(O["aria-hidden"]=!0);var M=f.createElement(x,(0,r.Z)({className:p()(!i&&n,m),style:(0,c.Z)((0,c.Z)({},C),v)},O,E,{ref:t}),_);return u&&(M=f.createElement(Ae,{onResize:function(e){S(e.offsetWidth)},disabled:l},M)),M}var We=f.forwardRef(Ue);We.displayName="Item";var Ke=We;function qe(){var e=f.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)z(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,U.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function Ye(e,t){var n=u(f.useState(t),2),r=n[0],i=n[1];return[r,g((function(t){e((function(){i(t)}))}))]}var $e=f.createContext(null),Xe=["component"],Ge=["className"],Qe=["className"],Je=function(e,t){var n=f.useContext($e);if(!n){var i=e.component,o=void 0===i?"div":i,a=s(e,Xe);return f.createElement(o,(0,r.Z)({},a,{ref:t}))}var u=n.className,l=s(n,Ge),c=e.className,d=s(e,Qe);return f.createElement($e.Provider,{value:null},f.createElement(Ke,(0,r.Z)({ref:t,className:p()(u,c)},l,d)))},et=f.forwardRef(Je);et.displayName="RawItem";var tt=et,nt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],rt="responsive",it="invalidate";function ot(e){return"+ ".concat(e.length," ...")}function at(e,t){var n=e.prefixCls,i=void 0===n?"rc-overflow":n,o=e.data,a=void 0===o?[]:o,l=e.renderItem,d=e.renderRawItem,h=e.itemKey,m=e.itemWidth,v=void 0===m?10:m,g=e.ssr,y=e.style,b=e.className,w=e.maxCount,x=e.renderRest,k=e.renderRawRest,S=e.suffix,C=e.component,_=void 0===C?"div":C,O=e.itemComponent,M=e.onVisibleChange,T=s(e,nt),P="full"===g,I=qe(),A=u(Ye(I,null),2),z=A[0],N=A[1],R=z||0,D=u(Ye(I,new Map),2),L=D[0],F=D[1],j=u(Ye(I,0),2),V=j[0],Z=j[1],H=u(Ye(I,0),2),B=H[0],U=H[1],W=u(Ye(I,0),2),K=W[0],q=W[1],Y=u((0,f.useState)(null),2),$=Y[0],X=Y[1],G=u((0,f.useState)(null),2),Q=G[0],J=G[1],ee=f.useMemo((function(){return null===Q&&P?Number.MAX_SAFE_INTEGER:Q||0}),[Q,z]),te=u((0,f.useState)(!1),2),ne=te[0],re=te[1],ie="".concat(i,"-item"),oe=Math.max(V,B),ae=w===rt,ue=a.length&&ae,le=w===it,se=ue||"number"===typeof w&&a.length>w,ce=(0,f.useMemo)((function(){var e=a;return ue?e=null===z&&P?a:a.slice(0,Math.min(a.length,R/v)):"number"===typeof w&&(e=a.slice(0,w)),e}),[a,v,z,w,ue]),fe=(0,f.useMemo)((function(){return ue?a.slice(ee+1):a.slice(ce.length)}),[a,ce,ue,ee]),de=(0,f.useCallback)((function(e,t){var n;return"function"===typeof h?h(e):null!==(n=h&&(null===e||void 0===e?void 0:e[h]))&&void 0!==n?n:t}),[h]),pe=(0,f.useCallback)(l||function(e){return e},[l]);function he(e,t,n){(Q!==e||void 0!==t&&t!==$)&&(J(e),n||(re(eR){he(r-1,e-i-K+B);break}}S&&ve(0)+K>R&&X(null)}}),[R,L,B,K,de,ce]);var ge=ne&&!!fe.length,ye={};null!==$&&ue&&(ye={position:"absolute",left:$,top:0});var be,we={prefixCls:ie,responsive:ue,component:O,invalidate:le},xe=d?function(e,t){var n=de(e,t);return f.createElement($e.Provider,{key:n,value:(0,c.Z)((0,c.Z)({},we),{},{order:t,item:e,itemKey:n,registerSize:me,display:t<=ee})},d(e,t))}:function(e,t){var n=de(e,t);return f.createElement(Ke,(0,r.Z)({},we,{order:t,key:n,item:e,renderItem:pe,itemKey:n,registerSize:me,display:t<=ee}))},Ee={order:ge?ee:Number.MAX_SAFE_INTEGER,className:"".concat(ie,"-rest"),registerSize:function(e,t){U(t),Z(B)},display:ge};if(k)k&&(be=f.createElement($e.Provider,{value:(0,c.Z)((0,c.Z)({},we),Ee)},k(fe)));else{var ke=x||ot;be=f.createElement(Ke,(0,r.Z)({},we,Ee),"function"===typeof ke?ke(fe):ke)}var Se=f.createElement(_,(0,r.Z)({className:p()(!le&&i,b),style:y,ref:t},T),ce.map(xe),se?be:null,S&&f.createElement(Ke,(0,r.Z)({},we,{responsive:ae,responsiveDisabled:!ue,order:ee,className:"".concat(ie,"-suffix"),registerSize:function(e,t){q(t)},display:!0,style:ye}),S));return ae&&(Se=f.createElement(Ae,{onResize:function(e,t){N(t.clientWidth)},disabled:!ue},Se)),Se}var ut=f.forwardRef(at);ut.displayName="Overflow",ut.Item=tt,ut.RESPONSIVE=rt,ut.INVALIDATE=it;var lt=ut;function st(e,t){var n=(0,c.Z)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var ct=["children","locked"],ft=f.createContext(null);function dt(e){var t=e.children,n=e.locked,r=s(e,ct),i=f.useContext(ft),o=function(e,t,n){var r=f.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value}((function(){return function(e,t){var n=(0,c.Z)({},e);return Object.keys(t).forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)})),n}(i,r)}),[i,r],(function(e,t){return!n&&(e[0]!==t[0]||!Ze()(e[1],t[1]))}));return f.createElement(ft.Provider,{value:o},t)}function pt(e,t,n,r){var i=f.useContext(ft),o=i.activeKey,a=i.onActive,u=i.onInactive,l={active:o===e};return t||(l.onMouseEnter=function(t){null===n||void 0===n||n({key:e,domEvent:t}),a(e)},l.onMouseLeave=function(t){null===r||void 0===r||r({key:e,domEvent:t}),u(e)}),l}var ht=["item"];function mt(e){var t=e.item,n=s(e,ht);return Object.defineProperty(n,"item",{get:function(){return V(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}function vt(e){var t=e.icon,n=e.props,r=e.children;return("function"===typeof t?f.createElement(t,(0,c.Z)({},n)):t)||r||null}function gt(e){var t=f.useContext(ft),n=t.mode,r=t.rtl,i=t.inlineIndent;if("inline"!==n)return null;return r?{paddingRight:e*i}:{paddingLeft:e*i}}var yt=[],bt=f.createContext(null);function wt(){return f.useContext(bt)}var xt=f.createContext(yt);function Et(e){var t=f.useContext(xt);return f.useMemo((function(){return void 0!==e?[].concat(_(t),[e]):t}),[t,e])}var kt=f.createContext(null),St=f.createContext(null);function Ct(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function _t(e){return Ct(f.useContext(St),e)}var Ot=f.createContext({}),Mt=["title","attribute","elementRef"],Tt=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Pt=["active"],It=function(e){xe(n,e);var t=Ce(n);function n(){return ve(this,n),t.apply(this,arguments)}return be(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.attribute,i=e.elementRef,o=st(s(e,Mt),["eventKey"]);return V(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),f.createElement(lt.Item,(0,r.Z)({},n,{title:"string"===typeof t?t:void 0},o,{ref:i}))}}]),n}(f.Component),At=function(e){var t,n=e.style,o=e.className,a=e.eventKey,u=(e.warnKey,e.disabled),l=e.itemIcon,d=e.children,h=e.role,m=e.onMouseEnter,v=e.onMouseLeave,g=e.onClick,y=e.onKeyDown,b=e.onFocus,w=s(e,Tt),x=_t(a),E=f.useContext(ft),k=E.prefixCls,S=E.onItemClick,C=E.disabled,O=E.overflowDisabled,M=E.itemIcon,T=E.selectedKeys,P=E.onActive,I=f.useContext(Ot)._internalRenderMenuItem,A="".concat(k,"-item"),z=f.useRef(),N=f.useRef(),R=C||u,D=Et(a);var L=function(e){return{key:a,keyPath:_(D).reverse(),item:z.current,domEvent:e}},F=l||M,j=pt(a,R,m,v),V=j.active,Z=s(j,Pt),H=T.includes(a),B=gt(D.length),U={};"option"===e.role&&(U["aria-selected"]=H);var W=f.createElement(It,(0,r.Z)({ref:z,elementRef:N,role:null===h?"none":h||"menuitem",tabIndex:u?null:-1,"data-menu-id":O&&x?null:x},w,Z,U,{component:"li","aria-disabled":u,style:(0,c.Z)((0,c.Z)({},B),n),className:p()(A,(t={},(0,i.Z)(t,"".concat(A,"-active"),V),(0,i.Z)(t,"".concat(A,"-selected"),H),(0,i.Z)(t,"".concat(A,"-disabled"),R),t),o),onClick:function(e){if(!R){var t=L(e);null===g||void 0===g||g(mt(t)),S(t)}},onKeyDown:function(e){if(null===y||void 0===y||y(e),e.which===Re.ENTER){var t=L(e);null===g||void 0===g||g(mt(t)),S(t)}},onFocus:function(e){P(a),null===b||void 0===b||b(e)}}),d,f.createElement(vt,{props:(0,c.Z)((0,c.Z)({},e),{},{isSelected:H}),icon:F}));return I&&(W=I(W,e,{selected:H})),W};var zt=function(e){var t=e.eventKey,n=wt(),r=Et(t);return f.useEffect((function(){if(n)return n.registerPath(t,r),function(){n.unregisterPath(t,r)}}),[r]),n?null:f.createElement(At,e)},Nt=["label","children","key","type"];function Rt(e,t){return m(e).map((function(e,n){if(f.isValidElement(e)){var r,i,o=e.key,a=null!==(r=null===(i=e.props)||void 0===i?void 0:i.eventKey)&&void 0!==r?r:o;(null===a||void 0===a)&&(a="tmp_key-".concat([].concat(_(t),[n]).join("-")));var u={key:a,eventKey:a};return f.cloneElement(e,u)}return e}))}function Dt(e){return(e||[]).map((function(e,t){if(e&&"object"===(0,l.Z)(e)){var n=e.label,i=e.children,o=e.key,a=e.type,u=s(e,Nt),c=null!==o&&void 0!==o?o:"tmp-".concat(t);return i||"group"===a?"group"===a?f.createElement(qi,(0,r.Z)({key:c},u,{title:n}),Dt(i)):f.createElement(wi,(0,r.Z)({key:c},u,{title:n}),Dt(i)):"divider"===a?f.createElement(Yi,(0,r.Z)({key:c},u)):f.createElement(zt,(0,r.Z)({key:c},u),n)}return null})).filter((function(e){return e}))}function Lt(e,t,n){var r=e;return t&&(r=Dt(t)),Rt(r,n)}function Ft(e){var t=f.useRef(e);t.current=e;var n=f.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var o=z((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)}));e.current=o},t]}(),l=u(a,2),s=l[0],c=l[1];var d=t?xn:wn;return bn((function(){if(i!==en&&i!==on){var e=d.indexOf(i),t=d[e+1],r=n(i);false===r?o(t,!0):t&&s((function(e){function n(){e.isCanceled()||o(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,i]),f.useEffect((function(){return function(){c()}}),[]),[function(){o(tn,!0)},i]};function Sn(e,t,n,r){var o=r.motionEnter,a=void 0===o||o,l=r.motionAppear,s=void 0===l||l,d=r.motionLeave,p=void 0===d||d,h=r.motionDeadline,m=r.motionLeaveImmediately,v=r.onAppearPrepare,g=r.onEnterPrepare,y=r.onLeavePrepare,b=r.onAppearStart,w=r.onEnterStart,x=r.onLeaveStart,E=r.onAppearActive,S=r.onEnterActive,C=r.onLeaveActive,_=r.onAppearEnd,O=r.onEnterEnd,M=r.onLeaveEnd,T=r.onVisibleChanged,P=u(k(),2),I=P[0],A=P[1],z=u(k(Xt),2),N=z[0],R=z[1],D=u(k(null),2),L=D[0],F=D[1],j=(0,f.useRef)(!1),V=(0,f.useRef)(null);function Z(){return n()}var H=(0,f.useRef)(!1);function B(){R(Xt,!0),F(null,!0)}function U(e){var t=Z();if(!e||e.deadline||e.target===t){var n,r=H.current;N===Gt&&r?n=null===_||void 0===_?void 0:_(t,e):N===Qt&&r?n=null===O||void 0===O?void 0:O(t,e):N===Jt&&r&&(n=null===M||void 0===M?void 0:M(t,e)),N!==Xt&&r&&!1!==n&&B()}}var W=function(e){var t=(0,f.useRef)(),n=(0,f.useRef)(e);n.current=e;var r=f.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(gn,r),e.removeEventListener(vn,r))}return f.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(gn,r),e.addEventListener(vn,r),t.current=e)},i]}(U),K=u(W,1)[0],q=function(e){var t,n,r;switch(e){case Gt:return t={},(0,i.Z)(t,tn,v),(0,i.Z)(t,nn,b),(0,i.Z)(t,rn,E),t;case Qt:return n={},(0,i.Z)(n,tn,g),(0,i.Z)(n,nn,w),(0,i.Z)(n,rn,S),n;case Jt:return r={},(0,i.Z)(r,tn,y),(0,i.Z)(r,nn,x),(0,i.Z)(r,rn,C),r;default:return{}}},Y=f.useMemo((function(){return q(N)}),[N]),$=u(kn(N,!e,(function(e){if(e===tn){var t=Y.prepare;return!!t&&t(Z())}var n;G in Y&&F((null===(n=Y[G])||void 0===n?void 0:n.call(Y,Z(),null))||null);return G===rn&&(K(Z()),h>0&&(clearTimeout(V.current),V.current=setTimeout((function(){U({deadline:!0})}),h))),G===an&&B(),true})),2),X=$[0],G=$[1],Q=En(G);H.current=Q,bn((function(){A(t);var n,r=j.current;j.current=!0,!r&&t&&s&&(n=Gt),r&&t&&a&&(n=Qt),(r&&!t&&p||!r&&m&&!t&&p)&&(n=Jt);var i=q(n);n&&(e||i.prepare)?(R(n),X()):R(Xt)}),[t]),(0,f.useEffect)((function(){(N===Gt&&!s||N===Qt&&!a||N===Jt&&!p)&&R(Xt)}),[s,a,p]),(0,f.useEffect)((function(){return function(){j.current=!1,clearTimeout(V.current)}}),[]);var J=f.useRef(!1);(0,f.useEffect)((function(){I&&(J.current=!0),void 0!==I&&N===Xt&&((J.current||I)&&(null===T||void 0===T||T(I)),J.current=!0)}),[I,N]);var ee=L;return Y.prepare&&G===nn&&(ee=(0,c.Z)({transition:"none"},ee)),[N,G,ee,null!==I&&void 0!==I?I:t]}var Cn=function(e){var t=e;"object"===(0,l.Z)(e)&&(t=e.transitionSupport);var n=f.forwardRef((function(e,n){var r=e.visible,o=void 0===r||r,a=e.removeOnLeave,l=void 0===a||a,s=e.forceRender,d=e.children,h=e.motionName,m=e.leavedClassName,v=e.eventProps,g=function(e,n){return!(!e.motionName||!t||!1===n)}(e,f.useContext(qt).motion),y=(0,f.useRef)(),b=(0,f.useRef)();var w=u(Sn(g,o,(function(){try{return y.current instanceof HTMLElement?y.current:W(b.current)}catch(e){return null}}),e),4),x=w[0],E=w[1],k=w[2],S=w[3],C=f.useRef(S);S&&(C.current=!0);var _,O=f.useCallback((function(e){y.current=e,Z(n,e)}),[n]),M=(0,c.Z)((0,c.Z)({},v),{},{visible:o});if(d)if(x===Xt)_=S?d((0,c.Z)({},M),O):!l&&C.current&&m?d((0,c.Z)((0,c.Z)({},M),{},{className:m}),O):s||!l&&!m?d((0,c.Z)((0,c.Z)({},M),{},{style:{display:"none"}}),O):null;else{var T,P;E===tn?P="prepare":En(E)?P="active":E===nn&&(P="start");var I=yn(h,"".concat(x,"-").concat(P));_=d((0,c.Z)((0,c.Z)({},M),{},{className:p()(yn(h,x),(T={},(0,i.Z)(T,I,I&&P),(0,i.Z)(T,h,"string"===typeof h),T)),style:k}),O)}else _=null;f.isValidElement(_)&&B(_)&&(_.ref||(_=f.cloneElement(_,{ref:O})));return f.createElement($t,{ref:b},_)}));return n.displayName="CSSMotion",n}(mn),_n="add",On="keep",Mn="remove",Tn="removed";function Pn(e){var t;return t=e&&"object"===(0,l.Z)(e)&&"key"in e?e:{key:e},(0,c.Z)((0,c.Z)({},t),{},{key:String(t.key)})}function In(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pn)}function An(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,o=In(e),a=In(t);o.forEach((function(e){for(var t=!1,o=r;o1}));return l.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==Mn}))).forEach((function(t){t.key===e&&(t.status=On)}))})),n}var zn=["component","children","onVisibleChanged","onAllRemoved"],Nn=["status"],Rn=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cn,n=function(e){xe(o,e);var n=Ce(o);function o(){var e;ve(this,o);for(var t=arguments.length,r=new Array(t),a=0;a=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Mr(e){var t,n,r;if(kr.isWindow(e)||9===e.nodeType){var i=kr.getWindow(e);t={left:kr.getWindowScrollLeft(i),top:kr.getWindowScrollTop(i)},n=kr.viewportWidth(i),r=kr.viewportHeight(i)}else t=kr.offset(e),n=kr.outerWidth(e),r=kr.outerHeight(e);return t.width=n,t.height=r,t}function Tr(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,a=e.left,u=e.top;return"c"===n?u+=o/2:"b"===n&&(u+=o),"c"===r?a+=i/2:"r"===r&&(a+=i),{left:a,top:u}}function Pr(e,t,n,r,i){var o=Tr(t,n[1]),a=Tr(e,n[0]),u=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-u[0]+r[0]-i[0]),top:Math.round(e.top-u[1]+r[1]-i[1])}}function Ir(e,t,n){return e.leftn.right}function Ar(e,t,n){return e.topn.bottom}function zr(e,t,n){var r=[];return kr.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Nr(e,t){return e[t]=-e[t],e}function Rr(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Dr(e,t){e[0]=Rr(e[0],t.width),e[1]=Rr(e[1],t.height)}function Lr(e,t,n,r){var i=n.points,o=n.offset||[0,0],a=n.targetOffset||[0,0],u=n.overflow,l=n.source||e;o=[].concat(o),a=[].concat(a);var s={},c=0,f=Or(l,!(!(u=u||{})||!u.alwaysByViewport)),d=Mr(l);Dr(o,d),Dr(a,t);var p=Pr(d,t,i,o,a),h=kr.merge(d,p);if(f&&(u.adjustX||u.adjustY)&&r){if(u.adjustX&&Ir(p,d,f)){var m=zr(i,/[lr]/gi,{l:"r",r:"l"}),v=Nr(o,0),g=Nr(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),kr.mix(i,o)}(p,d,f,s))}return h.width!==d.width&&kr.css(l,"width",kr.width(l)+h.width-d.width),h.height!==d.height&&kr.css(l,"height",kr.height(l)+h.height-d.height),kr.offset(l,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:s}}function Fr(e,t,n){var r=n.target||t,i=Mr(r),o=!function(e,t){var n=Or(e,t),r=Mr(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return Lr(e,i,n,o)}Fr.__getOffsetParent=Cr,Fr.__getVisibleRectForElement=Or;var jr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;function i(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(e);if(V(!a,"Warning: There may be circular references"),a)return!1;if(e===t)return!0;if(n&&o>1)return!1;r.add(e);var u=o+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var s=0;s=0&&r<=u+s&&i>=0&&i<=l+c,p=[n.points[0],"cc"];return Lr(e,f,Zn(Zn({},n),{},{points:p}),d)}(o,l,r)),function(e,t){e!==document.activeElement&&Bt(t,e)&&"function"===typeof e.focus&&e.focus()}(s,o),i&&a&&i(o,a),!0}return!1}),c),g=u(v,2),y=g[0],b=g[1],w=u(f.useState(),2),x=w[0],k=w[1],S=u(f.useState(),2),C=S[0],_=S[1];return E((function(){k(Hr(i)),_(Br(i))})),f.useEffect((function(){var e,t;d.current.element===x&&((e=d.current.point)===(t=C)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&jr(d.current.align,o)||y()})),f.useEffect((function(){return Zr(p.current,y)}),[p.current]),f.useEffect((function(){return Zr(x,y)}),[x]),f.useEffect((function(){r?b():y()}),[r]),f.useEffect((function(){if(l)return Ut(window,"resize",y).remove}),[l]),f.useEffect((function(){return function(){b()}}),[]),f.useImperativeHandle(t,(function(){return{forceAlign:function(){return y(!0)}}})),f.isValidElement(h)&&(h=f.cloneElement(h,{ref:H(h.ref,p)})),h},Wr=f.forwardRef(Ur);Wr.displayName="Align";var Kr=Wr;function qr(){qr=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(T){s=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),u=new _(i||[]);return r(a,"_invoke",{value:E(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var d={};function p(){}function h(){}function m(){}var v={};s(v,o,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==t&&n.call(y,o)&&(v=y);var b=m.prototype=p.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(r,o,a,u){var s=f(e[r],e,o);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==(0,l.Z)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(s.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return M()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=f(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Yr(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(s){return void n(s)}u.done?t(l):Promise.resolve(l).then(r,i)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Yr(o,r,i,a,u,"next",e)}function u(e){Yr(o,r,i,a,u,"throw",e)}a(void 0)}))}}var Xr=["measure","alignPre","align",null,"motion"],Gr=f.forwardRef((function(e,t){var n=e.visible,i=e.prefixCls,o=e.className,a=e.style,l=e.children,s=e.zIndex,d=e.stretch,h=e.destroyPopupOnHide,m=e.forceRender,v=e.align,g=e.point,y=e.getRootDomNode,b=e.getClassNameFromAlign,w=e.onAlign,x=e.onMouseEnter,S=e.onMouseLeave,C=e.onMouseDown,_=e.onTouchStart,O=e.onClick,M=(0,f.useRef)(),T=(0,f.useRef)(),P=u((0,f.useState)(),2),I=P[0],A=P[1],N=function(e){var t=u(f.useState({width:0,height:0}),2),n=t[0],r=t[1];return[f.useMemo((function(){var t={};if(e){var r=n.width,i=n.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&r?t.width=r:-1!==e.indexOf("minWidth")&&r&&(t.minWidth=r)}return t}),[e,n]),function(e){var t=e.offsetWidth,n=e.offsetHeight,i=e.getBoundingClientRect(),o=i.width,a=i.height;Math.abs(t-o)<1&&Math.abs(n-a)<1&&(t=o,n=a),r({width:t,height:n})}]}(d),R=u(N,2),D=R[0],L=R[1];var F=function(e,t){var n=u(k(null),2),r=n[0],i=n[1],o=(0,f.useRef)();function a(e){i(e,!0)}function l(){z.cancel(o.current)}return(0,f.useEffect)((function(){a("measure")}),[e]),(0,f.useEffect)((function(){"measure"===r&&t(),r&&(o.current=z($r(qr().mark((function e(){var t,n;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Xr.indexOf(r),(n=Xr[t+1])&&-1!==t&&a(n);case 3:case"end":return e.stop()}}),e)})))))}),[r]),(0,f.useEffect)((function(){return function(){l()}}),[]),[r,function(e){l(),o.current=z((function(){a((function(e){switch(r){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(n,(function(){d&&L(y())})),j=u(F,2),V=j[0],Z=j[1],H=u((0,f.useState)(0),2),B=H[0],U=H[1],W=(0,f.useRef)();function K(){var e;null===(e=M.current)||void 0===e||e.forceAlign()}function q(e,t){var n=b(t);I!==n&&A(n),U((function(e){return e+1})),"align"===V&&(null===w||void 0===w||w(e,t))}E((function(){"alignPre"===V&&U(0)}),[V]),E((function(){"align"===V&&(B<3?K():Z((function(){var e;null===(e=W.current)||void 0===e||e.call(W)})))}),[B]);var Y=(0,c.Z)({},Fn(e));function $(){return new Promise((function(e){W.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=Y[e];Y[e]=function(e,n){return Z(),null===t||void 0===t?void 0:t(e,n)}})),f.useEffect((function(){Y.motionName||"motion"!==V||Z()}),[Y.motionName,V]),f.useImperativeHandle(t,(function(){return{forceAlign:K,getElement:function(){return T.current}}}));var X=(0,c.Z)((0,c.Z)({},D),{},{zIndex:s,opacity:"motion"!==V&&"stable"!==V&&n?0:void 0,pointerEvents:n||"stable"===V?void 0:"none"},a),G=!0;null===v||void 0===v||!v.points||"align"!==V&&"stable"!==V||(G=!1);var Q=l;return f.Children.count(l)>1&&(Q=f.createElement("div",{className:"".concat(i,"-content")},l)),f.createElement(Ln,(0,r.Z)({visible:n,ref:T,leavedClassName:"".concat(i,"-hidden")},Y,{onAppearPrepare:$,onEnterPrepare:$,removeOnLeave:h,forceRender:m}),(function(e,t){var n=e.className,r=e.style,a=p()(i,o,I,n);return f.createElement(Kr,{target:g||y,key:"popup",ref:M,monitorWindowResize:!0,disabled:G,align:v,onAlign:q},f.createElement("div",{ref:t,className:a,onMouseEnter:x,onMouseLeave:S,onMouseDownCapture:C,onTouchStartCapture:_,onClick:O,style:(0,c.Z)((0,c.Z)({},r),X)},Q))}))}));Gr.displayName="PopupInner";var Qr=Gr,Jr=f.forwardRef((function(e,t){var n=e.prefixCls,i=e.visible,o=e.zIndex,a=e.children,u=e.mobile,l=(u=void 0===u?{}:u).popupClassName,s=u.popupStyle,d=u.popupMotion,h=void 0===d?{}:d,m=u.popupRender,v=e.onClick,g=f.useRef();f.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return g.current}}}));var y=(0,c.Z)({zIndex:o},s),b=a;return f.Children.count(a)>1&&(b=f.createElement("div",{className:"".concat(n,"-content")},a)),m&&(b=m(b)),f.createElement(Ln,(0,r.Z)({visible:i,ref:g,removeOnLeave:!0},h),(function(e,t){var r=e.className,i=e.style,o=p()(n,l,r);return f.createElement("div",{ref:t,className:o,onClick:v,style:(0,c.Z)((0,c.Z)({},i),y)},b)}))}));Jr.displayName="MobilePopupInner";var ei=Jr,ti=["visible","mobile"],ni=f.forwardRef((function(e,t){var n=e.visible,i=e.mobile,o=s(e,ti),a=u((0,f.useState)(n),2),l=a[0],d=a[1],p=u((0,f.useState)(!1),2),h=p[0],m=p[1],g=(0,c.Z)((0,c.Z)({},o),{},{visible:l});(0,f.useEffect)((function(){d(n),n&&i&&m(v())}),[n,i]);var y=h?f.createElement(ei,(0,r.Z)({},g,{mobile:i,ref:t})):f.createElement(Qr,(0,r.Z)({},g,{ref:t}));return f.createElement("div",null,f.createElement(jn,g),y)}));ni.displayName="Popup";var ri=ni,ii=f.createContext(null);function oi(){}function ai(){return""}function ui(e){return e?e.ownerDocument:window.document}var li=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var si=function(e){var t=function(t){xe(o,t);var n=Ce(o);function o(e){var t,a;return ve(this,o),t=n.call(this,e),(0,i.Z)(ke(t),"popupRef",f.createRef()),(0,i.Z)(ke(t),"triggerRef",f.createRef()),(0,i.Z)(ke(t),"portalContainer",void 0),(0,i.Z)(ke(t),"attachId",void 0),(0,i.Z)(ke(t),"clickOutsideHandler",void 0),(0,i.Z)(ke(t),"touchOutsideHandler",void 0),(0,i.Z)(ke(t),"contextMenuOutsideHandler1",void 0),(0,i.Z)(ke(t),"contextMenuOutsideHandler2",void 0),(0,i.Z)(ke(t),"mouseDownTimeout",void 0),(0,i.Z)(ke(t),"focusTime",void 0),(0,i.Z)(ke(t),"preClickTime",void 0),(0,i.Z)(ke(t),"preTouchTime",void 0),(0,i.Z)(ke(t),"delayTimer",void 0),(0,i.Z)(ke(t),"hasPopupMouseDown",void 0),(0,i.Z)(ke(t),"onMouseEnter",(function(e){var n=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,n,n?null:e)})),(0,i.Z)(ke(t),"onMouseMove",(function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)})),(0,i.Z)(ke(t),"onMouseLeave",(function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),(0,i.Z)(ke(t),"onPopupMouseEnter",(function(){t.clearDelayTimer()})),(0,i.Z)(ke(t),"onPopupMouseLeave",(function(e){var n;e.relatedTarget&&!e.relatedTarget.setTimeout&&Bt(null===(n=t.popupRef.current)||void 0===n?void 0:n.getElement(),e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),(0,i.Z)(ke(t),"onFocus",(function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))})),(0,i.Z)(ke(t),"onMouseDown",(function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()})),(0,i.Z)(ke(t),"onTouchStart",(function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()})),(0,i.Z)(ke(t),"onBlur",(function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)})),(0,i.Z)(ke(t),"onContextMenu",(function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)})),(0,i.Z)(ke(t),"onContextMenuClose",(function(){t.isContextMenuToShow()&&t.close()})),(0,i.Z)(ke(t),"onClick",(function(e){if(t.fireEvents("onClick",e),t.focusTime){var n;if(t.preClickTime&&t.preTouchTime?n=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?n=t.preClickTime:t.preTouchTime&&(n=t.preTouchTime),Math.abs(n-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!t.state.popupVisible;(t.isClickToHide()&&!r||r&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)})),(0,i.Z)(ke(t),"onPopupMouseDown",(function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)})),(0,i.Z)(ke(t),"onDocumentClick",(function(e){if(!t.props.mask||t.props.maskClosable){var n=e.target,r=t.getRootDomNode(),i=t.getPopupDomNode();Bt(r,n)&&!t.isContextMenuOnly()||Bt(i,n)||t.hasPopupMouseDown||t.close()}})),(0,i.Z)(ke(t),"getRootDomNode",(function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var n=W(t.triggerRef.current);if(n)return n}catch(r){}return U.findDOMNode(ke(t))})),(0,i.Z)(ke(t),"getPopupClassNameFromAlign",(function(e){var n=[],r=t.props,i=r.popupPlacement,o=r.builtinPlacements,a=r.prefixCls,u=r.alignPoint,l=r.getPopupClassNameFromAlign;return i&&o&&n.push(function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a1&&(x.motionAppear=!1);var E=x.onVisibleChanged;return x.onVisibleChanged=function(e){return v.current||e||b(!0),null===E||void 0===E?void 0:E(e)},y?null:f.createElement(dt,{mode:a,locked:!v.current},f.createElement(Ln,(0,r.Z)({visible:w},x,{forceRender:d,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),(function(e){var n=e.className,r=e.style;return f.createElement(Ht,{id:t,className:n,style:r},o)})))}var gi=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],yi=["active"],bi=function(e){var t,n=e.style,o=e.className,a=e.title,l=e.eventKey,d=(e.warnKey,e.disabled),h=e.internalPopupClose,m=e.children,v=e.itemIcon,g=e.expandIcon,y=e.popupClassName,b=e.popupOffset,w=e.onClick,x=e.onMouseEnter,E=e.onMouseLeave,k=e.onTitleClick,S=e.onTitleMouseEnter,C=e.onTitleMouseLeave,_=s(e,gi),O=_t(l),M=f.useContext(ft),T=M.prefixCls,P=M.mode,I=M.openKeys,A=M.disabled,z=M.overflowDisabled,N=M.activeKey,R=M.selectedKeys,D=M.itemIcon,L=M.expandIcon,F=M.onItemClick,j=M.onOpenChange,V=M.onActive,Z=f.useContext(Ot)._internalRenderSubMenuItem,H=f.useContext(kt).isSubPathKey,B=Et(),U="".concat(T,"-submenu"),W=A||d,K=f.useRef(),q=f.useRef();var Y=v||D,$=g||L,X=I.includes(l),G=!z&&X,Q=H(R,l),J=pt(l,W,S,C),ee=J.active,te=s(J,yi),ne=u(f.useState(!1),2),re=ne[0],ie=ne[1],oe=function(e){W||ie(e)},ae=f.useMemo((function(){return ee||"inline"!==P&&(re||H([N],l))}),[P,ee,N,re,l,H]),ue=gt(B.length),le=Ft((function(e){null===w||void 0===w||w(mt(e)),F(e)})),se=O&&"".concat(O,"-popup"),ce=f.createElement("div",(0,r.Z)({role:"menuitem",style:ue,className:"".concat(U,"-title"),tabIndex:W?null:-1,ref:K,title:"string"===typeof a?a:null,"data-menu-id":z&&O?null:O,"aria-expanded":G,"aria-haspopup":!0,"aria-controls":se,"aria-disabled":W,onClick:function(e){W||(null===k||void 0===k||k({key:l,domEvent:e}),"inline"===P&&j(l,!X))},onFocus:function(){V(l)}},te),a,f.createElement(vt,{icon:"horizontal"!==P?$:null,props:(0,c.Z)((0,c.Z)({},e),{},{isOpen:G,isSubMenu:!0})},f.createElement("i",{className:"".concat(U,"-arrow")}))),fe=f.useRef(P);if("inline"!==P&&(fe.current=B.length>1?"vertical":P),!z){var de=fe.current;ce=f.createElement(mi,{mode:de,prefixCls:U,visible:!h&&G&&"inline"!==P,popupClassName:y,popupOffset:b,popup:f.createElement(dt,{mode:"horizontal"===de?"vertical":de},f.createElement(Ht,{id:se,ref:q},m)),disabled:W,onVisibleChange:function(e){"inline"!==P&&j(l,e)}},ce)}var pe=f.createElement(lt.Item,(0,r.Z)({role:"none"},_,{component:"li",style:n,className:p()(U,"".concat(U,"-").concat(P),o,(t={},(0,i.Z)(t,"".concat(U,"-open"),G),(0,i.Z)(t,"".concat(U,"-active"),ae),(0,i.Z)(t,"".concat(U,"-selected"),Q),(0,i.Z)(t,"".concat(U,"-disabled"),W),t)),onMouseEnter:function(e){oe(!0),null===x||void 0===x||x({key:l,domEvent:e})},onMouseLeave:function(e){oe(!1),null===E||void 0===E||E({key:l,domEvent:e})}}),ce,!z&&f.createElement(vi,{id:se,open:G,keyPath:B},m));return Z&&(pe=Z(pe,e,{selected:Q,active:ae,open:G,disabled:W})),f.createElement(dt,{onItemClick:le,mode:"horizontal"===P?"vertical":P,itemIcon:Y,expandIcon:$},pe)};function wi(e){var t,n=e.eventKey,r=e.children,i=Et(n),o=Rt(r,i),a=wt();return f.useEffect((function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}}),[i]),t=a?o:f.createElement(bi,e,o),f.createElement(xt.Provider,{value:i},t)}function xi(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Vr(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}function Ei(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=_(e.querySelectorAll("*")).filter((function(e){return xi(e,t)}));return xi(e,t)&&n.unshift(e),n}var ki=Re.LEFT,Si=Re.RIGHT,Ci=Re.UP,_i=Re.DOWN,Oi=Re.ENTER,Mi=Re.ESC,Ti=Re.HOME,Pi=Re.END,Ii=[Ci,_i,ki,Si];function Ai(e,t){return Ei(e,!0).filter((function(e){return t.has(e)}))}function zi(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=Ai(e,t),o=i.length,a=i.findIndex((function(e){return n===e}));return r<0?-1===a?a=o-1:a-=1:r>0&&(a+=1),i[a=(a+o)%o]}function Ni(e,t,n,r,o,a,u,l,s,c){var d=f.useRef(),p=f.useRef();p.current=t;var h=function(){z.cancel(d.current)};return f.useEffect((function(){return function(){h()}}),[]),function(f){var m=f.which;if([].concat(Ii,[Oi,Mi,Ti,Pi]).includes(m)){var v,g,y,b=function(){return v=new Set,g=new Map,y=new Map,a().forEach((function(e){var t=document.querySelector("[data-menu-id='".concat(Ct(r,e),"']"));t&&(v.add(t),y.set(t,e),g.set(e,t))})),v};b();var w=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(g.get(t),v),x=y.get(w),E=function(e,t,n,r){var o,a,u,l,s="prev",c="next",f="children",d="parent";if("inline"===e&&r===Oi)return{inlineTrigger:!0};var p=(o={},(0,i.Z)(o,Ci,s),(0,i.Z)(o,_i,c),o),h=(a={},(0,i.Z)(a,ki,n?c:s),(0,i.Z)(a,Si,n?s:c),(0,i.Z)(a,_i,f),(0,i.Z)(a,Oi,f),a),m=(u={},(0,i.Z)(u,Ci,s),(0,i.Z)(u,_i,c),(0,i.Z)(u,Oi,f),(0,i.Z)(u,Mi,d),(0,i.Z)(u,ki,n?f:d),(0,i.Z)(u,Si,n?d:f),u);switch(null===(l={inline:p,horizontal:h,vertical:m,inlineSub:p,horizontalSub:m,verticalSub:m}["".concat(e).concat(t?"":"Sub")])||void 0===l?void 0:l[r]){case s:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case f:return{offset:1,sibling:!1};default:return null}}(e,1===u(x,!0).length,n,m);if(!E&&m!==Ti&&m!==Pi)return;(Ii.includes(m)||[Ti,Pi].includes(m))&&f.preventDefault();var k=function(e){if(e){var t=e,n=e.querySelector("a");(null===n||void 0===n?void 0:n.getAttribute("href"))&&(t=n);var r=y.get(e);l(r),h(),d.current=z((function(){p.current===r&&t.focus()}))}};if([Ti,Pi].includes(m)||E.sibling||!w){var S,C,_=Ai(S=w&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(w):o.current,v);C=m===Ti?_[0]:m===Pi?_[_.length-1]:zi(S,v,w,E.offset),k(C)}else if(E.inlineTrigger)s(x);else if(E.offset>0)s(x,!0),h(),d.current=z((function(){b();var e=w.getAttribute("aria-controls"),t=zi(document.getElementById(e),v);k(t)}),5);else if(E.offset<0){var O=u(x,!0),M=O[O.length-2],T=g.get(M);s(M,!1),k(T)}}null===c||void 0===c||c(f)}}var Ri=Math.random().toFixed(5).toString().slice(2),Di=0;var Li="__RC_UTIL_PATH_SPLIT__",Fi=function(e){return e.join(Li)},ji="rc-menu-more";function Vi(){var e=u(f.useState({}),2)[1],t=(0,f.useRef)(new Map),n=(0,f.useRef)(new Map),r=u(f.useState([]),2),i=r[0],o=r[1],a=(0,f.useRef)(0),l=(0,f.useRef)(!1),s=(0,f.useCallback)((function(r,i){var o=Fi(i);n.current.set(o,r),t.current.set(r,o),a.current+=1;var u,s=a.current;u=function(){s===a.current&&(l.current||e({}))},Promise.resolve().then(u)}),[]),c=(0,f.useCallback)((function(e,r){var i=Fi(r);n.current.delete(i),t.current.delete(e)}),[]),d=(0,f.useCallback)((function(e){o(e)}),[]),p=(0,f.useCallback)((function(e,n){var r=t.current.get(e)||"",o=r.split(Li);return n&&i.includes(o[0])&&o.unshift(ji),o}),[i]),h=(0,f.useCallback)((function(e,t){return e.some((function(e){return p(e,!0).includes(t)}))}),[p]),m=(0,f.useCallback)((function(e){var r="".concat(t.current.get(e)).concat(Li),i=new Set;return _(n.current.keys()).forEach((function(e){e.startsWith(r)&&i.add(n.current.get(e))})),i}),[]);return f.useEffect((function(){return function(){l.current=!0}}),[]),{registerPath:s,unregisterPath:c,refreshOverflowKeys:d,isSubPathKey:h,getKeyPath:p,getKeys:function(){var e=_(t.current.keys());return i.length&&e.push(ji),e},getSubPathKeys:m}}var Zi=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Hi=[],Bi=f.forwardRef((function(e,t){var n,o,a=e.prefixCls,l=void 0===a?"rc-menu":a,d=e.rootClassName,h=e.style,m=e.className,v=e.tabIndex,g=void 0===v?0:v,y=e.items,b=e.children,w=e.direction,x=e.id,E=e.mode,k=void 0===E?"vertical":E,S=e.inlineCollapsed,O=e.disabled,M=e.disabledOverflow,T=e.subMenuOpenDelay,P=void 0===T?.1:T,I=e.subMenuCloseDelay,A=void 0===I?.1:I,z=e.forceSubMenuRender,N=e.defaultOpenKeys,R=e.openKeys,D=e.activeKey,L=e.defaultActiveFirst,F=e.selectable,j=void 0===F||F,V=e.multiple,Z=void 0!==V&&V,H=e.defaultSelectedKeys,B=e.selectedKeys,U=e.onSelect,W=e.onDeselect,K=e.inlineIndent,q=void 0===K?24:K,Y=e.motion,$=e.defaultMotions,X=e.triggerSubMenuAction,G=void 0===X?"hover":X,Q=e.builtinPlacements,J=e.itemIcon,ee=e.expandIcon,te=e.overflowedIndicator,ne=void 0===te?"...":te,re=e.overflowedIndicatorPopupClassName,ie=e.getPopupContainer,oe=e.onClick,ae=e.onOpenChange,ue=e.onKeyDown,le=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),se=e._internalRenderSubMenuItem,ce=s(e,Zi),fe=f.useMemo((function(){return Lt(b,y,Hi)}),[b,y]),de=u(f.useState(!1),2),pe=de[0],he=de[1],me=f.useRef(),ve=function(e){var t=u(C(e,{value:e}),2),n=t[0],r=t[1];return f.useEffect((function(){Di+=1;var e="".concat(Ri,"-").concat(Di);r("rc-menu-uuid-".concat(e))}),[]),n}(x),ge="rtl"===w;var ye=u(f.useMemo((function(){return"inline"!==k&&"vertical"!==k||!S?[k,!1]:["vertical",S]}),[k,S]),2),be=ye[0],we=ye[1],xe=u(f.useState(0),2),Ee=xe[0],ke=xe[1],Se=Ee>=fe.length-1||"horizontal"!==be||M,Ce=u(C(N,{value:R,postState:function(e){return e||Hi}}),2),_e=Ce[0],Oe=Ce[1],Me=function(e){Oe(e),null===ae||void 0===ae||ae(e)},Te=u(f.useState(_e),2),Pe=Te[0],Ie=Te[1],Ae="inline"===be,ze=f.useRef(!1);f.useEffect((function(){Ae&&Ie(_e)}),[_e]),f.useEffect((function(){ze.current&&(Ae?Oe(Pe):Me(Hi))}),[Ae]),f.useEffect((function(){return ze.current=!0,function(){ze.current=!1}}),[]);var Ne=Vi(),Re=Ne.registerPath,De=Ne.unregisterPath,Le=Ne.refreshOverflowKeys,Fe=Ne.isSubPathKey,je=Ne.getKeyPath,Ve=Ne.getKeys,He=Ne.getSubPathKeys,Be=f.useMemo((function(){return{registerPath:Re,unregisterPath:De}}),[Re,De]),Ue=f.useMemo((function(){return{isSubPathKey:Fe}}),[Fe]);f.useEffect((function(){Le(Se?Hi:fe.slice(Ee+1).map((function(e){return e.key})))}),[Ee,Se]);var We=u(C(D||L&&(null===(n=fe[0])||void 0===n?void 0:n.key),{value:D}),2),Ke=We[0],qe=We[1],Ye=Ft((function(e){qe(e)})),$e=Ft((function(){qe(void 0)}));(0,f.useImperativeHandle)(t,(function(){return{list:me.current,focus:function(e){var t,n,r,i,o=null!==Ke&&void 0!==Ke?Ke:null===(t=fe.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key;o&&(null===(n=me.current)||void 0===n||null===(r=n.querySelector("li[data-menu-id='".concat(Ct(ve,o),"']")))||void 0===r||null===(i=r.focus)||void 0===i||i.call(r,e))}}}));var Xe=u(C(H||[],{value:B,postState:function(e){return Array.isArray(e)?e:null===e||void 0===e?Hi:[e]}}),2),Ge=Xe[0],Qe=Xe[1],Je=Ft((function(e){null===oe||void 0===oe||oe(mt(e)),function(e){if(j){var t,n=e.key,r=Ge.includes(n);t=Z?r?Ge.filter((function(e){return e!==n})):[].concat(_(Ge),[n]):[n],Qe(t);var i=(0,c.Z)((0,c.Z)({},e),{},{selectedKeys:t});r?null===W||void 0===W||W(i):null===U||void 0===U||U(i)}!Z&&_e.length&&"inline"!==be&&Me(Hi)}(e)})),et=Ft((function(e,t){var n=_e.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==be){var r=He(e);n=n.filter((function(e){return!r.has(e)}))}Ze()(_e,n)||Me(n)})),tt=Ft(ie),nt=Ni(be,Ke,ge,ve,me,Ve,je,qe,(function(e,t){var n=null!==t&&void 0!==t?t:!_e.includes(e);et(e,n)}),ue);f.useEffect((function(){he(!0)}),[]);var rt=f.useMemo((function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:se}}),[le,se]),it="horizontal"!==be||M?fe:fe.map((function(e,t){return f.createElement(dt,{key:e.key,overflowDisabled:t>Ee},e)})),ot=f.createElement(lt,(0,r.Z)({id:x,ref:me,prefixCls:"".concat(l,"-overflow"),component:"ul",itemComponent:zt,className:p()(l,"".concat(l,"-root"),"".concat(l,"-").concat(be),m,(o={},(0,i.Z)(o,"".concat(l,"-inline-collapsed"),we),(0,i.Z)(o,"".concat(l,"-rtl"),ge),o),d),dir:w,style:h,role:"menu",tabIndex:g,data:it,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?fe.slice(-t):null;return f.createElement(wi,{eventKey:ji,title:ne,disabled:Se,internalPopupClose:0===t,popupClassName:re},n)},maxCount:"horizontal"!==be||M?lt.INVALIDATE:lt.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){ke(e)},onKeyDown:nt},ce));return f.createElement(Ot.Provider,{value:rt},f.createElement(St.Provider,{value:ve},f.createElement(dt,{prefixCls:l,rootClassName:d,mode:be,openKeys:_e,rtl:ge,disabled:O,motion:pe?Y:null,defaultMotions:pe?$:null,activeKey:Ke,onActive:Ye,onInactive:$e,selectedKeys:Ge,inlineIndent:q,subMenuOpenDelay:P,subMenuCloseDelay:A,forceSubMenuRender:z,builtinPlacements:Q,triggerSubMenuAction:G,getPopupContainer:tt,itemIcon:J,expandIcon:ee,onItemClick:Je,onOpenChange:et},f.createElement(kt.Provider,{value:Ue},ot),f.createElement("div",{style:{display:"none"},"aria-hidden":!0},f.createElement(bt.Provider,{value:Be},fe)))))})),Ui=["className","title","eventKey","children"],Wi=["children"],Ki=function(e){var t=e.className,n=e.title,i=(e.eventKey,e.children),o=s(e,Ui),a=f.useContext(ft).prefixCls,u="".concat(a,"-item-group");return f.createElement("li",(0,r.Z)({},o,{onClick:function(e){return e.stopPropagation()},className:p()(u,t)}),f.createElement("div",{className:"".concat(u,"-title"),title:"string"===typeof n?n:void 0},n),f.createElement("ul",{className:"".concat(u,"-list")},i))};function qi(e){var t=e.children,n=s(e,Wi),r=Rt(t,Et(n.eventKey));return wt()?r:f.createElement(Ki,st(n,["warnKey"]),r)}function Yi(e){var t=e.className,n=e.style,r=f.useContext(ft).prefixCls;return wt()?null:f.createElement("li",{className:p()("".concat(r,"-item-divider"),t),style:n})}var $i=Bi;$i.Item=zt,$i.SubMenu=wi,$i.ItemGroup=qi,$i.Divider=Yi;var Xi=$i,Gi={adjustX:1,adjustY:1},Qi=[0,0],Ji={topLeft:{points:["bl","tl"],overflow:Gi,offset:[0,-4],targetOffset:Qi},topCenter:{points:["bc","tc"],overflow:Gi,offset:[0,-4],targetOffset:Qi},topRight:{points:["br","tr"],overflow:Gi,offset:[0,-4],targetOffset:Qi},bottomLeft:{points:["tl","bl"],overflow:Gi,offset:[0,4],targetOffset:Qi},bottomCenter:{points:["tc","bc"],overflow:Gi,offset:[0,4],targetOffset:Qi},bottomRight:{points:["tr","br"],overflow:Gi,offset:[0,4],targetOffset:Qi}},eo=Re.ESC,to=Re.TAB;var no=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function ro(e,t){var n=e.arrow,r=void 0!==n&&n,o=e.prefixCls,a=void 0===o?"rc-dropdown":o,l=e.transitionName,d=e.animation,h=e.align,m=e.placement,v=void 0===m?"bottomLeft":m,g=e.placements,y=void 0===g?Ji:g,b=e.getPopupContainer,w=e.showAction,x=e.hideAction,E=e.overlayClassName,k=e.overlayStyle,S=e.visible,C=e.trigger,_=void 0===C?["hover"]:C,O=e.autoFocus,M=s(e,no),T=u(f.useState(),2),P=T[0],I=T[1],A="visible"in e?S:P,N=f.useRef(null);f.useImperativeHandle(t,(function(){return N.current})),function(e){var t=e.visible,n=e.setTriggerVisible,r=e.triggerRef,i=e.onVisibleChange,o=e.autoFocus,a=f.useRef(!1),u=function(){var e,o,a,u;t&&r.current&&(null===(e=r.current)||void 0===e||null===(o=e.triggerRef)||void 0===o||null===(a=o.current)||void 0===a||null===(u=a.focus)||void 0===u||u.call(a),n(!1),"function"===typeof i&&i(!1))},l=function(){var e,t,n,i,o=Ei(null===(e=r.current)||void 0===e||null===(t=e.popupRef)||void 0===t||null===(n=t.current)||void 0===n||null===(i=n.getElement)||void 0===i?void 0:i.call(n))[0];return!!(null===o||void 0===o?void 0:o.focus)&&(o.focus(),a.current=!0,!0)},s=function(e){switch(e.keyCode){case eo:u();break;case to:var t=!1;a.current||(t=l()),t?e.preventDefault():u()}};f.useEffect((function(){return t?(window.addEventListener("keydown",s),o&&z(l,3),function(){window.removeEventListener("keydown",s),a.current=!1}):function(){a.current=!1}}),[t])}({visible:A,setTriggerVisible:I,triggerRef:N,onVisibleChange:e.onVisibleChange,autoFocus:O});var R=function(){var t=function(){var t=e.overlay;return"function"===typeof t?t():t}();return f.createElement(f.Fragment,null,r&&f.createElement("div",{className:"".concat(a,"-arrow")}),t)},D=x;return D||-1===_.indexOf("contextMenu")||(D=["click"]),f.createElement(si,(0,c.Z)((0,c.Z)({builtinPlacements:y},M),{},{prefixCls:a,ref:N,popupClassName:p()(E,(0,i.Z)({},"".concat(a,"-show-arrow"),r)),popupStyle:k,action:_,showAction:w,hideAction:D||[],popupPlacement:v,popupAlign:h,popupTransitionName:l,popupAnimation:d,popupVisible:A,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"===typeof e.overlay?R:R(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;I(t),"function"===typeof n&&n(t)},onPopupClick:function(t){var n=e.onOverlayClick;I(!1),n&&n(t)},getPopupContainer:b}),function(){var t=e.children,n=t.props?t.props:{},r=p()(n.className,function(){var t=e.openClassName;return void 0!==t?t:"".concat(a,"-open")}());return A&&t?f.cloneElement(t,{className:r}):t}())}var io=f.forwardRef(ro);function oo(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return r&&!1!==r.showAdd?f.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null===i||void 0===i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}var ao=f.forwardRef(oo);function uo(e,t){var n=e.prefixCls,r=e.id,o=e.tabs,a=e.locale,l=e.mobile,s=e.moreIcon,c=void 0===s?"More":s,d=e.moreTransitionName,h=e.style,m=e.className,v=e.editable,g=e.tabBarGutter,y=e.rtl,b=e.removeAriaLabel,w=e.onTabClick,x=e.getPopupContainer,E=e.popupClassName,k=u((0,f.useState)(!1),2),S=k[0],C=k[1],_=u((0,f.useState)(null),2),O=_[0],M=_[1],T="".concat(r,"-more-popup"),P="".concat(n,"-dropdown"),I=null!==O?"".concat(T,"-").concat(O):null,A=null===a||void 0===a?void 0:a.dropdownAriaLabel;var z=f.createElement(Xi,{onClick:function(e){var t=e.key,n=e.domEvent;w(t,n),C(!1)},prefixCls:"".concat(P,"-menu"),id:T,tabIndex:-1,role:"listbox","aria-activedescendant":I,selectedKeys:[O],"aria-label":void 0!==A?A:"expanded dropdown"},o.map((function(e){var t=v&&!1!==e.closable&&!e.disabled;return f.createElement(zt,{key:e.key,id:"".concat(T,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},f.createElement("span",null,e.tab),t&&f.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(P,"-menu-item-remove"),onClick:function(t){var n,r;t.stopPropagation(),n=t,r=e.key,n.preventDefault(),n.stopPropagation(),v.onEdit("remove",{key:r,event:n})}},e.closeIcon||v.removeIcon||"\xd7"))})));function N(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===O}))||0,r=t.length,i=0;it?"left":"right"})})),2),L=D[0],F=D[1],j=u(fo(0,(function(e,t){!R&&C&&C({direction:e>t?"top":"bottom"})})),2),V=j[0],Z=j[1],H=u((0,f.useState)(0),2),B=H[0],U=H[1],W=u((0,f.useState)(0),2),K=W[0],q=W[1],Y=u((0,f.useState)(null),2),$=Y[0],X=Y[1],G=u((0,f.useState)(null),2),Q=G[0],J=G[1],ee=u((0,f.useState)(0),2),te=ee[0],ne=ee[1],re=u((0,f.useState)(0),2),ie=re[0],oe=re[1],ae=function(e){var t=(0,f.useRef)([]),n=u((0,f.useState)({}),2)[1],r=(0,f.useRef)("function"===typeof e?e():e),i=ze((function(){var e=r.current;t.current.forEach((function(t){e=t(e)})),t.current=[],r.current=e,n({})}));return[r.current,function(e){t.current.push(e),i()}]}(new Map),ue=u(ae,2),le=ue[0],se=ue[1],ce=function(e,t,n){return(0,f.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||Fe,o=i.left+i.width,a=0;ape?pe:e}R?g?(de=0,pe=Math.max(0,B-$)):(de=Math.min(0,$-B),pe=0):(de=Math.min(0,Q-K),pe=0);var me=(0,f.useRef)(),ve=u((0,f.useState)(),2),ge=ve[0],ye=ve[1];function be(){ye(Date.now())}function we(){window.clearTimeout(me.current)}function xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=ce.get(e)||{width:0,height:0,left:0,right:0,top:0};if(R){var n=L;g?t.rightL+$&&(n=t.right+t.width-$):t.left<-L?n=-t.left:t.left+t.width>-L+$&&(n=-(t.left+t.width-$)),Z(0),F(he(n))}else{var r=V;t.top<-V?r=-t.top:t.top+t.height>-V+Q&&(r=-(t.top+t.height-Q)),F(0),Z(he(r))}}!function(e,t){var n=u((0,f.useState)(),2),r=n[0],i=n[1],o=u((0,f.useState)(0),2),a=o[0],l=o[1],s=u((0,f.useState)(0),2),c=s[0],d=s[1],p=u((0,f.useState)(),2),h=p[0],m=p[1],v=(0,f.useRef)(),g=(0,f.useRef)(),y=(0,f.useRef)(null);y.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(v.current)},onTouchMove:function(e){if(r){e.preventDefault();var n=e.touches[0],o=n.screenX,u=n.screenY;i({x:o,y:u});var s=o-r.x,c=u-r.y;t(s,c);var f=Date.now();l(f),d(f-a),m({x:s,y:c})}},onTouchEnd:function(){if(r&&(i(null),m(null),h)){var e=h.x/c,n=h.y/c,o=Math.abs(e),a=Math.abs(n);if(Math.max(o,a)<.1)return;var u=e,l=n;v.current=window.setInterval((function(){Math.abs(u)<.01&&Math.abs(l)<.01?window.clearInterval(v.current):t(20*(u*=co),20*(l*=co))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===g.current?n:r:o>a?(i=n,g.current="x"):(i=r,g.current="y"),t(-i,-i)&&e.preventDefault()}},f.useEffect((function(){function t(e){y.current.onTouchMove(e)}function n(e){y.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){y.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){y.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(O,(function(e,t){function n(e,t){e((function(e){return he(e+t)}))}if(R){if($>=B)return!1;n(F,e)}else{if(Q>=K)return!1;n(Z,t)}return we(),be(),!0})),(0,f.useEffect)((function(){return we(),ge&&(me.current=window.setTimeout((function(){ye(0)}),100)),we}),[ge]);var Ee=function(e,t,n,r,i){var o,a,u,l=i.tabs,s=i.tabPosition,c=i.rtl;["top","bottom"].includes(s)?(o="width",a=c?"right":"left",u=Math.abs(t.left)):(o="height",a="top",u=-t.top);var d=t[o],p=n[o],h=r[o],m=d;return p+h>d&&pu+m){n=r-1;break}}for(var s=0,c=t-1;c>=0;c-=1)if((e.get(l[c].key)||je)[a]0,Be=L+${},a=o(),u=Object,l=e=>e===a,s=e=>"function"==typeof e,c=(e,t)=>({...e,...t}),f=new WeakMap;let d=0;const p=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(u(e)!==e||r||n==RegExp)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=f.get(e),i)return i;if(i=++d+"~",f.set(e,i),n==Array){for(i="@",o=0;o{const n=h.get(e);return[()=>!l(t)&&e.get(t)||m,r=>{if(!l(t)){const i=e.get(t);t in v||(v[t]=i),n[5](t,c(i,r),i||m)}},n[6],()=>!l(t)&&t in v?v[t]:!l(t)&&e.get(t)||m]};let x=!0;const[E,k]=y&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],S={isOnline:()=>x,isVisible:()=>{const e=b&&document.visibilityState;return l(e)||"hidden"!==e}},C={initFocus:e=>(b&&document.addEventListener("visibilitychange",e),E("focus",e),()=>{b&&document.removeEventListener("visibilitychange",e),k("focus",e)}),initReconnect:e=>{const t=()=>{x=!0,e()},n=()=>{x=!1};return E("online",t),E("offline",n),()=>{k("online",t),k("offline",n)}}},_=!r.useId,O=!y||"Deno"in window,M=e=>y&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(e):setTimeout(e,1),T=O?r.useEffect:r.useLayoutEffect,P="undefined"!==typeof navigator&&navigator.connection,I=!O&&P&&(["slow-2g","2g"].includes(P.effectiveType)||P.saveData),A=e=>{if(s(e))try{e=e()}catch(n){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?p(e):"",t]};let z=0;const N=()=>++z;var R=3,D=0,L=2,F=1;async function j(...e){const[t,n,r,i]=e,o=c({populateCache:!0,throwOnError:!0},"boolean"===typeof i?{revalidate:i}:i||{});let u=o.populateCache;const f=o.rollbackOnError;let d=o.optimisticData;const p=!1!==o.revalidate,m=o.throwOnError;if(s(n)){const e=n,r=[],i=t.keys();for(const n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(v))}return v(n);async function v(n){const[i]=A(n);if(!i)return;const[o,c]=w(t,i),[v,g,y,b]=h.get(t),x=v[i],E=()=>p&&(delete y[i],delete b[i],x&&x[0])?x[0](2).then((()=>o().data)):o().data;if(e.length<3)return E();let k,S=r;const C=N();g[i]=[C,0];const _=!l(d),O=o(),M=O.data,T=O._c,P=l(T)?M:T;if(_&&(d=s(d)?d(P,M):d,c({data:d,_c:P})),s(S))try{S=S(P)}catch(z){k=z}if(S&&s(S.then)){if(S=await S.catch((e=>{k=e})),C!==g[i][0]){if(k)throw k;return S}k&&_&&(e=>"function"===typeof f?f(e):!1!==f)(k)&&(u=!0,S=P,c({data:S,_c:a}))}u&&(k||(s(u)&&(S=u(S,P)),c({data:S,error:a,_c:a}))),g[i][1]=N();const I=await E();if(c({_c:a}),!k)return u?I:S;if(m)throw k}}const V=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Z=(e,t)=>{if(!h.has(e)){const n=c(C,t),r={},i=j.bind(a,e);let u=o;const l={},s=(e,t)=>{const n=l[e]||[];return l[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,r)=>{e.set(t,n);const i=l[t];if(i)for(const e of i)e(n,r)},d=()=>{if(!h.has(e)&&(h.set(e,[r,{},{},{},i,f,s]),!O)){const t=n.initFocus(setTimeout.bind(a,V.bind(a,r,0))),i=n.initReconnect(setTimeout.bind(a,V.bind(a,r,1)));u=()=>{t&&t(),i&&i(),h.delete(e)}}};return d(),[e,i,d,u]}return[e,h.get(e)[4]]},[H,B]=Z(new Map),U=c({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!l(o)&&a>o||setTimeout(r,u,i)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:I?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:I?5e3:3e3,compare:(e,t)=>p(e)==p(t),isPaused:()=>!1,cache:H,mutate:B,fallback:{}},S),W=(e,t)=>{const n=c(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=c(i,a))}return n},K=(0,r.createContext)({}),q=y&&window.__SWR_DEVTOOLS_USE__,Y=q?window.__SWR_DEVTOOLS_USE__:[],$=e=>s(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],X=Y.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=A(t),[,,,i]=h.get(H),o=i[r];return l(o)?n(...e):(delete i[r],o)}),r)));q&&(window.__SWR_DEVTOOLS_REACT__=r);const G=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),Q={dedupe:!0},J=(u.defineProperty((e=>{const{value:t}=e,n=(0,r.useContext)(K),i=s(t),o=(0,r.useMemo)((()=>i?t(n):t),[i,n,t]),u=(0,r.useMemo)((()=>i?o:W(n,o)),[i,n,o]),l=o&&o.provider,f=(0,r.useRef)(a);l&&!f.current&&(f.current=Z(l(u.cache||H),o));const d=f.current;return d&&(u.cache=d[0],u.mutate=d[1]),T((()=>{if(d)return d[2]&&d[2](),d[3]}),[]),(0,r.createElement)(K.Provider,c(e,{value:u}))}),"defaultValue",{value:U}),ee=(e,t,n)=>{const{cache:o,compare:u,suspense:f,fallbackData:d,revalidateOnMount:p,revalidateIfStale:m,refreshInterval:v,refreshWhenHidden:g,refreshWhenOffline:y,keepPreviousData:b}=n,[x,E,k,S]=h.get(o),[C,P]=A(e),I=(0,r.useRef)(!1),z=(0,r.useRef)(!1),V=(0,r.useRef)(C),Z=(0,r.useRef)(t),H=(0,r.useRef)(n),B=()=>H.current,U=()=>B().isVisible()&&B().isOnline(),[W,K,q,Y]=w(o,C),$=(0,r.useRef)({}).current,X=l(d)?n.fallback[C]:d,J=(e,t)=>{for(const n in $){const r=n;if("data"===r){if(!u(e[r],t[r])){if(!l(e[r]))return!1;if(!u(le,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},ee=(0,r.useMemo)((()=>{const e=!!C&&!!t&&(l(p)?!B().isPaused()&&!f&&(!!l(m)||m):p),n=t=>{const n=c(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=W(),i=Y(),o=n(r),a=r===i?o:n(i);let u=o;return[()=>{const e=n(W());return J(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]}),[o,C]),te=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>q(C,((t,n)=>{J(n,t)||e()}))),[o,C]),ee[0],ee[1]),ne=!I.current,re=x[C]&&x[C].length>0,ie=te.data,oe=l(ie)?X:ie,ae=te.error,ue=(0,r.useRef)(oe),le=b?l(ie)?ue.current:ie:oe,se=!(re&&!l(ae))&&(ne&&!l(p)?p:!B().isPaused()&&(f?!l(oe)&&m:l(oe)||m)),ce=!!(C&&t&&ne&&se),fe=l(te.isValidating)?ce:te.isValidating,de=l(te.isLoading)?ce:te.isLoading,pe=(0,r.useCallback)((async e=>{const t=Z.current;if(!C||!t||z.current||B().isPaused())return!1;let r,i,o=!0;const c=e||{},f=!k[C]||!c.dedupe,d=()=>_?!z.current&&C===V.current&&I.current:C===V.current,p={isValidating:!1,isLoading:!1},h=()=>{K(p)},m=()=>{const e=k[C];e&&e[1]===i&&delete k[C]},v={isValidating:!0};l(W().data)&&(v.isLoading=!0);try{if(f&&(K(v),n.loadingTimeout&&l(W().data)&&setTimeout((()=>{o&&d()&&B().onLoadingSlow(C,n)}),n.loadingTimeout),k[C]=[t(P),N()]),[r,i]=k[C],r=await r,f&&setTimeout(m,n.dedupingInterval),!k[C]||k[C][1]!==i)return f&&d()&&B().onDiscarded(C),!1;p.error=a;const e=E[C];if(!l(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return h(),f&&d()&&B().onDiscarded(C),!1;const s=W().data;p.data=u(s,r)?s:r,f&&d()&&B().onSuccess(r,C,n)}catch(g){m();const e=B(),{shouldRetryOnError:t}=e;e.isPaused()||(p.error=g,f&&d()&&(e.onError(g,C,e),(!0===t||s(t)&&t(g))&&U()&&e.onErrorRetry(g,C,e,(e=>{const t=x[C];t&&t[0]&&t[0](R,e)}),{retryCount:(c.retryCount||0)+1,dedupe:!0})))}return o=!1,h(),!0}),[C,o]),he=(0,r.useCallback)(((...e)=>j(o,V.current,...e)),[]);if(T((()=>{Z.current=t,H.current=n,l(ie)||(ue.current=ie)})),T((()=>{if(!C)return;const e=pe.bind(a,Q);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(C,x,((n,r={})=>{if(n==D){const n=Date.now();B().revalidateOnFocus&&n>t&&U()&&(t=n+B().focusThrottleInterval,e())}else if(n==F)B().revalidateOnReconnect&&U()&&e();else{if(n==L)return pe();if(n==R)return pe(r)}}));return z.current=!1,V.current=C,I.current=!0,K({_k:P}),se&&(l(oe)||O?e():M(e)),()=>{z.current=!0,n()}}),[C]),T((()=>{let e;function t(){const t=s(v)?v(W().data):v;t&&-1!==e&&(e=setTimeout(n,t))}function n(){W().error||!g&&!B().isVisible()||!y&&!B().isOnline()?t():pe(Q).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[v,g,y,C]),(0,r.useDebugValue)(le),f&&l(oe)&&C){if(!_&&O)throw new Error("Fallback data is required when using suspense in SSR.");Z.current=t,H.current=n,z.current=!1;const e=S[C];if(!l(e)){const t=he(e);G(t)}if(!l(ae))throw ae;{const e=pe(Q);l(le)||(e.status="fulfilled",e.value=!0),G(e)}}return{mutate:he,get data(){return $.data=!0,le},get error(){return $.error=!0,ae},get isValidating(){return $.isValidating=!0,fe},get isLoading(){return $.isLoading=!0,de}}},function(...e){const t=c(U,(0,r.useContext)(K)),[n,i,o]=$(e),a=W(t,o);let u=ee;const{use:l}=a,s=(l||[]).concat(X);for(let r=s.length;r--;)u=s[r](u);return u(n,i||a.fetcher||null,a)});var ee;var te=((e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r})("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);function ne(){const e=new TextDecoder;return function(t){return t?e.decode(t,{stream:!0}):""}}var re=async(e,t,n,r,i,o,a,u,l)=>{var s,c;const f=i.current;n(t.messages,!1);const d=await fetch(e,{method:"POST",body:JSON.stringify({messages:l?t.messages:t.messages.map((({role:e,content:t,name:n,function_call:r})=>({role:e,content:t,...void 0!==n&&{name:n},...void 0!==r&&{function_call:r}}))),...r.current.body,...null==(s=t.options)?void 0:s.body,...void 0!==t.functions&&{functions:t.functions},...void 0!==t.function_call&&{function_call:t.function_call}}),credentials:r.current.credentials,headers:{...r.current.headers,...null==(c=t.options)?void 0:c.headers},...null!==o.current&&{signal:o.current.signal}}).catch((e=>{throw n(f,!1),e}));if(u)try{await u(d)}catch(b){throw b}if(!d.ok)throw n(f,!1),new Error(await d.text()||"Failed to fetch the chat response.");if(!d.body)throw new Error("The response body is empty.");let p="";const h=new Date,m=te(),v=d.body.getReader(),g=ne();let y={id:m,createdAt:h,content:"",role:"assistant"};for(;;){const{done:e,value:r}=await v.read();if(e)break;if(p+=g(r),p.startsWith('{"function_call":')?y.function_call=p:y.content=p,n([...t.messages,{...y}],!1),null===o.current){v.cancel();break}}if(p.startsWith('{"function_call":')){const e=JSON.parse(p).function_call;y.function_call=e,n([...t.messages,{...y}])}return a&&a(y),y};function ie({api:e="/api/chat",id:t,initialMessages:n=[],initialInput:i="",sendExtraMessageFields:o,experimental_onFunctionCall:a,onResponse:u,onFinish:l,onError:s,credentials:c,headers:f,body:d}={}){const p=(0,r.useId)(),h=t||p,{data:m,mutate:v}=J([e,h],null,{fallbackData:n}),{data:g=!1,mutate:y}=J([h,"loading"],null),b=m,w=(0,r.useRef)(b);(0,r.useEffect)((()=>{w.current=b}),[b]);const x=(0,r.useRef)(null),E=(0,r.useRef)({credentials:c,headers:f,body:d});(0,r.useEffect)((()=>{E.current={credentials:c,headers:f,body:d}}),[c,f,d]);const[k,S]=(0,r.useState)();async function C(t){try{y(!0);const n=new AbortController;for(x.current=n;;){const n=await re(e,t,v,E,w,x,l,u,o);if(void 0===n.function_call||"string"===typeof n.function_call)break;if(a){const e=n.function_call,r=await a(w.current,e);if(void 0===r)break;t=r}}return x.current=null,null}catch(n){if("AbortError"===n.name)return x.current=null,null;s&&n instanceof Error&&s(n),S(n)}finally{y(!1)}}const _=(0,r.useCallback)((async(e,{options:t,functions:n,function_call:r}={})=>{e.id||(e.id=te());return C({messages:w.current.concat(e),options:t,...void 0!==n&&{functions:n},...void 0!==r&&{function_call:r}})}),[C]),O=(0,r.useCallback)((async({options:e,functions:t,function_call:n}={})=>{if(0===w.current.length)return null;if("assistant"===w.current[w.current.length-1].role){return C({messages:w.current.slice(0,-1),options:e,...void 0!==t&&{functions:t},...void 0!==n&&{function_call:n}})}return C({messages:w.current,options:e,...void 0!==t&&{functions:t},...void 0!==n&&{function_call:n}})}),[C]),M=(0,r.useCallback)((()=>{x.current&&(x.current.abort(),x.current=null)}),[]),T=(0,r.useCallback)((e=>{v(e,!1),w.current=e}),[v]),[P,I]=(0,r.useState)(i),A=(0,r.useCallback)(((e,{options:t,functions:n,function_call:r}={},i)=>{i&&(E.current={...E.current,...i}),e.preventDefault(),P&&(_({content:P,role:"user",createdAt:new Date},{options:t,functions:n,function_call:r}),I(""))}),[P,_]);return{messages:b,error:k,append:_,reload:O,stop:M,setMessages:T,input:P,setInput:I,handleInputChange:e=>{I(e.target.value)},handleSubmit:A,isLoading:g}}},524:function(e,t,n){"use strict";n.d(t,{oL:function(){return ke}});var r=n(7294);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=t?e:t)),e}(g(e),t,n)})),b={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",a="[object Array]",u="[object Boolean]",l="[object Date]",s="[object Error]",c="[object Function]",f="[object Map]",d="[object Number]",p="[object Object]",h="[object Promise]",m="[object RegExp]",v="[object Set]",g="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[i]=k[a]=k[b]=k[u]=k[w]=k[l]=k[s]=k[c]=k[f]=k[d]=k[p]=k[m]=k[v]=k[g]=k[y]=!1;var S="object"==typeof o&&o&&o.Object===Object&&o,C="object"==typeof self&&self&&self.Object===Object&&self,_=S||C||Function("return this")(),O=t&&!t.nodeType&&t,M=O&&e&&!e.nodeType&&e,T=M&&M.exports===O,P=T&&S.process,I=function(){try{return P&&P.binding&&P.binding("util")}catch(e){}}(),A=I&&I.isTypedArray;function z(e,t){for(var n=-1,r=null==e?0:e.length;++nu))return!1;var s=o.get(e);if(s&&o.get(t))return s==t;var c=-1,f=!0,d=2&n?new be:void 0;for(o.set(e,t),o.set(t,e);++c-1},ge.prototype.set=function(e,t){var n=this.__data__,r=xe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(ie||ge),string:new ve}},ye.prototype.delete=function(e){var t=Oe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Oe(this,e).get(e)},ye.prototype.has=function(e){return Oe(this,e).has(e)},ye.prototype.set=function(e,t){var n=Oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,n),this},be.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new ge,this.size=0},we.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ge){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(r)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=r}function je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var Ze=A?function(e){return function(t){return e(t)}}(A):function(e){return Ve(e)&&Fe(e.length)&&!!k[Ee(e)]};function He(e){return null!=(t=e)&&Fe(t.length)&&!Le(t)?function(e,t){var n=Re(e),r=!n&&Ne(e),i=!n&&!r&&De(e),o=!n&&!r&&!i&&Ze(e),a=n||r||i||o,u=a?function(e,t){for(var n=-1,r=Array(e);++n=0,C=(S.indexOf("Macintosh")>=0||S.indexOf("iPad")>=0||S.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0);const O=C,M=_,T="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;class P{constructor(){this._size=void 0}getSize(){return this._size}setSize(e){this._size=e}}function I(e,t){const n=e.length,r=n-t.length;return r>=0&&e.slice(r,n)===t}var A={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var u=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],u]:e._events[l].push(u):(e._events[l]=u,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function u(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),u.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},u.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i-1&&(e.splice(n,1),e.unshift(t))}function R(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function D(e,t,n=1){const r=Math.max(0,Math.ceil((t-e)/n)),i=new Array(r);let o=-1;for(;++o=t||n<0||f&&e-s>=o}function m(){var e=Y();if(h(e))return v(e);u=setTimeout(m,function(e){var n=t-(e-l);return f?q(n,o-(e-s)):n}(e))}function v(e){return u=void 0,d&&r?p(e):(r=i=void 0,a)}function g(){var e=Y(),n=h(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return function(e){return s=e,u=setTimeout(m,t),c?p(e):a}(l);if(f)return u=setTimeout(m,t),p(l)}return void 0===u&&(u=setTimeout(m,t)),a}return t=X(t)||0,$(n)&&(c=!!n.leading,o=(f="maxWait"in n)?K(X(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=l=i=u=void 0},g.flush=function(){return void 0===u?a:v(Y())},g})),Q="sash-module_vertical__pB-rs",J="sash-module_horizontal__kFbiw",ee="sash-module_hover__80W6I",te="sash-module_active__bJspD";let ne=((oe={}).Vertical="VERTICAL",oe.Horizontal="HORIZONTAL",oe),re=function(e){return e.Disabled="DISABLED",e.Minimum="MINIMUM",e.Maximum="MAXIMUM",e.Enabled="ENABLED",e}({}),ie=O?20:8;var oe;const ae=new z;class ue extends z{get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("sash-module_disabled__Hm-wx",e===re.Disabled),this.el.classList.toggle("dash-disabled",e===re.Disabled),this.el.classList.toggle("sash-module_minimum__-UKxp",e===re.Minimum),this.el.classList.toggle("sash-minimum",e===re.Minimum),this.el.classList.toggle("sash-module_maximum__TCWxD",e===re.Maximum),this.el.classList.toggle("sash-maximum",e===re.Maximum),this._state=e,this.emit("enablementChange",e))}constructor(e,t,n){var r;super(),this.el=void 0,this.layoutProvider=void 0,this.orientation=void 0,this.size=void 0,this.hoverDelay=300,this.hoverDelayer=G((e=>e.classList.add("sash-hover",ee)),this.hoverDelay),this._state=re.Enabled,this.onPointerStart=e=>{const t=e.pageX,n=e.pageY,r={startX:t,currentX:t,startY:n,currentY:n};this.el.classList.add("sash-active",te),this.emit("start",r),this.el.setPointerCapture(e.pointerId);const i=e=>{e.preventDefault();const r={startX:t,currentX:e.pageX,startY:n,currentY:e.pageY};this.emit("change",r)},o=e=>{e.preventDefault(),this.el.classList.remove("sash-active",te),this.hoverDelayer.cancel(),this.emit("end"),this.el.releasePointerCapture(e.pointerId),window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",o)};window.addEventListener("pointermove",i),window.addEventListener("pointerup",o)},this.onPointerDoublePress=()=>{this.emit("reset")},this.onMouseEnter=()=>{this.el.classList.contains(te)?(this.hoverDelayer.cancel(),this.el.classList.add("sash-hover",ee)):this.hoverDelayer(this.el)},this.onMouseLeave=()=>{this.hoverDelayer.cancel(),this.el.classList.remove("sash-hover",ee)},this.el=document.createElement("div"),this.el.classList.add("sash","sash-module_sash__K-9lB"),this.el.dataset.testid="sash",e.append(this.el),M&&this.el.classList.add("sash-mac","sash-module_mac__Jf6OJ"),this.el.addEventListener("pointerdown",this.onPointerStart),this.el.addEventListener("dblclick",this.onPointerDoublePress),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),"number"==typeof n.size?(this.size=n.size,n.orientation===ne.Vertical?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=ie,ae.on("onDidChangeGlobalSize",(e=>{this.size=e,this.layout()}))),this.layoutProvider=t,this.orientation=null!=(r=n.orientation)?r:ne.Vertical,this.orientation===ne.Horizontal?(this.el.classList.add("sash-horizontal",J),this.el.classList.remove("sash-vertical",Q)):(this.el.classList.remove("sash-horizontal",J),this.el.classList.add("sash-vertical",Q)),this.layout()}layout(){if(this.orientation===ne.Vertical){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}dispose(){this.el.removeEventListener("pointerdown",this.onPointerStart),this.el.removeEventListener("dblclick",this.onPointerDoublePress),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseleave",(()=>this.onMouseLeave)),this.el.remove()}}let le;var se;(se=le||(le={})).Distribute={type:"distribute"},se.Split=function(e){return{type:"split",index:e}},se.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}};let ce=function(e){return e.Normal="NORMAL",e.Low="LOW",e.High="HIGH",e}({});class fe{constructor(e,t,n){this.container=void 0,this.view=void 0,this._size=void 0,this._cachedVisibleSize=void 0,this.container=e,this.view=t,this.container.classList.add("split-view-view",k),this.container.dataset.testid="split-view-view","number"==typeof n?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("split-view-view-visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get priority(){return this.view.priority}get snap(){return!!this.view.snap}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=y(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("split-view-view-visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e){this.layoutContainer(e),this.view.layout(this.size,e)}}class de extends fe{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}class pe extends fe{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class he extends z{get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={},n,r,i){var o,a;if(super(),this.onDidChange=void 0,this.onDidDragStart=void 0,this.onDidDragEnd=void 0,this.orientation=void 0,this.sashContainer=void 0,this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.sashDragState=void 0,this.proportionalLayout=void 0,this.getSashOrthogonalSize=void 0,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onSashEnd=e=>{this.emit("sashchange",e),this.saveProportions();for(const t of this.viewItems)t.enabled=!0},this.orientation=null!=(o=t.orientation)?o:ne.Vertical,this.proportionalLayout=null==(a=t.proportionalLayout)||a,this.getSashOrthogonalSize=t.getSashOrthogonalSize,n&&(this.onDidChange=n),r&&(this.onDidDragStart=r),i&&(this.onDidDragEnd=i),this.sashContainer=document.createElement("div"),this.sashContainer.classList.add("sash-container","allotment-module_sashContainer__fzwJF"),e.prepend(this.sashContainer),t.descriptor){this.size=t.descriptor.size;for(const[e,n]of t.descriptor.views.entries()){const t=n.size,r=n.container,i=n.view;this.addView(r,i,t,e,!0)}this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions()}}addView(e,t,n,r=this.viewItems.length,i){let o;o="number"==typeof n?n:"split"===n.type?this.getViewSize(n.index)/2:"invisible"===n.type?{cachedVisibleSize:n.cachedVisibleSize}:t.minimumSize;const a=this.orientation===ne.Vertical?new pe(e,t,o):new de(e,t,o);if(this.viewItems.splice(r,0,a),this.viewItems.length>1){const e=this.orientation===ne.Vertical?new ue(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{orientation:ne.Horizontal}):new ue(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{orientation:ne.Vertical}),t=this.orientation===ne.Vertical?t=>({sash:e,start:t.startY,current:t.currentY}):t=>({sash:e,start:t.startX,current:t.currentX});e.on("start",(e=>{var n;this.emit("sashDragStart"),this.onSashStart(t(e));const r=this.viewItems.map((e=>e.size));null==(n=this.onDidDragStart)||n.call(this,r)})),e.on("change",(e=>this.onSashChange(t(e)))),e.on("end",(()=>{var t;this.emit("sashDragEnd"),this.onSashEnd(this.sashItems.findIndex((t=>t.sash===e)));const n=this.viewItems.map((e=>e.size));null==(t=this.onDidDragEnd)||t.call(this,n)})),e.on("reset",(()=>{const t=this.sashItems.findIndex((t=>t.sash===e)),n=D(t,-1,-1),r=D(t+1,this.viewItems.length),i=this.findFirstSnapIndex(n),o=this.findFirstSnapIndex(r);("number"!=typeof i||this.viewItems[i].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this.emit("sashreset",t)}));const n={sash:e};this.sashItems.splice(r-1,0,n)}i||this.relayout(),i||"number"==typeof n||"distribute"!==n.type||this.distributeViewSizes()}removeView(e,t){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");const n=this.viewItems.splice(e,1)[0].view;if(this.viewItems.length>=1){const t=Math.max(e-1,0);this.sashItems.splice(t,1)[0].sash.dispose()}return this.relayout(),t&&"distribute"===t.type&&this.distributeViewSizes(),n}moveView(e,t,n){const r=this.getViewCachedVisibleSize(t),i=void 0===r?this.getViewSize(t):le.Invisible(r),o=this.removeView(t);this.addView(e,o,i,n)}getViewCachedVisibleSize(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].cachedVisibleSize}layout(e=this.size){const t=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(let n=0;nthis.viewItems[e].priority===ce.Low)),i=n.filter((e=>this.viewItems[e].priority===ce.High));this.resize(this.viewItems.length-1,e-t,void 0,r,i)}this.distributeEmptySpace(),this.layoutViews()}resizeView(e,t){if(e<0||e>=this.viewItems.length)return;const n=D(0,this.viewItems.length).filter((t=>t!==e)),r=[...n.filter((e=>this.viewItems[e].priority===ce.Low)),e],i=n.filter((e=>this.viewItems[e].priority===ce.High)),o=this.viewItems[e];t=Math.round(t),t=y(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(r,i)}resizeViews(e){for(let t=0;te+t.size),0),this.saveProportions(),this.layout(this.size)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}isViewVisible(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].visible}setViewVisible(e,t){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[e].setVisible(t),this.distributeEmptySpace(e),this.layoutViews(),this.saveProportions()}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const n=Math.floor(t/e.length);for(const a of e)a.size=y(n,a.minimumSize,a.maximumSize);const r=D(0,this.viewItems.length),i=r.filter((e=>this.viewItems[e].priority===ce.Low)),o=r.filter((e=>this.viewItems[e].priority===ce.High));this.relayout(i,o)}dispose(){this.sashItems.forEach((e=>e.sash.dispose())),this.sashItems=[],this.sashContainer.remove()}relayout(e,t){const n=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}onSashStart({sash:e,start:t}){const n=this.sashItems.findIndex((t=>t.sash===e));(e=>{const t=this.viewItems.map((e=>e.size));let r,i,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;const u=D(n,-1,-1),l=D(n+1,this.viewItems.length),s=u.reduce(((e,n)=>e+(this.viewItems[n].minimumSize-t[n])),0),c=u.reduce(((e,n)=>e+(this.viewItems[n].viewMaximumSize-t[n])),0),f=0===l.length?Number.POSITIVE_INFINITY:l.reduce(((e,n)=>e+(t[n]-this.viewItems[n].minimumSize)),0),d=0===l.length?Number.NEGATIVE_INFINITY:l.reduce(((e,n)=>e+(t[n]-this.viewItems[n].viewMaximumSize)),0);o=Math.max(s,d),a=Math.min(f,c);const p=this.findFirstSnapIndex(u),h=this.findFirstSnapIndex(l);if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?o-t:o+t,size:e.size}}if("number"==typeof h){const e=this.viewItems[h],t=Math.floor(e.viewMinimumSize/2);i={index:h,limitDelta:e.visible?a+t:a-t,size:e.size}}this.sashDragState={start:e,current:e,index:n,sizes:t,minDelta:o,maxDelta:a,snapBefore:r,snapAfter:i}})(t)}onSashChange({current:e}){const{index:t,start:n,sizes:r,minDelta:i,maxDelta:o,snapBefore:a,snapAfter:u}=this.sashDragState;this.sashDragState.current=e;const l=e-n;this.resize(t,l,r,void 0,void 0,i,o,a,u),this.distributeEmptySpace(),this.layoutViews()}getSashPosition(e){let t=0;for(let n=0;ne.size)),r,i,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,u,l){if(e<0||e>=this.viewItems.length)return 0;const s=D(e,-1,-1),c=D(e+1,this.viewItems.length);if(i)for(const y of i)N(s,y),N(c,y);if(r)for(const y of r)R(s,y),R(c,y);const f=s.map((e=>this.viewItems[e])),d=s.map((e=>n[e])),p=c.map((e=>this.viewItems[e])),h=c.map((e=>n[e])),m=s.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-n[t])),0),v=s.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-n[t])),0),g=0===c.length?Number.POSITIVE_INFINITY:c.reduce(((e,t)=>e+(n[t]-this.viewItems[t].minimumSize)),0),b=0===c.length?Number.NEGATIVE_INFINITY:c.reduce(((e,t)=>e+(n[t]-this.viewItems[t].maximumSize)),0),w=Math.max(m,b,o),x=Math.min(g,v,a);let E=!1;if(u){const e=this.viewItems[u.index],n=t>=u.limitDelta;E=n!==e.visible,e.setVisible(n,u.size)}if(!E&&l){const e=this.viewItems[l.index],n=te+t.size),0);let n=this.size-t;const r=D(this.viewItems.length-1,-1,-1);"number"==typeof e&&R(r,e);for(let i=0;0!==n&&ie+t.size),0);let t=0;for(const n of this.viewItems)n.layout(t),t+=n.size;null!=(e=this.onDidChange)&&e.call(this,this.viewItems.map((e=>e.size))),this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const n=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),r=[...this.viewItems].reverse();e=!1;const i=r.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=r.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let a=0;for(let u=0;u0||this.startSnappingEnabled)?e.state=re.Minimum:c&&t[u]&&(a0)return;if(!e.visible&&e.snap)return t}}}class me{constructor(e){this.size=void 0,this.size=e}getPreferredSize(){return this.size}}class ve{constructor(e,t){this.proportion=void 0,this.layoutService=void 0,this.proportion=e,this.layoutService=t}getPreferredSize(){return this.proportion*this.layoutService.getSize()}}class ge{getPreferredSize(){}}class ye{get preferredSize(){return this.layoutStrategy.getPreferredSize()}set preferredSize(e){if("number"==typeof e)this.layoutStrategy=new me(e);else if("string"==typeof e){const t=e.trim();if(I(t,"%")){const e=Number(t.slice(0,-1))/100;this.layoutStrategy=new ve(e,this.layoutService)}else if(I(t,"px")){const e=Number(t.slice(0,-2))/100;this.layoutStrategy=new me(e)}else if("number"==typeof Number.parseFloat(t)){const e=Number.parseFloat(t);this.layoutStrategy=new me(e)}else this.layoutStrategy=new ge}else this.layoutStrategy=new ge}constructor(e,t){var n;if(this.minimumSize=0,this.maximumSize=Number.POSITIVE_INFINITY,this.element=void 0,this.priority=void 0,this.snap=void 0,this.layoutService=void 0,this.layoutStrategy=void 0,this.layoutService=e,this.element=t.element,this.minimumSize="number"==typeof t.minimumSize?t.minimumSize:30,this.maximumSize="number"==typeof t.maximumSize?t.maximumSize:Number.POSITIVE_INFINITY,"number"==typeof t.preferredSize)this.layoutStrategy=new me(t.preferredSize);else if("string"==typeof t.preferredSize){const e=t.preferredSize.trim();if(I(e,"%")){const t=Number(e.slice(0,-1))/100;this.layoutStrategy=new ve(t,this.layoutService)}else if(I(e,"px")){const t=Number(e.slice(0,-2));this.layoutStrategy=new me(t)}else if("number"==typeof Number.parseFloat(e)){const t=Number.parseFloat(e);this.layoutStrategy=new me(t)}else this.layoutStrategy=new ge}else this.layoutStrategy=new ge;this.priority=null!=(n=t.priority)?n:ce.Normal,this.snap="boolean"==typeof t.snap&&t.snap}layout(e){}}function be(e){return void 0!==e.minSize||void 0!==e.maxSize||void 0!==e.preferredSize||void 0!==e.priority||void 0!==e.visible}const we=(0,r.forwardRef)((({className:e,children:t},n)=>r.createElement("div",{ref:n,className:s("split-view-view",k,e)},t)));we.displayName="Allotment.Pane";const xe=(0,r.forwardRef)((({children:e,className:t,maxSize:n=1/0,minSize:o=30,proportionalLayout:a=!0,separator:u=!0,sizes:l,defaultSizes:c=l,snap:f=!1,vertical:d=!1,onChange:p,onReset:h,onVisibleChange:m,onDragStart:v,onDragEnd:g},y)=>{const b=(0,r.useRef)(null),x=(0,r.useRef)([]),k=(0,r.useRef)(new Map),S=(0,r.useRef)(null),C=(0,r.useRef)(new Map),_=(0,r.useRef)(new P),M=(0,r.useRef)([]),[I,A]=(0,r.useState)(!1),z=(0,r.useMemo)((()=>r.Children.toArray(e).filter(r.isValidElement)),[e]),N=(0,r.useCallback)((e=>{var t,n;const r=null==(t=M.current)?void 0:t[e];return"number"==typeof(null==r?void 0:r.preferredSize)&&(null!=(n=S.current)&&n.resizeView(e,Math.round(r.preferredSize)),!0)}),[]);return(0,r.useImperativeHandle)(y,(()=>({reset:()=>{if(h)h();else{var e;null==(e=S.current)||e.distributeViewSizes();for(let e=0;e{var t;null==(t=S.current)||t.resizeViews(e)}}))),T((()=>{let e=!0;c&&C.current.size!==c.length&&(e=!1,console.warn(`Expected ${c.length} children based on defaultSizes but found ${C.current.size}`)),e&&c&&(x.current=z.map((e=>e.key)));const t=i({orientation:d?ne.Vertical:ne.Horizontal,proportionalLayout:a},e&&c&&{descriptor:{size:c.reduce(((e,t)=>e+t),0),views:c.map(((e,t)=>{var r,a,u,l;const s=k.current.get(x.current[t]),c=new ye(_.current,i({element:document.createElement("div"),minimumSize:null!=(r=null==s?void 0:s.minSize)?r:o,maximumSize:null!=(a=null==s?void 0:s.maxSize)?a:n,priority:null!=(u=null==s?void 0:s.priority)?u:ce.Normal},(null==s?void 0:s.preferredSize)&&{preferredSize:null==s?void 0:s.preferredSize},{snap:null!=(l=null==s?void 0:s.snap)?l:f}));return M.current.push(c),{container:[...C.current.values()][t],size:e,view:c}}))}});S.current=new he(b.current,t,p,v,g),S.current.on("sashDragStart",(()=>{var e;null==(e=b.current)||e.classList.add("split-view-sash-dragging")})),S.current.on("sashDragEnd",(()=>{var e;null==(e=b.current)||e.classList.remove("split-view-sash-dragging")})),S.current.on("sashchange",(e=>{if(m&&S.current){const e=z.map((e=>e.key));for(let t=0;t{if(h)h();else{var t;if(N(e))return;if(N(e+1))return;null==(t=S.current)||t.distributeViewSizes()}}));const r=S.current;return()=>{r.dispose()}}),[]),T((()=>{if(I){const m=z.map((e=>e.key)),v=[...x.current],g=m.filter((e=>!x.current.includes(e))),y=m.filter((e=>x.current.includes(e))),b=x.current.map((e=>!m.includes(e)));for(let t=b.length-1;t>=0;t--){var e;b[t]&&(null!=(e=S.current)&&e.removeView(t),v.splice(t,1),M.current.splice(t,1))}for(const e of g){var t,r,a,u,l;const s=k.current.get(e),c=new ye(_.current,i({element:document.createElement("div"),minimumSize:null!=(t=null==s?void 0:s.minSize)?t:o,maximumSize:null!=(r=null==s?void 0:s.maxSize)?r:n,priority:null!=(a=null==s?void 0:s.priority)?a:ce.Normal},(null==s?void 0:s.preferredSize)&&{preferredSize:null==s?void 0:s.preferredSize},{snap:null!=(u=null==s?void 0:s.snap)?u:f}));null!=(l=S.current)&&l.addView(C.current.get(e),c,le.Distribute,m.findIndex((t=>t===e))),v.splice(m.findIndex((t=>t===e)),0,e),M.current.splice(m.findIndex((t=>t===e)),0,c)}for(;!w(m,v);)for(const[e,t]of m.entries()){const n=v.findIndex((e=>e===t));if(n!==e){var s;null==(s=S.current)||s.moveView(C.current.get(t),n,e);const r=v[n];v.splice(n,1),v.splice(e,0,r);break}}for(const e of g){var c;const t=m.findIndex((t=>t===e)),n=M.current[t].preferredSize;void 0!==n&&(null==(c=S.current)||c.resizeView(t,n))}for(const e of[...g,...y]){var d,p;const t=k.current.get(e),n=m.findIndex((t=>t===e));t&&be(t)&&void 0!==t.visible&&(null==(d=S.current)?void 0:d.isViewVisible(n))!==t.visible&&(null==(p=S.current)||p.setViewVisible(n,t.visible))}for(const e of y){const t=k.current.get(e),n=m.findIndex((t=>t===e));if(t&&be(t)){var h;void 0!==t.preferredSize&&M.current[n].preferredSize!==t.preferredSize&&(M.current[n].preferredSize=t.preferredSize);let e=!1;void 0!==t.minSize&&M.current[n].minimumSize!==t.minSize&&(M.current[n].minimumSize=t.minSize,e=!0),void 0!==t.maxSize&&M.current[n].maximumSize!==t.maxSize&&(M.current[n].maximumSize=t.maxSize,e=!0),e&&(null==(h=S.current)||h.layout())}}(g.length>0||b.length>0)&&(x.current=m)}}),[z,I,n,o,f]),(0,r.useEffect)((()=>{S.current&&(S.current.onDidChange=p)}),[p]),(0,r.useEffect)((()=>{S.current&&(S.current.onDidDragStart=v)}),[v]),(0,r.useEffect)((()=>{S.current&&(S.current.onDidDragEnd=g)}),[g]),E({ref:b,onResize:({width:e,height:t})=>{var n;e&&t&&(null!=(n=S.current)&&n.layout(d?t:e),_.current.setSize(d?t:e),A(!0))}}),T((()=>{if(!I){var e;const{height:t,width:n}=b.current.getBoundingClientRect();null!=(e=S.current)&&e.layout(d?t:n),_.current.setSize(d?t:n),A(!0)}}),[I,d]),(0,r.useEffect)((()=>{O&&Ee(20)}),[]),r.createElement("div",{ref:b,className:s("split-view",d?"split-view-vertical":"split-view-horizontal",{"split-view-separator-border":u},"allotment-module_splitView__L-yRc",d?"allotment-module_vertical__WSwwa":"allotment-module_horizontal__7doS8",{"allotment-module_separatorBorder__x-rDS":u},t)},r.createElement("div",{className:s("split-view-container","allotment-module_splitViewContainer__rQnVa")},r.Children.toArray(e).map((e=>{if(!r.isValidElement(e))return null;const t=e.key;return"Allotment.Pane"===e.type.displayName?(k.current.set(t,e.props),r.cloneElement(e,{key:t,ref:n=>{const r=e.ref;r&&(r.current=n),n?C.current.set(t,n):C.current.delete(t)}})):r.createElement(we,{key:t,ref:e=>{e?C.current.set(t,e):C.current.delete(t)}},e)}))))}));function Ee(e){const t=y(e,4,20),n=y(e,1,8);document.documentElement.style.setProperty("--sash-size",t+"px"),document.documentElement.style.setProperty("--sash-hover-size",n+"px"),function(e){ie=e,ae.emit("onDidChangeGlobalSize",e)}(t)}xe.displayName="Allotment";var ke=Object.assign(xe,{Pane:we})},5299:function(e,t,n){"use strict";n.d(t,{D:function(){return Qn}});var r={};n.r(r),n.d(r,{attentionMarkers:function(){return ht},contentInitial:function(){return lt},disable:function(){return mt},document:function(){return ut},flow:function(){return ct},flowInitial:function(){return st},insideSpan:function(){return pt},string:function(){return ft},text:function(){return dt}});var i={};n.r(i),n.d(i,{boolean:function(){return ln},booleanish:function(){return sn},commaOrSpaceSeparated:function(){return hn},commaSeparated:function(){return pn},number:function(){return fn},overloadedBoolean:function(){return cn},spaceSeparated:function(){return dn}});var o=n(7294),a=n(8738);function u(e){return e&&"object"===typeof e?"position"in e||"type"in e?s(e.position):"start"in e||"end"in e?s(e):"line"in e||"column"in e?l(e):"":""}function l(e){return c(e&&e.line)+":"+c(e&&e.column)}function s(e){return l(e&&e.start)+"-"+l(e&&e.end)}function c(e){return e&&"number"===typeof e?e:1}class f extends Error{constructor(e,t,n){const r=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"===typeof t&&(n=t,t=void 0),"string"===typeof n){const e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(i=t.position):"start"in t||"end"in t?i=t:("line"in t||"column"in t)&&(i.start=t)),this.name=u(t)||"1:1",this.message="object"===typeof e?e.message:e,this.stack="","object"===typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=r[0],this.ruleId=r[1],this.file,this.actual,this.expected,this.url,this.note}}f.prototype.file="",f.prototype.name="",f.prototype.reason="",f.prototype.message="",f.prototype.stack="",f.prototype.fatal=null,f.prototype.column=null,f.prototype.line=null,f.prototype.source=null,f.prototype.ruleId=null,f.prototype.position=null;const d={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');p(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,u=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),u>-1&&(e.charCodeAt(o)===t.charCodeAt(u--)?u<0&&(i=o):(u=-1,i=a));r===i?i=a:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(p(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){p(e);let t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){const u=e.charCodeAt(n);if(47!==u)r<0&&(t=!0,r=n+1),46===u?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),a=l,u=0;continue}}else if(i.length>0){i="",o=0,a=l,u=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,u=0}else 46===n&&u>-1?u++:u=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function p(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h={cwd:function(){return"/"}};function m(e){return null!==e&&"object"===typeof e&&e.href&&e.origin}function v(e){if("string"===typeof e)e=new URL(e);else if(!m(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++nt.length;let u;r&&t.push(i);try{u=e.apply(this,t)}catch(o){const t=o;if(r&&n)throw t;return i(t)}r||(u instanceof Promise?u.then(a,i):u instanceof Error?i(u):a(u))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}(u,i)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!==typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const _=function e(){const t=C(),n=[];let r,i={},o=-1;return u.data=function(e,t){if("string"===typeof e)return 2===arguments.length?(I("data",r),i[e]=t,u):O.call(i,e)&&i[e]||null;if(e)return I("data",r),i=e,u;return i},u.Parser=void 0,u.Compiler=void 0,u.freeze=function(){if(r)return u;for(;++o{if(!e&&t&&n){const i=u.stringify(t,n);void 0===i||null===i||("string"===typeof(r=i)||a(r)?n.value=i:n.result=i),o(e,n)}else o(e);var r}))}n(null,t)},u.processSync=function(e){let t;u.freeze(),T("processSync",u.Parser),P("processSync",u.Compiler);const n=N(e);return u.process(n,r),z("processSync","process",t),n;function r(e){t=!0,E(e)}},u;function u(){const t=e();let r=-1;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(F(e,e.length,0,t),e):t}const V={}.hasOwnProperty;function Z(e,t){let n;for(n in t){const r=(V.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){V.call(r,o)||(r[o]=[]);const e=i[o];H(r[o],Array.isArray(e)?e:e?[e]:[])}}}function H(e,t){let n=-1;const r=[];for(;++no))return;const n=t.events.length;let i,u,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){u=t.events[l][1].end;break}i=!0}for(g(a),e=n;er;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},oe={tokenize:function(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const ae={tokenize:function(e,t,n){return function(t){return Q(t)?ne(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||X(e)?t(e):n(e)}},partial:!0};function ue(e){const t={};let n,r,i,o,a,u,l,s=-1;for(;++s=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};const fe={tokenize:function(e){const t=this,n=e.attempt(ae,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,ne(e,e.attempt(this.parser.constructs.flow,r,e.attempt(se,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const de={resolveAll:ve()},pe=me("string"),he=me("text");function me(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),u;t.consume(e)}function u(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),u)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i-1){const e=a[0];"string"===typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function h(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:o}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:o}}function m(){let e;for(;r._index=3&&(null===o||X(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),Q(t)?ne(e,o,"whitespace")(t):o(t))}}};const xe={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:q(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(we,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(t)}return n(t)};function u(t){return q(t)&&++a<10?(e.consume(t),u):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(ae,r.interrupt?n:s,e.attempt(Ee,f,c))}function s(e){return r.containerState.initialBlankLine=!0,o++,f(e)}function c(t){return Q(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ae,i,o);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ke,t,a)(n))}function a(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(xe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Ee={tokenize:function(e,t,n){const r=this;return ne(e,(function(e){const i=r.events[r.events.length-1];return!Q(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},ke={tokenize:function(e,t,n){const r=this;return ne(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const Se={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Q(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Q(t))return ne(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(Se,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function Ce(e,t,n,r,i,o,a,u,l){const s=l||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||K(t))return n(t);return e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(u),f(t)):null===t||60===t||X(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(i){return c||null!==i&&41!==i&&!G(i)?c999||null===f||91===f||93===f&&!u||94===f&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):X(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||X(t)||l++>999?(e.exit("chunkString"),s(t)):(e.consume(t),u||(u=!Q(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function Oe(e,t,n,r,i,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,u;return n(t)};function u(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),u(a)):null===t?n(t):X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ne(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===a||null===t||X(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:s)}function c(t){return t===a||92===t?(e.consume(t),s):s(t)}}function Me(e,t){let n;return function r(i){if(X(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(Q(i))return ne(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pe={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return _e.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return G(t)?Me(e,u)(t):u(t)}function u(t){return Ce(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ie,s,s)(t)}function s(t){return Q(t)?ne(e,c,"whitespace")(t):c(t)}function c(o){return null===o||X(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},Ie={tokenize:function(e,t,n){return function(t){return G(t)?Me(e,r)(t):n(t)};function r(t){return Oe(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Q(t)?ne(e,o,"whitespace")(t):o(t)}function o(e){return null===e||X(e)?t(e):n(e)}},partial:!0};const Ae={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),ne(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?u(t):X(t)?e.attempt(ze,o,u)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||X(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function u(n){return e.exit("codeIndented"),t(n)}}},ze={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):ne(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):X(e)?i(e):n(e)}},partial:!0};const Ne={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||G(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||X(n)?(e.exit("atxHeading"),t(n)):Q(n)?ne(e,o,"whitespace")(n):(e.enter("atxHeadingText"),u(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function u(t){return null===t||35===t||G(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),u)}},resolve:function(e,t){let n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},F(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const Re={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let a,u=r.events.length;for(;u--;)if("lineEnding"!==r.events[u][1].type&&"linePrefix"!==r.events[u][1].type&&"content"!==r.events[u][1].type){a="paragraph"===r.events[u][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Q(t)?ne(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||X(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a;return e.push(["exit",a,t]),e}};const De=["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"],Le=["pre","script","style","textarea"],Fe={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,o,a,u,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(u){return 33===u?(e.consume(u),c):47===u?(e.consume(u),o=!0,p):63===u?(e.consume(u),i=3,r.interrupt?t:N):B(u)?(e.consume(u),a=String.fromCharCode(u),h):n(u)}function c(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,u=0,d):B(o)?(e.consume(o),i=4,r.interrupt?t:N):n(o)}function f(i){return 45===i?(e.consume(i),r.interrupt?t:N):n(i)}function d(i){const o="CDATA[";return i===o.charCodeAt(u++)?(e.consume(i),u===o.length?r.interrupt?t:_:d):n(i)}function p(t){return B(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(u){if(null===u||47===u||62===u||G(u)){const l=47===u,s=a.toLowerCase();return l||o||!Le.includes(s)?De.includes(a.toLowerCase())?(i=6,l?(e.consume(u),m):r.interrupt?t(u):_(u)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(u):o?v(u):g(u)):(i=1,r.interrupt?t(u):_(u))}return 45===u||U(u)?(e.consume(u),a+=String.fromCharCode(u),h):n(u)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:_):n(i)}function v(t){return Q(t)?(e.consume(t),v):S(t)}function g(t){return 47===t?(e.consume(t),S):58===t||95===t||B(t)?(e.consume(t),y):Q(t)?(e.consume(t),g):S(t)}function y(t){return 45===t||46===t||58===t||95===t||U(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):Q(t)?(e.consume(t),b):g(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):Q(t)?(e.consume(t),w):E(t)}function x(t){return t===l?(e.consume(t),l=null,k):null===t||X(t)?n(t):(e.consume(t),x)}function E(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||G(t)?b(t):(e.consume(t),E)}function k(e){return 47===e||62===e||Q(e)?g(e):n(e)}function S(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||X(t)?_(t):Q(t)?(e.consume(t),C):n(t)}function _(t){return 45===t&&2===i?(e.consume(t),P):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),R):63===t&&3===i?(e.consume(t),N):93===t&&5===i?(e.consume(t),z):!X(t)||6!==i&&7!==i?null===t||X(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(je,D,O)(t))}function O(t){return e.check(Ve,M,D)(t)}function M(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return null===t||X(t)?O(t):(e.enter("htmlFlowData"),_(t))}function P(t){return 45===t?(e.consume(t),N):_(t)}function I(t){return 47===t?(e.consume(t),a="",A):_(t)}function A(t){if(62===t){const n=a.toLowerCase();return Le.includes(n)?(e.consume(t),R):_(t)}return B(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),A):_(t)}function z(t){return 93===t?(e.consume(t),N):_(t)}function N(t){return 62===t?(e.consume(t),R):45===t&&2===i?(e.consume(t),N):_(t)}function R(t){return null===t||X(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),R)}function D(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},je={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ae,t,n)}},partial:!0},Ve={tokenize:function(e,t,n){const r=this;return function(t){if(X(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const Ze={tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},He={name:"codeFenced",tokenize:function(e,t,n){const r=this,i={tokenize:function(e,t,n){let i=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Q(t)?ne(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=u?(e.exit("codeFencedFenceSequence"),Q(t)?ne(e,f,"whitespace")(t):f(t)):n(t)}function f(r){return null===r||X(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let o,a=0,u=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(u++,e.consume(t),l):u<3?n(t):(e.exit("codeFencedFenceSequence"),Q(t)?ne(e,s,"whitespace")(t):s(t))}function s(n){return null===n||X(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ze,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||X(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):Q(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,f,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function f(t){return null===t||X(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||X(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===o?n(t):(e.consume(t),d)}function p(t){return e.attempt(i,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Q(t)?ne(e,v,"linePrefix",a+1)(t):v(t)}function v(t){return null===t||X(t)?e.check(Ze,p,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||X(t)?(e.exit("codeFlowValue"),v(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};const Be=document.createElement("i");function Ue(e){const t="&"+e+";";Be.innerHTML=t;const n=Be.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const We={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),u};function u(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=U,s(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=Y,s):(e.enter("characterReferenceValue"),i=7,o=q,s(t))}function s(u){if(59===u&&a){const i=e.exit("characterReferenceValue");return o!==U||Ue(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(u)}return o(u)&&a++1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),d=Object.assign({},e[c][1].start);tt(f,-u),tt(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},a={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[c][1].start),end:d},i={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[c][1].start)},r={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},o.start),e[c][1].start=Object.assign({},a.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=j(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=j(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=j(l,ye(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=j(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(s=2,l=j(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):s=0,F(e,n-1,c-n+3,l),c=n+l.length-s-2;break}c=-1;for(;++c13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCharCode(n)}const bt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wt(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return yt(n.slice(t?2:1),t?16:10)}return Ue(n)||e}const xt={}.hasOwnProperty,Et=function(e,t,n){return"string"!==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(oe),autolinkProtocol:M,autolinkEmail:M,atxHeading:l(te),blockQuote:l(X),characterEscape:M,characterReference:M,codeFenced:l(G),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(G,s),codeText:l(Q,s),codeTextData:M,data:M,codeFlowValue:M,definition:l(J),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(ee),hardBreakEscape:l(ne),hardBreakTrailing:l(ne),htmlFlow:l(re,s),htmlFlowData:M,htmlText:l(re,s),htmlTextData:M,image:l(ie),label:s,link:l(oe),listItem:l(ue),listItemValue:m,listOrdered:l(ae,h),listUnordered:l(ae),paragraph:l(le),reference:U,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(te),strong:l(se),thematicBreak:l(fe)},exit:{atxHeading:f(),atxHeadingSequence:S,autolink:f(),autolinkEmail:$,autolinkProtocol:Y,blockQuote:f(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:q,codeFenced:f(b),codeFencedFence:y,codeFencedFenceInfo:v,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:f(w),codeText:f(N),codeTextData:T,data:T,definition:f(),definitionDestinationString:k,definitionLabelString:x,definitionTitleString:E,emphasis:f(),hardBreakEscape:f(I),hardBreakTrailing:f(I),htmlFlow:f(A),htmlFlowData:T,htmlText:f(z),htmlTextData:T,image:f(F),label:V,labelText:j,lineEnding:P,link:f(L),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:W,resourceDestinationString:Z,resourceTitleString:H,resource:B,setextHeading:f(O),setextHeadingLineSequence:_,setextHeadingText:C,strong:f(),thematicBreak:f()}};St(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let n={type:"root",children:[]};const r={stack:[n],tokenStack:[],config:t,enter:c,exit:d,buffer:s,resume:p,setData:o,getData:a},u=[];let l=-1;for(;++l0){const e=r.tokenStack[r.tokenStack.length-1];(e[1]||_t).call(r,void 0,e[0])}for(n.position={start:kt(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:kt(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l{const n=this.data("settings");return Et(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Mt(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="\ufffd"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}const Tt=function(e){if(void 0===e||null===e)return It;if("string"===typeof e)return function(e){return Pt(t);function t(t){return t&&t.type===e}}(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n":"")+")"})}return c;function c(){let s,c,f,d=[];if((!t||i(a,u,l[l.length-1]||null))&&(d=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[true,e];return[e]}(n(a,l)),false===d[0]))return d;if(a.children&&"skip"!==d[0])for(c=(r?a.children.length:-1)+o,f=l.concat(a);c>-1&&c-1?n.offset:null}}}const Lt={}.hasOwnProperty;function Ft(e){return String(e||"").toUpperCase()}function jt(e,t){const n=String(t.identifier).toUpperCase(),r=Mt(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;-1===i?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],u={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function Vt(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function Zt(e){const t=e.spread;return void 0===t||null===t?e.children.length>1:t}function Ht(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Bt(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Bt(t.slice(i),i>0,!1)),o.join("")}function Bt(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const Ut={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:jt,footnote:function(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},jt(e,{type:"footnoteReference",identifier:i,position:t.position})},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Vt(e,t);const r={src:Mt(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Mt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Vt(e,t);const r={href:Mt(n.url||"")};null!==n.title&&void 0!==n.title&&(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)},link:function(e,t){const n={href:Mt(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Nt(t.children[1]),a=Rt(t.children[t.children.length-1]);o.line&&a.line&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let u=-1;const l=[];for(;++u{const n=Ft(e.identifier);n&&!Lt.call(t,n)&&(t[n]=e)})),function(e){const n=Ft(e);return n&&Lt.call(t,n)?t[n]:null}}(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=Yt,a.applyData=$t,a.one=function(e,t){return Xt(a,e,t)},a.all=function(e){return Gt(a,e)},a.wrap=Qt,a.augment=o,zt(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Kt.call(i,t)||(i[t]=e)})),a;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};(function(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})(n)||(t.position={start:Nt(n),end:Rt(n)})}return t}function a(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function Yt(e,t){e.position&&(t.position=function(e){return{start:Nt(e),end:Rt(e)}}(e))}function $t(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"===typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function Xt(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Kt.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Gt(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){const n=t.data||{},r=!("value"in t)||Kt.call(n,"hProperties")||Kt.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:Gt(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function Gt(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:"\n"}),n}function Jt(e,t){const n=qt(e,t),r=n.one(e,null),i=function(e){const t=[];let n=-1;for(;++n1?"-"+u:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21a9"}]};u>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(u)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const s=i[i.length-1];if(s&&"element"===s.type&&"p"===s.tagName){const e=s.children[s.children.length-1];e&&"text"===e.type?e.value+=" ":s.children.push({type:"text",value:" "}),s.children.push(...l)}else i.push(...l);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(0!==t.length)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:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return i&&r.children.push({type:"text",value:"\n"},i),Array.isArray(r)?{type:"root",children:r}:r}var en=function(e,t){return e&&"run"in e?function(e,t){return(n,r,i)=>{e.run(Jt(n,t),r,(e=>{i(e)}))}}(e,t):function(e){return t=>Jt(t,e)}(e||t)};var tn=n(5697);class nn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function rn(e,t){const n={},r={};let i=-1;for(;++i"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),En=wn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function kn(e,t){return t in e?e[t]:t}function Sn(e,t){return kn(e,t.toLowerCase())}const Cn=wn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sn,properties:{xmlns:null,xmlnsXLink:null}}),_n=wn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:sn,ariaAutoComplete:null,ariaBusy:sn,ariaChecked:sn,ariaColCount:fn,ariaColIndex:fn,ariaColSpan:fn,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:sn,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:sn,ariaFlowTo:dn,ariaGrabbed:sn,ariaHasPopup:null,ariaHidden:sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:fn,ariaLive:null,ariaModal:sn,ariaMultiLine:sn,ariaMultiSelectable:sn,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:fn,ariaPressed:sn,ariaReadOnly:sn,ariaRelevant:null,ariaRequired:sn,ariaRoleDescription:dn,ariaRowCount:fn,ariaRowIndex:fn,ariaRowSpan:fn,ariaSelected:sn,ariaSetSize:fn,ariaSort:null,ariaValueMax:fn,ariaValueMin:fn,ariaValueNow:fn,ariaValueText:null,role:null}}),On=wn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sn,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pn,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:ln,allowPaymentRequest:ln,allowUserMedia:ln,alt:null,as:null,async:ln,autoCapitalize:null,autoComplete:dn,autoFocus:ln,autoPlay:ln,capture:ln,charSet:null,checked:ln,cite:null,className:dn,cols:fn,colSpan:null,content:null,contentEditable:sn,controls:ln,controlsList:dn,coords:fn|pn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ln,defer:ln,dir:null,dirName:null,disabled:ln,download:cn,draggable:sn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ln,formTarget:null,headers:dn,height:fn,hidden:ln,high:fn,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:ln,itemId:null,itemProp:dn,itemRef:dn,itemScope:ln,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ln,low:fn,manifest:null,max:null,maxLength:fn,media:null,method:null,min:null,minLength:fn,multiple:ln,muted:ln,name:null,nonce:null,noModule:ln,noValidate:ln,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint: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:ln,optimum:fn,pattern:null,ping:dn,placeholder:null,playsInline:ln,poster:null,preload:null,readOnly:ln,referrerPolicy:null,rel:dn,required:ln,reversed:ln,rows:fn,rowSpan:fn,sandbox:dn,scope:null,scoped:ln,seamless:ln,selected:ln,shape:null,size:fn,sizes:null,slot:null,span:fn,spellCheck:sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fn,step:null,style:null,tabIndex:fn,target:null,title:null,translate:null,type:null,typeMustMatch:ln,useMap:null,value:sn,width:fn,wrap:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:fn,borderColor:null,bottomMargin:fn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ln,declare:ln,event:null,face:null,frame:null,frameBorder:null,hSpace:fn,leftMargin:fn,link:null,longDesc:null,lowSrc:null,marginHeight:fn,marginWidth:fn,noResize:ln,noHref:ln,noShade:ln,noWrap:ln,object:null,profile:null,prompt:null,rev:null,rightMargin:fn,rules:null,scheme:null,scrolling:sn,standby:null,summary:null,text:null,topMargin:fn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ln,disableRemotePlayback:ln,prefix:null,property:null,results:fn,security:null,unselectable:null}}),Mn=wn({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",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:kn,properties:{about:hn,accentHeight:fn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fn,amplitude:fn,arabicForm:null,ascent:fn,attributeName:null,attributeType:null,azimuth:fn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fn,by:null,calcMode:null,capHeight:fn,className:dn,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:fn,diffuseConstant:fn,direction:null,display:null,dur:null,divisor:fn,dominantBaseline:null,download:ln,dx:null,dy:null,edgeMode:null,editable:null,elevation:fn,enableBackground:null,end:null,event:null,exponent:fn,externalResourcesRequired:null,fill:null,fillOpacity:fn,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:pn,g2:pn,glyphName:pn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fn,horizOriginX:fn,horizOriginY:fn,id:null,ideographic:fn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fn,k:fn,k1:fn,k2:fn,k3:fn,k4:fn,kernelMatrix:hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fn,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:fn,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:fn,overlineThickness:fn,paintOrder:null,panose1:null,path:null,pathLength:fn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fn,pointsAtY:fn,pointsAtZ:fn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hn,rev:hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hn,requiredFeatures:hn,requiredFonts:hn,requiredFormats:hn,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:fn,specularExponent:fn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fn,strikethroughThickness:fn,string:null,stroke:null,strokeDashArray:hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fn,strokeOpacity:fn,strokeWidth:null,style:null,surfaceScale:fn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hn,tabIndex:fn,tableValues:null,target:null,targetX:fn,targetY:fn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hn,to:null,transform:null,u1:null,u2:null,underlinePosition:fn,underlineThickness:fn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fn,values:null,vAlphabetic:fn,vMathematical:fn,vectorEffect:null,vHanging:fn,vIdeographic:fn,version:null,vertAdvY:fn,vertOriginX:fn,vertOriginY:fn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Tn=rn([En,xn,Cn,_n,On],"html"),Pn=rn([En,xn,Cn,_n,Mn],"svg");function In(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=>{zt(t,"element",((t,n,r)=>{const i=r;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"===typeof n&&(o=!e.allowElement(t,n,i)),o&&"number"===typeof n)return e.unwrapDisallowed&&t.children?i.children.splice(n,1,...t.children):i.children.splice(n,1),n}))}}var An=n(2143);function zn(e){const t=e&&"object"===typeof e&&"text"===e.type?e.value||"":e;return"string"===typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}const Nn=/^data[-\w.:]+$/i,Rn=/-[a-z]/g,Dn=/[A-Z]/g;function Ln(e){return"-"+e.toLowerCase()}function Fn(e){return e.charAt(1).toUpperCase()}const jn={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"};var Vn=n(7848);const Zn=["http","https","mailto","tel"];function Hn(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const r=t.indexOf(":");if(-1===r)return t;let i=-1;for(;++ii?t:(i=t.indexOf("#"),-1!==i&&r>i?t:"javascript:void(0)")}const Bn={}.hasOwnProperty,Un=new Set(["table","thead","tbody","tfoot","tr"]);function Wn(e,t){const n=[];let r,i=-1;for(;++i0?o.createElement(h,s,d):o.createElement(h,s)}function qn(e,t){let n=-1,r=0;for(;++n4&&"data"===n.slice(0,4)&&Nn.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Rn,Fn);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Rn.test(e)){let n=e.replace(Dn,Ln);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=gn}return new i(r,t)}(r.schema,t);let o=n;null!==o&&void 0!==o&&o===o&&(Array.isArray(o)&&(o=i.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):o.join(" ").trim()),"style"===i.property&&"string"===typeof o&&(o=function(e){const t={};try{Vn(e,n)}catch{}return t;function n(e,n){const r="-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e;t[r.replace(/-([a-z])/g,$n)]=n}}(o)),i.space&&i.property?e[Bn.call(jn,i.property)?jn[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function $n(e,t){return t.toUpperCase()}const Xn={}.hasOwnProperty,Gn={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 Qn(e){for(const o in Gn)if(Xn.call(Gn,o)&&Xn.call(e,o)){const e=Gn[o];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${o}\` (see for more info)`),delete Gn[o]}const t=_().use(Ot).use(e.remarkPlugins||[]).use(en,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(In,e),n=new y;"string"===typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if("root"!==r.type)throw new TypeError("Expected a `root` node");let i=o.createElement(o.Fragment,{},Wn({options:e,schema:Tn,listDepth:0},r));return e.className&&(i=o.createElement("div",{className:e.className},i)),i}Qn.propTypes={children:tn.string,className:tn.string,allowElement:tn.func,allowedElements:tn.arrayOf(tn.string),disallowedElements:tn.arrayOf(tn.string),unwrapDisallowed:tn.bool,remarkPlugins:tn.arrayOf(tn.oneOfType([tn.object,tn.func,tn.arrayOf(tn.oneOfType([tn.bool,tn.string,tn.object,tn.func,tn.arrayOf(tn.any)]))])),rehypePlugins:tn.arrayOf(tn.oneOfType([tn.object,tn.func,tn.arrayOf(tn.oneOfType([tn.bool,tn.string,tn.object,tn.func,tn.arrayOf(tn.any)]))])),sourcePos:tn.bool,rawSourcePos:tn.bool,skipHtml:tn.bool,includeElementIndex:tn.bool,transformLinkUri:tn.oneOfType([tn.func,tn.bool]),linkTarget:tn.oneOfType([tn.func,tn.string]),transformImageUri:tn.func,components:tn.object}}}]); \ No newline at end of file