","+","~");var mm=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.forEach((function(t){"text"===t.type?n+=t.value:"element"===t.type&&t.children&&Array.isArray(t.children)&&(n+=e(t.children))})),n},gm=function(e){var t=e||{},n=t.selector,r=t.rewrite;return function(e){if(r&&"function"===typeof r)if(n&&"string"===typeof n){var t=pm(n,e);t&&t.length>0&&Uc(e,t,(function(e,t,n){r(e,t,n)}))}else Uc(e,(function(e,t,n){r(e,t,n)}))}},vm={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]},Om=n(8469),ym=n.n(Om);var km=function(e){return void 0===e&&(e={}),function(e){Uc(e,(function(e){"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=te({},e.properties,{"data-meta":String(e.data.meta)}))}))}},bm=["prefixCls","className","source","style","disableCopy","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","warpperElement"],xm=J.forwardRef((function(e,t){var n=e.prefixCls,r=void 0===n?"wmde-markdown wmde-markdown-color":n,i=e.className,o=e.source,a=e.style,s=e.disableCopy,l=void 0!==s&&s,u=e.onScroll,c=e.onMouseOver,h=e.pluginsFilter,f=e.rehypeRewrite,d=e.warpperElement,p=void 0===d?{}:d,m=Ge(e,bm),g=J.createRef();(0,J.useImperativeHandle)(t,(function(){return te({},e,{mdp:g})}),[g,e]);var v=(r||"")+" "+(i||""),O=[km,[Tp,{ignoreMissing:!0}],ap,gd,Td,fp,[gm,{rewrite:function(e,t,n){if("element"===e.type&&n&&"root"===n.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var r=e.children&&e.children[0];r&&r.properties&&"true"===r.properties.ariaHidden&&(r.properties=te({class:"anchor"},r.properties),r.children=[vm])}if("element"===e.type&&"pre"===e.tagName&&!l){var i=mm(e.children);e.children.push((void 0===(o=i)&&(o=""),{type:"element",tagName:"div",properties:{onClick:function(e){var t=e.currentTarget||e.target;t.classList.add("active"),ym()(t.dataset.code,(function(){setTimeout((function(){t.classList.remove("active")}),2e3)}))},"data-code":o,class:"copied"},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var o;f&&f(e,t,n)}}],[hp,{properties:"attr"}]].concat((0,rt.Z)(m.rehypePlugins||[])),y={allowElement:function(e,t,n){return m.allowElement?m.allowElement(e,t,n):/^[A-Za-z0-9]+$/.test(e.tagName)}},k=[].concat((0,rt.Z)(m.remarkPlugins||[]),[sd]);return(0,qe.jsx)("div",te({ref:g,onScroll:u,onMouseOver:c},p,{className:v,style:a,children:(0,qe.jsx)(Ih,te({},m,y,{rehypePlugins:h?h("rehype",O):O,remarkPlugins:h?h("remark",k):k,children:o||""}))}))})),Tm={name:"bold",keyCommand:"bold",button:{"aria-label":"Add bold text"},icon:(0,qe.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 384 512",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"**"},{from:e.to,insert:"**"}],range:Ai.jT.range(e.from+2,e.to+2)}})))}},wm={name:"italic",keyCommand:"italic",button:{"aria-label":"Add italic text"},icon:(0,qe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 320 512",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"*"},{from:e.to,insert:"*"}],range:Ai.jT.range(e.from+1,e.to+1)}})))}},Sm={name:"header",keyCommand:"header",button:{"aria-label":"Add header text"},icon:(0,qe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="#",o=r.text.match(/^#+/);if(o&&o[0]){var a=o[0];a.length<6&&(i=a+"#")}i.length>6&&(i="#");var s=r.text.replace(/^#+/,"");n.dispatch({changes:{from:r.from,to:r.to,insert:i+" "+s},selection:{anchor:r.from+i.length+1}})}}},Cm={name:"strike",keyCommand:"strike",button:{"aria-label":"Add strike text"},icon:(0,qe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"~~"},{from:e.to,insert:"~~"}],range:Ai.jT.range(e.from+2,e.to+2)}})))}},Em={name:"underline",keyCommand:"underline",button:{"aria-label":"Add underline text"},icon:(0,qe.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 20 20",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M10 17c3.3 0 6-2.7 6-6V3.5c0-.8-.7-1.5-1.5-1.5S13 2.7 13 3.5V11c0 1.7-1.3 3-3 3s-3-1.3-3-3V3.5C7 2.7 6.3 2 5.5 2S4 2.7 4 3.5V11c0 3.3 2.7 6 6 6zM16.5 19h-13c-.3 0-.5.2-.5.5s.2.5.5.5h13c.3 0 .5-.2.5-.5s-.2-.5-.5-.5z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:""},{from:e.to,insert:""}],range:Ai.jT.range(e.from+3,e.to+3)}})))}},Am={name:"olist",keyCommand:"olist",button:{"aria-label":"Add olist text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 576 512",height:"16",width:"16",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M55.1 56.04c0-13.26 11.64-24 24-24h32c14.2 0 24 10.74 24 24V176h16c14.2 0 24 10.8 24 24 0 13.3-9.8 24-24 24h-80c-12.36 0-24-10.7-24-24 0-13.2 11.64-24 24-24h16V80.04h-8c-12.36 0-24-10.75-24-24zm63.6 285.16c-6.6-7.4-18.3-6.9-24.05 1.2l-11.12 15.5c-7.7 10.8-22.69 13.3-33.48 5.6-10.79-7.7-13.28-22.7-5.58-33.4l11.12-15.6c23.74-33.3 72.31-35.7 99.21-4.9 21.3 23.5 20.8 60.9-1.1 84.7L118.8 432H152c13.3 0 24 10.7 24 24s-10.7 24-24 24H64c-9.53 0-18.16-5.6-21.98-14.4-3.83-8.7-2.12-18.9 4.34-25.9l72.04-78c5.3-5.8 5.4-14.6.3-20.5zM512 64c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H256c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- ",o=r.text.match(/^-/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},_m={name:"ulist",keyCommand:"ulist",button:{"aria-label":"Add ulist text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M88 48c13.3 0 24 10.75 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24V72c0-13.25 10.75-24 24-24h48zm392 16c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zM16 232c0-13.3 10.75-24 24-24h48c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48zm72 136c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48c0-13.3 10.75-24 24-24h48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="1. ",o=r.text.match(/^\1\./);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},Qm={name:"quote",keyCommand:"quote",button:{"aria-label":"Add quote text"},icon:(0,qe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M512 80v128c0 137.018-63.772 236.324-193.827 271.172-15.225 4.08-30.173-7.437-30.173-23.199v-33.895c0-10.057 6.228-19.133 15.687-22.55C369.684 375.688 408 330.054 408 256h-72c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h128c26.51 0 48 21.49 48 48zM176 32H48C21.49 32 0 53.49 0 80v128c0 26.51 21.49 48 48 48h72c0 74.054-38.316 119.688-104.313 143.528C6.228 402.945 0 412.021 0 422.078v33.895c0 15.762 14.948 27.279 30.173 23.199C160.228 444.324 224 345.018 224 208V80c0-26.51-21.49-48-48-48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="> ",o=r.text.match(/^>\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},Pm={name:"link",keyCommand:"link",button:{"aria-label":"Add link text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 640 512",height:"16",width:"16",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M172.5 131.1c55.6-55.59 148-55.59 203.6 0 50 50 57.4 129.7 16.3 187.2l-1.1 1.6c-10.3 14.3-30.3 17.7-44.6 7.4-14.4-10.3-17.8-30.3-7.5-44.6l1.1-1.6c22.9-32.1 19.3-76-8.6-103.9-31.4-31.4-82.5-31.4-114 0L105.5 289.5c-31.51 30.6-31.51 82.5 0 114 27.8 27.9 71.8 31.5 103.8 8.6l1.6-2c14.4-9.4 34.4-6.1 44.6 8.3 10.3 14.4 7 34.4-7.4 44.7l-1.6 1.1c-58.4 41.1-136.3 34.5-186.29-15.4-56.469-56.5-56.469-148.1 0-204.5L172.5 131.1zm295 248.9c-56.5 56.5-148 56.5-204.5 0-50-50-56.5-128.8-15.4-186.3l1.1-1.6c9.4-14.3 29.4-17.7 44.6-7.4 14.4 9.4 17.8 29.4 7.5 44.6l-1.1 1.6c-22.9 31.2-19.3 76 8.6 103.9 31.4 31.4 82.5 31.4 114 0l112.2-112.3c31.5-31.5 31.5-83.4 0-114-27.8-27.87-71.8-31.51-103.8-8.6l-1.6 1.1c-14.4 10.3-34.4 6.1-44.6-7.42-10.3-14.38-7-34.37 7.4-44.64l1.6-1.12C451 6.731 529.8 13.25 579.8 63.24c56.5 56.46 56.5 148.06 0 204.46L467.5 380z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n&&t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:"["+i+"]()"},selection:Ai.jT.range(r.from+3+i.length,r.to+3)})}}},Rm={name:"todo",keyCommand:"todo",button:{"aria-label":"Add todo List"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M152.1 38.16c9.8 8.87 10.6 24.04 1.7 33.9L81.84 152.1c-4.41 4.8-10.63 7.7-17.21 7-6.58 1.1-12.94-1.5-17.6-7l-40.001-40c-9.372-8.5-9.372-23.7 0-33.07 9.371-9.37 24.571-9.37 33.941 0l22.11 22.07 55.12-61.16c8.8-9.85 24-10.65 33.9-1.78zm0 160.04c9.8 8.8 10.6 24 1.7 33.9l-71.96 80c-4.41 4.8-10.63 7.7-17.21 7-6.58 1.1-12.94-1.5-17.6-7l-40.001-40c-9.372-8.5-9.372-23.7 0-33.1 9.371-9.3 24.571-9.3 33.941 0l22.11 22.1 55.12-61.2c8.8-9.8 24-10.6 33.9-1.7zM224 96c0-17.67 14.3-32 32-32h224c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zm-64 160c0-17.7 14.3-32 32-32h288c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32zM0 416c0-26.5 21.49-48 48-48s48 21.5 48 48-21.49 48-48 48-48-21.5-48-48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- [ ] ",o=r.text.match(/^-\s\[\s\]\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},Dm={name:"image",keyCommand:"image",button:{"aria-label":"Add image text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M447.1 32h-384C28.64 32-.01 60.65-.01 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96c.01-35.35-27.79-64-63.99-64zm-336 64c26.51 0 48 21.49 48 48s-20.6 48-48 48-48-21.49-48-48 22.38-48 48-48zm335 311.6c-2.8 5.2-8.2 8.4-14.1 8.4H82.01a15.993 15.993 0 0 1-14.26-8.75 16 16 0 0 1 1.334-16.68l70-96C142.1 290.4 146.9 288 152 288s9.916 2.441 12.93 6.574l32.46 44.51 93.3-139.1C293.7 194.7 298.7 192 304 192s10.35 2.672 13.31 7.125l128 192c3.29 4.875 3.59 11.175.79 16.475z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:""},selection:Ai.jT.range(r.from+4,r.to+4)})}}},Nm={name:"redo",keyCommand:"redo",button:{"aria-label":"redo text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M58.79,439.13A16,16,0,0,1,48,424c0-73.1,14.68-131.56,43.65-173.77,35-51,90.21-78.46,164.35-81.87V88a16,16,0,0,1,27.05-11.57l176,168a16,16,0,0,1,0,23.14l-176,168A16,16,0,0,1,256,424V344.23c-45,1.36-79,8.65-106.07,22.64-29.25,15.12-50.46,37.71-73.32,67a16,16,0,0,1-17.82,5.28Z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&Xi(n)}},Mm={name:"undo",keyCommand:"undo",button:{"aria-label":"undo text"},icon:(0,qe.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M448,440a16,16,0,0,1-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335,352.88,301,345.59,256,344.23V424A16,16,0,0,1,229,435.57l-176-168a16,16,0,0,1,0-23.14l176-168A16,16,0,0,1,256,88v80.36c74.14,3.41,129.38,30.91,164.35,81.87C449.32,292.44,464,350.9,464,424a16,16,0,0,1-16,16Z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&Ui(n)}},Im=function(e){var t=e.editorProps,n=(0,J.useRef)(0),r=(0,J.useState)(!1),i=(0,ee.Z)(r,2),o=i[0],a=i[1];return(0,J.useEffect)((function(){if(t.containerEditor&&t.containerEditor.current&&t.containerEditor.current.parentElement){var e=t.containerEditor.current.parentElement;new ResizeObserver((function(e){var r,i=(0,K.Z)(e);try{for(i.s();!(r=i.n()).done;){var a,s,l,u=r.value;n.current||(n.current=u.target.clientHeight),null!=(a=t.editor)&&null!=(s=a.current)&&null!=(l=s.view)&&l.dom&&(o?t.editor.current.view.dom.style.height=u.target.clientHeight+"px":t.editor.current.view.dom.removeAttribute("style"))}}catch(c){i.e(c)}finally{i.f()}})).observe(e)}}),[t.containerEditor,t.editor,o]),(0,J.useEffect)((function(){if(document&&t&&t.container&&t.container.current&&t.editor){var e=t.container.current;document.body.style.overflow=o?"hidden":"initial",e&&o?(e.style.zIndex="999",e.style.position="fixed",e.style.top="0px",e.style.bottom="0px",e.style.left="0px",e.style.right="0px"):e&&(e.style.position="initial",e.style.top="initial",e.style.bottom="initial",e.style.left="initial",e.style.right="initial")}}),[o,t]),(0,qe.jsx)("button",{onClick:function(){return a(!o)},type:"button",className:o?"active":"",children:e.command.icon})},Lm={name:"fullscreen",keyCommand:"fullscreen",button:function(e,t,n){return(0,qe.jsx)(Im,{command:e,editorProps:te({},t,n)})},icon:(0,qe.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 1024 1024",children:[(0,qe.jsx)("path",{fill:"currentColor",d:"M189.75 428.89a36.87 36.87 0 0 0 36.84-36.85V228.12h164a36.85 36.85 0 1 0 0-73.7H189.75a36.82 36.82 0 0 0-36.8 36.85v200.8a36.83 36.83 0 0 0 36.8 36.82zM834.26 595.06a36.82 36.82 0 0 0-36.8 36.84v164H633.41a36.85 36.85 0 0 0 0 73.7h200.85a36.87 36.87 0 0 0 36.84-36.85V631.9a36.86 36.86 0 0 0-36.84-36.84zM797.46 228.12v179.31a36.82 36.82 0 1 0 73.64 0V191.24a36.86 36.86 0 0 0-36.84-36.85H602.33a36.85 36.85 0 0 0 0 73.7zM421.62 795.9H226.54V616.56a36.82 36.82 0 1 0-73.64 0v216.19a36.83 36.83 0 0 0 36.85 36.85h231.87a36.85 36.85 0 0 0 0-73.7z"}),(0,qe.jsx)("path",{fill:"currentColor",d:"M306.5 307.94m32.95 0l345.1 0q32.95 0 32.95 32.95l0 342.22q0 32.95-32.95 32.95l-345.1 0q-32.95 0-32.95-32.95l0-342.22q0-32.95 32.95-32.95Z"})]})},$m=function(e){var t=e.editorProps,n=t.containerEditor,r=t.preview,i=(0,J.useState)(e.editorProps.visible),o=(0,ee.Z)(i,2),a=o[0],s=o[1];return(0,J.useEffect)((function(){return s(e.editorProps.visible)}),[e.editorProps.visible]),(0,J.useEffect)((function(){if(r.current){var e=r.current;r&&(e.style.borderBottomRightRadius="3px"),e&&a?(e.style.width="50%",e.style.overflow="auto",e.style.borderLeft="1px solid var(--color-border-muted)",e.style.padding="20px",n.current&&(n.current.style.width="50%")):e&&(e.style.width="0%",e.style.overflow="hidden",e.style.borderLeft="0px",e.style.padding="0",n.current&&(n.current.style.width="100%"))}}),[a,n,r]),(0,qe.jsx)("button",{onClick:function(){return s(!a)},type:"button",className:a?"active":"",children:e.command.icon})},Fm={name:"preview",keyCommand:"preview",button:function(e,t,n){return(0,qe.jsx)($m,{command:e,editorProps:te({},t,n)})},icon:(0,qe.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 32 32",children:(0,qe.jsx)("path",{fill:"currentColor",d:"M0 16c3.037-5.864 9.058-9.802 16-9.802s12.963 3.938 15.953 9.703l0.047 0.1c-3.037 5.864-9.058 9.802-16 9.802s-12.963-3.938-15.953-9.703l-0.047-0.1zM16 22.531c3.607 0 6.531-2.924 6.531-6.531s-2.924-6.531-6.531-6.531v0c-3.607 0-6.531 2.924-6.531 6.531s2.924 6.531 6.531 6.531v0zM16 19.265c-1.804 0-3.265-1.461-3.265-3.265s1.461-3.265 3.265-3.265v0c1.804 0 3.265 1.461 3.265 3.265s-1.461 3.265-3.265 3.265v0z"})})},Zm={undo:Mm,redo:Nm,bold:Tm,italic:wm,header:Sm,strike:Cm,underline:Em,quote:Qm,olist:Am,ulist:_m,todo:Rm,link:Pm,image:Dm,fullscreen:Lm,preview:Fm},Bm=function(){return Object.keys(Zm).filter((function(e){return!/^(fullscreen|preview)/.test(e)})).map((function(e){return Zm[e]}))},jm=function(){return[Fm,Lm]},zm=["prefixCls","className","onClick","toolbars","editor","mode","preview","container","containerEditor","editorProps"];function Hm(e){var t=e.prefixCls,n=void 0===t?"md-editor":t,r=e.className,i=e.toolbars,o=void 0===i?[]:i,a=e.editor,s=e.mode,l=e.preview,u=e.container,c=e.containerEditor,h=e.editorProps,f=void 0===h?{}:h,d=Ge(e,zm);if(!o||0===o.length)return null;return(0,qe.jsx)("div",te({className:n+"-toolbar "+(r||"")+" "+(s?n+"-toolbar-mode":"")},d,{children:(0,rt.Z)(o).map((function(e,t){var n={type:"button"},r="string"===typeof e?Zm[e]:e;if(!r)return null;if(n.children=r.icon,n.onClick=function(){var e;(e=r.execute)&&a&&a&&e(a.current)},r.button&&"object"===typeof r.button){var i=r.button;Object.keys(i).forEach((function(e){n[e]=i[e]}))}else if("function"===typeof r.button)return J.cloneElement(r.button(r,f,{preview:l,container:u,containerEditor:c,editor:a,editorProps:f}),{key:t});return(0,J.createElement)("button",te({},n,{key:t}))}))}))}var Wm=function(e){var t=e.theme,n=e.settings,r=e.styles,i={"&":{backgroundColor:n.background,color:n.foreground},".cm-gutters":{}};n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret}),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},i[".cm-activeLineGutter"]={backgroundColor:n.lineHighlight}),n.selection&&(i["&.cm-focused .cm-selectionBackground .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, ::selection"]={backgroundColor:n.selection}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var o=Ei.tk.theme(i,{dark:"dark"===t}),a=Ti.Qf.define(r);return[o,(0,Ti.nF)(a)]},Um=Wm({theme:"light",settings:{background:"var(--color-canvas-subtle)",foreground:"var(--color-fg-default)",caret:"var(--color-fg-default)",selection:"var(--color-border-default)",selectionMatch:"var(--color-border-muted)",lineHighlight:"var(--color-neutral-muted)",gutterBackground:"var(--color-canvas-subtle)",gutterForeground:"var(--color-fg-muted)",gutterBorder:"var(--color-border-muted)"},styles:[{tag:Bs.pJ.comment,color:"var(--color-prettylights-syntax-comment)"},{tag:Bs.pJ.variableName,color:"var(--color-prettylights-syntax-variable)"},{tag:[Bs.pJ.string,Bs.pJ.special(Bs.pJ.brace)],color:"var(--color-prettylights-syntax-entity)"},{tag:Bs.pJ.number,color:"var(--color-prettylights-syntax-variable)"},{tag:[Bs.pJ.bool,Bs.pJ.null],color:"var(--color-prettylights-syntax-entity)"},{tag:Bs.pJ.keyword,color:"var(--color-prettylights-syntax-keyword)",fontWeight:"bold"},{tag:Bs.pJ.string,color:"var(--color-prettylights-syntax-string)"},{tag:Bs.pJ.operator,color:"var(--color-accent-emphasis)"},{tag:Bs.pJ.deleted,color:"var(--color-prettylights-syntax-markup-deleted-bg)"},{tag:Bs.pJ.deleted,color:"red"},{tag:Bs.pJ.className,color:"var(--color-prettylights-syntax-variable)"},{tag:Bs.pJ.definition(Bs.pJ.typeName),color:"var(--color-prettylights-syntax-entity)"},{tag:Bs.pJ.typeName,color:"var(--color-prettylights-syntax-entity)"},{tag:Bs.pJ.list,color:"var(--color-prettylights-syntax-markup-list)"},{tag:Bs.pJ.heading,color:"var(--color-prettylights-syntax-markup-heading)",fontWeight:"bold"},{tag:Bs.pJ.regexp,color:"var(--color-prettylights-syntax-string-regexp)"},{tag:Bs.pJ.literal,color:"var(--color-prettylights-syntax-markup-italic)"},{tag:Bs.pJ.link,color:"var(--color-prettylights-syntax-constant-other-reference-link)",textDecoration:"underline"},{tag:Bs.pJ.angleBracket,color:"var(--color-fg-default)"},{tag:Bs.pJ.tagName,color:"var(--color-prettylights-syntax-entity-tag)"},{tag:Bs.pJ.attributeName,color:"var(--color-prettylights-syntax-constant)"}]}),Xm=["prefixCls","className","onChange","toolbars","toolbarsMode","visible","renderPreview","visibleEditor","hideToolbar","previewProps","extensions","reExtensions"],Gm=Ei.tk.theme({"&.cm-editor, & .cm-scroller":{borderBottomRightRadius:"3px",borderBottomLeftRadius:"3px"}}),qm=J.forwardRef(Jm);qm.Markdown=xm;var Vm=qm;function Jm(e,t){var n=e.prefixCls,r=void 0===n?"md-editor":n,i=e.className,o=e.onChange,a=e.toolbars,s=void 0===a?Bm():a,l=e.toolbarsMode,u=void 0===l?jm():l,c=e.visible,h=void 0===c||c,f=e.renderPreview,d=e.visibleEditor,p=void 0===d||d,m=e.hideToolbar,g=void 0===m||m,v=e.previewProps,O=void 0===v?{}:v,y=e.extensions,k=void 0===y?[]:y,b=e.reExtensions,x=Ge(e,Xm),T=(0,J.useState)(e.value||""),w=(0,ee.Z)(T,2),S=w[0],C=w[1],E=(0,J.useRef)(null),A=(0,J.useRef)(null),_=(0,J.useRef)(null),Q=(0,J.useRef)(null);(0,J.useImperativeHandle)(t,(function(){return{editor:E,preview:Q}}),[E]);var P={preview:Q,editor:E,container:A,containerEditor:_,editorProps:e},R="number"===typeof x.height?x.height+"px":x.height,D=b||[(0,xi.markdown)({base:xi.markdownLanguage,codeLanguages:Ci}),Gm].concat((0,rt.Z)(k)),N=r+"-preview",M=[r,"wmde-markdown-var",i].filter(Boolean).join(" ");O.source=S;return(0,qe.jsxs)("div",{className:M,ref:A,children:[g&&(0,qe.jsxs)("div",{className:r+"-toolbar-warp",children:[(0,qe.jsx)(Hm,te({},P,{toolbars:s})),(0,qe.jsx)(Hm,te({},P,{toolbars:u,mode:!0}))]}),(0,qe.jsxs)("div",{className:r+"-content",style:{height:x.height},children:[(0,qe.jsx)("div",{className:r+"-content-editor",ref:_,children:p&&(0,qe.jsx)(nl,te({theme:Um},x,{extensions:D,height:R,ref:E,onChange:function(e,t){C(e),o&&o(e,t)}}))}),(0,qe.jsx)("div",{className:N,ref:Q,children:f?f(O,!!h):(0,qe.jsx)(xm,te({},O,{"data-visible":!!h}))})]})]})}var Ym=Wm({theme:"dark",settings:{background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#314151"},styles:[{tag:Bs.pJ.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:Bs.pJ.atom,color:"#77F"},{tag:Bs.pJ.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:Bs.pJ.number,color:"violet"},{tag:Bs.pJ.definition(Bs.pJ.variableName),color:"#fffabc"},{tag:Bs.pJ.variableName,color:"#abcdef"},{tag:Bs.pJ.function(Bs.pJ.variableName),color:"#fffabc"},{tag:Bs.pJ.typeName,color:"#FFDD44"},{tag:Bs.pJ.tagName,color:"#def"},{tag:Bs.pJ.string,color:"#2b4"},{tag:Bs.pJ.meta,color:"#C9F"},{tag:Bs.pJ.bracket,color:"#8a8a8a"},{tag:Bs.pJ.attributeName,color:"#DDFF00"},{tag:Bs.pJ.heading,color:"aquamarine",fontWeight:"bold"},{tag:Bs.pJ.link,color:"blueviolet",fontWeight:"bold"}]}),Km=Wm({theme:"dark",settings:{background:"#282b2e",foreground:"#a9b7c6",caret:"#00FF00",selection:"#343739",selectionMatch:"#343739",lineHighlight:"#343739"},styles:[{tag:[Bs.pJ.keyword,Bs.pJ.deleted,Bs.pJ.className],color:"#cc7832"},{tag:[Bs.pJ.number,Bs.pJ.literal,Bs.pJ.derefOperator],color:"#6897bb"},{tag:[Bs.pJ.link,Bs.pJ.variableName],color:"#629755"},{tag:[Bs.pJ.comment,Bs.pJ.quote],color:"grey"},{tag:[Bs.pJ.meta,Bs.pJ.documentMeta],color:"#bbb529"},{tag:[Bs.pJ.string,Bs.pJ.propertyName,Bs.pJ.attributeValue],color:"#6a8759"},{tag:[Bs.pJ.heading,Bs.pJ.typeName],color:"#ffc66d"},{tag:[Bs.pJ.attributeName],color:"#a9b7c6"},{tag:[Bs.pJ.emphasis],fontStyle:"italic"}]}),eg=Wm({theme:"dark",settings:{background:"#272C35",foreground:"#9d9b97",caret:"#797977",selection:"#ffffff30",selectionMatch:"#2B323D",gutterBackground:"#272C35",gutterForeground:"#465063",lineHighlight:"#2B323D"},styles:[{tag:[Bs.pJ.function(Bs.pJ.variableName),Bs.pJ.function(Bs.pJ.propertyName),Bs.pJ.url,Bs.pJ.processingInstruction],color:"hsl(207, 82%, 66%)"},{tag:[Bs.pJ.tagName,Bs.pJ.heading],color:"#e06c75"},{tag:Bs.pJ.comment,color:"#54636D"},{tag:[Bs.pJ.propertyName],color:"hsl(220, 14%, 71%)"},{tag:[Bs.pJ.attributeName,Bs.pJ.number],color:"hsl( 29, 54%, 61%)"},{tag:Bs.pJ.className,color:"hsl( 39, 67%, 69%)"},{tag:Bs.pJ.keyword,color:"hsl(286, 60%, 67%)"},{tag:[Bs.pJ.string,Bs.pJ.regexp,Bs.pJ.special(Bs.pJ.propertyName)],color:"#98c379"}]}),tg=Wm({theme:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#FBAC52",selection:"#FFD420",selectionMatch:"#FFD420",gutterBackground:"#f5f5f5",gutterForeground:"#4D4D4C",lineHighlight:"#00000012"},styles:[{tag:[Bs.pJ.meta,Bs.pJ.comment],color:"#804000"},{tag:[Bs.pJ.keyword,Bs.pJ.strong],color:"#0000FF"},{tag:[Bs.pJ.number],color:"#FF0080"},{tag:[Bs.pJ.string],color:"#FF0080"},{tag:[Bs.pJ.variableName],color:"#006600"},{tag:[Bs.pJ.escape],color:"#33CC33"},{tag:[Bs.pJ.tagName],color:"#1C02FF"},{tag:[Bs.pJ.heading],color:"#0C07FF"},{tag:[Bs.pJ.quote],color:"#000000"},{tag:[Bs.pJ.list],color:"#B90690"},{tag:[Bs.pJ.documentMeta],color:"#888888"},{tag:[Bs.pJ.function(Bs.pJ.variableName)],color:"#0000A2"},{tag:[Bs.pJ.definition(Bs.pJ.typeName),Bs.pJ.typeName],color:"#6D79DE"}]}),ng=Wm({theme:"dark",settings:{background:"#28211c",foreground:"#9d9b97",caret:"#797977",selection:"#36312e",selectionMatch:"#4f382b",gutterBackground:"#28211c",gutterForeground:"#666666",lineHighlight:"rgba(255, 255, 255, 0.1)"},styles:[{tag:[Bs.pJ.atom,Bs.pJ.number,Bs.pJ.link,Bs.pJ.bool],color:"#9b859d"},{tag:Bs.pJ.comment,color:"#937121"},{tag:[Bs.pJ.keyword,Bs.pJ.tagName],color:"#cf6a4c"},{tag:Bs.pJ.string,color:"#f9ee98"},{tag:Bs.pJ.bracket,color:"#9d9b97"},{tag:[Bs.pJ.variableName],color:"#5ea6ea"},{tag:Bs.pJ.definition(Bs.pJ.variableName),color:"#cf7d34"},{tag:[Bs.pJ.function(Bs.pJ.variableName),Bs.pJ.className],color:"#cf7d34"},{tag:[Bs.pJ.propertyName,Bs.pJ.attributeName],color:"#54be0d"}]}),rg=Wm({theme:"dark",settings:{background:"#2B2B2B",foreground:"#f8f8f2",caret:"#FFFFFF",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"rgba(255, 255, 255, 0.1)",gutterForeground:"#999",lineHighlight:"rgba(255, 255, 255, 0.1)"},styles:[{tag:[Bs.pJ.atom,Bs.pJ.number],color:"#bd93f9"},{tag:[Bs.pJ.comment],color:"#61A151"},{tag:[Bs.pJ.string],color:"#6A8759"},{tag:[Bs.pJ.variableName,Bs.pJ.operator],color:"#A9B7C6"},{tag:[Bs.pJ.meta,Bs.pJ.className],color:"#A9B7C6"},{tag:[Bs.pJ.propertyName],color:"#FFC66D"},{tag:[Bs.pJ.keyword],color:"#CC7832"},{tag:[Bs.pJ.tagName],color:"#ff79c6"},{tag:[Bs.pJ.typeName],color:"#ffb86c"}]}),ig=Wm({theme:"dark",settings:{background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",lineHighlight:"rgba(255, 255, 255, 0.1)"},styles:[{tag:Bs.pJ.comment,color:"#6272a4"},{tag:Bs.pJ.string,color:"#f1fa8c"},{tag:Bs.pJ.atom,color:"#bd93f9"},{tag:Bs.pJ.meta,color:"#f8f8f2"},{tag:[Bs.pJ.keyword,Bs.pJ.operator,Bs.pJ.tagName],color:"#ff79c6"},{tag:[Bs.pJ.function(Bs.pJ.propertyName),Bs.pJ.propertyName],color:"#66d9ef"},{tag:[Bs.pJ.definition(Bs.pJ.variableName),Bs.pJ.function(Bs.pJ.variableName),Bs.pJ.className,Bs.pJ.attributeName],color:"#50fa7b"},{tag:Bs.pJ.atom,color:"#bd93f9"}]}),og=Wm({theme:"light",settings:{background:"#faf8f5",foreground:"#b29762",caret:"#93abdc",selection:"#e3dcce",selectionMatch:"#e3dcce",gutterBackground:"#faf8f5",gutterForeground:"#cdc4b1",lineHighlight:"#EFEFEF"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.bracket],color:"#b6ad9a"},{tag:[Bs.pJ.atom,Bs.pJ.number,Bs.pJ.keyword,Bs.pJ.link,Bs.pJ.attributeName,Bs.pJ.quote],color:"#063289"},{tag:[Bs.pJ.emphasis,Bs.pJ.heading,Bs.pJ.tagName,Bs.pJ.propertyName,Bs.pJ.variableName],color:"#2d2006"},{tag:[Bs.pJ.typeName,Bs.pJ.url,Bs.pJ.string],color:"#896724"},{tag:[Bs.pJ.operator,Bs.pJ.string],color:"#1659df"},{tag:[Bs.pJ.propertyName],color:"#b29762"},{tag:[Bs.pJ.unit,Bs.pJ.punctuation],color:"#063289"}]}),ag=Wm({theme:"dark",settings:{background:"#2a2734",foreground:"#6c6783",caret:"#ffad5c",selection:"rgba(255, 255, 255, 0.1)",gutterBackground:"#2a2734",gutterForeground:"#545167",lineHighlight:"#36334280"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.bracket],color:"#6c6783"},{tag:[Bs.pJ.atom,Bs.pJ.number,Bs.pJ.keyword,Bs.pJ.link,Bs.pJ.attributeName,Bs.pJ.quote],color:"#ffcc99"},{tag:[Bs.pJ.emphasis,Bs.pJ.heading,Bs.pJ.tagName,Bs.pJ.propertyName,Bs.pJ.className,Bs.pJ.variableName],color:"#eeebff"},{tag:[Bs.pJ.typeName,Bs.pJ.url],color:"#7a63ee"},{tag:Bs.pJ.operator,color:"#ffad5c"},{tag:Bs.pJ.string,color:"#ffb870"},{tag:[Bs.pJ.propertyName],color:"#9a86fd"},{tag:[Bs.pJ.unit,Bs.pJ.punctuation],color:"#e09142"}]}),sg=Wm({theme:"light",settings:{background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#e8f2ff"},styles:[{tag:[Bs.pJ.comment],color:"#3F7F5F"},{tag:[Bs.pJ.documentMeta],color:"#FF1717"},{tag:Bs.pJ.keyword,color:"#7F0055",fontWeight:"bold"},{tag:Bs.pJ.atom,color:"#00f"},{tag:Bs.pJ.number,color:"#164"},{tag:Bs.pJ.propertyName,color:"#164"},{tag:[Bs.pJ.variableName,Bs.pJ.definition(Bs.pJ.variableName)],color:"#0000C0"},{tag:Bs.pJ.function(Bs.pJ.variableName),color:"#0000C0"},{tag:Bs.pJ.string,color:"#2A00FF"},{tag:Bs.pJ.operator,color:"black"},{tag:Bs.pJ.tagName,color:"#170"},{tag:Bs.pJ.attributeName,color:"#00c"},{tag:Bs.pJ.link,color:"#219"}]}),lg=Wm({theme:"light",settings:{background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.bracket],color:"#6a737d"},{tag:[Bs.pJ.className,Bs.pJ.propertyName],color:"#6f42c1"},{tag:[Bs.pJ.variableName,Bs.pJ.attributeName,Bs.pJ.number,Bs.pJ.operator],color:"#005cc5"},{tag:[Bs.pJ.keyword,Bs.pJ.typeName,Bs.pJ.typeOperator,Bs.pJ.typeName],color:"#d73a49"},{tag:[Bs.pJ.string,Bs.pJ.meta,Bs.pJ.regexp],color:"#032f62"},{tag:[Bs.pJ.name,Bs.pJ.quote],color:"#22863a"},{tag:[Bs.pJ.heading],color:"#24292e",fontWeight:"bold"},{tag:[Bs.pJ.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[Bs.pJ.deleted],color:"#b31d28",backgroundColor:"ffeef0"}]}),ug=Wm({theme:"dark",settings:{background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.bracket],color:"#8b949e"},{tag:[Bs.pJ.className,Bs.pJ.propertyName],color:"#d2a8ff"},{tag:[Bs.pJ.variableName,Bs.pJ.attributeName,Bs.pJ.number,Bs.pJ.operator],color:"#79c0ff"},{tag:[Bs.pJ.keyword,Bs.pJ.typeName,Bs.pJ.typeOperator,Bs.pJ.typeName],color:"#ff7b72"},{tag:[Bs.pJ.string,Bs.pJ.meta,Bs.pJ.regexp],color:"#a5d6ff"},{tag:[Bs.pJ.name,Bs.pJ.quote],color:"#7ee787"},{tag:[Bs.pJ.heading],color:"#d2a8ff",fontWeight:"bold"},{tag:[Bs.pJ.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[Bs.pJ.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"}]}),cg=Wm({theme:"dark",settings:{background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.documentMeta],color:"#8292a2"},{tag:[Bs.pJ.number,Bs.pJ.bool,Bs.pJ.null,Bs.pJ.atom],color:"#ae81ff"},{tag:[Bs.pJ.attributeValue,Bs.pJ.className,Bs.pJ.name],color:"#e6db74"},{tag:[Bs.pJ.propertyName,Bs.pJ.attributeName],color:"#a6e22e"},{tag:[Bs.pJ.variableName],color:"#9effff"},{tag:[Bs.pJ.squareBracket],color:"#bababa"},{tag:[Bs.pJ.string,Bs.pJ.special(Bs.pJ.brace)],color:"#e6db74"},{tag:[Bs.pJ.regexp,Bs.pJ.className,Bs.pJ.typeName,Bs.pJ.definition(Bs.pJ.typeName)],color:"#66d9ef"},{tag:[Bs.pJ.definition(Bs.pJ.variableName),Bs.pJ.definition(Bs.pJ.propertyName),Bs.pJ.function(Bs.pJ.variableName)],color:"#fd971f"},{tag:[Bs.pJ.keyword,Bs.pJ.definitionKeyword,Bs.pJ.modifier,Bs.pJ.tagName,Bs.pJ.angleBracket],color:"#f92672"}]}),hg=Wm({theme:"dark",settings:{background:"#303841",foreground:"#FFFFFF",caret:"#FBAC52",selection:"#4C5964",selectionMatch:"#3A546E",gutterBackground:"#303841",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:[Bs.pJ.meta,Bs.pJ.comment],color:"#A2A9B5"},{tag:[Bs.pJ.attributeName,Bs.pJ.keyword],color:"#B78FBA"},{tag:Bs.pJ.function(Bs.pJ.variableName),color:"#5AB0B0"},{tag:[Bs.pJ.string,Bs.pJ.regexp,Bs.pJ.attributeValue],color:"#99C592"},{tag:Bs.pJ.operator,color:"#f47954"},{tag:[Bs.pJ.propertyName,Bs.pJ.typeName],color:"#629ccd"},{tag:[Bs.pJ.tagName,Bs.pJ.modifier],color:"#E35F63"},{tag:[Bs.pJ.number,Bs.pJ.definition(Bs.pJ.tagName),Bs.pJ.className,Bs.pJ.definition(Bs.pJ.variableName)],color:"#fbac52"},{tag:[Bs.pJ.atom,Bs.pJ.bool,Bs.pJ.special(Bs.pJ.variableName)],color:"#E35F63"}]}),fg=Wm({theme:"light",settings:{background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#EDF4FF"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.quote],color:"#707F8D"},{tag:[Bs.pJ.typeName,Bs.pJ.typeOperator],color:"#aa0d91"},{tag:[Bs.pJ.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[Bs.pJ.string,Bs.pJ.meta],color:"#D23423"},{tag:[Bs.pJ.name],color:"#032f62"},{tag:[Bs.pJ.typeName],color:"#522BB2"},{tag:[Bs.pJ.variableName],color:"#23575C"},{tag:[Bs.pJ.definition(Bs.pJ.variableName)],color:"#327A9E"},{tag:[Bs.pJ.regexp,Bs.pJ.link],color:"#0e0eff"}]}),dg=Wm({theme:"dark",settings:{background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#2F3239"},styles:[{tag:[Bs.pJ.comment,Bs.pJ.quote],color:"#7F8C98"},{tag:[Bs.pJ.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[Bs.pJ.string,Bs.pJ.meta],color:"#FF8170"},{tag:[Bs.pJ.typeName],color:"#DABAFF"},{tag:[Bs.pJ.definition(Bs.pJ.variableName)],color:"#6BDFFF"},{tag:[Bs.pJ.name],color:"#6BAA9F"},{tag:[Bs.pJ.variableName],color:"#ACF2E4"},{tag:[Bs.pJ.regexp,Bs.pJ.link],color:"#FF8170"}]}),pg='\n
\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668
\n\n\n\n\n\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0 Markdown \u5728\u7ebf\u7f16\u8f91\u5668\uff0c\u4f7f\u7528 markdown \u8bed\u6cd5\u521b\u5efa\u4e00\u7bc7\u7b80\u4ecb\u7f8e\u89c2\u5927\u65b9\u7684\u5fae\u4fe1\u516c\u4f17\u53f7\u56fe\u6587\u3002\u7531\u4e8e\u53d1\u7248\u672c\u9ebb\u70e6\uff0c\u548c\u4e00\u4e9b\u529f\u80fd\u65e0\u6cd5\u6269\u5c55\u505c\u6ede\u5f00\u53d1\u4e86\uff0c\u672a\u6765\u4e0d\u518d\u5f00\u53d1 Chrome \u7684\u63d2\u4ef6(\u6682\u5b58\u5728 chrome \u5206\u652f)\uff0c\u901a\u8fc7 web \u7248\u672c\u5b9a\u5236\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u3002\n\n## \u529f\u80fd\u7279\u6027\n\n\u5f00\u53d1\u8ba1\u5212\u548c\u4e00\u4e9b\u529f\u80fd\u4ecb\u7ecd\uff0c\u6709\u9700\u6c42\u53ef\u4ee5\u5728 issue \u4e2d\u63d0\uff0c\u4f7f\u5f97\u5de5\u5177\u53d8\u5f97\u66f4\u52a0\u5b8c\u5584\u3002\u4e0b\u9762\u793a\u4f8b\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n- [x] \u652f\u6301 Markdown \u6240\u6709\u57fa\u7840\u8bed\u6cd5\n- [x] \u652f\u6301\u81ea\u5b9a\u4e49 CSS \u6837\u5f0f\n- [x] \u652f\u6301\u4e3b\u9898\u9009\u62e9 & \u7f16\u8f91\u9884\u89c8\u3002\n- [x] \u652f\u6301\u660e\u6697\u4e24\u79cd\u4e3b\u9898\u9884\u89c8\u3002\n- [ ] \u652f\u6301\u8272\u76d8\u53d6\u8272\uff0c\u5feb\u901f\u66ff\u6362\u6587\u7ae0\u6574\u4f53\u8272\u8c03\n- [ ] \u652f\u6301 URL \u53c2\u6570\u52a0\u8f7d Markdown \u5185\u5bb9\u3002\n- [x] \u652f\u6301 URL \u53c2\u6570\u9009\u62e9\u9884\u89c8\u4e3b\u9898\u3002\n\n### \u652f\u6301\u4ee3\u7801\u5757\u6837\u5f0f\n\n\u4e0b\u9762\u662f `jsx` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```jsx\nfunction Demo() {\n return Hello World!
\n}\n```\n\n\u4e0b\u9762\u662f `css` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```css\nli {\n font-size: 16px;\n margin: 0;\n line-height: 26px;\n color: rgb(30 41 59);\n font-family:-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif;\n}\n```\n\n### \u652f\u6301\u5185\u8054\u4ee3\u7801\n\n> \u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\nInline Code `{code: 0}`\n\n### \u652f\u6301\u8868\u683c\n\n\u8868\u683c\u65e0\u6cd5\u4f7f\u7528\u81ea\u5b9a\u4e49\u6837\u5f0f\uff0c\u6682\u65f6\u6ca1\u627e\u5230\u89e3\u51b3\u9014\u5f84\n\n| Header 1 | Header 2 |\n| --- | --- |\n| Key 1 | Value 1 |\n| Key 2 | Value 2 |\n| Key 3 | Value 3 |\n\n### \u652f\u6301 GFM \u811a\u6ce8\n\n\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Markdown[^1] \u8bed\u6cd5\u7684\u811a\u6ce8[^2]\u3002 \u9875\u9762\u6700\u540e\u6709\u4e00\u4e9b\u989d\u5916\u7684\u6587\u5b57\u63cf\u8ff0\u3002\u6ce8\u610f\u8fd9\u4e0d\u662f\u5b8c\u6574\u7684\u6ce8\u811a[^3]\u7279\u6027\u3002\n\n[^1]: GitHub \u98ce\u683c\u7684 Markdown \u89c4\u8303 https://github.github.com/gfm/\n[^2]: \u811a\u6ce8 https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/\n[^3]: \u5fae\u4fe1\u6587\u7ae0\u4e0d\u652f\u6301\u951a\u70b9\u8df3\u8f6c\u548c\u6253\u5f00\u7b2c\u4e09\u65b9 URL \u8d85\u94fe\u63a5\uff0c\u6240\u4ee5\u4e0d\u652f\u6301\u5b8c\u6574\u7684\u6ce8\u811a\u7279\u6027\u3002\n\n### \u652f\u6301\u6ce8\u91ca\n\n```html\n\n \u6c49 \n\n```\n\n\u6c49\u5b57\u6ce8\u97f3\u6548\u679c\uff1a\n\n \u6c49 \n \u5b57 \n \u62fc \n \u97f3 \n \u6ce8 \n \u97f3 \n\n\n### \u652f\u6301\u81ea\u5b9a\u4e49\u6837\u5f0f\n\x3c!--rehype:style=color: red;--\x3e\n\n\u5728 Markdown \u4e2d HTML \u6ce8\u91ca\u4e5f\u53ef\u4ee5\u7528\u5728 markdown \u4e2d\uff0c\u5229\u7528\u8fd9\u4e00\u7279\u70b9\uff0c\u4e3a\u4e00\u4e9b\u5185\u5bb9\u81ea\u5b9a\u4e00\u6837\u5f0f\u3002\u4f7f\u7528 HTML \u6ce8\u91ca `\x3c!--rehype:xxx--\x3e`\x3c!--rehype:style=color: red;background: #ff000033;--\x3e \u8ba9 Markdown \u652f\u6301\u6837\u5f0f\u81ea\u5b9a\u4e49\u3002\n\n```markdown\n## \u5b9a\u4e49\u6807\u9898\u6837\u5f0f\n\x3c!--rehype:style=display: flex; height: 230px; align-items: center; justify-content: center; font-size: 38px;--\x3e\n\n\u652f\u6301\u5bf9\u67d0\u4e9b\u6587\u5b57\u53d8\u66f4\u6837\u5f0f\uff0c\u5982_\u6587\u5b57\u989c\u8272_\x3c!--rehype:style=color: red;--\x3e\uff0c\u6587\u5b57\u989c\u8272\u5c06\u88ab\u8bbe\u7f6e\u4e3a\u7ea2\u8272(red)\u3002\n```\n\n\u26a0\ufe0f \u6ce8\u610f\uff1a\u8fd9\u4e00\u7279\u6027\u53ef\u80fd\u9002\u7528\u4e8e\u6709\u4e00\u5b9a css \u524d\u7aef\u57fa\u7840\u77e5\u8bc6\u7684\u7528\u6237\uff0c\u4e0d\u8fc7\u5b83\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u4f7f\u7528 `\x3c!--rehype:style=` \u5f00\u59cb\uff0c`--\x3e` \u7ed3\u675f\uff0c\u4e2d\u95f4\u5305\u88f9 css \u6837\u5f0f\uff0c\u5982 `color: red;` \u8bbe\u7f6e\u6587\u5b57\u7ea2\u8272\u3002\n\n\n### \u6807\u8bb0\u5ffd\u7565\u5185\u5bb9\n\n\u6b64\u7279\u6027\u5229\u7528 HTML \u6ce8\u91ca\u5728 markdown \u4e2d\u88ab\u5ffd\u7565\u7684\u7279\u6027\uff0c\u6807\u8bb0\u9700\u8981\u5ffd\u7565\u7684\u5185\u5bb9\uff0c\u6807\u8bb0\u5f00\u59cb `\x3c!--rehype:ignore:start--\x3e`\uff0c\u6807\u8bb0\u7ed3\u675f `\x3c!--rehype:ignore:end--\x3e`\uff0c\u88ab\u6807\u8bb0\u7684\u5185\u5bb9\u5728\u5fae\u4fe1 Markdown \u7f16\u8f91\u5668\u9884\u89c8\u4e2d\u4e0d\u663e\u793a\u3002\u5728\u5176\u5b83\u9884\u89c8\u5de5\u5177\u4e2d\u5c55\u793a\u5185\u5bb9\uff0c\u6bd4\u5982 GitHub \u4e2d\u80fd\u5c55\u793a\u3002\n\n```markdown\n# \u6ce8\u91ca\u5ffd\u7565\n\n\x3c!--rehype:ignore:start--\x3e\u5185\u5bb9\u5728\u5fae\u4fe1 Markdown \u7f16\u8f91\u5668\u9884\u89c8\u4e2d\u4e0d\u663e\u793a\u3002\u5728\u5176\u5b83\u9884\u89c8\u5de5\u5177\u4e2d\u5c55\u793a\u5185\u5bb9\u3002\x3c!--rehype:ignore:end--\x3e\n```\n\n### \u652f\u6301 URL \u53c2\u6570\u52a0\u8f7d Markdown \u5185\u5bb9\n\n```\nhttps://?md=\n```\n\n\u52a0\u8f7d Markdown \u5185\u5bb9\u7684\u793a\u4f8b URL\uff1a\n\n```\nhttps://jaywcjlove.github.io/wxmp/#/?theme=underscore&md=https%3A%2F%2Fraw.githubusercontent.com%2Fuiwjs%2Freact-markdown-editor%2Fmaster%2FREADME.md\n\nMarkdown URL \u5730\u5740: https://raw.githubusercontent.com/uiwjs/react-markdown-editor/master/README.md\n```\n\n## \u4e3b\u9898\u5b9a\u5236\n\n\u5728\u76ee\u5f55 `src/themes` \u4e2d\u5b58\u653e\u9ed8\u8ba4\u4e3b\u9898\uff0c\u5728 `src/store/context.tsx` \u4e2d\u914d\u7f6e\u4e3b\u9898\uff0c\u4e3b\u9898\u4f7f\u7528 css \u5b9a\u4e49\u6837\u5f0f\uff0c\u4e0d\u652f\u6301\u590d\u6742\u7684\u9009\u62e9\u5668\u3002\u63d0\u4f9b\u5728\u7ebf\u4e3b\u9898\u7f16\u8f91\u5668\uff0c\u6b22\u8fce\u4fee\u6539\u5e76 PR \u8fdb\u4ed3\u5e93\u4f9b\u5927\u5bb6\u4f7f\u7528\u3002\n\n```css\n/* 1~6 \u6807\u9898\u6837\u5f0f\u5b9a\u4e49 */\nh1 {} h2 {} h3 {} h4 {} h5 {} h6 {}\na { color: red; } /* \u8d85\u94fe\u63a5\u6837\u5f0f\u5b9a\u4e49 */\nstrong {} /* \u52a0\u7c97\u6837\u5f0f\u5b9a\u4e49 */\ndel {} /* \u5220\u9664\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\nem {} /* \u4e0b\u5212\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\nu {} /* \u4e0b\u5212\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\np {} /* \u6bb5\u843d\u6837\u5f0f\u5b9a\u4e49 */\nul {} /* \u65e0\u5e8f\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\nol {} /* \u6709\u5e8f\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\nli {} /* \u5217\u8868\u6761\u76ee\u6837\u5f0f\u5b9a\u4e49 */\nblockquote {} /* \u5757\u7ea7\u5f15\u7528\u6837\u5f0f\u5b9a\u4e49 */\ntable {}\ntd {}\nth {}\npre {} /* \u6837\u5f0f\u5b9a\u4e49 */\n.code-highlight {} /* \u4ee3\u7801\u5757\u6837\u5f0f\u5b9a\u4e49 */\n.code-line {} /* \u4ee3\u7801\u5757\u884c\u6837\u5f0f\u5b9a\u4e49 */\n.code-spans {} /* \u4ee3\u7801\u5757\u884c\u6837\u5f0f\u5b9a\u4e49 */\n\nsup {} /* GFM \u811a\u6ce8\u6837\u5f0f\u5b9a\u4e49 */\n.footnotes-title {} /* GFM \u811a\u6ce8\uff0c\u53c2\u8003\u6807\u9898\u6837\u5f0f\u5b9a\u4e49 */\n.footnotes-list {} /* GFM \u811a\u6ce8\uff0c\u53c2\u8003\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\n\n.image-warpper {} /* \u56fe\u7247\u7236\u8282\u70b9\u6837\u5f0f\u5b9a\u4e49 */\n.image {} /* \u56fe\u7247\u6837\u5f0f\u5b9a\u4e49 */\n\n/* \u90e8\u5206\u4ee3\u7801\u9ad8\u4eae\u6837\u5f0f */\n.comment {}\n.property {}\n.function {}\n.keyword {}\n.punctuation {}\n.unit {}\n.tag {}\n.color {}\n.selector {}\n.quote {}\n.number {}\n.attr-name {}\n.attr-value {}\n```\n\n## \u90e8\u7f72\n\n[](https://hub.docker.com/r/wcjiang/wxmp) [](https://hub.docker.com/r/wcjiang/wxmp) [](https://hub.docker.com/r/wcjiang/wxmp)\n\n\u8f7b\u677e\u901a\u8fc7 docker \u90e8\u7f72\u300a\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668\u300b\u7f51\u7ad9\u5e94\u7528\u3002\n\n```bash\ndocker pull wcjiang/wxmp\n# Or\ndocker pull ghcr.io/jaywcjlove/wxmp:latest\n```\n\n```bash\ndocker run --name wxmp --rm -d -p 96611:3000 wcjiang/wxmp:latest\n# Or\ndocker run --name wxmp -itd -p 96611:3000 wcjiang/wxmp:latest\n# Or\ndocker run --name wxmp -itd -p 96611:3000 ghcr.io/jaywcjlove/wxmp:latest\n```\n\n\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u4ee5\u4e0b URL\n\n```\nhttp://localhost:96611/\n```\n\n## \u8d21\u732e\u8005\n\n\u4e00\u5982\u65e2\u5f80\uff0c\u611f\u8c22\u6211\u4eec\u51fa\u8272\u7684\u8d21\u732e\u8005\uff01\n\n\n
\n\n\n\u4e0a\u56fe\u8d21\u732e\u8005\u5217\u8868\uff0c\u7531 [action-contributors](https://github.com/jaywcjlove/github-action-contributors)[^4] \u81ea\u52a8\u751f\u6210\u8d21\u732e\u8005\u56fe\u7247\u3002\n\n\n[^4]: Action Contributors https://github.com/jaywcjlove/github-action-contributors\n\n## License\n\n\u6839\u636e MIT \u8bb8\u53ef\u8bc1\u83b7\u5f97\u8bb8\u53ef\u3002\n',mg={default:{label:"\u9ed8\u8ba4\u4e3b\u9898",value:Um},abcdef:{label:"Abcdef Theme",value:Ym},androidstudio:{label:"Android Studio Theme",value:Km},atomone:{label:"Atomone Theme",value:eg},bbedit:{label:"Bbedit Theme",value:tg},bespin:{label:"Bespin Theme",value:ng},darcula:{label:"Darcula Theme",value:rg},dracula:{label:"Dracula Theme",value:ig},duotoneLight:{label:"Duotone Light Theme",value:og},duotoneDark:{label:"Duotone Dark Theme",value:ag},eclipse:{label:"Eclipse Theme",value:sg},githubLight:{label:"Github Light Theme",value:lg},githubDark:{label:"Github Dark Theme",value:ug},okaidia:{label:"Okaidia Theme",value:cg},sublime:{label:"Sublime Theme",value:hg},xcodeLight:{label:"Xcode Light Theme",value:fg},xcodeDark:{label:"Xcode Dark Theme",value:dg}},gg={default:{label:"\u7fe1\u7fe0\u7eff",value:"a {\n color: #576b95;\n text-decoration: none;\n font-size: 0.85em;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1em;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em;\n border-bottom: 2px solid #009874;\n margin-top: 0;\n}\n\nh2 {\n display: table;\n text-align: center;\n color: #fff;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.3em;\n font-weight: bold;\n margin: 4em auto 2em;\n padding: 0 0.3em;\n border-radius: 0.3em;\n background: #009874;\n}\n\np {\n font-size: 0.85em;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.1em;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 3px solid #009874;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n color: rgb(30 41 59);\n font-size: 0.85em;\n}\n\nblockquote {\n text-align: left;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 0.85em;\n font-style: normal;\n border-left: none;\n padding: 0.1rem 1rem;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1rem 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 0.85em;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 0.85em;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: pre;\n color: #009874;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.2em 0.6em;\n border-radius: 0.6em;\n font-weight: bold;\n font-size: 0.45em;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1em;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 0.75em;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n"},simple:{label:"\u7b80\u6d01\u84dd",value:"a {\n color: #576b95;\n text-decoration: none;\n font-size: 0.85em;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.2em;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em;\n border-bottom: 2px solid #0f4c81;\n margin-top: 0;\n}\n\nh2 {\n display: table;\n text-align: center;\n color: #fff;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.2em;\n font-weight: bold;\n margin: 4em auto 2em;\n padding: 0 0.3em;\n border-radius: 0.3rem;\n background: #0f4c81;\n}\n\np {\n font-size: 0.85em;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.1em;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 3px solid #0f4c81;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n color: rgb(30 41 59);\n font-size: 0.85em;\n}\n\nblockquote {\n text-align: left;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 0.85em;\n font-style: normal;\n border-left: none;\n padding: 0.1rem 1rem;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1rem 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 0.85em;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 0.85em;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: pre;\n color: #0f4c81;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.2em 0.6em;\n border-radius: 0.6em;\n font-weight: bold;\n font-size: 0.45em;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1em;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 0.75em;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n"},underscore:{label:"\u4e0b\u5212\u7ebf\u9ec4",value:"a {\n color: #576b95;\n text-decoration: none;\n font-size: 0.85em;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.15;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.3em;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em 0.3em 1em;\n margin-top: 0;\n box-shadow: inset 0 -0.9rem 0 0 #ffb11b;\n}\n\nh2 {\n display: table;\n line-height: 1.35;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.2em;\n font-weight: bold;\n padding: 0 0.3em;\n margin: 2em 0 1em 0;\n box-shadow: inset 0 -0.7rem 0 0 #ffb11b;\n}\n\np {\n font-size: 0.85em;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1.1em;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 5px solid #ffb11b;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n color: rgb(30 41 59);\n font-size: 0.85em;\n}\n\nblockquote {\n text-align: left;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 0.85em;\n font-style: normal;\n border-left: none;\n padding: 0.1rem 1rem;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1rem 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 0.85em;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 0.85em;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: pre;\n color: #ffb11b;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.2em 0.6em;\n border-radius: 0.6em;\n font-weight: bold;\n font-size: 0.45em;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1em;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 0.75em;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n"},base:{label:"\u7b80\u6d01",value:"a {\n color: inherit;\n text-decoration: none;\n}\n\nh1 {\n color: inherit;\n font-size: 1.5rem;\n font-weight: bold;\n}\n\nh2 {\n color: inherit;\n margin: 2.5rem 0 1rem 0;\n font-size: 1.3em;\n font-weight: bold;\n}\n\nh3 {\n color: inherit;\n margin: 1em 0 1em 0;\n font-weight: bold;\n font-size: 1em;\n}\n\nh4 {\n color: inherit;\n margin: 0.6em 0 0.6em 0;\n font-weight: bold;\n font-size: 0.9em;\n}\n\np {\n color: initial;\n font-size: 0.85em;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n font-size: 0.85em;\n}\n\nblockquote {\n font-style: normal;\n border-left: none;\n margin: 1em 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-size: 0.85em;\n font-weight: 400;\n letter-spacing: normal;\n word-spacing: 0px;\n border-radius: 5px;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 0.85em;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 0.85em;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: pre;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.2em 0.6em;\n border-radius: 0.6em;\n font-weight: bold;\n font-size: 0.45em;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 1em;\n font-weight: bold;\n margin: 3rem 0 0.6rem 0;\n padding-left: 0.2rem;\n}\n\n.footnotes-list {\n font-size: 0.75em;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n"}},vg=J.createContext({markdown:pg,setMarkdown:function(){},css:gg.underscore.value,setCss:function(){},previewTheme:"underscore",setPreviewTheme:function(){},theme:"default",setTheme:function(){}}),Og=function(e){var t=e.children,n=function(e){var t=(0,J.useRef)(Xe(e)),n=Qe(),r=(0,J.useMemo)((function(){var e,r=Xe(n.search),i=(0,K.Z)(t.current.keys());try{var o=function(){var n=e.value;r.has(n)||t.current.getAll(n).forEach((function(e){r.append(n,e)}))};for(i.s();!(e=i.n()).done;)o()}catch(a){i.e(a)}finally{i.f()}return r}),[n.search]),i=Pe();return[r,(0,J.useCallback)((function(e,t){i("?"+Xe(e),t)}),[i])]}(),r=(0,ee.Z)(n,2),i=r[0],o=r[1],a=i.get("theme"),s=a||"underscore",l=J.useState(pg),u=(0,ee.Z)(l,2),c=u[0],h=u[1],f=J.useState(gg[s].value),d=(0,ee.Z)(f,2),p=d[0],m=d[1],g=J.useState(s),v=(0,ee.Z)(g,2),O=v[0],y=v[1],k=J.useState("default"),b=(0,ee.Z)(k,2),x=b[0],T=b[1];return(0,J.useEffect)((function(){a!==O&&(i.set("theme",O),o(i))}),[a,O,i,o]),(0,qe.jsx)(vg.Provider,{value:{markdown:c,setMarkdown:h,css:p,setCss:m,previewTheme:O,setPreviewTheme:y,theme:x,setTheme:T},children:t})},yg=10,kg=11,bg=12,xg=13,Tg=15,wg=16,Sg=17,Cg=18,Eg=19,Ag=20,_g=21,Qg=22,Pg=23,Rg=24,Dg=25;function Ng(e){return e>=48&&e<=57}function Mg(e){return Ng(e)||e>=65&&e<=70||e>=97&&e<=102}function Ig(e){return e>=65&&e<=90}function Lg(e){return function(e){return Ig(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function $g(e){return Lg(e)||Ng(e)||45===e}function Fg(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Zg(e){return 10===e||13===e||12===e}function Bg(e){return Zg(e)||32===e||9===e}function jg(e,t){return 92===e&&(!Zg(t)&&0!==t)}function zg(e,t,n){return 45===e?Lg(t)||45===t||jg(t,n):!!Lg(e)||92===e&&jg(e,t)}function Hg(e,t,n){return 43===e||45===e?Ng(t)?2:46===t&&Ng(n)?3:0:46===e?Ng(t)?2:0:Ng(e)?1:0}function Wg(e){return 65279===e||65534===e?1:0}for(var Ug=new Array(128),Xg=130,Gg=0;Gge.length)return!1;for(var i=t;i=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var sv=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function lv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return null===e||e.length0?Wg(t.charCodeAt(0)):0,i=lv(e.lines,n),o=lv(e.columns,n),a=e.startLine,s=e.startColumn,l=r;l1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}},{key:"getLocation",value:function(e,t){return this.computed||uv(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}},{key:"getLocationRange",value:function(e,t,n){return this.computed||uv(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}}]),e}(),hv=16777215,fv=24,dv=new Map([[2,Qg],[_g,Qg],[Eg,Ag],[Pg,Rg]]),pv=function(){function e(t,n){(0,_i.Z)(this,e),this.setSource(t,n)}return(0,Qi.Z)(e,[{key:"reset",value:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}},{key:"setSource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=(e=String(e||"")).length,r=lv(this.offsetAndType,e.length+1),i=lv(this.balance,e.length+1),o=0,a=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(function(e,t,u){switch(e){default:i[o]=n;break;case a:var c=s&hv;for(s=i[c],a=s>>fv,i[o]=c,i[c++]=o;c>fv:0}},{key:"lookupOffset",value:function(e){return(e+=this.tokenIndex)0?e>fv,this.tokenEnd=t&hv):(this.tokenIndex=this.tokenCount,this.next())}},{key:"next",value:function(){var e=this.tokenIndex+1;e>fv,this.tokenEnd=e&hv):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}},{key:"skipSC",value:function(){for(;this.tokenType===xg||this.tokenType===Dg;)this.next()}},{key:"skipUntilBalanced",value:function(e,t){var n,r,i=e;e:for(;i0?this.offsetAndType[i-1]&hv:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:i++;break e;default:this.balance[n]===i&&(i=n)}this.skip(i-this.tokenIndex)}},{key:"forEachToken",value:function(e){for(var t=0,n=this.firstCharOffset;t>fv,r,o,t)}}},{key:"dump",value:function(){var e=this,t=new Array(this.tokenCount);return this.forEachToken((function(n,r,i,o){t[o]={idx:o,type:sv[n],chunk:e.source.substring(r,i),balance:e.balance[o]}})),t}}]),e}();function mv(e,t){function n(t){return t=e.length?void(u=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&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),x(n),c}},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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}var Ov=null,yv=function(e){function t(){(0,_i.Z)(this,t),this.head=null,this.tail=null,this.cursor=null}return(0,Qi.Z)(t,[{key:"createItem",value:function(e){return t.createItem(e)}},{key:"allocateCursor",value:function(e,t){var n;return null!==Ov?(n=Ov,Ov=Ov.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}},{key:"releaseCursor",value:function(){var e=this.cursor;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Ov,Ov=e}},{key:"updateCursors",value:function(e,t,n,r){for(var i=this.cursor;null!==i;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}},{key:e,value:vv().mark((function e(){var t;return vv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(null===t){e.next=7;break}return e.next=4,t.data;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"size",get:function(){for(var e=0,t=this.head;null!==t;t=t.next)e++;return e}},{key:"isEmpty",get:function(){return null===this.head}},{key:"first",get:function(){return this.head&&this.head.data}},{key:"last",get:function(){return this.tail&&this.tail.data}},{key:"fromArray",value:function(e){var n=null;this.head=null;var r,i=(0,K.Z)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.createItem(o);null!==n?n.next=a:this.head=a,a.prev=n,n=a}}catch(s){i.e(s)}finally{i.f()}return this.tail=n,this}},{key:"toArray",value:function(){return(0,rt.Z)(this)}},{key:"toJSON",value:function(){return(0,rt.Z)(this)}},{key:"forEach",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.allocateCursor(null,this.head);null!==n.next;){var r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}},{key:"forEachRight",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.allocateCursor(this.tail,null);null!==n.prev;){var r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}},{key:"reduce",value:function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(null,this.head),o=t;null!==i.next;)n=i.next,i.next=n.next,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}},{key:"reduceRight",value:function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(this.tail,null),o=t;null!==i.prev;)n=i.prev,i.prev=n.prev,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}},{key:"some",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}},{key:"map",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=new t,i=this.head;null!==i;i=i.next)r.appendData(e.call(n,i.data,i,this));return r}},{key:"filter",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=new t,i=this.head;null!==i;i=i.next)e.call(n,i.data,i,this)&&r.appendData(i.data);return r}},{key:"nextUntil",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null!==e){for(var r=this.allocateCursor(null,e);null!==r.next;){var i=r.next;if(r.next=i.next,t.call(n,i.data,i,this))break}this.releaseCursor()}}},{key:"prevUntil",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null!==e){for(var r=this.allocateCursor(e,null);null!==r.prev;){var i=r.prev;if(r.prev=i.prev,t.call(n,i.data,i,this))break}this.releaseCursor()}}},{key:"clear",value:function(){this.head=null,this.tail=null}},{key:"copy",value:function(){var e,n=new t,r=(0,K.Z)(this);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.appendData(i)}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"prepend",value:function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}},{key:"prependData",value:function(e){return this.prepend(t.createItem(e))}},{key:"append",value:function(e){return this.insert(e)}},{key:"appendData",value:function(e){return this.insert(t.createItem(e))}},{key:"insert",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}},{key:"insertData",value:function(e,n){return this.insert(t.createItem(e),n)}},{key:"remove",value:function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}},{key:"push",value:function(e){this.insert(t.createItem(e))}},{key:"pop",value:function(){return null!==this.tail?this.remove(this.tail):null}},{key:"unshift",value:function(e){this.prepend(t.createItem(e))}},{key:"shift",value:function(){return null!==this.head?this.remove(this.head):null}},{key:"prependList",value:function(e){return this.insertList(e,this.head)}},{key:"appendList",value:function(e){return this.insertList(e)}},{key:"insertList",value:function(e,t){return null===e.head||(void 0!==t&&null!==t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}},{key:"replace",value:function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}}],[{key:"createItem",value:function(e){return{prev:null,next:null,data:e}}}]),t}(Symbol.iterator);function kv(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,"".concat(e,": ").concat(t,"\n"))}})}var bv=" ";function xv(e,t){var n=e.source,r=e.line,i=e.column;function o(e,t){return a.slice(e,t).map((function(t,n){return String(e+n+1).padStart(u)+" |"+t})).join("\n")}var a=n.split(/\r\n?|\n|\f/),s=Math.max(1,r-t)-1,l=Math.min(r+t,a.length+1),u=Math.max(4,String(l).length)+1,c=0;(i+=(bv.length-1)*(a[r-1].substr(0,i-1).match(/\t/g)||[]).length)>100&&(c=i-60+3,i=58);for(var h=s;h<=l;h++)h>=0&&h0&&a[h].length>c?"\u2026":"")+a[h].substr(c,98)+(a[h].length>c+100-1?"\u2026":""));return[o(s,r),new Array(i+u+2).join("-")+"^",o(r,l)].filter(Boolean).join("\n")}function Tv(e,t,n,r,i){return Object.assign(kv("SyntaxError",e),{source:t,offset:n,line:r,column:i,sourceFragment:function(e){return xv({source:t,line:r,column:i},isNaN(e)?0:e)},get formattedMessage(){return"Parse error: ".concat(e,"\n")+xv({source:t,line:r,column:i},2)}})}function wv(e){for(var t=this.createList(),n=!1,r={recognizer:e};!this.eof;){switch(this.tokenType){case Dg:this.next();continue;case xg:n=!0,this.next();continue}var i=e.getNode.call(this,r);if(void 0===i)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),n=!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Sv=function(){};function Cv(e){return function(){return this[e]()}}function Ev(e){var t=Object.create(null);for(var n in e){var r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function Av(e){var t="",n="",r=!1,i=Sv,o=!1,a=new cv,s=Object.assign(new pv,function(e){var t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Ev(e.atrule),pseudo:Ev(e.pseudo),node:Ev(e.node)};for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Cv(e.parseContext[n])}return(0,it.Z)((0,it.Z)({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:wv,consumeUntilBalanceEnd:function(){return 0},consumeUntilLeftCurlyBracket:function(e){return 123===e?1:0},consumeUntilLeftCurlyBracketOrSemicolon:function(e){return 123===e||59===e?1:0},consumeUntilExclamationMarkOrSemicolon:function(e){return 33===e||59===e?1:0},consumeUntilSemicolonIncluded:function(e){return 59===e?2:0},createList:function(){return new yv},createSingleNodeList:function(e){return(new yv).appendData(e)},getFirstListNode:function(e){return e&&e.first},getLastListNode:function(e){return e&&e.last},parseWithFallback:function(e,t){var n=this.tokenIndex;try{return e.call(this)}catch(at){if(o)throw at;var r=t.call(this,n);return o=!0,i(at,r),o=!1,r}},lookupNonWSType:function(e){var t;do{if((t=this.lookupType(e++))!==xg)return t}while(0!==t);return 0},charCodeAt:function(e){return e>=0&&e=0&&Bg(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new Tv(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,mv),a.setSource(t,l.offset,l.line,l.column),n=l.filename||"",r=Boolean(l.positions),i="function"===typeof l.onParseError?l.onParseError:Sv,o=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);var u=l,c=u.context,h=void 0===c?"default":c,f=u.onComment;if(h in s.context===!1)throw new Error("Unknown context `"+h+"`");"function"===typeof f&&s.forEachToken((function(e,n,r){if(e===Dg){var i=s.getLocation(n,r),o=Kg(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);f(o,i)}}));var d=s.context[h].call(s,l);return s.eof||s.error(),d}),{SyntaxError:Tv,config:s.config})}var _v=n(7806),Qv=new Set(["Atrule","Selector","Declaration"]);var Pv=function(e,t){if(9===e&&(e=t),"string"===typeof e){var n=e.charCodeAt(0);return n>127?32768:n<<8}return e},Rv=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,yg],[1,kg],[1,bg],[1,Tg],[1,_g],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,yg],[3,kg],[3,bg],[3,Tg],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,yg],[4,kg],[4,bg],[4,Tg],[bg,1],[bg,2],[bg,7],[bg,8],[bg,"-"],[bg,yg],[bg,kg],[bg,bg],[bg,Tg],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",yg],["#",kg],["#",bg],["#",Tg],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",yg],["-",kg],["-",bg],["-",Tg],[yg,1],[yg,2],[yg,7],[yg,8],[yg,yg],[yg,kg],[yg,bg],[yg,"%"],[yg,Tg],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",Tg],[".",yg],[".",kg],[".",bg],["+",yg],["+",kg],["+",bg],["/","*"]],Dv=Rv.concat([[1,4],[bg,4],[4,4],[3,_g],[3,5],[3,wg],[kg,kg],[kg,bg],[kg,2],[kg,"-"],[Qg,1],[Qg,2],[Qg,kg],[Qg,bg],[Qg,4],[Qg,"-"]]);function Nv(e){var t=new Set(e.map((function(e){var t=(0,ee.Z)(e,2),n=t[0],r=t[1];return Pv(n)<<16|Pv(r)})));return function(e,n,r){var i=Pv(n,r),o=r.charCodeAt(0);return(45===o&&1!==n&&2!==n&&n!==Tg||43===o?t.has(e<<16|o<<8):t.has(e<<16|i))&&this.emit(" ",xg,!0),i}}var Mv=Nv(Rv),Iv=Nv(Dv);function Lv(e,t){var n=this;if("function"!==typeof t)e.children.forEach(this.node,this);else{var r=null;e.children.forEach((function(e){null!==r&&t.call(n,r),n.node(e),r=e}))}}function $v(e){var t=this;mv(e,(function(n,r,i){t.token(n,e.slice(r,i))}))}function Fv(e){var t=new Map;for(var n in e.node){var r=e.node[n];"function"===typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){var r="",o=0,a={node:function(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:Iv,token:function(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",xg,!0)},emit:function(e){r+=e},result:function(){return r}};n&&("function"===typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=function(e){var t=new _v.h,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},o={generated:i},a=1,s=0,l=!1,u=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Qv.has(e.type)){var c=e.loc.start.line,h=e.loc.start.column-1;r.line===c&&r.column===h||(r.line=c,r.column=h,n.line=a,n.column=s,l&&(l=!1,n.line===i.line&&n.column===i.column||t.addMapping(o)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}u.call(this,e),l&&Qv.has(e.type)&&(i.line=a,i.column=s)};var c=e.emit;e.emit=function(e,t,n){for(var r=0;r";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}function Vv(e,t){var n=Gv,r=!1,i=!1;return"function"===typeof t?n=t:t&&(r=Boolean(t.forceBraces),i=Boolean(t.compact),"function"===typeof t.decorate&&(n=t.decorate)),qv(e,n,r,i)}var Jv={offset:0,line:1,column:1};function Yv(e,t){var n=e&&e.loc&&e.loc[t];return n?"line"in n?Kv(n):n:null}function Kv(e,t){var n={offset:e.offset,line:e.line,column:e.column};if(t){var r=t.split(/\n|\r\n?|\f/);n.offset+=t.length,n.line+=r.length-1,n.column=1===r.length?n.column+t.length:r.pop().length+1}return n}var eO=function(e,t){var n=kv("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},tO=function(e,t,n,r){var i=kv("SyntaxMatchError",e),o=function(e,t){for(var n,r,i=e.tokens,o=e.longestMatch,a=o1?(n=Yv(s||t,"end")||Kv(Jv,h),r=Kv(n)):(n=Yv(s,"start")||Kv(Yv(t,"start")||Jv,h.slice(0,l)),r=Yv(s,"end")||Kv(n,h.substr(l,u))),{css:h,mismatchOffset:l,mismatchLength:u,start:n,end:r}}(r,n),a=o.css,s=o.mismatchOffset,l=o.mismatchLength,u=o.start,c=o.end;return i.rawMessage=e,i.syntax=t?Vv(t):"",i.css=a,i.mismatchOffset=s,i.mismatchLength=l,i.message=e+"\n syntax: "+i.syntax+"\n value: "+(a||"")+"\n --------"+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,u),i.loc={source:n&&n.loc&&n.loc.source||"",start:u,end:c},i},nO=new Map,rO=new Map,iO=function(e){if(nO.has(e))return nO.get(e);var t=e.toLowerCase(),n=nO.get(t);if(void 0===n){var r=aO(t,0),i=r?"":sO(t,0);n=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:r})}return nO.set(e,n),n},oO=function(e){if(rO.has(e))return rO.get(e);var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=aO(t,n.length);if(!r&&(t=t.toLowerCase(),rO.has(t))){var i=rO.get(t);return rO.set(e,i),i}var o=r?"":sO(t,n.length),a=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(a.length),name:t.substr(n.length),hack:n,vendor:o,prefix:a,custom:r});return rO.set(e,s),s};function aO(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function sO(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var lO=["initial","inherit","unset","revert","revert-layer"],uO=45,cO=!0;function hO(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function fO(e,t,n){for(;null!==e&&(e.type===xg||e.type===Dg);)e=n(++t);return t}function dO(e,t,n,r){if(!e)return 0;var i=e.value.charCodeAt(t);if(43===i||i===uO){if(n)return 0;t++}for(;t6)return 0}return r}function vO(e,t,n){if(!e)return 0;for(;mO(n(t),63);){if(++e>6)return 0;t++}return t}var OO=["calc(","-moz-calc(","-webkit-calc("],yO=new Map([[2,Qg],[_g,Qg],[Eg,Ag],[Pg,Rg]]);function kO(e,t){return te.max&&"string"!==typeof e.max)return!0}return!1}function SO(e){return function(t,n,r){return null===t?0:2===t.type&&xO(t.value,OO)?function(e,t){var n=0,r=[],i=0;e:do{switch(e.type){case Rg:case Qg:case Ag:if(e.type!==n)break e;if(n=r.pop(),0===r.length){i++;break e}break;case 2:case _g:case Eg:case Pg:r.push(n),n=yO.get(e.type)}i++}while(e=t(i));return i}(t,n):e(t,n,r)}}function CO(e){return function(t){return null===t||t.type!==e?0:1}}function EO(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||t.type!==bg)return 0;var i=iv(t.value,0);if(null!==e){var o=t.value.indexOf("\\",i),a=-1!==o&&TO(t.value,o)?t.value.substring(i,o):t.value.substr(i);if(!1===e.has(a.toLowerCase()))return 0}return wO(r,t.value,i)?0:1}}function AO(e){return"function"!==typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===yg&&0===Number(t.value)?1:e(t,n,r)}}var _O={"ident-token":CO(1),"function-token":CO(2),"at-keyword-token":CO(3),"hash-token":CO(4),"string-token":CO(5),"bad-string-token":CO(6),"url-token":CO(7),"bad-url-token":CO(8),"delim-token":CO(9),"number-token":CO(yg),"percentage-token":CO(kg),"dimension-token":CO(bg),"whitespace-token":CO(xg),"CDO-token":CO(14),"CDC-token":CO(Tg),"colon-token":CO(wg),"semicolon-token":CO(Sg),"comma-token":CO(Cg),"[-token":CO(Eg),"]-token":CO(Ag),"(-token":CO(_g),")-token":CO(Qg),"{-token":CO(Pg),"}-token":CO(Rg),string:CO(5),ident:CO(1),"custom-ident":function(e){if(null===e||1!==e.type)return 0;var t=e.value.toLowerCase();return xO(t,lO)||bO(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==kO(e.value,0)||45!==kO(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n=128||0===DO[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function LO(e){for(var t=e.pos;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function $O(e){var t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function FO(e){var t,n=null;return e.eat(RO),t=LO(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=LO(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function ZO(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,e.charCode()===RO?t=FO(e):63===e.charCode()?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case RO:t=FO(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,35===e.charCode()&&43===e.charCodeAt(e.pos-1)?ZO(e,n):n):t}function BO(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function jO(e){var t,n=null;return e.eat(60),t=IO(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(MO(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():(t=r*Number(LO(e)),0!==DO[e.charCode()]&&(t+=IO(e))),MO(e),e.eat(44),MO(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(LO(e)),0!==DO[e.charCode()]&&(n+=IO(e))),e.eat(93),{type:"Range",min:t,max:n}}(e)),e.eat(62),ZO(e,{type:"Type",name:t,opts:n})}function zO(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}var r;for(t=Object.keys(t).sort((function(e,t){return NO[e]-NO[t]}));t.length>0;){r=t.shift();for(var i=0,o=0;i1&&(e.splice(o,i-o,n(e.slice(o,i),r)),i=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,i-o,n(e.slice(o,i),r))}return r}function HO(e){for(var t,n=[],r={},i=null,o=e.pos;t=WO(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==i&&"Combinator"!==i.type||(e.pos=o,e.error("Unexpected combinator")),r[t.value]=!0):null!==i&&"Combinator"!==i.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),i=t,o=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:zO(n,r)||" ",disallowEmpty:!1,explicit:!1}}function WO(e){var t=e.charCode();if(t<128&&1===DO[t])return function(e){var t=IO(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):ZO(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return ZO(e,function(e){var t;return e.eat(91),t=HO(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){var t;return e.eat(60),e.eat(39),t=IO(e),e.eat(39),e.eat(62),ZO(e,{type:"Property",name:t})}(e):jO(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return ZO(e,{type:"String",value:$O(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:MO(e)};case 64:return(t=e.nextCharCode())<128&&1===DO[t]?(e.pos++,{type:"AtKeyword",name:IO(e)}):BO(e);case 42:case 43:case 63:case 35:case 33:break;case RO:if((t=e.nextCharCode())<48||t>57)return BO(e);break;default:return BO(e)}}function UO(e){var t=new PO(e),n=HO(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}var XO=function(){};function GO(e){return"function"===typeof e?e:XO}var qO={decorator:function(e){var t=[],n=null;return(0,it.Z)((0,it.Z)({},e),{},{node:function(t){var r=n;n=t,e.node.call(this,t),n=r},emit:function(e,r,i){t.push({type:r,value:e,node:i?null:n})},result:function(){return t}})}};function VO(e,t){return"string"===typeof e?function(e){var t=[];return mv(e,(function(n,r,i){return t.push({type:n,value:e.slice(r,i),node:null})})),t}(e):t.generate(e,qO)}var JO={type:"Match"},YO={type:"Mismatch"},KO={type:"DisallowEmpty"};function ey(e,t,n){return t===JO&&n===YO||e===JO&&t===JO&&n===JO?e:("If"===e.type&&e.else===YO&&t===JO&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function ty(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function ny(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&ty(e.name)}function ry(e,t,n){switch(e){case" ":for(var r=JO,i=t.length-1;i>=0;i--){r=ey(t[i],r,YO)}return r;case"|":for(var o=YO,a=null,s=t.length-1;s>=0;s--){var l=t[s];if(ny(l)&&(null===a&&s>0&&ny(t[s-1])&&(o=ey({type:"Enum",map:a=Object.create(null)},JO,o)),null!==a)){var u=(ty(l.name)?l.name.slice(0,-1):l.name).toLowerCase();if(u in a===!1){a[u]=l;continue}}a=null,o=ey(l,JO,o)}return o;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(var c=YO,h=function(n){var r=t[n],i=void 0;i=t.length>1?ry(e,t.filter((function(e){return e!==r})),!1):JO,c=ey(r,i,c)},f=t.length-1;f>=0;f--)h(f);return c;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(var d=n?JO:YO,p=function(n){var r=t[n],i=void 0;i=t.length>1?ry(e,t.filter((function(e){return e!==r})),!0):JO,d=ey(r,i,d)},m=t.length-1;m>=0;m--)p(m);return d}}function iy(e){if("function"===typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=ry(e.combinator,e.terms.map(iy),!1);return e.disallowEmpty&&(t=ey(t,KO,YO)),t;case"Multiplier":return function(e){var t=JO,n=iy(e.term);if(0===e.max)n=ey(n,KO,YO),(t=ey(n,null,YO)).then=ey(JO,JO,t),e.comma&&(t.then.else=ey({type:"Comma",syntax:e},t,YO));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==JO&&(t=ey({type:"Comma",syntax:e},t,YO)),t=ey(n,ey(JO,JO,t),YO);if(0===e.min)t=ey(JO,JO,t);else for(var i=0;i=65&&i<=90&&(i|=32),i!==r)return!1}return!0}function cy(e){return null===e||(e.type===Cg||2===e.type||e.type===_g||e.type===Eg||e.type===Pg||function(e){return 9===e.type&&"?"!==e.value}(e))}function hy(e){return null===e||(e.type===Qg||e.type===Ag||e.type===Rg||9===e.type&&"/"===e.value)}function fy(e,t,n){function r(){do{v++,g=vO&&(O=v)}function u(){y=2===y.type?y.prev:{type:3,syntax:c.syntax,token:y.token,prev:y},c=c.prev}var c=null,h=null,f=null,d=null,p=0,m=null,g=null,v=-1,O=0,y={type:0,syntax:null,token:null,prev:null};for(r();null===m&&++p<15e3;)switch(t.type){case"Match":if(null===h){if(null!==g&&(v!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=YO;break}m=sy;break}if((t=h.nextState)===KO){if(h.matchStack===y){t=YO;break}t=JO}for(;h.syntaxStack!==c;)u();h=h.prev;break;case"Mismatch":if(null!==d&&!1!==d)(null===f||v>f.tokenIndex)&&(f=d,d=!1);else if(null===f){m="Mismatch";break}t=f.nextState,h=f.thenStack,c=f.syntaxStack,y=f.matchStack,v=f.tokenIndex,g=vv){for(;v":"<'"+t.name+"'>"));if(!1!==d&&null!==g&&"Type"===t.type)if("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value){null===d&&(d=o(t,f)),t=YO;break}c={syntax:t.syntax,opts:t.syntax.opts||null!==c&&c.opts||null,prev:c},y={type:2,syntax:t.syntax,token:y.token,prev:y},t=C.match;break;case"Keyword":var E=t.name;if(null!==g){var A=g.value;if(-1!==A.indexOf("\\")&&(A=A.replace(/\\[09].*$/,"")),uy(A,E)){l(),t=JO;break}}t=YO;break;case"AtKeyword":case"Function":if(null!==g&&uy(g.value,t.name)){l(),t=JO;break}t=YO;break;case"Token":if(null!==g&&g.value===t.value){l(),t=JO;break}t=YO;break;case"Comma":null!==g&&g.type===Cg?cy(y.token)?t=YO:(l(),t=hy(g)?YO:JO):t=cy(y.token)||hy(g)?JO:YO;break;case"String":for(var _="",Q=v;Q=0}function wy(e){return Boolean(e)&&Ty(e.offset)&&Ty(e.line)&&Ty(e.column)}function Sy(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var i in n){var o=!0;if(!1!==xy.call(n,i)){if("type"===i)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===i){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!==typeof n.loc.source)i+=".source";else if(wy(n.loc.start)){if(wy(n.loc.end))continue;i+=".end"}else i+=".start";o=!1}else if(t.hasOwnProperty(i)){o=!1;for(var a=0;!o&&a");else{if(!Array.isArray(u))throw new Error("Wrong value `"+u+"` in `"+e+"."+o+"` structure definition");a.push("List")}}i[o]=a.join(" | ")}return{docs:i,check:Sy(e,r)}}var Ey=oy(lO.join(" | "));function Ay(e,t,n){var r={};for(var i in e)e[i].syntax&&(r[i]=n?e[i].syntax:Vv(e[i].syntax,{compact:t}));return r}function _y(e,t,n){for(var r={},i=0,o=Object.entries(e);i3&&void 0!==arguments[3]?arguments[3]:null,i={type:t,name:n},o={type:t,name:n,parent:r,serializable:"string"===typeof e||e&&"string"===typeof e.type,syntax:null,match:null};return"function"===typeof e?o.match=oy(e,i):("string"===typeof e?Object.defineProperty(o,"syntax",{get:function(){return Object.defineProperty(o,"syntax",{value:UO(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get:function(){return Object.defineProperty(o,"match",{value:oy(o.syntax,i)}),o.match}})),o}},{key:"addAtrule_",value:function(e,t){var n=this;t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((function(r,i){return r[i]=n.createDescriptor(t.descriptors[i],"AtruleDescriptor",i,e),r}),Object.create(null)):null})}},{key:"addProperty_",value:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))}},{key:"addType_",value:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e))}},{key:"checkAtruleName",value:function(e){if(!this.getAtrule(e))return new eO("Unknown at-rule","@"+e)}},{key:"checkAtrulePrelude",value:function(e,t){var n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||Py(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}},{key:"checkAtruleDescriptorName",value:function(e,t){var n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),i=iO(t);return r.descriptors?r.descriptors[i.name]||r.descriptors[i.basename]?void 0:new eO("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}},{key:"checkPropertyName",value:function(e){if(!this.getProperty(e))return new eO("Unknown property",e)}},{key:"matchAtrulePrelude",value:function(e,t){var n=this.checkAtrulePrelude(e,t);if(n)return Qy(null,n);var r=this.getAtrule(e);return r.prelude?Py(this,r.prelude,t||"",!1):Qy(null,null)}},{key:"matchAtruleDescriptor",value:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return Qy(null,r);var i=this.getAtrule(e),o=iO(t);return Py(this,i.descriptors[o.name]||i.descriptors[o.basename],n,!1)}},{key:"matchDeclaration",value:function(e){return"Declaration"!==e.type?Qy(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}},{key:"matchProperty",value:function(e,t){if(oO(e).custom)return Qy(null,new Error("Lexer matching doesn't applicable for custom properties"));var n=this.checkPropertyName(e);return n?Qy(null,n):Py(this,this.getProperty(e),t,!0)}},{key:"matchType",value:function(e,t){var n=this.getType(e);return n?Py(this,n,t,!1):Qy(null,new eO("Unknown type",e))}},{key:"match",value:function(e,t){return"string"===typeof e||e&&e.type?("string"!==typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),Py(this,e,t,!1)):Qy(null,new eO("Bad syntax"))}},{key:"findValueFragments",value:function(e,t,n,r){return by(this,t,this.matchProperty(e,t),n,r)}},{key:"findDeclarationValueFragments",value:function(e,t,n){return by(this,e.value,this.matchDeclaration(e),t,n)}},{key:"findAllFragments",value:function(e,t,n){var r=this,i=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){i.push.apply(i,r.findDeclarationValueFragments(e,t,n))}}),i}},{key:"getAtrule",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=iO(e),r=n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name];return r||null}},{key:"getAtrulePrelude",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getAtrule(e,t);return n&&n.prelude||null}},{key:"getAtruleDescriptor",value:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}},{key:"getProperty",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=oO(e),r=n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name];return r||null}},{key:"getType",value:function(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}},{key:"validate",value:function(){function e(r,i,o,a){if(o.has(i))return o.get(i);o.set(i,!1),null!==a.syntax&&function(e,t,n){var r=XO,i=XO;if("function"===typeof t?r=t:t&&(r=GO(t.enter),i=GO(t.leave)),r===XO&&i===XO)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}i.call(n,t)}(e)}(a.syntax,(function(a){if("Type"===a.type||"Property"===a.type){var s="Type"===a.type?r.types:r.properties,l="Type"===a.type?t:n;hasOwnProperty.call(s,a.name)&&!e(r,a.name,l,s[a.name])||o.set(i,!0)}}),this)}var t=new Map,n=new Map;for(var r in this.types)e(this,r,t,this.types[r]);for(var i in this.properties)e(this,i,n,this.properties[i]);return t=(0,rt.Z)(t.keys()).filter((function(e){return t.get(e)})),n=(0,rt.Z)(n.keys()).filter((function(e){return n.get(e)})),t.length||n.length?{types:t,properties:n}:null}},{key:"dump",value:function(e,t){return{generic:this.generic,types:Ay(this.types,!t,e),properties:Ay(this.properties,!t,e),atrules:_y(this.atrules,!t,e)}}},{key:"toString",value:function(){return JSON.stringify(this.dump())}}]),e}(),Dy=Object.prototype.hasOwnProperty,Ny={generic:!0,types:$y,atrules:{prelude:Fy,descriptors:Fy},properties:$y,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(var r in n)Dy.call(n,r)&&(My(t[r])?e(t[r],n[r]):t[r]=Iy(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function My(e){return e&&e.constructor===Object}function Iy(e){return My(e)?(0,it.Z)({},e):e}function Ly(e,t){return"string"===typeof t&&/^\s*\|/.test(t)?"string"===typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function $y(e,t){if("string"===typeof t)return Ly(e,t);var n=(0,it.Z)({},e);for(var r in t)Dy.call(t,r)&&(n[r]=Ly(Dy.call(e,r)?e[r]:void 0,t[r]));return n}function Fy(e,t){var n=$y(e,t);return!My(n)||Object.keys(n).length?n:null}function Zy(e,t,n){for(var r in n)if(!1!==Dy.call(n,r))if(!0===n[r])Dy.call(t,r)&&(e[r]=Iy(t[r]));else if(n[r])if("function"===typeof n[r]){var i=n[r];e[r]=i({},e[r]),e[r]=i(e[r]||{},t[r])}else if(My(n[r])){var o={};for(var a in e[r])o[a]=Zy({},e[r][a],n[r]);for(var s in t[r])o[s]=Zy(o[s]||{},t[r][s],n[r]);e[r]=o}else if(Array.isArray(n[r])){for(var l={},u=n[r].reduce((function(e,t){return e[t]=!0,e}),{}),c=0,h=Object.entries(e[r]||{});c0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart))!==zy&&n!==Hy&&this.error("Number sign is expected"),Gy.call(this,0!==t),t===Hy?"-"+this.consume(yg):this.consume(yg)}var Jy="AnPlusB",Yy={a:[String,null],b:[String,null]};function Ky(){var e=this.tokenStart,t=null,n=null;if(this.tokenType===yg)Gy.call(this,false),n=this.consume(yg);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,Hy))switch(t="-1",qy.call(this,1,Wy),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Vy.call(this);break;case 3:qy.call(this,2,Hy),this.next(),this.skipSC(),Gy.call(this,Uy),n="-"+this.consume(yg);break;default:qy.call(this,2,Hy),Xy.call(this,3,Uy),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(zy)&&1===this.lookupType(1)){var r=0;switch(t="1",this.isDelim(zy)&&(r=1,this.next()),qy.call(this,0,Wy),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Vy.call(this);break;case 2:qy.call(this,1,Hy),this.next(),this.skipSC(),Gy.call(this,Uy),n="-"+this.consume(yg);break;default:qy.call(this,1,Hy),Xy.call(this,2,Uy),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===bg){for(var i=this.charCodeAt(this.tokenStart),o=i===zy||i===Hy,a=this.tokenStart+o;a=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Jk(e){this.token(Dg,"/*"+e.value+"*/")}function Yk(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Kk(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function eb(){var e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&this.tokenType!==Sg&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var tb="Declaration",nb="declaration",rb={important:[Boolean,String],property:String,value:["Value","Raw"]};function ib(){var e,t=this.tokenStart,n=this.tokenIndex,r=ab.call(this),i=aO(r),o=i?this.parseCustomProperty:this.parseValue,a=i?Kk:Yk,s=!1;this.skipSC(),this.eat(wg);var l=this.tokenIndex;if(i||this.skipSC(),e=o?this.parseWithFallback(eb,a):a.call(this,this.tokenIndex),i&&"Value"===e.type&&e.children.isEmpty)for(var u=l-this.tokenIndex;u<=0;u++)if(this.lookupType(u)===xg){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(s=sb.call(this),this.skipSC()),!1===this.eof&&this.tokenType!==Sg&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:s,property:r,value:e}}function ob(e){this.token(1,e.property),this.token(wg,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function ab(){var e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function sb(){this.eat(9),this.skipSC();var e=this.consume(1);return"important"===e||e}function lb(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var ub="DeclarationList",cb={children:[["Declaration"]]};function hb(){for(var e=this.createList();!this.eof;)switch(this.tokenType){case xg:case Dg:case Sg:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,lb))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function fb(e){var t=this;this.children(e,(function(e){"Declaration"===e.type&&t.token(Sg,";")}))}var db="Dimension",pb={value:String,unit:String};function mb(){var e=this.tokenStart,t=this.consumeNumber(bg);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function gb(e){this.token(bg,e.value+e.unit)}var vb="Function",Ob="function",yb={name:String,children:[[]]};function kb(e,t){var n,r=this.tokenStart,i=this.consumeFunctionName(),o=i.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(Qg),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:i,children:n}}function bb(e){this.token(2,e.name+"("),this.children(e),this.token(Qg,")")}var xb="XXX",Tb="Hash",wb={value:String};function Sb(){var e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Cb(e){this.token(4,"#"+e.value)}var Eb="Identifier",Ab={name:String};function _b(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Qb(e){this.token(1,e.name)}var Pb="IdSelector",Rb={name:String};function Db(){var e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Nb(e){this.token(9,"#"+e.name)}var Mb="MediaFeature",Ib={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Lb(){var e,t=this.tokenStart,n=null;if(this.eat(_g),this.skipSC(),e=this.consume(1),this.skipSC(),this.tokenType!==Qg){switch(this.eat(wg),this.skipSC(),this.tokenType){case yg:n=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case bg:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(Qg),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:n}}function $b(e){this.token(_g,"("),this.token(1,e.name),null!==e.value&&(this.token(wg,":"),this.node(e.value)),this.token(Qg,")")}var Fb="MediaQuery",Zb={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Bb(){var e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case Dg:case xg:this.next();continue;case 1:t=this.Identifier();break;case _g:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function jb(e){this.children(e)}var zb="MediaQueryList",Hb={children:[["MediaQuery"]]};function Wb(){var e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===Cg);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Ub(e){var t=this;this.children(e,(function(){return t.token(Cg,",")}))}var Xb="Nth",Gb={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function qb(){this.skipSC();var e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function Vb(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var Jb="Number",Yb={value:String};function Kb(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(yg)}}function ex(e){this.token(yg,e.value)}var tx="Operator",nx={value:String};function rx(){var e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function ix(e){this.tokenize(e.value)}var ox="Parentheses",ax={children:[[]]};function sx(e,t){var n,r=this.tokenStart;return this.eat(_g),n=e.call(this,t),this.eof||this.eat(Qg),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function lx(e){this.token(_g,"("),this.children(e),this.token(Qg,")")}var ux="Percentage",cx={value:String};function hx(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(kg)}}function fx(e){this.token(kg,e.value+"%")}var dx="PseudoClassSelector",px="function",mx={name:String,children:[["Raw"],null]};function gx(){var e,t,n=this.tokenStart,r=null;return this.eat(wg),2===this.tokenType?(t=(e=this.consumeFunctionName()).toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList()).push(this.Raw(this.tokenIndex,null,!1)),this.eat(Qg)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function vx(e){this.token(wg,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(Qg,")"))}var Ox="PseudoElementSelector",yx="function",kx={name:String,children:[["Raw"],null]};function bx(){var e,t,n=this.tokenStart,r=null;return this.eat(wg),this.eat(wg),2===this.tokenType?(t=(e=this.consumeFunctionName()).toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList()).push(this.Raw(this.tokenIndex,null,!1)),this.eat(Qg)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function xx(e){this.token(wg,":"),this.token(wg,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(Qg,")"))}function Tx(){this.skipSC();for(var e=this.consume(yg),t=0;t0&&this.lookupType(-1)===xg?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var _x="Raw",Qx={value:String};function Px(e,t,n){var r,i=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>i?Ax.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(i,r),value:this.substring(i,r)}}function Rx(e){this.tokenize(e.value)}function Dx(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Nx(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&this.tokenType!==Pg&&this.error(),e}var Mx="Rule",Ix="rule",Lx={prelude:["SelectorList","Raw"],block:["Block"]};function $x(){var e,t,n=this.tokenIndex,r=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Nx,Dx):Dx.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.tokenStart),prelude:e,block:t}}function Fx(e){this.node(e.prelude),this.node(e.block)}var Zx="Selector",Bx={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function jx(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function zx(e){this.children(e)}var Hx="SelectorList",Wx="selector",Ux={children:[["Selector","Raw"]]};function Xx(){for(var e=this.createList();!this.eof&&(e.push(this.Selector()),this.tokenType===Cg);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Gx(e){var t=this;this.children(e,(function(){return t.token(Cg,",")}))}function qx(e){for(var t=e.length,n=e.charCodeAt(0),r=34===n||39===n?1:0,i=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,o="",a=r;a<=i;a++){var s=e.charCodeAt(a);if(92===s){if(a===i){a!==t-1&&(o=e.substr(a+1));break}if(jg(92,s=e.charCodeAt(++a))){var l=a-1,u=nv(e,l);a=u-1,o+=av(e.substring(l+1,u))}else 13===s&&10===e.charCodeAt(a+1)&&a++}else o+=e[a]}return o}var Vx="String",Jx={value:String};function Yx(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:qx(this.consume(5))}}function Kx(e){this.token(5,function(e,t){for(var n=t?"'":'"',r=t?39:34,i="",o=!1,a=0;a6&&this.error("Too many hex digits",r)}return this.next(),n}function fT(e){for(var t=0;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function dT(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function pT(){var e=0;switch(this.tokenType){case yg:if(e=hT.call(this,1,!0),this.isDelim(63)){fT.call(this,6-e);break}if(this.tokenType===bg||this.tokenType===yg){dT.call(this,45),hT.call(this,1,!1);break}break;case bg:(e=hT.call(this,1,!0))>0&&fT.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){(e=hT.call(this,0,!0))>0&&fT.call(this,6-e);break}if(this.isDelim(63)){this.next(),fT.call(this,5);break}this.error("Hex digit or question mark is expected")}}var mT="UnicodeRange",gT={value:String};function vT(){var e=this.tokenStart;return this.eatIdent("u"),pT.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function OT(e){this.tokenize(e.value)}var yT="Url",kT={value:String};function bT(){var e,t=this.tokenStart;switch(this.tokenType){case 7:e=function(e){for(var t=e.length,n=4,r=41===e.charCodeAt(t-1)?t-2:t-1,i="";n|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"