@jojovms/scripto 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,77 @@
1
+ (function($,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):($=typeof globalThis<"u"?globalThis:$||self,v($.Scripto={},$.React))})(this,function($,v){"use strict";var wi=Object.defineProperty;var Xn=$=>{throw TypeError($)};var _i=($,v,J)=>v in $?wi($,v,{enumerable:!0,configurable:!0,writable:!0,value:J}):$[v]=J;var z=($,v,J)=>_i($,typeof v!="symbol"?v+"":v,J),yi=($,v,J)=>v.has($)||Xn("Cannot "+J);var Kn=($,v,J)=>v.has($)?Xn("Cannot add the same private member more than once"):v instanceof WeakSet?v.add($):v.set($,J);var Ht=($,v,J)=>(yi($,v,"access private method"),J);var Pe,dn,Qn;var J={exports:{}},Ve={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var mn;function Jn(){if(mn)return Ve;mn=1;var l=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(c,u,x){var h,w={},g=null,E=null;x!==void 0&&(g=""+x),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(E=u.ref);for(h in u)n.call(u,h)&&!a.hasOwnProperty(h)&&(w[h]=u[h]);if(c&&c.defaultProps)for(h in u=c.defaultProps,u)w[h]===void 0&&(w[h]=u[h]);return{$$typeof:e,type:c,key:g,ref:E,props:w,_owner:r.current}}return Ve.Fragment=t,Ve.jsx=s,Ve.jsxs=s,Ve}var qe={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var gn;function er(){return gn||(gn=1,process.env.NODE_ENV!=="production"&&function(){var l=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),T=Symbol.iterator,m="@@iterator";function C(o){if(o===null||typeof o!="object")return null;var p=T&&o[T]||o[m];return typeof p=="function"?p:null}var j=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(o){{for(var p=arguments.length,k=new Array(p>1?p-1:0),y=1;y<p;y++)k[y-1]=arguments[y];ee("error",o,k)}}function ee(o,p,k){{var y=j.ReactDebugCurrentFrame,O=y.getStackAddendum();O!==""&&(p+="%s",k=k.concat([O]));var P=k.map(function(R){return String(R)});P.unshift("Warning: "+p),Function.prototype.apply.call(console[o],console,P)}}var W=!1,ce=!1,ot=!1,an=!1,ln=!1,Ot;Ot=Symbol.for("react.module.reference");function cn(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===a||ln||o===r||o===x||o===h||an||o===E||W||ce||ot||typeof o=="object"&&o!==null&&(o.$$typeof===g||o.$$typeof===w||o.$$typeof===s||o.$$typeof===c||o.$$typeof===u||o.$$typeof===Ot||o.getModuleId!==void 0))}function Y(o,p,k){var y=o.displayName;if(y)return y;var O=p.displayName||p.name||"";return O!==""?k+"("+O+")":k}function ze(o){return o.displayName||"Context"}function oe(o){if(o==null)return null;if(typeof o.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case h:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case c:var p=o;return ze(p)+".Consumer";case s:var k=o;return ze(k._context)+".Provider";case u:return Y(o,o.render,"ForwardRef");case w:var y=o.displayName||null;return y!==null?y:oe(o.type)||"Memo";case g:{var O=o,P=O._payload,R=O._init;try{return oe(R(P))}catch{return null}}}return null}var ue=Object.assign,Ne=0,Ct,Lt,st,It,at,H,lt;function G(){}G.__reactDisabledLog=!0;function Dt(){{if(Ne===0){Ct=console.log,Lt=console.info,st=console.warn,It=console.error,at=console.group,H=console.groupCollapsed,lt=console.groupEnd;var o={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}Ne++}}function U(){{if(Ne--,Ne===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ue({},o,{value:Ct}),info:ue({},o,{value:Lt}),warn:ue({},o,{value:st}),error:ue({},o,{value:It}),group:ue({},o,{value:at}),groupCollapsed:ue({},o,{value:H}),groupEnd:ue({},o,{value:lt})})}Ne<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var be=j.ReactCurrentDispatcher,Me;function fe(o,p,k){{if(Me===void 0)try{throw Error()}catch(O){var y=O.stack.trim().match(/\n( *(at )?)/);Me=y&&y[1]||""}return`
18
+ `+Me+o}}var $e=!1,Se;{var Pt=typeof WeakMap=="function"?WeakMap:Map;Se=new Pt}function ct(o,p){if(!o||$e)return"";{var k=Se.get(o);if(k!==void 0)return k}var y;$e=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var P;P=be.current,be.current=null,Dt();try{if(p){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(I){y=I}Reflect.construct(o,[],R)}else{try{R.call()}catch(I){y=I}o.call(R.prototype)}}else{try{throw Error()}catch(I){y=I}o()}}catch(I){if(I&&y&&typeof I.stack=="string"){for(var S=I.stack.split(`
19
+ `),V=y.stack.split(`
20
+ `),d=S.length-1,i=V.length-1;d>=1&&i>=0&&S[d]!==V[i];)i--;for(;d>=1&&i>=0;d--,i--)if(S[d]!==V[i]){if(d!==1||i!==1)do if(d--,i--,i<0||S[d]!==V[i]){var f=`
21
+ `+S[d].replace(" at new "," at ");return o.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",o.displayName)),typeof o=="function"&&Se.set(o,f),f}while(d>=1&&i>=0);break}}}finally{$e=!1,be.current=P,U(),Error.prepareStackTrace=O}var b=o?o.displayName||o.name:"",L=b?fe(b):"";return typeof o=="function"&&Se.set(o,L),L}function Ae(o,p,k){return ct(o,!1)}function Fe(o){var p=o.prototype;return!!(p&&p.isReactComponent)}function se(o,p,k){if(o==null)return"";if(typeof o=="function")return ct(o,Fe(o));if(typeof o=="string")return fe(o);switch(o){case x:return fe("Suspense");case h:return fe("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case u:return Ae(o.render);case w:return se(o.type,p,k);case g:{var y=o,O=y._payload,P=y._init;try{return se(P(O),p,k)}catch{}}}return""}var xe=Object.prototype.hasOwnProperty,Ue={},Te=j.ReactDebugCurrentFrame;function we(o){if(o){var p=o._owner,k=se(o.type,o._source,p?p.type:null);Te.setExtraStackFrame(k)}else Te.setExtraStackFrame(null)}function He(o,p,k,y,O){{var P=Function.call.bind(xe);for(var R in o)if(P(o,R)){var S=void 0;try{if(typeof o[R]!="function"){var V=Error((y||"React class")+": "+k+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}S=o[R](p,R,y,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){S=d}S&&!(S instanceof Error)&&(we(O),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",y||"React class",k,R,typeof S),we(null)),S instanceof Error&&!(S.message in Ue)&&(Ue[S.message]=!0,we(O),M("Failed %s type: %s",k,S.message),we(null))}}}var Nt=Array.isArray;function Be(o){return Nt(o)}function un(o){{var p=typeof Symbol=="function"&&Symbol.toStringTag,k=p&&o[Symbol.toStringTag]||o.constructor.name||"Object";return k}}function ut(o){try{return Re(o),!1}catch{return!0}}function Re(o){return""+o}function _e(o){if(ut(o))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",un(o)),Re(o)}var ne=j.ReactCurrentOwner,ft={key:!0,ref:!0,__self:!0,__source:!0},pt,ht;function dt(o){if(xe.call(o,"ref")){var p=Object.getOwnPropertyDescriptor(o,"ref").get;if(p&&p.isReactWarning)return!1}return o.ref!==void 0}function Mt(o){if(xe.call(o,"key")){var p=Object.getOwnPropertyDescriptor(o,"key").get;if(p&&p.isReactWarning)return!1}return o.key!==void 0}function We(o,p){typeof o.ref=="string"&&ne.current}function Ge(o,p){{var k=function(){pt||(pt=!0,M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};k.isReactWarning=!0,Object.defineProperty(o,"key",{get:k,configurable:!0})}}function pe(o,p){{var k=function(){ht||(ht=!0,M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};k.isReactWarning=!0,Object.defineProperty(o,"ref",{get:k,configurable:!0})}}var Oe=function(o,p,k,y,O,P,R){var S={$$typeof:e,type:o,key:p,ref:k,props:R,_owner:P};return S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(S,"_self",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.defineProperty(S,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S};function mt(o,p,k,y,O){{var P,R={},S=null,V=null;k!==void 0&&(_e(k),S=""+k),Mt(p)&&(_e(p.key),S=""+p.key),dt(p)&&(V=p.ref,We(p,O));for(P in p)xe.call(p,P)&&!ft.hasOwnProperty(P)&&(R[P]=p[P]);if(o&&o.defaultProps){var d=o.defaultProps;for(P in d)R[P]===void 0&&(R[P]=d[P])}if(S||V){var i=typeof o=="function"?o.displayName||o.name||"Unknown":o;S&&Ge(R,i),V&&pe(R,i)}return Oe(o,S,V,O,y,ne.current,R)}}var je=j.ReactCurrentOwner,jt=j.ReactDebugCurrentFrame;function he(o){if(o){var p=o._owner,k=se(o.type,o._source,p?p.type:null);jt.setExtraStackFrame(k)}else jt.setExtraStackFrame(null)}var Ce;Ce=!1;function gt(o){return typeof o=="object"&&o!==null&&o.$$typeof===e}function Le(){{if(je.current){var o=oe(je.current.type);if(o)return`
22
+
23
+ Check the render method of \``+o+"`."}return""}}function fn(o){return""}var zt={};function B(o){{var p=Le();if(!p){var k=typeof o=="string"?o:o.displayName||o.name;k&&(p=`
24
+
25
+ Check the top-level render call using <`+k+">.")}return p}}function ye(o,p){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var k=B(p);if(zt[k])return;zt[k]=!0;var y="";o&&o._owner&&o._owner!==je.current&&(y=" It was passed a child from "+oe(o._owner.type)+"."),he(o),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,y),he(null)}}function $t(o,p){{if(typeof o!="object")return;if(Be(o))for(var k=0;k<o.length;k++){var y=o[k];gt(y)&&ye(y,p)}else if(gt(o))o._store&&(o._store.validated=!0);else if(o){var O=C(o);if(typeof O=="function"&&O!==o.entries)for(var P=O.call(o),R;!(R=P.next()).done;)gt(R.value)&&ye(R.value,p)}}}function Ft(o){{var p=o.type;if(p==null||typeof p=="string")return;var k;if(typeof p=="function")k=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===u||p.$$typeof===w))k=p.propTypes;else return;if(k){var y=oe(p);He(k,o.props,"prop",y,o)}else if(p.PropTypes!==void 0&&!Ce){Ce=!0;var O=oe(p);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kt(o){{for(var p=Object.keys(o.props),k=0;k<p.length;k++){var y=p[k];if(y!=="children"&&y!=="key"){he(o),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",y),he(null);break}}o.ref!==null&&(he(o),M("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var bt={};function xt(o,p,k,y,O,P){{var R=cn(o);if(!R){var S="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=fn();V?S+=V:S+=Le();var d;o===null?d="null":Be(o)?d="array":o!==void 0&&o.$$typeof===e?(d="<"+(oe(o.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):d=typeof o,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,S)}var i=mt(o,p,k,O,P);if(i==null)return i;if(R){var f=p.children;if(f!==void 0)if(y)if(Be(f)){for(var b=0;b<f.length;b++)$t(f[b],o);Object.freeze&&Object.freeze(f)}else M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $t(f,o)}if(xe.call(p,"key")){var L=oe(o),I=Object.keys(p).filter(function(de){return de!=="key"}),F=I.length>0?"{key: someKey, "+I.join(": ..., ")+": ...}":"{key: someKey}";if(!bt[L+F]){var Z=I.length>0?"{"+I.join(": ..., ")+": ...}":"{}";M(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,F,L,Z,L),bt[L+F]=!0}}return o===n?kt(i):Ft(i),i}}function pn(o,p,k){return xt(o,p,k,!0)}function ae(o,p,k){return xt(o,p,k,!1)}var Ee=ae,Ut=pn;qe.Fragment=n,qe.jsx=Ee,qe.jsxs=Ut}()),qe}process.env.NODE_ENV==="production"?J.exports=Jn():J.exports=er();var _=J.exports,kn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},bn=v.createContext&&v.createContext(kn),ve=function(){return ve=Object.assign||function(l){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(l[r]=e[r])}return l},ve.apply(this,arguments)},tr=function(l,e){var t={};for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&e.indexOf(n)<0&&(t[n]=l[n]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(l);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(l,n[r])&&(t[n[r]]=l[n[r]]);return t};function xn(l){return l&&l.map(function(e,t){return v.createElement(e.tag,ve({key:t},e.attr),xn(e.child))})}function re(l){return function(e){return v.createElement(nr,ve({attr:ve({},l.attr)},e),xn(l.child))}}function nr(l){var e=function(t){var n=l.attr,r=l.size,a=l.title,s=tr(l,["attr","size","title"]),c=r||t.size||"1em",u;return t.className&&(u=t.className),l.className&&(u=(u?u+" ":"")+l.className),v.createElement("svg",ve({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:u,style:ve(ve({color:l.color||t.color},t.style),l.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&v.createElement("title",null,a),l.children)};return bn!==void 0?v.createElement(bn.Consumer,null,function(t){return e(t)}):e(kn)}function rr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"}}]})(l)}function ir(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128L192 384l-96-96"}}]})(l)}function or(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144m224 0L144 368"}}]})(l)}function sr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 367.79h76c55 0 100-29.21 100-83.6s-53-81.47-96-83.6c-8.89-85.06-71-136.8-144-136.8-69 0-113.44 45.79-128 91.2-60 5.7-112 43.88-112 106.4s54 106.4 120 106.4h56"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M320 255.79l-64-64-64 64m64 192.42V207.79"}}]})(l)}function ar(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"336",height:"336",x:"128",y:"128",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"57",ry:"57"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24"}}]})(l)}function lr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0032 32h120m-232 80h160m-160 80h160"}}]})(l)}function cr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 272l80 80 80-80M256 48v288"}}]})(l)}function ur(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"}}]})(l)}function fr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"}},{tag:"path",attr:{d:"M310.4 336H201.6a25.62 25.62 0 01-25.6-25.6V201.6a25.62 25.62 0 0125.6-25.6h108.8a25.62 25.62 0 0125.6 25.6v108.8a25.62 25.62 0 01-25.6 25.6z"}}]})(l)}function pr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 48v48m0 320v48m147.08-355.08l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08l-33.94-33.94M142.86 142.86l-33.94-33.94"}},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32"}}]})(l)}function hr(l){return re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M126 192H56a8 8 0 00-8 8v112a8 8 0 008 8h69.65a15.93 15.93 0 0110.14 3.54l91.47 74.89A8 8 0 00240 392V120a8 8 0 00-12.74-6.43l-91.47 74.89A15 15 0 01126 192zm194 128c9.74-19.38 16-40.84 16-64 0-23.48-6-44.42-16-64m48 176c19.48-33.92 32-64.06 32-112s-12-77.74-32-112m48 272c30-46 48-91.43 48-160s-18-113-48-160"}}]})(l)}function dr(l){return re({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"}}]})(l)}const mr=({onFileLoaded:l})=>{const e=v.useRef(null),[t,n]=v.useState(!1),[r,a]=v.useState(""),[s,c]=v.useState(!1),u=m=>{if(m.length>0){const C=m[0];x(C)?h(C):alert("Please upload a valid Markdown (.md) file.")}},x=m=>m.name.endsWith(".md")||m.name.endsWith(".markdown")||m.type==="text/markdown",h=m=>{const C=new FileReader;C.onload=j=>{l({name:m.name,content:j.target.result})},C.readAsText(m)},w=m=>{m.preventDefault(),m.stopPropagation(),m.type==="dragenter"||m.type==="dragover"?n(!0):(m.type==="dragleave"||m.type==="drop")&&n(!1)},g=m=>{m.preventDefault(),m.stopPropagation(),n(!1),m.dataTransfer.files&&m.dataTransfer.files[0]&&u(m.dataTransfer.files)},E=async()=>{const m=r.trim();if(m){c(!0);try{const C=T(m),j=await fetch(C);if(!j.ok)throw new Error(`HTTP error! status: ${j.status}`);const M=await j.text();let ee=m.substring(m.lastIndexOf("/")+1)||"remote-file.md";ee.includes("?")&&(ee=ee.split("?")[0]),l({name:ee,content:M})}catch(C){console.error("Fetch error:",C),alert(`Failed to load Markdown from URL.
31
+
32
+ Note: This might be due to CORS restrictions. Try a raw GitHub URL.`)}finally{c(!1)}}},T=m=>{try{if(new URL(m).hostname==="github.com"&&m.includes("/blob/"))return m.replace("github.com","raw.githubusercontent.com").replace("/blob/","/")}catch{}return m};return _.jsxs("section",{className:`upload-zone ${t?"drag-active":""}`,onClick:()=>e.current.click(),onDragEnter:w,onDragLeave:w,onDragOver:w,onDrop:g,id:"upload-area",children:[_.jsx("input",{type:"file",ref:e,accept:".md,.markdown",hidden:!0,onChange:m=>u(m.target.files)}),_.jsxs("div",{className:"upload-content",children:[_.jsx("div",{className:"icon-wrapper",children:_.jsx(sr,{})}),_.jsx("h2",{children:"Drop your Markdown file here"}),_.jsxs("p",{children:["or ",_.jsx("span",{className:"browse-btn",children:"browse files"})]}),_.jsx("div",{className:"divider",children:_.jsx("span",{children:"OR"})}),_.jsxs("div",{className:"url-input-container",onClick:m=>m.stopPropagation(),children:[_.jsx("input",{type:"url",id:"url-input",placeholder:"Paste a raw Markdown URL...",spellCheck:"false",value:r,onChange:m=>a(m.target.value),onKeyDown:m=>m.key==="Enter"&&E()}),_.jsx("button",{id:"url-btn",onClick:E,disabled:s,children:s?"...":"Go"})]}),_.jsxs("p",{className:"sub-text",children:["Supports ",_.jsx("span",{style:{color:"aqua"},children:".md"})," and ",_.jsx("span",{style:{color:"aqua"},children:".markdown"})]})]})]})};function Bt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ie=Bt();function Tn(l){Ie=l}const wn=/[&<>"']/,gr=new RegExp(wn.source,"g"),_n=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,kr=new RegExp(_n.source,"g"),br={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yn=l=>br[l];function te(l,e){if(e){if(wn.test(l))return l.replace(gr,yn)}else if(_n.test(l))return l.replace(kr,yn);return l}const xr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Tr(l){return l.replace(xr,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const wr=/(^|[^\[])\^/g;function N(l,e){let t=typeof l=="string"?l:l.source;e=e||"";const n={replace:(r,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(wr,"$1"),t=t.replace(r,s),n},getRegex:()=>new RegExp(t,e)};return n}function En(l){try{l=encodeURI(l).replace(/%25/g,"%")}catch{return null}return l}const Ze={exec:()=>null};function vn(l,e){const t=l.replace(/\|/g,(a,s,c)=>{let u=!1,x=s;for(;--x>=0&&c[x]==="\\";)u=!u;return u?"|":" |"}),n=t.split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function Tt(l,e,t){const n=l.length;if(n===0)return"";let r=0;for(;r<n&&l.charAt(n-r-1)===e;)r++;return l.slice(0,n-r)}function _r(l,e){if(l.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===e[0])t++;else if(l[n]===e[1]&&(t--,t<0))return n;return-1}function Sn(l,e,t,n){const r=e.href,a=e.title?te(e.title):null,s=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const c={type:"link",raw:t,href:r,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,c}return{type:"image",raw:t,href:r,title:a,text:te(s)}}function yr(l,e){const t=l.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
33
+ `).map(r=>{const a=r.match(/^\s+/);if(a===null)return r;const[s]=a;return s.length>=n.length?r.slice(n.length):r}).join(`
34
+ `)}class wt{constructor(e){z(this,"options");z(this,"rules");z(this,"lexer");this.options=e||Ie}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Tt(n,`
35
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=yr(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const r=Tt(n,"#");(this.options.pedantic||!r||/ $/.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=Tt(t[0].replace(/^ *>[ \t]?/gm,""),`
36
+ `),r=this.lexer.state.top;this.lexer.state.top=!0;const a=this.lexer.blockTokens(n);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:a,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let c="",u="",x=!1;for(;e;){let h=!1;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let w=t[2].split(`
37
+ `,1)[0].replace(/^\t+/,j=>" ".repeat(3*j.length)),g=e.split(`
38
+ `,1)[0],E=0;this.options.pedantic?(E=2,u=w.trimStart()):(E=t[2].search(/[^ ]/),E=E>4?1:E,u=w.slice(E),E+=t[1].length);let T=!1;if(!w&&/^ *$/.test(g)&&(c+=g+`
39
+ `,e=e.substring(g.length+1),h=!0),!h){const j=new RegExp(`^ {0,${Math.min(3,E-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,E-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),ee=new RegExp(`^ {0,${Math.min(3,E-1)}}(?:\`\`\`|~~~)`),W=new RegExp(`^ {0,${Math.min(3,E-1)}}#`);for(;e;){const ce=e.split(`
40
+ `,1)[0];if(g=ce,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ee.test(g)||W.test(g)||j.test(g)||M.test(e))break;if(g.search(/[^ ]/)>=E||!g.trim())u+=`
41
+ `+g.slice(E);else{if(T||w.search(/[^ ]/)>=4||ee.test(w)||W.test(w)||M.test(w))break;u+=`
42
+ `+g}!T&&!g.trim()&&(T=!0),c+=ce+`
43
+ `,e=e.substring(ce.length+1),w=g.slice(E)}}a.loose||(x?a.loose=!0:/\n *\n *$/.test(c)&&(x=!0));let m=null,C;this.options.gfm&&(m=/^\[[ xX]\] /.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}a.items[a.items.length-1].raw=c.trimEnd(),a.items[a.items.length-1].text=u.trimEnd(),a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){const w=a.items[h].tokens.filter(E=>E.type==="space"),g=w.length>0&&w.some(E=>/\n.*\n/.test(E.raw));a.loose=g}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:a}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=vn(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
44
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const c of r)/^ *-+: *$/.test(c)?s.align.push("right"):/^ *:-+: *$/.test(c)?s.align.push("center"):/^ *:-+ *$/.test(c)?s.align.push("left"):s.align.push(null);for(const c of n)s.header.push({text:c,tokens:this.lexer.inline(c)});for(const c of a)s.rows.push(vn(c,s.header.length).map(u=>({text:u,tokens:this.lexer.inline(u)})));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
45
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:te(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const s=Tt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=_r(t[2],"()");if(s>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let r=t[2],a="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(n)?r=r.slice(1):r=r.slice(1,-1)),Sn(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(/\s+/g," "),a=t[r.toLowerCase()];if(!a){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Sn(n,a,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...r[0]].length-1;let c,u,x=s,h=0;const w=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,t=t.slice(-1*e.length+s);(r=w.exec(t))!=null;){if(c=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!c)continue;if(u=[...c].length,r[3]||r[4]){x+=u;continue}else if((r[5]||r[6])&&s%3&&!((s+u)%3)){h+=u;continue}if(x-=u,x>0)continue;u=Math.min(u,u+x+h);const g=[...r[0]][0].length,E=e.slice(0,s+r.index+g+u);if(Math.min(s,u)%2){const m=E.slice(1,-1);return{type:"em",raw:E,text:m,tokens:this.lexer.inlineTokens(m)}}const T=E.slice(2,-2);return{type:"strong",raw:E,text:T,tokens:this.lexer.inlineTokens(T)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const r=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return r&&a&&(n=n.substring(1,n.length-1)),n=te(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=te(t[1]),r="mailto:"+n):(n=te(t[1]),r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,a;if(t[2]==="@")r=te(t[0]),a="mailto:"+r;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);r=te(t[0]),t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=te(t[0]),{type:"text",raw:t[0],text:n}}}}const Er=/^(?: *(?:\n|$))+/,vr=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Sr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ar=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,An=/(?:[*+-]|\d{1,9}[.)])/,Rn=N(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,An).getRegex(),Wt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Rr=/^[^\n]+/,Gt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Or=N(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Gt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cr=N(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,An).getRegex(),_t="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yt=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Lr=N("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Yt).replace("tag",_t).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),On=N(Wt).replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex(),Vt={blockquote:N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",On).getRegex(),code:vr,def:Or,fences:Sr,heading:Ar,hr:Xe,html:Lr,lheading:Rn,list:Cr,newline:Er,paragraph:On,table:Ze,text:Rr},Cn=N("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex(),Ir={...Vt,table:Cn,paragraph:N(Wt).replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_t).getRegex()},Dr={...Vt,html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ze,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(Wt).replace("hr",Xe).replace("heading",` *#{1,6} *[^
46
+ ]`).replace("lheading",Rn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ln=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,In=/^( {2,}|\\)\n(?!\s*$)/,Nr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ke="\\p{P}$+<=>`^|~",Mr=N(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ke).getRegex(),jr=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,zr=N(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ke).getRegex(),$r=N("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ke).getRegex(),Fr=N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ke).getRegex(),Ur=N(/\\([punct])/,"gu").replace(/punct/g,Ke).getRegex(),Hr=N(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Br=N(Yt).replace("(?:-->|$)","-->").getRegex(),Wr=N("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Br).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Gr=N(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",yt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dn=N(/^!?\[(label)\]\[(ref)\]/).replace("label",yt).replace("ref",Gt).getRegex(),Pn=N(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gt).getRegex(),Yr=N("reflink|nolink(?!\\()","g").replace("reflink",Dn).replace("nolink",Pn).getRegex(),qt={_backpedal:Ze,anyPunctuation:Ur,autolink:Hr,blockSkip:jr,br:In,code:Pr,del:Ze,emStrongLDelim:zr,emStrongRDelimAst:$r,emStrongRDelimUnd:Fr,escape:Ln,link:Gr,nolink:Pn,punctuation:Mr,reflink:Dn,reflinkSearch:Yr,tag:Wr,text:Nr,url:Ze},Vr={...qt,link:N(/^!?\[(label)\]\((.*?)\)/).replace("label",yt).getRegex(),reflink:N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yt).getRegex()},Zt={...qt,escape:N(Ln).replace("])","~|])").getRegex(),url:N(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qr={...Zt,br:N(In).replace("{2,}","*").getRegex(),text:N(Zt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Et={normal:Vt,gfm:Ir,pedantic:Dr},Qe={normal:qt,gfm:Zt,breaks:qr,pedantic:Vr};class me{constructor(e){z(this,"tokens");z(this,"options");z(this,"state");z(this,"tokenizer");z(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ie,this.options.tokenizer=this.options.tokenizer||new wt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Et.normal,inline:Qe.normal};this.options.pedantic?(t.block=Et.pedantic,t.inline=Qe.pedantic):this.options.gfm&&(t.block=Et.gfm,this.options.breaks?t.inline=Qe.breaks:t.inline=Qe.gfm),this.tokenizer.rules=t}static get rules(){return{block:Et,inline:Qe}}static lex(e,t){return new me(t).lex(e)}static lexInline(e,t){return new me(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
47
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(c,u,x)=>u+" ".repeat(x.length));let n,r,a,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
48
+ `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
49
+ `+n.raw,r.text+=`
50
+ `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
51
+ `+n.raw,r.text+=`
52
+ `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startBlock){let c=1/0;const u=e.slice(1);let x;this.options.extensions.startBlock.forEach(h=>{x=h.call({lexer:this},u),typeof x=="number"&&x>=0&&(c=Math.min(c,x))}),c<1/0&&c>=0&&(a=e.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){r=t[t.length-1],s&&r.type==="paragraph"?(r.raw+=`
53
+ `+n.raw,r.text+=`
54
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=`
55
+ `+n.raw,r.text+=`
56
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,a,s=e,c,u,x;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,c.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(u||(x=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,s,x)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const w=e.slice(1);let g;this.options.extensions.startInline.forEach(E=>{g=E.call({lexer:this},w),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(x=n.raw.slice(-1)),u=!0,r=t[t.length-1],r&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}}class vt{constructor(e){z(this,"options");this.options=e||Ie}code(e,t,n){var a;const r=(a=(t||"").match(/^\S*/))==null?void 0:a[0];return e=e.replace(/\n$/,"")+`
57
+ `,r?'<pre><code class="language-'+te(r)+'">'+(n?e:te(e,!0))+`</code></pre>
58
+ `:"<pre><code>"+(n?e:te(e,!0))+`</code></pre>
59
+ `}blockquote(e){return`<blockquote>
60
+ ${e}</blockquote>
61
+ `}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>
62
+ `}hr(){return`<hr>
63
+ `}list(e,t,n){const r=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+r+a+`>
64
+ `+e+"</"+r+`>
65
+ `}listitem(e,t,n){return`<li>${e}</li>
66
+ `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
67
+ `}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
68
+ <thead>
69
+ `+e+`</thead>
70
+ `+t+`</table>
71
+ `}tablerow(e){return`<tr>
72
+ ${e}</tr>
73
+ `}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
74
+ `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=En(e);if(r===null)return n;e=r;let a='<a href="'+e+'"';return t&&(a+=' title="'+t+'"'),a+=">"+n+"</a>",a}image(e,t,n){const r=En(e);if(r===null)return n;e=r;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${t}"`),a+=">",a}text(e){return e}}class Xt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ge{constructor(e){z(this,"options");z(this,"renderer");z(this,"textRenderer");this.options=e||Ie,this.options.renderer=this.options.renderer||new vt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xt}static parse(e,t){return new ge(t).parse(e)}static parseInline(e,t){return new ge(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const a=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const s=a,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=c||"";continue}}switch(a.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{const s=a;n+=this.renderer.heading(this.parseInline(s.tokens),s.depth,Tr(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{const s=a;n+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{const s=a;let c="",u="";for(let h=0;h<s.header.length;h++)u+=this.renderer.tablecell(this.parseInline(s.header[h].tokens),{header:!0,align:s.align[h]});c+=this.renderer.tablerow(u);let x="";for(let h=0;h<s.rows.length;h++){const w=s.rows[h];u="";for(let g=0;g<w.length;g++)u+=this.renderer.tablecell(this.parseInline(w[g].tokens),{header:!1,align:s.align[g]});x+=this.renderer.tablerow(u)}n+=this.renderer.table(c,x);continue}case"blockquote":{const s=a,c=this.parse(s.tokens);n+=this.renderer.blockquote(c);continue}case"list":{const s=a,c=s.ordered,u=s.start,x=s.loose;let h="";for(let w=0;w<s.items.length;w++){const g=s.items[w],E=g.checked,T=g.task;let m="";if(g.task){const C=this.renderer.checkbox(!!E);x?g.tokens.length>0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=C+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=C+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:C+" "}):m+=C+" "}m+=this.parse(g.tokens,x),h+=this.renderer.listitem(m,T,!!E)}n+=this.renderer.list(h,c,u);continue}case"html":{const s=a;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=a;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=a,c=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&e[r+1].type==="text";)s=e[++r],c+=`
75
+ `+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(c):c;continue}default:{const s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const a=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=s||"";continue}}switch(a.type){case"escape":{const s=a;n+=t.text(s.text);break}case"html":{const s=a;n+=t.html(s.text);break}case"link":{const s=a;n+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break}case"image":{const s=a;n+=t.image(s.href,s.title,s.text);break}case"strong":{const s=a;n+=t.strong(this.parseInline(s.tokens,t));break}case"em":{const s=a;n+=t.em(this.parseInline(s.tokens,t));break}case"codespan":{const s=a;n+=t.codespan(s.text);break}case"br":{n+=t.br();break}case"del":{const s=a;n+=t.del(this.parseInline(s.tokens,t));break}case"text":{const s=a;n+=t.text(s.text);break}default:{const s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}}class Je{constructor(e){z(this,"options");this.options=e||Ie}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}z(Je,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Zr{constructor(...e){Kn(this,Pe);z(this,"defaults",Bt());z(this,"options",this.setOptions);z(this,"parse",Ht(this,Pe,dn).call(this,me.lex,ge.parse));z(this,"parseInline",Ht(this,Pe,dn).call(this,me.lexInline,ge.parseInline));z(this,"Parser",ge);z(this,"Renderer",vt);z(this,"TextRenderer",Xt);z(this,"Lexer",me);z(this,"Tokenizer",wt);z(this,"Hooks",Je);this.use(...e)}walkTokens(e,t){var r,a;let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const c=s;for(const u of c.header)n=n.concat(this.walkTokens(u.tokens,t));for(const u of c.rows)for(const x of u)n=n.concat(this.walkTokens(x.tokens,t));break}case"list":{const c=s;n=n.concat(this.walkTokens(c.items,t));break}default:{const c=s;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{const x=c[u].flat(1/0);n=n.concat(this.walkTokens(x,t))}):c.tokens&&(n=n.concat(this.walkTokens(c.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const s=t.renderers[a.name];s?t.renderers[a.name]=function(...c){let u=a.renderer.apply(this,c);return u===!1&&(u=s.apply(this,c)),u}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=t[a.level];s?s.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),r.extensions=t),n.renderer){const a=this.defaults.renderer||new vt(this.defaults);for(const s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const c=s,u=n.renderer[c],x=a[c];a[c]=(...h)=>{let w=u.apply(a,h);return w===!1&&(w=x.apply(a,h)),w||""}}r.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new wt(this.defaults);for(const s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const c=s,u=n.tokenizer[c],x=a[c];a[c]=(...h)=>{let w=u.apply(a,h);return w===!1&&(w=x.apply(a,h)),w}}r.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Je;for(const s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const c=s,u=n.hooks[c],x=a[c];Je.passThroughHooks.has(s)?a[c]=h=>{if(this.defaults.async)return Promise.resolve(u.call(a,h)).then(g=>x.call(a,g));const w=u.call(a,h);return x.call(a,w)}:a[c]=(...h)=>{let w=u.apply(a,h);return w===!1&&(w=x.apply(a,h)),w}}r.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(c){let u=[];return u.push(s.call(this,c)),a&&(u=u.concat(a.call(this,c))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return me.lex(e,t??this.defaults)}parser(e,t){return ge.parse(e,t??this.defaults)}}Pe=new WeakSet,dn=function(e,t){return(n,r)=>{const a={...r},s={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const c=Ht(this,Pe,Qn).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(u=>e(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>t(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(c);try{s.hooks&&(n=s.hooks.preprocess(n));let u=e(n,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let x=t(u,s);return s.hooks&&(x=s.hooks.postprocess(x)),x}catch(u){return c(u)}}},Qn=function(e,t){return n=>{if(n.message+=`
76
+ Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+te(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}};const De=new Zr;function D(l,e){return De.parse(l,e)}D.options=D.setOptions=function(l){return De.setOptions(l),D.defaults=De.defaults,Tn(D.defaults),D},D.getDefaults=Bt,D.defaults=Ie,D.use=function(...l){return De.use(...l),D.defaults=De.defaults,Tn(D.defaults),D},D.walkTokens=function(l,e){return De.walkTokens(l,e)},D.parseInline=De.parseInline,D.Parser=ge,D.parser=ge.parse,D.Renderer=vt,D.TextRenderer=Xt,D.Lexer=me,D.lexer=me.lex,D.Tokenizer=wt,D.Hooks=Je,D.parse=D,D.options,D.setOptions,D.use,D.walkTokens,D.parseInline,ge.parse,me.lex;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Nn,setPrototypeOf:Mn,isFrozen:Xr,getPrototypeOf:Kr,getOwnPropertyDescriptor:Qr}=Object;let{freeze:X,seal:ie,create:Kt}=Object,{apply:Qt,construct:Jt}=typeof Reflect<"u"&&Reflect;X||(X=function(e){return e}),ie||(ie=function(e){return e}),Qt||(Qt=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return e.apply(t,r)}),Jt||(Jt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const St=Q(Array.prototype.forEach),Jr=Q(Array.prototype.lastIndexOf),jn=Q(Array.prototype.pop),et=Q(Array.prototype.push),ei=Q(Array.prototype.splice),At=Q(String.prototype.toLowerCase),en=Q(String.prototype.toString),tn=Q(String.prototype.match),tt=Q(String.prototype.replace),ti=Q(String.prototype.indexOf),ni=Q(String.prototype.trim),le=Q(Object.prototype.hasOwnProperty),K=Q(RegExp.prototype.test),nt=ri(TypeError);function Q(l){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Qt(l,e,n)}}function ri(l){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jt(l,t)}}function A(l,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At;Mn&&Mn(l,null);let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const a=t(r);a!==r&&(Xr(e)||(e[n]=a),r=a)}l[r]=!0}return l}function ii(l){for(let e=0;e<l.length;e++)le(l,e)||(l[e]=null);return l}function ke(l){const e=Kt(null);for(const[t,n]of Nn(l))le(l,t)&&(Array.isArray(n)?e[t]=ii(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=ke(n):e[t]=n);return e}function rt(l,e){for(;l!==null;){const n=Qr(l,e);if(n){if(n.get)return Q(n.get);if(typeof n.value=="function")return Q(n.value)}l=Kr(l)}function t(){return null}return t}const zn=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),nn=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),rn=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oi=X(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),on=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),si=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$n=X(["#text"]),Fn=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),sn=X(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Un=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rt=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ai=ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm),li=ie(/<%[\w\W]*|[\w\W]*%>/gm),ci=ie(/\$\{[\w\W]*/gm),ui=ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),fi=ie(/^aria-[\-\w]+$/),Hn=ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pi=ie(/^(?:\w+script|data):/i),hi=ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bn=ie(/^html$/i),di=ie(/^[a-z][.\w]*(-[.\w]+)+$/i);var Wn=Object.freeze({__proto__:null,ARIA_ATTR:fi,ATTR_WHITESPACE:hi,CUSTOM_ELEMENT:di,DATA_ATTR:ui,DOCTYPE_NAME:Bn,ERB_EXPR:li,IS_ALLOWED_URI:Hn,IS_SCRIPT_OR_DATA:pi,MUSTACHE_EXPR:ai,TMPLIT_EXPR:ci});const it={element:1,text:3,progressingInstruction:7,comment:8,document:9},mi=function(){return typeof window>"u"?null:window},gi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Gn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Yn(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mi();const e=d=>Yn(d);if(e.version="3.3.1",e.removed=[],!l||!l.document||l.document.nodeType!==it.document||!l.Element)return e.isSupported=!1,e;let{document:t}=l;const n=t,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:x,NamedNodeMap:h=l.NamedNodeMap||l.MozNamedAttrMap,HTMLFormElement:w,DOMParser:g,trustedTypes:E}=l,T=u.prototype,m=rt(T,"cloneNode"),C=rt(T,"remove"),j=rt(T,"nextSibling"),M=rt(T,"childNodes"),ee=rt(T,"parentNode");if(typeof s=="function"){const d=t.createElement("template");d.content&&d.content.ownerDocument&&(t=d.content.ownerDocument)}let W,ce="";const{implementation:ot,createNodeIterator:an,createDocumentFragment:ln,getElementsByTagName:Ot}=t,{importNode:cn}=n;let Y=Gn();e.isSupported=typeof Nn=="function"&&typeof ee=="function"&&ot&&ot.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:oe,TMPLIT_EXPR:ue,DATA_ATTR:Ne,ARIA_ATTR:Ct,IS_SCRIPT_OR_DATA:Lt,ATTR_WHITESPACE:st,CUSTOM_ELEMENT:It}=Wn;let{IS_ALLOWED_URI:at}=Wn,H=null;const lt=A({},[...zn,...nn,...rn,...on,...$n]);let G=null;const Dt=A({},[...Fn,...sn,...Un,...Rt]);let U=Object.seal(Kt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,Me=null;const fe=Object.seal(Kt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $e=!0,Se=!0,Pt=!1,ct=!0,Ae=!1,Fe=!0,se=!1,xe=!1,Ue=!1,Te=!1,we=!1,He=!1,Nt=!0,Be=!1;const un="user-content-";let ut=!0,Re=!1,_e={},ne=null;const ft=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let pt=null;const ht=A({},["audio","video","img","source","image","track"]);let dt=null;const Mt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let Oe=pe,mt=!1,je=null;const jt=A({},[We,Ge,pe],en);let he=A({},["mi","mo","mn","ms","mtext"]),Ce=A({},["annotation-xml"]);const gt=A({},["title","style","font","a","script"]);let Le=null;const fn=["application/xhtml+xml","text/html"],zt="text/html";let B=null,ye=null;const $t=t.createElement("form"),Ft=function(i){return i instanceof RegExp||i instanceof Function},kt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ye&&ye===i)){if((!i||typeof i!="object")&&(i={}),i=ke(i),Le=fn.indexOf(i.PARSER_MEDIA_TYPE)===-1?zt:i.PARSER_MEDIA_TYPE,B=Le==="application/xhtml+xml"?en:At,H=le(i,"ALLOWED_TAGS")?A({},i.ALLOWED_TAGS,B):lt,G=le(i,"ALLOWED_ATTR")?A({},i.ALLOWED_ATTR,B):Dt,je=le(i,"ALLOWED_NAMESPACES")?A({},i.ALLOWED_NAMESPACES,en):jt,dt=le(i,"ADD_URI_SAFE_ATTR")?A(ke(Mt),i.ADD_URI_SAFE_ATTR,B):Mt,pt=le(i,"ADD_DATA_URI_TAGS")?A(ke(ht),i.ADD_DATA_URI_TAGS,B):ht,ne=le(i,"FORBID_CONTENTS")?A({},i.FORBID_CONTENTS,B):ft,be=le(i,"FORBID_TAGS")?A({},i.FORBID_TAGS,B):ke({}),Me=le(i,"FORBID_ATTR")?A({},i.FORBID_ATTR,B):ke({}),_e=le(i,"USE_PROFILES")?i.USE_PROFILES:!1,$e=i.ALLOW_ARIA_ATTR!==!1,Se=i.ALLOW_DATA_ATTR!==!1,Pt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,ct=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=i.SAFE_FOR_TEMPLATES||!1,Fe=i.SAFE_FOR_XML!==!1,se=i.WHOLE_DOCUMENT||!1,Te=i.RETURN_DOM||!1,we=i.RETURN_DOM_FRAGMENT||!1,He=i.RETURN_TRUSTED_TYPE||!1,Ue=i.FORCE_BODY||!1,Nt=i.SANITIZE_DOM!==!1,Be=i.SANITIZE_NAMED_PROPS||!1,ut=i.KEEP_CONTENT!==!1,Re=i.IN_PLACE||!1,at=i.ALLOWED_URI_REGEXP||Hn,Oe=i.NAMESPACE||pe,he=i.MATHML_TEXT_INTEGRATION_POINTS||he,Ce=i.HTML_INTEGRATION_POINTS||Ce,U=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&Ft(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&Ft(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ae&&(Se=!1),we&&(Te=!0),_e&&(H=A({},$n),G=[],_e.html===!0&&(A(H,zn),A(G,Fn)),_e.svg===!0&&(A(H,nn),A(G,sn),A(G,Rt)),_e.svgFilters===!0&&(A(H,rn),A(G,sn),A(G,Rt)),_e.mathMl===!0&&(A(H,on),A(G,Un),A(G,Rt))),i.ADD_TAGS&&(typeof i.ADD_TAGS=="function"?fe.tagCheck=i.ADD_TAGS:(H===lt&&(H=ke(H)),A(H,i.ADD_TAGS,B))),i.ADD_ATTR&&(typeof i.ADD_ATTR=="function"?fe.attributeCheck=i.ADD_ATTR:(G===Dt&&(G=ke(G)),A(G,i.ADD_ATTR,B))),i.ADD_URI_SAFE_ATTR&&A(dt,i.ADD_URI_SAFE_ATTR,B),i.FORBID_CONTENTS&&(ne===ft&&(ne=ke(ne)),A(ne,i.FORBID_CONTENTS,B)),i.ADD_FORBID_CONTENTS&&(ne===ft&&(ne=ke(ne)),A(ne,i.ADD_FORBID_CONTENTS,B)),ut&&(H["#text"]=!0),se&&A(H,["html","head","body"]),H.table&&(A(H,["tbody"]),delete be.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');W=i.TRUSTED_TYPES_POLICY,ce=W.createHTML("")}else W===void 0&&(W=gi(E,r)),W!==null&&typeof ce=="string"&&(ce=W.createHTML(""));X&&X(i),ye=i}},bt=A({},[...nn,...rn,...oi]),xt=A({},[...on,...si]),pn=function(i){let f=ee(i);(!f||!f.tagName)&&(f={namespaceURI:Oe,tagName:"template"});const b=At(i.tagName),L=At(f.tagName);return je[i.namespaceURI]?i.namespaceURI===Ge?f.namespaceURI===pe?b==="svg":f.namespaceURI===We?b==="svg"&&(L==="annotation-xml"||he[L]):!!bt[b]:i.namespaceURI===We?f.namespaceURI===pe?b==="math":f.namespaceURI===Ge?b==="math"&&Ce[L]:!!xt[b]:i.namespaceURI===pe?f.namespaceURI===Ge&&!Ce[L]||f.namespaceURI===We&&!he[L]?!1:!xt[b]&&(gt[b]||!bt[b]):!!(Le==="application/xhtml+xml"&&je[i.namespaceURI]):!1},ae=function(i){et(e.removed,{element:i});try{ee(i).removeChild(i)}catch{C(i)}},Ee=function(i,f){try{et(e.removed,{attribute:f.getAttributeNode(i),from:f})}catch{et(e.removed,{attribute:null,from:f})}if(f.removeAttribute(i),i==="is")if(Te||we)try{ae(f)}catch{}else try{f.setAttribute(i,"")}catch{}},Ut=function(i){let f=null,b=null;if(Ue)i="<remove></remove>"+i;else{const F=tn(i,/^[\r\n\t ]+/);b=F&&F[0]}Le==="application/xhtml+xml"&&Oe===pe&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const L=W?W.createHTML(i):i;if(Oe===pe)try{f=new g().parseFromString(L,Le)}catch{}if(!f||!f.documentElement){f=ot.createDocument(Oe,"template",null);try{f.documentElement.innerHTML=mt?ce:L}catch{}}const I=f.body||f.documentElement;return i&&b&&I.insertBefore(t.createTextNode(b),I.childNodes[0]||null),Oe===pe?Ot.call(f,se?"html":"body")[0]:se?f.documentElement:I},o=function(i){return an.call(i.ownerDocument||i,i,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},p=function(i){return i instanceof w&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof h)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},k=function(i){return typeof c=="function"&&i instanceof c};function y(d,i,f){St(d,b=>{b.call(e,i,f,ye)})}const O=function(i){let f=null;if(y(Y.beforeSanitizeElements,i,null),p(i))return ae(i),!0;const b=B(i.nodeName);if(y(Y.uponSanitizeElement,i,{tagName:b,allowedTags:H}),Fe&&i.hasChildNodes()&&!k(i.firstElementChild)&&K(/<[/\w!]/g,i.innerHTML)&&K(/<[/\w!]/g,i.textContent)||i.nodeType===it.progressingInstruction||Fe&&i.nodeType===it.comment&&K(/<[/\w]/g,i.data))return ae(i),!0;if(!(fe.tagCheck instanceof Function&&fe.tagCheck(b))&&(!H[b]||be[b])){if(!be[b]&&R(b)&&(U.tagNameCheck instanceof RegExp&&K(U.tagNameCheck,b)||U.tagNameCheck instanceof Function&&U.tagNameCheck(b)))return!1;if(ut&&!ne[b]){const L=ee(i)||i.parentNode,I=M(i)||i.childNodes;if(I&&L){const F=I.length;for(let Z=F-1;Z>=0;--Z){const de=m(I[Z],!0);de.__removalCount=(i.__removalCount||0)+1,L.insertBefore(de,j(i))}}}return ae(i),!0}return i instanceof u&&!pn(i)||(b==="noscript"||b==="noembed"||b==="noframes")&&K(/<\/no(script|embed|frames)/i,i.innerHTML)?(ae(i),!0):(Ae&&i.nodeType===it.text&&(f=i.textContent,St([ze,oe,ue],L=>{f=tt(f,L," ")}),i.textContent!==f&&(et(e.removed,{element:i.cloneNode()}),i.textContent=f)),y(Y.afterSanitizeElements,i,null),!1)},P=function(i,f,b){if(Nt&&(f==="id"||f==="name")&&(b in t||b in $t))return!1;if(!(Se&&!Me[f]&&K(Ne,f))){if(!($e&&K(Ct,f))){if(!(fe.attributeCheck instanceof Function&&fe.attributeCheck(f,i))){if(!G[f]||Me[f]){if(!(R(i)&&(U.tagNameCheck instanceof RegExp&&K(U.tagNameCheck,i)||U.tagNameCheck instanceof Function&&U.tagNameCheck(i))&&(U.attributeNameCheck instanceof RegExp&&K(U.attributeNameCheck,f)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(f,i))||f==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&K(U.tagNameCheck,b)||U.tagNameCheck instanceof Function&&U.tagNameCheck(b))))return!1}else if(!dt[f]){if(!K(at,tt(b,st,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&i!=="script"&&ti(b,"data:")===0&&pt[i])){if(!(Pt&&!K(Lt,tt(b,st,"")))){if(b)return!1}}}}}}}return!0},R=function(i){return i!=="annotation-xml"&&tn(i,It)},S=function(i){y(Y.beforeSanitizeAttributes,i,null);const{attributes:f}=i;if(!f||p(i))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let L=f.length;for(;L--;){const I=f[L],{name:F,namespaceURI:Z,value:de}=I,Ye=B(F),hn=de;let q=F==="value"?hn:ni(hn);if(b.attrName=Ye,b.attrValue=q,b.keepAttr=!0,b.forceKeepAttr=void 0,y(Y.uponSanitizeAttribute,i,b),q=b.attrValue,Be&&(Ye==="id"||Ye==="name")&&(Ee(F,i),q=un+q),Fe&&K(/((--!?|])>)|<\/(style|title|textarea)/i,q)){Ee(F,i);continue}if(Ye==="attributename"&&tn(q,"href")){Ee(F,i);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){Ee(F,i);continue}if(!ct&&K(/\/>/i,q)){Ee(F,i);continue}Ae&&St([ze,oe,ue],Zn=>{q=tt(q,Zn," ")});const qn=B(i.nodeName);if(!P(qn,Ye,q)){Ee(F,i);continue}if(W&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!Z)switch(E.getAttributeType(qn,Ye)){case"TrustedHTML":{q=W.createHTML(q);break}case"TrustedScriptURL":{q=W.createScriptURL(q);break}}if(q!==hn)try{Z?i.setAttributeNS(Z,F,q):i.setAttribute(F,q),p(i)?ae(i):jn(e.removed)}catch{Ee(F,i)}}y(Y.afterSanitizeAttributes,i,null)},V=function d(i){let f=null;const b=o(i);for(y(Y.beforeSanitizeShadowDOM,i,null);f=b.nextNode();)y(Y.uponSanitizeShadowNode,f,null),O(f),S(f),f.content instanceof a&&d(f.content);y(Y.afterSanitizeShadowDOM,i,null)};return e.sanitize=function(d){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,b=null,L=null,I=null;if(mt=!d,mt&&(d="<!-->"),typeof d!="string"&&!k(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw nt("dirty is not a string, aborting")}else throw nt("toString is not a function");if(!e.isSupported)return d;if(xe||kt(i),e.removed=[],typeof d=="string"&&(Re=!1),Re){if(d.nodeName){const de=B(d.nodeName);if(!H[de]||be[de])throw nt("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof c)f=Ut("<!---->"),b=f.ownerDocument.importNode(d,!0),b.nodeType===it.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?f=b:f.appendChild(b);else{if(!Te&&!Ae&&!se&&d.indexOf("<")===-1)return W&&He?W.createHTML(d):d;if(f=Ut(d),!f)return Te?null:He?ce:""}f&&Ue&&ae(f.firstChild);const F=o(Re?d:f);for(;L=F.nextNode();)O(L),S(L),L.content instanceof a&&V(L.content);if(Re)return d;if(Te){if(we)for(I=ln.call(f.ownerDocument);f.firstChild;)I.appendChild(f.firstChild);else I=f;return(G.shadowroot||G.shadowrootmode)&&(I=cn.call(n,I,!0)),I}let Z=se?f.outerHTML:f.innerHTML;return se&&H["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&K(Bn,f.ownerDocument.doctype.name)&&(Z="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
77
+ `+Z),Ae&&St([ze,oe,ue],de=>{Z=tt(Z,de," ")}),W&&He?W.createHTML(Z):Z},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kt(d),xe=!0},e.clearConfig=function(){ye=null,xe=!1},e.isValidAttribute=function(d,i,f){ye||kt({});const b=B(d),L=B(i);return P(b,L,f)},e.addHook=function(d,i){typeof i=="function"&&et(Y[d],i)},e.removeHook=function(d,i){if(i!==void 0){const f=Jr(Y[d],i);return f===-1?void 0:ei(Y[d],f,1)[0]}return jn(Y[d])},e.removeHooks=function(d){Y[d]=[]},e.removeAllHooks=function(){Y=Gn()},e}var ki=Yn();const bi={heading(l,e,t){typeof l=="object"&&l!==null&&(t=l.raw||t,e=l.depth||l.level||e,l=l.text||"");const r=(t||String(l)).toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"");return`<h${e} id="${r}">${l}</h${e}>`}};D.use({renderer:bi});function xi(l){const e=D.parse(l);return ki.sanitize(e,{ADD_ATTR:["id","name"],ADD_TAGS:["h1","h2","h3","h4","h5","h6"]})}const Ti=({content:l,filename:e,onClose:t})=>{const[n,r]=v.useState(""),[a,s]=v.useState(!1),[c,u]=v.useState(!1);v.useEffect(()=>{if(l){const g=xi(l);r(g)}},[l]),v.useEffect(()=>{const g=T=>{var C;const m=(C=T.target.getAttribute("href"))==null?void 0:C.substring(1);if(m){const j=document.getElementById(m);j&&(T.preventDefault(),j.scrollIntoView({behavior:"smooth",block:"start"}))}},E=document.querySelectorAll('.markdown-body a[href^="#"]');return E.forEach(T=>T.addEventListener("click",g)),()=>{E.forEach(T=>T.removeEventListener("click",g))}},[n]);const x=()=>{var g;if(a)window.speechSynthesis.cancel(),s(!1);else{const E=(g=document.getElementById("markdown-content"))==null?void 0:g.innerText;if(!E)return;const T=new SpeechSynthesisUtterance(E);T.rate=1,T.onend=()=>s(!1),T.onerror=()=>s(!1),window.speechSynthesis.speak(T),s(!0)}};v.useEffect(()=>()=>window.speechSynthesis.cancel(),[]);const h=()=>{const g=document.getElementById("markdown-content");if(!g)return;const E=g.innerText,T=g.innerHTML,m=new Blob([T],{type:"text/html"}),C=new Blob([E],{type:"text/plain"}),j=[new ClipboardItem({"text/html":m,"text/plain":C})];navigator.clipboard.write(j).then(()=>{u(!0),setTimeout(()=>u(!1),2e3)}).catch(()=>{navigator.clipboard.writeText(E).then(()=>{u(!0),setTimeout(()=>u(!1),2e3)})})},w=()=>{alert("💡 Tip: To preserve the visual theme in your PDF, make sure to check 'Background graphics' in the print settings window."),window.print()};return _.jsxs("section",{className:"preview-zone",children:[_.jsxs("div",{className:"preview-header",children:[_.jsx("span",{id:"filename-display",children:e||"filename.md"}),_.jsxs("div",{className:"header-actions",children:[_.jsx("button",{className:`icon-btn ${a?"speaking":""}`,onClick:x,title:a?"Stop Reading":"Read Aloud",children:a?_.jsx(fr,{}):_.jsx(hr,{})}),_.jsx("button",{className:"icon-btn",onClick:h,title:"Copy to Clipboard",style:{color:c?"var(--accent-color)":""},children:c?_.jsx(ir,{}):_.jsx(ar,{})}),_.jsx("button",{className:"icon-btn",onClick:w,title:"Save as PDF",children:_.jsx(cr,{})}),_.jsx("button",{className:"icon-btn",onClick:t,title:"Close File",id:"close-btn",children:_.jsx(or,{})})]})]}),_.jsx("div",{id:"markdown-content",className:"markdown-body",dangerouslySetInnerHTML:{__html:n}})]})},Vn=({url:l})=>{const[e,t]=v.useState("light"),[n,r]=v.useState(null),[a,s]=v.useState(!1),c=v.useRef(null);v.useEffect(()=>{const T=localStorage.getItem("theme"),m=window.matchMedia("(prefers-color-scheme: dark)").matches;t(T||(m?"dark":"light"))},[]);const u=()=>{const T=e==="light"?"dark":"light";t(T),localStorage.setItem("theme",T)},x=T=>{try{if(new URL(T).hostname==="github.com"&&T.includes("/blob/"))return T.replace("github.com","raw.githubusercontent.com").replace("/blob/","/")}catch{}return T},h=async T=>{if(T)try{const m=x(T),C=await fetch(m);if(!C.ok)throw new Error("Failed to fetch");const j=await C.text();let M=T.substring(T.lastIndexOf("/")+1)||"remote-file.md";M.includes("?")&&(M=M.split("?")[0]),r({name:M,content:j})}catch(m){console.error("Scripto Load Error:",m)}};v.useEffect(()=>{const T=c.current;if(!T)return;const m=()=>{T.scrollTop>300?s(!0):s(!1)};return T.addEventListener("scroll",m),()=>T.removeEventListener("scroll",m)},[]);const w=()=>{c.current&&c.current.scrollTo({top:0,behavior:"smooth"})},g=T=>{r(T),c.current&&(c.current.scrollTop=0)},E=()=>{r(null);const T=new URL(window.location);T.searchParams.delete("url"),window.history.pushState({},"",T)};return v.useEffect(()=>{const T=new URLSearchParams(window.location.search),m=l||T.get("url");m&&h(m)},[l]),_.jsxs("div",{className:"scripto-wrapper","data-theme":e,children:[_.jsxs("div",{className:"background-blobs",children:[_.jsx("div",{className:"blob blob-1"}),_.jsx("div",{className:"blob blob-2"}),_.jsx("div",{className:"blob blob-3"})]}),_.jsx("button",{id:"theme-toggle","aria-label":"Toggle Theme",onClick:u,children:e==="light"?_.jsx(pr,{}):_.jsx(ur,{})}),_.jsxs("main",{className:"app-container",ref:c,children:[_.jsxs("header",{className:"glass-header",children:[_.jsxs("div",{className:"logo",children:[_.jsx(lr,{}),_.jsxs("h1",{children:["Scr!p",_.jsx("span",{children:"tō"})]})]}),_.jsx("p",{children:"“Simple, elegant visualization — where every mark becomes meaning.”"})]}),n?_.jsx(Ti,{content:n.content,filename:n.name,onClose:E}):_.jsx(mr,{onFileLoaded:g}),_.jsx("footer",{className:"app-footer",children:_.jsxs("p",{children:[" Try it out on  ",_.jsx("a",{href:"https://www.npmjs.com/package/@jojovms/scripto",target:"_blank",rel:"noopener noreferrer",className:"npm-link",title:"View on NPM",children:_.jsx(dr,{style:{fontSize:"2.5em",verticalAlign:"middle",marginRight:"5px"}})}),_.jsx("span",{style:{margin:"0 10px",opacity:.5},children:"|"}),"🎯 App created by ",_.jsx("a",{href:"https://bio.link/shijoshaji",target:"_blank",rel:"noopener noreferrer",children:"Shijo Shaji"})]})})]}),_.jsx("button",{id:"scroll-top-btn","aria-label":"Scroll to Top",className:a?"visible":"",onClick:w,children:_.jsx(rr,{})})]})};$.Scripto=Vn,$.default=Vn,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jojovms/scripto",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "description": "Scriptō: A beautiful and simple markdown viewer component for React.",
7
7
  "keywords": [
@@ -21,12 +21,12 @@
21
21
  "url": "https://github.com/shijoshaji/Scripto/issues"
22
22
  },
23
23
  "homepage": "https://shijoshaji.github.io/Scripto/",
24
- "main": "./dist/scripto.umd.cjs",
25
- "module": "./dist/scripto.js",
24
+ "main": "./dist/scripto.umd.js",
25
+ "module": "./dist/scripto.es.js",
26
26
  "exports": {
27
27
  ".": {
28
- "import": "./dist/scripto.js",
29
- "require": "./dist/scripto.umd.cjs"
28
+ "import": "./dist/scripto.es.js",
29
+ "require": "./dist/scripto.umd.js"
30
30
  },
31
31
  "./dist/style.css": "./dist/style.css"
32
32
  },