diff --git a/antdesign.327d013c.async.js b/antdesign.327d013c.async.js index 27cca609c8..d92ac57f9d 100644 --- a/antdesign.327d013c.async.js +++ b/antdesign.327d013c.async.js @@ -37,8 +37,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("pVnL"),a=n.n(r),i=n("lSNA"),o=n.n(i),s=n("J4zp"),l=n.n(s),c=n("q1tI"),u=n("V/uB"),d=n.n(u),f=n("0G8d"),h=n.n(f),p=n("xddM"),m=n.n(p),v=n("ESPI"),g=n.n(v),y=n("Z/ur"),b=n.n(y),w=n("J84W"),x=n.n(w),k=n("sKbD"),S=n.n(k),C=n("72Ab"),_=n.n(C),N=n("kbBi"),j=n.n(N),O=n("8XRh"),E=n("TSYQ"),A=n.n(E),P=n("H84U");var L=n("lwsE"),T=n.n(L),I=n("W8MJ"),M=n.n(I),z=n("7W2i"),R=n.n(z),B=n("LQ03"),F=n.n(B),D=function(e){R()(n,e);var t=F()(n);function n(){var e;return T()(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return M()(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){var e=this.props,t=e.message,n=e.description,r=e.children,a=this.state,i=a.error,o=a.info,s=o&&o.componentStack?o.componentStack:null,l=void 0===t?(i||"").toString():t,u=void 0===n?s:n;return i?c.createElement(K,{type:"error",message:l,description:c.createElement("pre",null,u)}):r}}]),n}(c.Component),q=n("0n0R"),H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1],r=n.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n}};var W=V,K=n("YMnH"),G=n("ZvpZ"),Y=n("uaoM"),J=n("sPtV"),Q=function(e,t){var n,r=e.fileList,i=e.defaultFileList,s=e.onRemove,c=e.showUploadList,h=e.listType,m=e.onPreview,v=e.onDownload,g=e.previewFile,y=e.disabled,b=e.locale,w=e.iconRender,x=e.isImageUrl,k=e.progress,S=e.prefixCls,C=e.className,_=e.type,N=e.children,j=e.style,O=Object(J.a)(r||i||[]),E=u()(O,2),A=E[0],P=E[1],L=d.useState("drop"),T=u()(L,2),I=T[0],R=T[1],B=d.useRef();d.useEffect((function(){P(r||i||[]),Object(Y.a)("fileList"in e||!("value"in e),"Upload","`value` is not a valid prop, do you mean `fileList`?")}),[]),d.useEffect((function(){"fileList"in e&&P(r||[])}),[r]);var F=function(t){"fileList"in e||P(t.fileList);var n=e.onChange;n&&n(l()(l()({},t),{fileList:o()(t.fileList)}))},q=function(e){var t=M(e);t.status="uploading";var n=A().concat(),r=n.findIndex((function(e){return e.uid===t.uid}));-1===r?n.push(t):n[r]=t,F({file:t,fileList:n})},U=function(e,t,n){try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}var r=z(t,A());r&&(r.status="done",r.response=e,r.xhr=n,F({file:l()({},r),fileList:A().concat()}))},V=function(e,t){var n=z(t,A());n&&(n.percent=e.percent,F({event:e,file:l()({},n),fileList:A().concat()}))},Q=function(e,t,n){var r=z(n,A());r&&(r.error=e,r.response=t,r.status="error",F({file:l()({},r),fileList:A().concat()}))},X=function(e){Promise.resolve("function"==typeof s?s(e):s).then((function(t){if(!1!==t){var n=function(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter((function(t){return t[n]!==e[n]}));return r.length===t.length?null:r}(e,A());n&&(e.status="removed",B.current&&B.current.abort(e),F({file:e,fileList:n}))}}))},Z=function(e){R(e.type)},$=Object(H.a)();d.useImperativeHandle(t,(function(){return{onStart:q,onSuccess:U,onProgress:V,onError:Q,fileList:A(),upload:B.current,forceUpdate:$}}));var ee=function(e){var t=c.showRemoveIcon,n=c.showPreviewIcon,r=c.showDownloadIcon,a=c.removeIcon,i=c.downloadIcon;return d.createElement(W,{listType:h,items:A(),previewFile:g,onPreview:m,onDownload:v,onRemove:X,showRemoveIcon:!y&&t,showPreviewIcon:n,showDownloadIcon:r,removeIcon:a,downloadIcon:i,iconRender:w,locale:l()(l()({},e),b),isImageUrl:x,progress:k})},te=d.useContext(D.b),ne=te.getPrefixCls,re=te.direction,ae=ne("upload",S),ie=l()(l()({onStart:q,onError:Q,onProgress:V,onSuccess:U},e),{prefixCls:ae,beforeUpload:function(t,n){var r=e.beforeUpload;if(!r)return!0;var a=r(t,n);if(!1===a){var i=[];return A().concat(n.map(M)).forEach((function(e){i.every((function(t){return t.uid!==e.uid}))&&i.push(e)})),F({file:t,fileList:i}),!1}return!a||!a.then||a}});delete ie.className,delete ie.style,N&&!y||delete ie.id;var oe=c?d.createElement(K.a,{componentName:"Upload",defaultLocale:G.a.Upload},ee):null;if("drag"===_){var se,le=p()(ae,(se={},a()(se,"".concat(ae,"-drag"),!0),a()(se,"".concat(ae,"-drag-uploading"),A().some((function(e){return"uploading"===e.status}))),a()(se,"".concat(ae,"-drag-hover"),"dragover"===I),a()(se,"".concat(ae,"-disabled"),y),a()(se,"".concat(ae,"-rtl"),"rtl"===re),se),C);return d.createElement("span",null,d.createElement("div",{className:le,onDrop:Z,onDragOver:Z,onDragLeave:Z,style:j},d.createElement(f.a,l()({},ie,{ref:B,className:"".concat(ae,"-btn")}),d.createElement("div",{className:"".concat(ae,"-drag-container")},N))),oe)}var ce=p()(ae,(n={},a()(n,"".concat(ae,"-select"),!0),a()(n,"".concat(ae,"-select-").concat(h),!0),a()(n,"".concat(ae,"-disabled"),y),a()(n,"".concat(ae,"-rtl"),"rtl"===re),n)),ue=d.createElement("div",{className:ce,style:N?void 0:{display:"none"}},d.createElement(f.a,l()({},ie,{ref:B})));return"picture-card"===h?d.createElement("span",{className:p()(C,"".concat(ae,"-picture-card-wrapper"))},oe,ue):d.createElement("span",{className:C},ue,oe)},X=d.forwardRef(Q);X.Dragger=y,X.displayName="Upload",X.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",beforeUpload:function(){return!0},showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0};var Z=X;Z.Dragger=y;t.a=Z},"9Odx": @@ -1040,11 +1040,11 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/Innovation/MyMirror/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-checkbox/es/index.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/Innovation/MyProject/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-checkbox/es/index.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("lSNA"),a=n.n(r),i=n("pVnL"),o=n.n(i),s=n("q1tI"),l=n("+6Fa"),c=n("TSYQ"),u=n.n(c),d=n("H84U"),f=s.createContext(null),h=f.Provider,p=f,m=n("ID/q"),v=n("uaoM"),g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0){var j="button"===p?"".concat(C,"-button"):C;N=h.map((function(e){return"string"==typeof e?s.createElement(w,{ref:t,key:e,prefixCls:j,disabled:v,value:e,checked:f===e},e):s.createElement(w,{ref:t,key:"radio-group-value-options-".concat(e.value),prefixCls:j,disabled:e.disabled||v,value:e.value,checked:f===e.value,style:e.style},e.label)}))}var O=y||o,E=u()(_,"".concat(_,"-").concat(m),(n={},a()(n,"".concat(_,"-").concat(O),O),a()(n,"".concat(_,"-rtl"),"rtl"===i),n),d);return s.createElement("div",{className:E,style:b,onMouseEnter:k,onMouseLeave:S,id:x},N)}())}));_.defaultProps={buttonStyle:"outline"};var N=s.memo(_),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);ar?a>=i?10+e:20+e:a<=i?10+e:e}(e,t),r=k||void 0===y(I)[t];return c.createElement("span",{className:"".concat(z,"-only"),style:{transition:r?"none":void 0,msTransform:"translateY(".concat(100*-n,"%)"),WebkitTransform:"translateY(".concat(100*-n,"%)"),transform:"translateY(".concat(100*-n,"%)")},key:t},function(e,t){for(var n=[],r=0;r<30;r++)n.push(c.createElement("p",{key:r.toString(),className:f()(t,{current:e===r})},r%10));return n}(n,"".concat(z,"-only-unit")))}return c.createElement("span",{key:"symbol",className:"".concat(z,"-symbol")},e)},B=l()(l()({},b),{style:a,className:f()(z,r),title:i});return a&&a.borderColor&&(B.style=l()(l()({},a),{boxShadow:"0 0 0 1px ".concat(a.borderColor," inset")})),u?Object(v.a)(u,{className:f()("".concat(z,"-custom-component"),u.props&&u.props.className)}):c.createElement(s,B,N&&Number(N)%1==0?y(N).map((function(e,t){return R(e,t)})).reverse():N)},w=n("09Wf");function x(e){return-1!==w.a.indexOf(e)}var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);aS?"".concat(S,"+"):y},D=function(){return!!d||!!p},q=function(){var e=F();return"0"===e||0===e},H=function(){return _&&!q()||D()},U=function(){return H()?"":F()},V=function(){return"rtl"===R?E?l()({left:parseInt(E[0],10),marginTop:E[1]},A):A:E?l()({right:-parseInt(E[0],10),marginTop:E[1]},A):A},W=function(){var e=U();return(null==e||""===e||q()&&!T)&&!H()},K=function(){var e=y;if(e&&"object"===o()(e))return Object(v.a)(e,{style:l()(l()({},V()),e.props&&e.props.style)})},G=f()((t={},a()(t,"".concat(B,"-status-dot"),D()),a()(t,"".concat(B,"-status-").concat(d),!!d),a()(t,"".concat(B,"-status-").concat(p),x(p)),t)),Y={};p&&!x(p)&&(Y.background=p);var J=f()(P,B,(n={},a()(n,"".concat(B,"-status"),D()),a()(n,"".concat(B,"-not-a-wrapper"),!s),a()(n,"".concat(B,"-rtl"),"rtl"===R),n));if(!s&&D()){var Q=V(),X=Q&&Q.color;return c.createElement("span",l()({},I,{className:J,style:Q}),c.createElement("span",{className:G,style:Y}),c.createElement("span",{style:{color:X},className:"".concat(B,"-status-text")},h))}return c.createElement("span",l()({},I,{className:J}),s,c.createElement(u.a,{component:"",showProp:"data-show",transitionName:s?"".concat(B,"-zoom"):"",transitionAppear:!0},function(){var e,t=z("scroll-number",i),n=U(),r=H(),o=W(),s=f()((e={},a()(e,"".concat(B,"-dot"),r),a()(e,"".concat(B,"-count"),!r),a()(e,"".concat(B,"-count-sm"),"small"===j),a()(e,"".concat(B,"-multiple-words"),!r&&y&&y.toString&&y.toString().length>1),a()(e,"".concat(B,"-status-").concat(d),!!d),a()(e,"".concat(B,"-status-").concat(p),x(p)),e)),l=V();return p&&!x(p)&&((l=l||{}).background=p),o?null:c.createElement(b,{prefixCls:t,"data-show":!o,className:s,count:n,displayComponent:K(),title:O||("string"==typeof y||"number"==typeof y?y:void 0),style:l,key:"scrollNumber"})}()),W()||!h?null:c.createElement("span",{className:"".concat(B,"-status-text")},h))};S.Ribbon=function(e){var t,n=e.className,r=e.prefixCls,i=e.style,o=e.color,s=e.children,u=e.text,d=e.placement,h=void 0===d?"end":d,p=c.useContext(m.b),v=p.getPrefixCls,g=p.direction,y=v("ribbon",r),b=x(o),w=f()(y,n,"".concat(y,"-placement-").concat(h),(t={},a()(t,"".concat(y,"-rtl"),"rtl"===g),a()(t,"".concat(y,"-color-").concat(o),b),t)),k={},S={};return o&&!b&&(k.background=o,S.color=o),c.createElement("div",{className:"".concat(y,"-wrapper")},s,c.createElement("div",{className:w,style:l()(l()({},k),i)},u,c.createElement("div",{className:"".concat(y,"-corner"),style:S})))};t.a=S},KtWR: /*!************************************************************************!*\ @@ -1619,9 +1619,9 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/motion.js because of ./src/pages/Messages/Private/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/utils/iconUtil.js because of ./src/pages/RestFul/components/LeftBar/Rename.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/motion.js because of ./src/pages/Messages/component/LeftNav.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/utils/iconUtil.js because of ./src/pages/virtualSpaces/Lists/Video/components/AddLink.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/debounce.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/index.js */ @@ -1696,10 +1696,10 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/RightOutlined.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/en_US.js */ @@ -1917,7 +1917,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/message/index.js (referenced with cjs require), ./node_modules/antd/lib/notification/index.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js */ @@ -2016,7 +2016,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/throttleByAnimationFrame.js because of ./src/pages/HttpStatus/SixActivities.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ @@ -2032,14 +2032,14 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/responsiveObserve.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/Messages/Private/components/WriteMessage.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/Messages/Private/components/WriteMessage.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/responsiveObserve.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n("RIqP"),a=n.n(r),i=n("pVnL"),o=n.n(i),s=n("lSNA"),l=n.n(s),c=n("J4zp"),u=n.n(c),d=n("cDf5"),f=n.n(d),h=n("q1tI"),p=n("TSYQ"),m=n.n(p),v=n("W9HT"),g=n("5OYt"),y=n("ACnJ"),b=n("H84U"),w=n("NUBc"),x=n("qrJ5"),k=n("/kpp"),S=n("0n0R"),C=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&h.createElement("ul",{className:"".concat(g,"-item-action"),key:"actions"},a.map((function(e,t){return h.createElement("li",{key:"".concat(g,"-item-action-").concat(t)},e,t!==a.length-1&&h.createElement("em",{className:"".concat(g,"-item-action-split")}))}))),w=f?"div":"li",x=h.createElement(w,o()({},u,{className:m()("".concat(g,"-item"),s,l()({},"".concat(g,"-item-no-flex"),!("vertical"===p?i:(h.Children.forEach(r,(function(e){"string"==typeof e&&(t=!0)})),!(t&&h.Children.count(r)>1)))))}),"vertical"===p&&i?[h.createElement("div",{className:"".concat(g,"-item-main"),key:"content"},r,y),h.createElement("div",{className:"".concat(g,"-item-extra"),key:"extra"},i)]:[r,y,Object(S.a)(i,{key:"extra"})]);return f?h.createElement(k.a,{flex:1,style:c},x):x};_.Meta=function(e){var t=e.prefixCls,n=e.className,r=e.avatar,a=e.title,i=e.description,s=C(e,["prefixCls","className","avatar","title","description"]),l=(0,h.useContext(b.b).getPrefixCls)("list",t),c=m()("".concat(l,"-item-meta"),n),u=h.createElement("div",{className:"".concat(l,"-item-meta-content")},a&&h.createElement("h4",{className:"".concat(l,"-item-meta-title")},a),i&&h.createElement("div",{className:"".concat(l,"-item-meta-description")},i));return h.createElement("div",o()({},s,{className:c}),r&&h.createElement("div",{className:"".concat(l,"-item-meta-avatar")},r),(a||i)&&u)};var N=_,j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);ace&&(le.current=ce);var ue=r?h.createElement("div",{className:"".concat(re,"-pagination")},h.createElement(w.a,o()({},le,{onChange:te,onShowSizeChange:ne}))):null,de=a()(A);r&&A.length>(le.current-1)*le.pageSize&&(de=a()(A).splice((le.current-1)*le.pageSize,le.pageSize));var fe=Object(g.a)(),he=h.useMemo((function(){for(var e=0;e0){var ve=de.map((function(e,t){return function(e,t){return R?((n="function"==typeof z?z(e):"string"==typeof z?e[z]:e.key)||(n="list-item-".concat(t)),$[t]=n,R(e,t)):null;var n}(e,t)})),ge=h.Children.map(ve,(function(e,t){return h.createElement("div",{key:$[t],style:pe},e)}));me=N?h.createElement(x.a,{gutter:N.gutter},ge):h.createElement("ul",{className:"".concat(re,"-items")},ve)}else S||ie||(me=function(e,t){return h.createElement("div",{className:"".concat(e,"-empty-text")},B&&B.emptyText||t("List"))}(re,X));var ye=le.position||"bottom";return h.createElement(O.Provider,{value:{grid:N,itemLayout:C}},h.createElement("div",o()({className:se},F),("top"===ye||"both"===ye)&&ue,L&&h.createElement("div",{className:"".concat(re,"-header")},L),h.createElement(v.a,ae,me,S),T&&h.createElement("div",{className:"".concat(re,"-footer")},T),_||("bottom"===ye||"both"===ye)&&ue))}E.Item=N;t.b=E},Vl3Y: /*!*********************************************************!*\ @@ -2056,16 +2056,16 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/hooks/useForceUpdate.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/Messages/Tidings/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/Messages/Tidings/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/hooks/useForceUpdate.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/isEqual.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ @@ -2128,11 +2128,11 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("pVnL"),a=n.n(r),i=n("lSNA"),o=n.n(i),s=n("q1tI"),l=n("eDIo"),c=n("TSYQ"),u=n.n(c),d=n("fEPi"),f=n.n(d),h=n("J4zp"),p=n.n(h),m=n("cCPh"),v=n.n(m),g=n("2/Rp"),y=n("H84U"),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a=0?"slide-down":"slide-up"),trigger:E,overlay:function(){return function(t){var n,r=e.overlay;n="function"==typeof r?r():r;var a=(n=s.Children.only("string"==typeof n?s.createElement("span",null,n):n)).props;Object(S.a)(!a.mode||"vertical"===a.mode,"Dropdown",'mode="'.concat(a.mode,"\" is not supported for Dropdown's Menu."));var i=a.selectable,o=void 0!==i&&i,l=a.focusable,c=void 0===l||l,u=s.createElement("span",{className:"".concat(t,"-menu-submenu-arrow")},s.createElement(f.a,{className:"".concat(t,"-menu-submenu-arrow-icon")}));return"string"==typeof n.type?n:Object(_.a)(n,{mode:"vertical",selectable:o,focusable:c,expandIcon:u})}(C)},placement:function(){var t=e.placement;return void 0!==t?t:"rtl"===p?"bottomRight":"bottomLeft"}()}),j)});N.Button=k,N.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1};var j=t.a=N},XCrF: @@ -2189,7 +2189,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./src/.umi-production/plugin-locale/locale.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return g}));var r=n("pVnL"),a=n.n(r),i=n("lwsE"),o=n.n(i),s=n("W8MJ"),l=n.n(s),c=n("7W2i"),u=n.n(c),d=n("LQ03"),f=n.n(d),h=n("q1tI"),p=n("ZvpZ").a,m=n("YlG9"),v=function(e){u()(n,e);var t=f()(n);function n(){return o()(this,n),t.apply(this,arguments)}return l()(n,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale||p[t||"global"],r=this.context,i=t&&r?r[t]:{};return a()(a()({},"function"==typeof n?n():n),i||{})}},{key:"getLocaleCode",value:function(){var e=this.context,t=e&&e.locale;return e&&e.exist&&!t?p.locale:t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),n}(h.Component);function g(e,t){var n=h.useContext(m.a);return[h.useMemo((function(){var r=t||p[e||"global"],i=e&&n?n[e]:{};return a()(a()({},"function"==typeof r?r():r),i||{})}),[e,t,n])]}v.defaultProps={componentName:"global"},v.contextType=m.a},YNAk: /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons/lib/icons/CaretDownFilled.js ***! @@ -2267,8 +2267,8 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/layout.js because of ./src/pages/Messages/Private/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/layout.js because of ./src/pages/Messages/component/LeftNav.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return I}));var r,a=n("lSNA"),i=n.n(a),o=n("pVnL"),s=n.n(o),l=n("lwsE"),c=n.n(l),u=n("W8MJ"),d=n.n(u),f=n("7W2i"),h=n.n(f),p=n("LQ03"),m=n.n(p),v=n("q1tI"),g=n("TSYQ"),y=n.n(g),b=n("BGR+"),w=n("T1rO"),x=n.n(w),k=n("fEPi"),S=n.n(k),C=n("DFhj"),_=n.n(C),N=n("PKem"),j=n("H84U"),O=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&void 0!==arguments[0]?arguments[0]:"";return r+=1,"".concat(e).concat(r)}),T=function(e){h()(n,e);var t=m()(n);function n(e){var r,a,o;return c()(this,n),(r=t.call(this,e)).responsiveHandler=function(e){r.setState({below:e.matches});var t=r.props.onBreakpoint,n=r.state.collapsed;t&&t(e.matches),n!==e.matches&&r.setCollapsed(e.matches,"responsive")},r.setCollapsed=function(e,t){"collapsed"in r.props||r.setState({collapsed:e});var n=r.props.onCollapse;n&&n(e,t)},r.toggle=function(){var e=!r.state.collapsed;r.setCollapsed(e,"clickTrigger")},r.renderSider=function(e){var t,n=e.getPrefixCls,a=r.props,o=a.prefixCls,l=a.className,c=a.theme,u=a.collapsible,d=a.reverseArrow,f=a.trigger,h=a.style,p=a.width,m=a.collapsedWidth,g=a.zeroWidthTriggerStyle,w=a.children,k=E(a,["prefixCls","className","theme","collapsible","reverseArrow","trigger","style","width","collapsedWidth","zeroWidthTriggerStyle","children"]),C=r.state,N=C.collapsed,j=C.below,A=n("layout-sider",o),P=Object(b.default)(k,["collapsed","defaultCollapsed","onCollapse","breakpoint","onBreakpoint","siderHook","zeroWidthTriggerStyle"]),L=N?m:p,T=O(L)?"".concat(L,"px"):String(L),I=0===parseFloat(String(m||0))?v.createElement("span",{onClick:r.toggle,className:y()("".concat(A,"-zero-width-trigger"),"".concat(A,"-zero-width-trigger-").concat(d?"right":"left")),style:g},f||v.createElement(x.a,null)):null,M={expanded:d?v.createElement(S.a,null):v.createElement(_.a,null),collapsed:d?v.createElement(_.a,null):v.createElement(S.a,null)}[N?"collapsed":"expanded"],z=null!==f?I||v.createElement("div",{className:"".concat(A,"-trigger"),onClick:r.toggle,style:{width:T}},f||M):null,R=s()(s()({},h),{flex:"0 0 ".concat(T),maxWidth:T,minWidth:T,width:T}),B=y()(l,A,"".concat(A,"-").concat(c),(t={},i()(t,"".concat(A,"-collapsed"),!!N),i()(t,"".concat(A,"-has-trigger"),u&&null!==f&&!I),i()(t,"".concat(A,"-below"),!!j),i()(t,"".concat(A,"-zero-width"),0===parseFloat(T)),t));return v.createElement("aside",s()({className:B},P,{style:R}),v.createElement("div",{className:"".concat(A,"-children")},w),u||j&&I?z:null)},r.uniqueId=L("ant-sider-"),"undefined"!=typeof window&&(a=window.matchMedia),a&&e.breakpoint&&e.breakpoint in A&&(r.mql=a("(max-width: ".concat(A[e.breakpoint],")"))),o="collapsed"in e?e.collapsed:e.defaultCollapsed,r.state={collapsed:o,below:!1},r}return d()(n,[{key:"componentDidMount",value:function(){var e;this.mql&&(this.mql.addListener(this.responsiveHandler),this.responsiveHandler(this.mql)),null===(e=this.props)||void 0===e||e.siderHook.addSider(this.uniqueId)}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=null==this?void 0:this.mql)||void 0===e||e.removeListener(this.responsiveHandler),null===(t=this.props)||void 0===t||t.siderHook.removeSider(this.uniqueId)}},{key:"render",value:function(){var e=this.state.collapsed,t=this.props.collapsedWidth;return v.createElement(P.Provider,{value:{siderCollapsed:e,collapsedWidth:t}},v.createElement(j.a,null,this.renderSider))}}],[{key:"getDerivedStateFromProps",value:function(e){return"collapsed"in e?{collapsed:e.collapsed}:null}}]),n}(v.Component);T.defaultProps={collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80,style:{},theme:"dark"};var I=function(e){h()(n,e);var t=m()(n);function n(){return c()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){var e=this;return v.createElement(N.a.Consumer,null,(function(t){return v.createElement(T,s()({},t,e.props))}))}}]),n}(v.Component)},"Znn+": @@ -2287,8 +2287,8 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" \************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/locale/en_US.js because of ./src/pages/Classrooms/Lists/CourseGroup/List/components/CutOffNow.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/time-picker/locale/en_US.js because of ./src/pages/Classrooms/Lists/CourseGroup/List/components/CutOffNow.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/locale/en_US.js because of ./src/pages/Shixuns/Detail/Settings/components/Permission/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/time-picker/locale/en_US.js because of ./src/pages/Shixuns/Detail/Settings/components/Permission/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/en_US.js */function(e,t,n){"use strict";var r=n("H4fg"),a=n("61s2"),i=n("RlXo"),o=a.a,s="${label} is not a valid ${type}",l={locale:"en",Pagination:r.a,DatePicker:a.a,TimePicker:i.a,Calendar:o,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click sort by descend",triggerAsc:"Click sort by ascend",cancelSort:"Click to cancel sort"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:s,method:s,array:s,object:s,number:s,date:s,boolean:s,integer:s,float:s,regexp:s,email:s,url:s,hex:s},string:{len:"${label} must be ${len} characters",min:"${label} at least ${min} characters",max:"${label} up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} minimum value is ${min}",max:"${label} maximum value is ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}}};t.a=l},ZxNd: /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/lib/asn/EditOutlined.js ***! @@ -2349,11 +2349,11 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js because of ./src/pages/Messages/Private/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js because of ./src/pages/Messages/component/LeftNav.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("pVnL"),a=n.n(r),i=n("lSNA"),o=n.n(i),s=n("RIqP"),l=n.n(s),c=n("q1tI"),u=n("TSYQ"),d=n.n(u),f=n("Zm9Q"),h=n("HQEm"),p=n.n(h),m=n("XBQK"),v=n("H84U"),g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0){var L=[];t=h.map((function(e){var t,n=j(e.path,w);return n&&L.push(n),e.children&&e.children.length&&(t=c.createElement(k.a,null,e.children.map((function(e){return c.createElement(k.a.Item,{key:e.path||e.breadcrumbName},g(e,w,h,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=l()(e),a=j(t,n);return a&&r.push(a),r}(L,e.path,w)))})))),c.createElement(b,{overlay:t,separator:i,key:n||e.breadcrumbName},g(e,w,h,L))}))}else p&&(t=Object(f.a)(p).map((function(e,t){return e?(Object(S.a)(e.type&&(!0===e.type.__ANT_BREADCRUMB_ITEM||!0===e.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Object(C.a)(e,{separator:i,key:t})):e})));var T=d()(u,P,o()({},"".concat(P,"-rtl"),"rtl"===A));return c.createElement("div",a()({className:T,style:s},x),t)};O.Item=b,O.Separator=x;var E=O;t.a=E},bKJz: @@ -2403,11 +2403,11 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/pages/Messages/Tidings/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/pages/Messages/Tidings/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js because of ./src/pages/User/Detail/Order/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js because of ./src/pages/Home/PaZhou/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("lSNA"),a=n.n(r),i=n("pVnL"),o=n.n(i),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("BGR+"),d=n("H84U"),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&(w=r.getOptions().map((function(e){return g.createElement(L,{prefixCls:m,key:e.value.toString(),disabled:"disabled"in e?e.disabled:s.disabled,value:e.value,checked:-1!==l.value.indexOf(e.value),onChange:e.onChange,className:"".concat(v,"-item"),style:e.style},e.label)})));var x={toggleOption:r.toggleOption,value:r.state.value,disabled:r.props.disabled,name:r.props.name,registerValue:r.registerValue,cancelValue:r.cancelValue},k=b()(v,u,a()({},"".concat(v,"-rtl"),"rtl"===n));return g.createElement("div",o()({className:k,style:d},y),g.createElement(N.Provider,{value:x},w))},r.state={value:e.value||e.defaultValue||[],registeredValues:[]},r}return u()(n,[{key:"getOptions",value:function(){return this.props.options.map((function(e){return"string"==typeof e?{label:e,value:e}:e}))}},{key:"render",value:function(){return g.createElement(C.a,null,this.renderGroup)}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value||[]}:null}}]),n}(g.PureComponent);j.defaultProps={options:[]};var O=j,E=n("uaoM"),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&(N=i.createElement(o.FormProvider,{validateMessages:j},s)),i.createElement(x.a,{size:g},i.createElement(w.b.Provider,{value:_},i.createElement(y,{locale:m||r,_ANT_MARK__:"internalMark"},N)))}(n,s)}))}))}},wFql: @@ -3593,15 +3593,15 @@ e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setProtot /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/raf.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/components/markdown-editor/add-table-panel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/raf.js because of ./src/pages/MyProblem/LeftPanel/Description/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/index.js because of ./src/.umi-production/plugin-locale/locale.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/Three/Model/AddModel.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js because of ./src/layouts/virtualDetail/TopBanner/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/copy-to-clipboard/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ @@ -3791,12 +3791,12 @@ e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setProtot /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/User/Detail/Order/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/MoopCases/InfoPanel/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/wave.js because of ./src/pages/Search/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Paperlibrary/components/SendToClassModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/wave.js because of ./src/pages/MyProblem/LeftPanel/Description/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/tasks/Jupyter/components/DataSet/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ diff --git a/color.less b/color.less index 97944955f6..809a2dc227 100644 --- a/color.less +++ b/color.less @@ -90,7 +90,7 @@ html {--antd-wave-shadow-color: @primary-color;} .ant-alert-info .ant-alert-icon {color: @primary-color;} .ant-alert-warning {background-color: color(~`colorPalette("@{warning-color}", 1)`);border: 1px solid color(~`colorPalette("@{warning-color}", 3)`);} .ant-alert-warning .ant-alert-icon {color: @warning-color;} -.ant-alert-error {background-color: color(~`colorPalette("@{error-color}", 1)`);border: 1px solid color(~`colorPalette("@{error-color}", 3)`);} +.ant-alert-error {background-color: color(~`colorPalette("@{error-color}", 1)`);border: 1px solid color(~`colorPalette("@{modal-header-bg}", 1)`);} .ant-alert-error .ant-alert-icon {color: @error-color;} .ant-alert-close-icon {background-color: transparent;border: none;} .ant-alert-close-icon .anticon-close {color: @text-color-secondary;} @@ -727,42 +727,42 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {color: @success-color;} .ant-form-item-has-warning .ant-form-item-explain, .ant-form-item-has-warning .ant-form-item-split {color: @warning-color;} .ant-form-item-has-warning .ant-input, .ant-form-item-has-warning .ant-input-affix-wrapper, .ant-form-item-has-warning .ant-input:hover, .ant-form-item-has-warning .ant-input-affix-wrapper:hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(75, 41, 46, 0.2);} +.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(162, 46, 41, 0.2);} .ant-form-item-has-warning .ant-input:not(.ant-form-item-has-warning .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper:not(.ant-form-item-has-warning .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(75, 41, 46, 0.2);} +.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(162, 46, 41, 0.2);} .ant-form-item-has-warning .ant-input-prefix {color: @warning-color;} .ant-form-item-has-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} .ant-form-item-has-warning .has-feedback {color: @warning-color;} .ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {color: @warning-color;} .ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @warning-color !important;} -.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(75, 41, 46, 0.2);} +.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(162, 46, 41, 0.2);} .ant-form-item-has-warning .ant-input-number, .ant-form-item-has-warning .ant-picker {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(75, 41, 46, 0.2);} +.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(162, 46, 41, 0.2);} .ant-form-item-has-warning .ant-input-number:not([disabled]):hover, .ant-form-item-has-warning .ant-picker:not([disabled]):hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(75, 41, 46, 0.2);} +.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(162, 46, 41, 0.2);} .ant-form-item-has-error .ant-form-item-explain, .ant-form-item-has-error .ant-form-item-split {color: @error-color;} .ant-form-item-has-error .ant-input, .ant-form-item-has-error .ant-input-affix-wrapper, .ant-form-item-has-error .ant-input:hover, .ant-form-item-has-error .ant-input-affix-wrapper:hover {border-color: @error-color;} -.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} +.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} .ant-form-item-has-error .ant-input:not(.ant-form-item-has-error .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper:not(.ant-form-item-has-error .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} +.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} .ant-form-item-has-error .ant-input-prefix {color: @error-color;} .ant-form-item-has-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-form-item-has-error .has-feedback {color: @error-color;} .ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {color: @error-color;} .ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @error-color !important;} -.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} +.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} .ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {border: 0;} .ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {border-color: @error-color;} .ant-form-item-has-error .ant-input-number, .ant-form-item-has-error .ant-picker {border-color: @error-color;} -.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} +.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} .ant-form-item-has-error .ant-input-number:not([disabled]):hover, .ant-form-item-has-error .ant-picker:not([disabled]):hover {border-color: @error-color;} .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {border-color: @error-color;} -.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} -.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(244, 12, 166, 0.2);} +.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} +.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(207, 216, 182, 0.2);} .ant-form-item-has-error .ant-transfer-list {border-color: @error-color;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {border-color: @border-color-base;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px !important;} @@ -1481,7 +1481,7 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-geekblue {color: #2f54eb;background: #f0f5ff;border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} -.ant-tag-purple {color: #722ed1;background: color(~`colorPalette("@{modal-close-color}", 1)`);border-color: #d3adf7;} +.ant-tag-purple {color: #722ed1;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-processing {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;} diff --git a/index.html b/index.html index 05f0b0f8ae..c801018da8 100644 --- a/index.html +++ b/index.html @@ -127,6 +127,6 @@ - + diff --git a/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.d9809193.bcd018cc.async.js b/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.d9809193.bcd018cc.async.js index 5aad448c25..3fe41ea4e5 100644 --- a/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.d9809193.bcd018cc.async.js +++ b/layouts__ShixunDetail__index.p__Account__Certification__index.p__Account__Profile__Edit__index.p__Ac.d9809193.bcd018cc.async.js @@ -38,7 +38,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js because of ./node_modules/rc-select/es/OptionList.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/interface/generator.js because of ./node_modules/rc-tree-select/es/TreeSelect.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js because of ./node_modules/rc-select/es/utils/warningPropsUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js because of ./node_modules/rc-select/es/Select.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js because of ./node_modules/rc-select/es/Select.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ diff --git a/monaco-editor.38977551.async.js b/monaco-editor.38977551.async.js index e7afffda4c..6aab9edb96 100644 --- a/monaco-editor.38977551.async.js +++ b/monaco-editor.38977551.async.js @@ -36,7 +36,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */function(e,t,n){"use strict";n.r(t),n.d(t,"DragAndDropController",(function(){return f}));n("OhnE");var i,o=n("pmY6"),r=n("MNsG"),s=n("sswD"),a=n("cGHE"),u=n("aokT"),l=n("gCVg"),c=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}return e.prototype.getEditOperations=function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new u.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis.selection.endLineNumber?this.targetSelection=new l.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumbero,u=i>r,l=ir)continue;if(bi)continue;if(g1&&o--,e.columnSelect(t,n,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,o)},e.columnSelectRight=function(e,t,n){for(var i=0,o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),r=Math.max(n.fromViewLineNumber,n.toViewLineNumber),s=o;s<=r;s++){var a=t.getLineMaxColumn(s),u=m.a.visibleColumnFromColumn2(e,t,new v.a(s,a));i=Math.max(i,u)}var l=n.toViewVisualColumn;return l1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,u=o.length;ao&&(i=o);var r=new _.a(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case s.RawAtArgument.Top:a=3;break;case s.RawAtArgument.Center:a=1;break;case s.RawAtArgument.Bottom:a=4}var u=e.context.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,u,a,0)},t}(x))),e.SelectAll=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:void 0})||this}return D(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[C.b.selectAll(e.context,e.getPrimaryCursor())])},t}(x))),e.SetSelection=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:void 0})||this}return D(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[m.d.fromModelSelection(t.selection)])},t}(x)))}(u||(u={})),c=l||(l={}),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditingCommand(t,i,n||{})},t}(f.c),c.CoreEditingCommand=d,c.LineBreakInsert=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:0,mac:{primary:301}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.lineBreakInsert(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))))},t}(d))),c.Outdent=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:L.a.and(O.a.editorTextFocus,O.a.tabDoesNotMoveFocus),primary:1026}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.outdent(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(d))),c.Tab=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"tab",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:L.a.and(O.a.editorTextFocus,O.a.tabDoesNotMoveFocus),primary:2}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.tab(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(d))),c.DeleteLeft=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=y.a.deleteLeft(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)},t}(d))),c.DeleteRight=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=y.a.deleteRight(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)},t}(d)));var k=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return D(t,e),t.prototype.runCommand=function(e,t){var n=e.get(g.a).getFocusedCodeEditor();if(n&&n.hasTextFocus())return this._runEditorHandler(e,n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(g.a).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(e,o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t,n){var i=this._editorHandler;"string"==typeof i?t.trigger("keyboard",i,n):((n=n||{}).source="keyboard",i.runEditorCommand(e,t,n))},t}(f.a),E=function(e){function t(t,n,i){var o=e.call(this,{id:t,precondition:void 0,description:i})||this;return o._handlerId=n,o}return D(t,e),t.prototype.runCommand=function(e,t){var n=e.get(g.a).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)},t}(f.a);function I(e,t){N(new E("default:"+e,e)),N(new E(e,e,t))}N(new k({editorHandler:u.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:O.a.textInputFocus,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:{menuId:25,group:"1_basic",title:h.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),N(new k({editorHandler:S.b.Undo,inputHandler:"undo",id:S.b.Undo,precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:2104},menuOpts:{menuId:17,group:"1_do",title:h.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),N(new E("default:"+S.b.Undo,S.b.Undo)),N(new k({editorHandler:S.b.Redo,inputHandler:"redo",id:S.b.Redo,precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:{menuId:17,group:"1_do",title:h.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),N(new E("default:"+S.b.Redo,S.b.Redo)),I(S.b.Type,{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),I(S.b.ReplacePreviousChar),I(S.b.CompositionStart),I(S.b.CompositionEnd),I(S.b.Paste),I(S.b.Cut)},"1lwE": @@ -181,13 +181,13 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t);n("YHy6");var i,o=n("3/fG"),r=n("X+cX"),s=n("JQT/"),a=n("/cxE"),u=n("eLzo"),l=n("pmY6"),c=n("MNsG"),d=n("sswD"),h=n("tX9W"),p=n("twdY"),f=n("aBYw"),g=n("bY76"),m=n("aokT"),v=n("G2kB"),_=n("nnTU"),b=n("6OMU"),y=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},w=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},T=function(e,t){return function(n,i){t(n,i,e)}},P=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},R=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1] ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:m,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||C.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=h(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d{1,9}\.)/,t.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,t.item=h(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=h(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=v({},t),t.gfm=v({},t.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=v({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=v({},t.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,y;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:b(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2]?r[2].trim():r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if((r=this.rules.nptable.exec(e))&&(u={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),p=0;p ?/gm,""),this.token(r,n),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),l={type:"list_start",ordered:m=(s=r[2]).length>1,start:m?+s:"",loose:!1},this.tokens.push(l),c=[],i=!1,g=(r=r[0].match(this.rules.item)).length,p=0;p1?1===a.length:a.length>1||this.options.smartLists&&a!==s)&&(e=r.slice(p+1).join("\n")+e,p=g-1)),o=i||/\n\n(?!\s*$)/.test(u),p!==g-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),o&&(l.loose=!0),y=void 0,(v=/^\[[ xX]\] /.test(u))&&(y=" "!==u[1],u=u.replace(/^\[[ xX]\] +/,"")),d={type:"list_item_start",task:v,checked:y,loose:o},c.push(d),this.tokens.push(d),this.token(u,!1),this.tokens.push({type:"list_item_end"});if(l.loose)for(g=c.length,p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:m,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:m,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",o.em=h(o.em).replace(/punctuation/g,o._punctuation).getRegex(),o._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,o._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,o._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,o.autolink=h(o.autolink).replace("scheme",o._scheme).replace("email",o._email).getRegex(),o._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,o.tag=h(o.tag).replace("comment",t._comment).replace("attribute",o._attribute).getRegex(),o._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,o._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,o._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,o.link=h(o.link).replace("label",o._label).replace("href",o._href).replace("title",o._title).getRegex(),o.reflink=h(o.reflink).replace("label",o._label).getRegex(),o.normal=v({},o),o.pedantic=v({},o.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",o._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",o._label).getRegex()}),o.gfm=v({},o.normal,{escape:h(o.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):c(s[0]):s[0];else if(s=this.rules.link.exec(e)){var l=y(s[2],"()");if(l>-1){var d=s[0].length-(s[2].length-l)-(s[3]||"").length;s[2]=s[2].substring(0,l),s[0]=s[0].substring(0,d).trim(),s[3]=""}e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],o=t[3]):o="":o=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(s,{href:r.escapes(i),title:r.escapes(o)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){u+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,u+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),u+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),u+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),u+=this.renderer.codespan(c(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),u+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),u+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),i="@"===s[2]?"mailto:"+(n=c(this.mangle(s[1]))):n=c(s[1]),u+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?u+=this.renderer.text(s[0]):u+=this.renderer.text(c(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])i="mailto:"+(n=c(s[0]));else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=c(s[0]),i="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),u+=this.renderer.link(i,null,n)}return u},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var n=t.href,i=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,c(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},s.prototype.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,i);null!=o&&o!==e&&(n=!0,e=o)}return i?'
'+(n?e:c(e,!0))+"
\n":"
"+(n?e:c(e,!0))+"
"},s.prototype.blockquote=function(e){return"
\n"+e+"
\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,n,i){return this.options.headerIds?"'+e+"\n":""+e+"\n"},s.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},s.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},s.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},s.prototype.checkbox=function(e){return" "},s.prototype.paragraph=function(e){return"

    "+e+"

    \n"},s.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},s.prototype.tablerow=function(e){return"\n"+e+"\n"},s.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},s.prototype.strong=function(e){return""+e+""},s.prototype.em=function(e){return""+e+""},s.prototype.codespan=function(e){return""+e+""},s.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},s.prototype.del=function(e){return""+e+""},s.prototype.link=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"},s.prototype.image=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,n){return""+n},a.prototype.br=function(){return""},u.parse=function(e,t){return new u(t).parse(e)},u.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,v({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},u.prototype.next=function(){return this.token=this.tokens.pop()},u.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},u.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},u.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},c.escapeTest=/[&<>"']/,c.escapeReplace=/[&<>"']/g,c.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},c.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,c.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var f={},g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(){}function v(e){for(var t,n,i=1;i=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+c(e.message+"",!0)+"
    ";throw e}}m.exec=m,C.options=C.setOptions=function(e){return v(C.defaults,e),C},C.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},C.defaults=C.getDefaults(),C.Parser=u,C.parser=u.parse,C.Renderer=s,C.TextRenderer=a,C.Lexer=n,C.lexer=n.lex,C.InlineLexer=r,C.inlineLexer=r.output,C.Slugger=l,C.parse=C,i=C}).call(void 0);i.Parser,i.parser;var l=i.Renderer,c=(i.TextRenderer,i.Lexer,i.lexer,i.InlineLexer,i.inlineLexer,i.parse);let d;!function e(t,n,i){function o(s,a){if(!n[s]){if(!t[s]){if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,n,i)}return n[s].exports}for(var r=!1,s=0;s\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,u=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,l=/^=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):c.test(e)?f(a,m):l.test(e)&&f(s,g);var i;!function(){if(!n)return;var i,o=e.indexOf("<");o>=0?(i=e.substring(0,o),e=e.substring(o)):(i=e,e="");t.chars&&t.chars(i)}()}();var i=e===h;h=e,i&&(e="")}function f(t,i){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,i),n=!1)}function g(e,n,s,a){var l={},c=o(n),h=r.voids[c]||!!a;s.replace(u,(function(e,t,n,o,r){l[t]=void 0===n&&void 0===o&&void 0===r?void 0:i.decode(n||o||r||"")})),h||d.push(c),t.start&&t.start(c,l,h)}function m(e,n){var i,r=0,s=o(n);if(s)for(r=d.length-1;r>=0&&d[r]!==s;r--);if(r>=0){for(i=d.length-1;i>=r;i--)t.end&&t.end(d[i]);d.length=r}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var i=e("he"),o=e("./lowercase"),r=e("./attributes"),s=e("./elements");t.exports=function(e,t){var n,a=t||{};return d(),{start:function(e,t,s){var c=o(e);if(n.ignoring)return void l(c);if(-1===(a.allowedTags||[]).indexOf(c))return void l(c);if(a.filter&&!a.filter({tag:c,attrs:t}))return void l(c);u("<"),u(c),Object.keys(t).forEach((function(e){var n=t[e],s=(a.allowedClasses||{})[c]||[],l=(a.allowedAttributes||{})[c]||[];l=l.concat((a.allowedAttributes||{})["*"]||[]);var d=o(e);("class"===d&&-1===l.indexOf(d)?(n=n.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==l.indexOf(d)&&(!0!==r.uris[d]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var i=e.indexOf("?");if(-1!==i&&n>i)return!0;var o=e.indexOf("#");if(-1!==o&&n>o)return!0;return a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(n)))&&(u(" "),u(e),"string"==typeof n&&(u('="'),u(i.encode(n)),u('"')))})),u(s?"/>":">")},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(u("")):c(t)},chars:function(e){!1===n.ignoring&&u(a.transformText?a.transformText(e):e)}};function u(t){e.push(t)}function l(e){s.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function c(e){n.ignoring===e&&--n.depth<=0&&d()}function d(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var i={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},r=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return i[e]}function u(e){return o[e]}function l(e){return null==e?"":String(e).replace(s,a)}function c(e){return null==e?"":String(e).replace(r,u)}l.options=c.options={},t.exports={encode:l,escape:l,decode:c,unescape:c,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function i(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(i,{})}},{}]},{},[4]);var h=d,p=n("Q4rV"),f=n("qj0h"),g=n("N0LK"),m=n("bY76"),v=n("tYmi"),_=n("Vhoy");var b,y=n("W9cx"),C=n("WBhO"),w=n("TQUy"),S=n("Cg/j"),O=n("MI8n"),L=n("pmY6"),D=n("twdY"),x=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),N=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}},E=function(e){function t(t,n,i){void 0===i&&(i=y.b);var o=e.call(this)||this;return o._editor=t,o._modeService=n,o._openerService=i,o._onDidRenderCodeBlock=o._register(new O.a),o.onDidRenderCodeBlock=o._onDidRenderCodeBlock.event,o}return x(t,e),t.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,n){var i=null;if(e)i=t._modeService.getModeIdForLanguageName(e);else{var o=t._editor.getModel();o&&(i=o.getLanguageIdentifier().language)}return t._modeService.triggerMode(i||""),Promise.resolve(!0).then((function(e){var t=D.B.getPromise(i||"");return t?t.then((function(e){return Object(w.b)(n,e)})):Object(w.b)(n,void 0)})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(e,{fromUserGesture:!0}).catch(s.e)},disposeables:e}}},t.prototype.render=function(e){var t=new L.b;return{element:e?function(e,t){void 0===t&&(t={});var n,i=Object(r.a)(t),d=function(t){var n;try{n=Object(p.a)(decodeURIComponent(t))}catch(e){}return n?(n=Object(f.b)(n,(function(t){return e.uris&&e.uris[t]?m.a.revive(e.uris[t]):void 0})),encodeURIComponent(JSON.stringify(n))):t},b=function(t,n){var i=e.uris&&e.uris[t];if(!i)return t;var r=m.a.revive(i);return m.a.parse(t).toString()===r.toString()?t:(n&&(r=o.s(r)),r.query&&(r=r.with({query:d(r.query)})),r.toString(!0))},y=new Promise((function(e){return n=e})),C=new l;C.image=function(e,t,n){var i,o=[],r=[];return e&&(e=(i=Object(a.d)(e)).href,o=i.dimensions,e=b(e,!0),r.push('src="'+e+'"')),n&&r.push('alt="'+n+'"'),t&&r.push('title="'+t+'"'),o.length&&(r=r.concat(o)),""},C.link=function(t,n,i){return t===i&&(i=Object(a.e)(i)),t=b(t,!1),n=Object(a.e)(n),!(t=Object(a.e)(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?i:'
    /g,">").replace(/"/g,""").replace(/'/g,"'"))+'" title="'+(n||t)+'">'+i+""},C.paragraph=function(t){return"

    "+(e.supportThemeIcons?Object(_.c)(t):t)+"

    "},t.codeBlockRenderer&&(C.code=function(e,n){var o=t.codeBlockRenderer(n,e),r=u.b.nextId(),s=Promise.all([o,y]).then((function(e){var t=e[0],n=i.querySelector('div[data-code="'+r+'"]');n&&(n.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&s.then(t.codeBlockRenderCallback),'
    '+Object(g.o)(e)+"
    "});var w=t.actionHandler;w&&w.disposeables.add(o.o(i,"click",(function(e){var t=e.target;if("A"===t.tagName||(t=t.parentElement)&&"A"===t.tagName)try{var n=t.dataset.href;n&&w.callback(n,e)}catch(e){Object(s.e)(e)}finally{e.preventDefault()}})));var S={sanitize:!0,renderer:C},O=[v.b.http,v.b.https,v.b.mailto,v.b.data,v.b.file,v.b.vscodeRemote,v.b.vscodeRemoteResource];e.isTrusted&&O.push(v.b.command);var L=c(e.supportThemeIcons?Object(_.b)(e.value):e.value,S);return i.innerHTML=h(L,{allowedSchemes:O,allowedAttributes:{a:["href","name","target","data-href"],iframe:["allowfullscreen","frameborder","src"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class"]}}),n(),i}(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return t.dispose()}}},t=N([k(1,C.a),k(2,Object(S.d)(y.a))],t)}(L.a)},"3rx1": /*!*****************************************************************!*\ @@ -383,8 +383,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ @@ -395,17 +395,17 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */function(e,t,n){"use strict";n.r(t),n.d(t,"DefinitionAction",(function(){return ie}));var i,o=n("OBOq"),r=n("X+cX"),s=n("/kV6"),a=n("MNsG"),u=n("sFUC"),l=n("sswD"),c=n("Vxe3"),d=n("cGHE"),h=n("aokT"),p=n("wQH0"),f=n("twdY"),g=n("NR8r"),m=n("iNS8"),v=n("QY8A"),_=n("9o5J"),b=n("3/fG"),y=n("fjLI"),C=n("T8No"),w=n("sM1p"),S=n("tTk5"),O=n("vRMv"),L=n("nnTU"),D=n("vATl"),x=n("Cg/j"),N=n("9fML"),k=n("nrhi"),E=n("pmY6"),I=n("MI8n"),M=n("bexQ"),T=n("gslv"),P=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),R=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},A=function(e,t){return function(n,i){t(n,i,e)}},F=new C.d("hasSymbols",!1),j=Object(x.c)("ISymbolNavigationService"),W=function(){function e(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=F.bindTo(e)}return e.prototype.reset=function(){this._ctxHasSymbols.reset(),Object(E.f)(this._currentState),Object(E.f)(this._currentMessage),this._currentModel=void 0,this._currentIdx=-1},e.prototype.put=function(e){var t=this,n=e.parent.parent;if(n.references.length<=1)this.reset();else{this._currentModel=n,this._currentIdx=n.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();var i=new Y(this._editorService),o=i.onDidChange((function(e){if(!t._ignoreEditorChange){var i=t._editorService.getActiveCodeEditor();if(i){var o=i.getModel(),r=i.getPosition();if(o&&r){for(var s=!1,a=!1,u=0,l=n.references;u0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1)?[3,1]:(this._openInPeek(n,i),[3,3]);case 1:return r=i.firstReference(),s=i.references.length>1&&"gotoAndPeek"===o,[4,this._openReference(n,e,r,this._configuration.openToSide,!s)];case 2:a=u.sent(),s&&a?this._openInPeek(a,i):i.dispose(),"goto"===o&&t.put(r),u.label=3;case 3:return[2]}}))}))},t.prototype._openReference=function(e,t,n,i,o){return ee(this,void 0,void 0,(function(){var r,s,a,u;return te(this,(function(l){switch(l.label){case 0:return r=void 0,Object(f.G)(n)&&(r=n.targetSelectionRange),r||(r=n.range),[4,t.openCodeEditor({resource:n.uri,options:{selection:h.a.collapseToStart(r),revealInCenterIfOutsideViewport:!0}},e,i)];case 1:return(s=l.sent())?(o&&(a=s.getModel(),u=s.deltaDecorations([],[{range:r,options:{className:"symbolHighlight"}}]),setTimeout((function(){s.getModel()===a&&s.deltaDecorations(u,[])}),350)),[2,s]):[2,void 0]}}))}))},t.prototype._openInPeek=function(e,t){var n=v.a.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Object(r.f)((function(e){return Promise.resolve(t)})),this._configuration.openInPeek):t.dispose()},t}(l.b),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.b)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("def.title","Definitions")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("noResultWord","No definition found for '{0}'",e.word):b.a("generic.noResults","No definition found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeDefinitionCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleDefinitions},t}(ne),oe=a.g&&!Z.l?2118:70;Object(l.f)(((V=function(e){function t(){var n=e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:C.a.and(p.a.hasDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:oe,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:19,group:"4_symbol_nav",order:2,title:b.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}})||this;return L.a.registerCommandAlias("editor.action.goToDeclaration",t.id),n}return $(t,e),t}(ie)).id="editor.action.revealDefinition",V)),Object(l.f)(((B=function(e){function t(){var n=e.call(this,{openToSide:!0,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:C.a.and(p.a.hasDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:Object(s.a)(2089,oe),weight:100}})||this;return L.a.registerCommandAlias("editor.action.openDeclarationToTheSide",t.id),n}return $(t,e),t}(ie)).id="editor.action.revealDefinitionAside",B)),Object(l.f)(((H=function(e){function t(){var n=e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.id,label:b.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:C.a.and(p.a.hasDefinitionProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:8,group:"peek",order:2}})||this;return L.a.registerCommandAlias("editor.action.previewDeclaration",t.id),n}return $(t,e),t}(ie)).id="editor.action.peekDefinition",H));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.a)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("decl.title","Declarations")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeDeclarationCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleDeclarations},t}(ne);Object(l.f)(((z=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:C.a.and(p.a.hasDeclarationProvider,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:19,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})||this}return $(t,e),t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")},t}(re)).id="editor.action.revealDeclaration",z)),Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:b.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:C.a.and(p.a.hasDeclarationProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:3}})||this}return $(t,e),t}(re));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.e)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("typedef.title","Type Definitions")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b.a("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeTypeDefinitionCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleTypeDefinitions},t}(ne);Object(l.f)(((U=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:b.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:C.a.and(p.a.hasTypeDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:19,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})||this}return $(t,e),t}(se)).ID="editor.action.goToTypeDefinition",U)),Object(l.f)(((K=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:b.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:C.a.and(p.a.hasTypeDefinitionProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:4}})||this}return $(t,e),t}(se)).ID="editor.action.peekTypeDefinition",K));var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.c)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("impl.title","Implementations")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b.a("goToImplementation.generic.noResults","No implementation found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeImplementationCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleImplementations},t}(ne);Object(l.f)(((q=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:b.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:C.a.and(p.a.hasImplementationProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:19,group:"4_symbol_nav",order:4,title:b.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})||this}return $(t,e),t}(ae)).ID="editor.action.goToImplementation",q)),Object(l.f)(((G=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:b.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:C.a.and(p.a.hasImplementationProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:8,group:"peek",order:5}})||this}return $(t,e),t}(ae)).ID="editor.action.peekImplementation",G));var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getNoResultFoundMessage=function(e){return e?b.a("references.no","No references found for '{0}'",e.word):b.a("references.noGeneric","No references found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeReferenceCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleReferences},t}(ne);Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:b.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:C.a.and(p.a.hasReferenceProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:19,group:"4_symbol_nav",order:5,title:b.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.d)(e,t,!0,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("ref.title","References")]))]}}))}))},t}(ue)),Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:b.a("references.action.label","Peek References"),alias:"Peek References",precondition:C.a.and(p.a.hasReferenceProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:6}})||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.d)(e,t,!1,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("ref.title","References")]))]}}))}))},t}(ue));var le=function(e){function t(t,n,i){var o=e.call(this,t,{id:"editor.action.goToLocation",label:b.a("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:C.a.and(m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated())})||this;return o._references=n,o._gotoMultipleBehaviour=i,o}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){return te(this,(function(e){return[2,new _.c(this._references,b.a("generic.title","Locations"))]}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&b.a("generic.noResult","No results for '{0}'",e.word)||""},t.prototype._getGoToPreference=function(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(41).multipleReferences},t.prototype._getAlternativeCommand=function(){return""},t}(ne);L.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:X.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,i,o,r){return ee(void 0,void 0,void 0,(function(){var s,a;return te(this,(function(l){switch(l.label){case 0:return Object(Q.a)(X.a.isUri(t)),Object(Q.a)(d.a.isIPosition(n)),Object(Q.a)(Array.isArray(i)),Object(Q.a)(void 0===o||"string"==typeof o),Object(Q.a)(void 0===r||"boolean"==typeof r),[4,(s=e.get(c.a)).openCodeEditor({resource:t},s.getFocusedCodeEditor())];case 1:return a=l.sent(),Object(u.a)(a)?(a.setPosition(n),a.revealPositionInCenterIfOutsideViewport(n,0),[2,a.invokeWithinContext((function(e){var t=new le({muteMessage:!0,openInPeek:Boolean(r),openToSide:!1},i,o);e.get(x.a).invokeFunction(t.run.bind(t),a)}))]):[2]}}))}))}}),L.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:X.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,i,o){return ee(void 0,void 0,void 0,(function(){return te(this,(function(r){return e.get(L.b).executeCommand("editor.action.goToLocations",t,n,i,o,!0),[2]}))}))}}),L.a.registerCommand({id:"editor.action.findReferences",handler:function(e,t,n){Object(Q.a)(X.a.isUri(t)),Object(Q.a)(d.a.isIPosition(n));var i=e.get(c.a);return i.openCodeEditor({resource:t},i.getFocusedCodeEditor()).then((function(e){if(Object(u.a)(e)&&e.hasModel()){var t=v.a.get(e);if(t){var i=Object(r.f)((function(t){return Object(O.d)(e.getModel(),d.a.lift(n),!1,t).then((function(e){return new _.c(e,b.a("ref.title","References"))}))})),o=new h.a(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(o,i,!1))}}}))}}),L.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},"8gvo": /*!****************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***! @@ -424,11 +424,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/assert.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -446,50 +446,50 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/marshalling.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/marshalling.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/network.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/objects.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/path.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/range.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ @@ -498,7 +498,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -509,20 +509,20 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/label/common/label.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -629,7 +629,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/touch.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -639,11 +639,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ @@ -651,11 +651,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -810,7 +810,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/browser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -825,14 +825,14 @@ /*! exports used: TypeOperations, TypeWithAutoClosingCommand */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return v}));var i,o=n("/cxE"),r=n("N0LK"),s=n("LCkn"),a=n("zN7H"),u=n("aokT"),l=n("gCVg"),c=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new u.a(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new u.a(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new l.a(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}(),d=n("Ll0s"),h=n("5v8Y"),p=n("KDc4"),f=n("cMvZ"),g=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){function e(){}return e.indent=function(e,t,n){if(null===t||null===n)return[];for(var i=[],o=0,r=n.length;o1){var l=void 0;for(l=i-1;l>=1;l--){var c=n.getLineContent(l);if(r.D(c)>=0)break}if(l<1)return null;var d=n.getLineMaxColumn(l),h=f.a.getEnterAction(t.autoIndent,n,new u.a(l,d,l,d));h&&(s=h.indentation+h.appendText)}return o&&(o===p.a.Indent&&(s=e.shiftIndent(t,s)),o===p.a.Outdent&&(s=e.unshiftIndent(t,s)),s=t.normalizeIndentation(s)),s||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var a=d.a.visibleColumnFromColumn2(e,t,r),u=e.indentSize,l=u-a%u,c=0;c=4){var y=f.a.getIndentForEnter(t.autoIndent,n,o,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(y){var C=d.a.visibleColumnFromColumn2(t,n,o.getEndPosition()),w=o.endColumn,S="\n";b!==t.normalizeIndentation(y.beforeEnter)&&(S=t.normalizeIndentation(y.beforeEnter)+_.substring(b.length,o.startColumn-1)+"\n",o=new u.a(o.startLineNumber,1,o.endLineNumber,o.endColumn));var O=n.getLineContent(o.endLineNumber),L=r.q(O);if(o=L>=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,L+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new s.e(o,S+t.normalizeIndentation(y.afterEnter),!0);var D=0;return w<=L+1&&(t.insertSpaces||(C=Math.ceil(C/t.indentSize)),D=Math.min(C+1-t.normalizeIndentation(y.afterEnter).length-1,0)),new s.d(o,S+t.normalizeIndentation(y.afterEnter),0,D,!0)}}return e._typeCommand(o,"\n"+t.normalizeIndentation(b),i)},e._isAutoIndentType=function(e,t,n){if(e.autoIndent<4)return!1;for(var i=0,o=n.length;i2?l.charCodeAt(u.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){for(var h=!1,p=0,f=i.length;p=0||n.indexOf(t)>=0},e._isBeforeClosingBrace=function(t,n,i){var o=t.autoClosingPairsClose2.get(i);if(!o)return!1;for(var r=e._autoClosingPairIsSymmetric(n),s=0,a=o;sr.open.length){for(var c=!0,d=0,h=n;dv.column-1){var b=_.charAt(v.column-1);if(!e._isBeforeClosingBrace(t,l,b)&&!c(b))return null}if(!n.isCheapToTokenize(v.lineNumber))return null;if(1===l.open.length&&a&&"always"!==u){var y=Object(h.a)(t.wordSeparators);if(s&&v.column>1&&0===y.get(_.charCodeAt(v.column-2)))return null;if(!s&&v.column>2&&0===y.get(_.charCodeAt(v.column-3)))return null}n.forceTokenization(v.lineNumber);var C=n.getLineTokens(v.lineNumber),w=!1;try{w=f.a.shouldAutoClosePair(l,C,s?v.column:v.column-1)}catch(e){Object(o.e)(e)}if(!w)return null}return l},e._runAutoClosingOpenCharType=function(e,t,n,i,o,r,s){for(var a=[],u=0,l=i.length;u1){var l=void 0;for(l=i-1;l>=1;l--){var c=n.getLineContent(l);if(r.D(c)>=0)break}if(l<1)return null;var d=n.getLineMaxColumn(l),h=f.a.getEnterAction(t.autoIndent,n,new u.a(l,d,l,d));h&&(s=h.indentation+h.appendText)}return o&&(o===p.a.Indent&&(s=e.shiftIndent(t,s)),o===p.a.Outdent&&(s=e.unshiftIndent(t,s)),s=t.normalizeIndentation(s)),s||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var a=d.a.visibleColumnFromColumn2(e,t,r),u=e.indentSize,l=u-a%u,c=0;c=4){var y=f.a.getIndentForEnter(t.autoIndent,n,o,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(y){var C=d.a.visibleColumnFromColumn2(t,n,o.getEndPosition()),w=o.endColumn,S="\n";b!==t.normalizeIndentation(y.beforeEnter)&&(S=t.normalizeIndentation(y.beforeEnter)+_.substring(b.length,o.startColumn-1)+"\n",o=new u.a(o.startLineNumber,1,o.endLineNumber,o.endColumn));var O=n.getLineContent(o.endLineNumber),L=r.q(O);if(o=L>=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,L+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new s.e(o,S+t.normalizeIndentation(y.afterEnter),!0);var D=0;return w<=L+1&&(t.insertSpaces||(C=Math.ceil(C/t.indentSize)),D=Math.min(C+1-t.normalizeIndentation(y.afterEnter).length-1,0)),new s.d(o,S+t.normalizeIndentation(y.afterEnter),0,D,!0)}}return e._typeCommand(o,"\n"+t.normalizeIndentation(b),i)},e._isAutoIndentType=function(e,t,n){if(e.autoIndent<4)return!1;for(var i=0,o=n.length;i2?l.charCodeAt(u.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){for(var h=!1,p=0,f=i.length;p=0||n.indexOf(t)>=0},e._isBeforeClosingBrace=function(t,n,i){var o=t.autoClosingPairsClose2.get(i);if(!o)return!1;for(var r=e._autoClosingPairIsSymmetric(n),s=0,a=o;sr.open.length){for(var c=!0,d=0,h=n;dv.column-1){var b=_.charAt(v.column-1);if(!e._isBeforeClosingBrace(t,l,b)&&!c(b))return null}if(!n.isCheapToTokenize(v.lineNumber))return null;if(1===l.open.length&&a&&"always"!==u){var y=Object(h.a)(t.wordSeparators);if(s&&v.column>1&&0===y.get(_.charCodeAt(v.column-2)))return null;if(!s&&v.column>2&&0===y.get(_.charCodeAt(v.column-3)))return null}n.forceTokenization(v.lineNumber);var C=n.getLineTokens(v.lineNumber),w=!1;try{w=f.a.shouldAutoClosePair(l,C,s?v.column:v.column-1)}catch(e){Object(o.e)(e)}if(!w)return null}return l},e._runAutoClosingOpenCharType=function(e,t,n,i,o,r,s){for(var a=[],u=0,l=i.length;u=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},b=function(e,t){return function(n,i){t(n,i,e)}},y=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.run=function(t,n){var i=this;this.currentRequest&&this.currentRequest.cancel();var o=this.editor.getSelection(),a=this.editor.getModel();if(a&&o){var u=o;if(u.startLineNumber===u.endLineNumber){var l=new d.a(this.editor,5),h=a.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=Object(g.f)((function(e){return i.editorWorkerService.navigateValueSet(h,u,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&l.validate(i.editor)){var o=r.a.lift(n.range),a=n.range,d=n.value.length-(u.endColumn-u.startColumn);a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.startColumn+n.value.length},d>1&&(u=new s.a(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+d-1));var h=new c(o,u,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,h),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:a,options:e.DECORATION}]),i.decorationRemover&&i.decorationRemover.cancel(),i.decorationRemover=Object(g.l)(350),i.decorationRemover.then((function(){return i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])})).catch(m.e)}})).catch(m.e)):Promise.resolve(void 0)}}},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=f.a.register({className:"valueSetReplacement"}),e=_([b(1,l.a)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:o.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:a.a.writable,kbOpts:{kbExpr:a.a.editorTextFocus,primary:3154,weight:100}})||this}return v(t,e),t.prototype.run=function(e,t){var n=y.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)},t}(u.b),w=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:o.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:a.a.writable,kbOpts:{kbExpr:a.a.editorTextFocus,primary:3156,weight:100}})||this}return v(t,e),t.prototype.run=function(e,t){var n=y.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)},t}(u.b);Object(u.h)(y.ID,y),Object(u.f)(C),Object(u.f)(w),Object(h.e)((function(e,t){var n=e.getColor(p.d);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")}))},Gw4z: /*!********************************************************************************!*\ @@ -867,7 +867,7 @@ \********************************************************************************/ /*! exports provided: StringDiffSequence, stringDiff, Debug, MyArray, LcsDiff */ /*! exports used: LcsDiff, stringDiff */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/hash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var i=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}(),o=n("7afs"),r=function(){function e(e){this.source=e}return e.prototype.getElements=function(){for(var e=this.source,t=new Int32Array(e.length),n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),c=function(){function e(t,n,i){void 0===i&&(i=null),this.ContinueProcessingPredicate=i;var o=e._getElements(t),r=o[0],s=o[1],a=o[2],u=e._getElements(n),l=u[0],c=u[1],d=u[2];this._hasStrings=a&&d,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"==typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),r=0,s=n.length;r=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){var s=void 0;return n<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,o-n+1)]):e<=t?(a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,o,u,l,r),d=u[0],h=l[0];if(null!==c)return c;if(!r[0]){var p=this.ComputeDiffRecursive(e,d,n,h,r),f=[];return f=r[0]?[new i(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,r),this.ConcatenateChanges(p,f)}return[new i(e,t-e+1,n,o-n+1)]},e.prototype.WALKTRACE=function(e,t,n,o,r,s,a,u,c,d,h,p,f,g,m,v,_,b){var y,C=null,w=new l,S=t,O=n,L=f[0]-v[0]-o,D=-1073741824,x=this.m_forwardHistory.length-1;do{(I=L+e)===S||I=0&&(e=(c=this.m_forwardHistory[x])[0],S=1,O=c.length-1)}while(--x>=-1);if(y=w.getReverseChanges(),b[0]){var N=f[0]+1,k=v[0]+1;if(null!==y&&y.length>0){var E=y[y.length-1];N=Math.max(N,E.getOriginalEnd()),k=Math.max(k,E.getModifiedEnd())}C=[new i(N,p-N+1,k,m-k+1)]}else{w=new l,S=s,O=a,L=f[0]-v[0]-u,D=1073741824,x=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var I;(I=L+r)===S||I=d[I+1]?(g=(h=d[I+1]-1)-L-u,h>D&&w.MarkNextChange(),D=h+1,w.AddOriginalElement(h+1,g+1),L=I+1-r):(g=(h=d[I-1])-L-u,h>D&&w.MarkNextChange(),D=h,w.AddModifiedElement(h+1,g+1),L=I-1-r),x>=0&&(r=(d=this.m_reverseHistory[x])[0],S=1,O=d.length-1)}while(--x>=-1);C=w.getChanges()}return this.ConcatenateChanges(y,C)},e.prototype.ComputeRecursionPoint=function(e,t,n,o,r,s,a){var l=0,c=0,d=0,h=0,p=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(o-n),m=g+1,v=new Int32Array(m),_=new Int32Array(m),b=o-n,y=t-e,C=e-n,w=t-o,S=(y-b)%2==0;v[b]=e,_[y]=t,a[0]=!1;for(var O=1;O<=g/2+1;O++){var L=0,D=0;d=this.ClipDiagonalBound(b-O,O,b,m),h=this.ClipDiagonalBound(b+O,O,b,m);for(var x=d;x<=h;x+=2){c=(l=x===d||xL+D&&(L=l,D=c),!S&&Math.abs(x-y)<=O-1&&l>=_[x])return r[0]=l,s[0]=c,N<=_[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}var k=(L-e+(D-n)-O)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,k))return a[0]=!0,r[0]=L,s[0]=D,k>0&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):(e++,n++,[new i(e,t-e+1,n,o-n+1)]);p=this.ClipDiagonalBound(y-O,O,y,m),f=this.ClipDiagonalBound(y+O,O,y,m);for(x=p;x<=f;x+=2){c=(l=x===p||x=_[x+1]?_[x+1]-1:_[x-1])-(x-y)-w;for(N=l;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[x]=l,S&&Math.abs(x-b)<=O&&l<=v[x])return r[0]=l,s[0]=c,N>=v[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}if(O<=1447){var E=new Int32Array(h-d+2);E[0]=b-d+1,u.Copy2(v,d,E,1,h-d+1),this.m_forwardHistory.push(E),(E=new Int32Array(f-p+2))[0]=y-p+1,u.Copy2(_,p,E,1,f-p+1),this.m_reverseHistory.push(E)}}return this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a)},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,p=n.modifiedStart-d;if(hc&&(c=f,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return u.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],u.Copy(t,1,i,e.length,t.length-1),i}i=new Array(e.length+t.length);return u.Copy(e,0,i,0,e.length),u.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,r=e.originalLength,s=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(o,r,s,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),c=function(){function e(t,n,i){void 0===i&&(i=null),this.ContinueProcessingPredicate=i;var o=e._getElements(t),r=o[0],s=o[1],a=o[2],u=e._getElements(n),l=u[0],c=u[1],d=u[2];this._hasStrings=a&&d,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"==typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),r=0,s=n.length;r=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){var s=void 0;return n<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,o-n+1)]):e<=t?(a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,o,u,l,r),d=u[0],h=l[0];if(null!==c)return c;if(!r[0]){var p=this.ComputeDiffRecursive(e,d,n,h,r),f=[];return f=r[0]?[new i(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,r),this.ConcatenateChanges(p,f)}return[new i(e,t-e+1,n,o-n+1)]},e.prototype.WALKTRACE=function(e,t,n,o,r,s,a,u,c,d,h,p,f,g,m,v,_,b){var y,C=null,w=new l,S=t,O=n,L=f[0]-v[0]-o,D=-1073741824,x=this.m_forwardHistory.length-1;do{(I=L+e)===S||I=0&&(e=(c=this.m_forwardHistory[x])[0],S=1,O=c.length-1)}while(--x>=-1);if(y=w.getReverseChanges(),b[0]){var N=f[0]+1,k=v[0]+1;if(null!==y&&y.length>0){var E=y[y.length-1];N=Math.max(N,E.getOriginalEnd()),k=Math.max(k,E.getModifiedEnd())}C=[new i(N,p-N+1,k,m-k+1)]}else{w=new l,S=s,O=a,L=f[0]-v[0]-u,D=1073741824,x=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var I;(I=L+r)===S||I=d[I+1]?(g=(h=d[I+1]-1)-L-u,h>D&&w.MarkNextChange(),D=h+1,w.AddOriginalElement(h+1,g+1),L=I+1-r):(g=(h=d[I-1])-L-u,h>D&&w.MarkNextChange(),D=h,w.AddModifiedElement(h+1,g+1),L=I-1-r),x>=0&&(r=(d=this.m_reverseHistory[x])[0],S=1,O=d.length-1)}while(--x>=-1);C=w.getChanges()}return this.ConcatenateChanges(y,C)},e.prototype.ComputeRecursionPoint=function(e,t,n,o,r,s,a){var l=0,c=0,d=0,h=0,p=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(o-n),m=g+1,v=new Int32Array(m),_=new Int32Array(m),b=o-n,y=t-e,C=e-n,w=t-o,S=(y-b)%2==0;v[b]=e,_[y]=t,a[0]=!1;for(var O=1;O<=g/2+1;O++){var L=0,D=0;d=this.ClipDiagonalBound(b-O,O,b,m),h=this.ClipDiagonalBound(b+O,O,b,m);for(var x=d;x<=h;x+=2){c=(l=x===d||xL+D&&(L=l,D=c),!S&&Math.abs(x-y)<=O-1&&l>=_[x])return r[0]=l,s[0]=c,N<=_[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}var k=(L-e+(D-n)-O)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,k))return a[0]=!0,r[0]=L,s[0]=D,k>0&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):(e++,n++,[new i(e,t-e+1,n,o-n+1)]);p=this.ClipDiagonalBound(y-O,O,y,m),f=this.ClipDiagonalBound(y+O,O,y,m);for(x=p;x<=f;x+=2){c=(l=x===p||x=_[x+1]?_[x+1]-1:_[x-1])-(x-y)-w;for(N=l;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[x]=l,S&&Math.abs(x-b)<=O&&l<=v[x])return r[0]=l,s[0]=c,N>=v[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}if(O<=1447){var E=new Int32Array(h-d+2);E[0]=b-d+1,u.Copy2(v,d,E,1,h-d+1),this.m_forwardHistory.push(E),(E=new Int32Array(f-p+2))[0]=y-p+1,u.Copy2(_,p,E,1,f-p+1),this.m_reverseHistory.push(E)}}return this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a)},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,p=n.modifiedStart-d;if(hc&&(c=f,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return u.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],u.Copy(t,1,i,e.length,t.length-1),i}i=new Array(e.length+t.length);return u.Copy(e,0,i,0,e.length),u.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,r=e.originalLength,s=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(o,r,s,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=3)for(var o=0,r=this._regExpRules.length;o=2&&n.length>0&&i.length>0)for(o=0,r=this._brackets.length;o=2&&n.length>0)for(o=0,r=this._brackets.length;o1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};var s=this.getPrecedingValidLine(t,n,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};var u=t.getLineContent(s);if(o.shouldIncrease(u)||o.shouldIndentNextLine(u))return{indentation:r.t(u),action:a.a.Indent,line:s};if(o.shouldDecrease(u))return{indentation:r.t(u),action:null,line:s};if(1===s)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};var l=s-1,c=o.getIndentMetadata(t.getLineContent(l));if(!(3&c)&&4&c){for(var d=0,h=l-1;h>0;h--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(i)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};for(h=s;h>0;h--){var p=t.getLineContent(h);if(o.shouldIncrease(p))return{indentation:r.t(p),action:a.a.Indent,line:h};if(o.shouldIndentNextLine(p)){d=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=f;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(o.shouldDecrease(p))return{indentation:r.t(p),action:null,line:h}}return{indentation:r.t(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,o){if(e<4)return null;var s=this._getRichEditSupport(n);if(!s)return null;var u=this.getIndentRulesSupport(n);if(!u)return null;var l=this.getInheritIndentForLine(e,t,i),c=t.getLineContent(i);if(l){var d=l.line;if(void 0!==d){var h=s.onEnter(e,"",t.getLineContent(d),"");if(h){var p=r.t(t.getLineContent(d));return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===a.a.Indent||h.indentAction===a.a.IndentOutdent?p=o.shiftIndent(p):h.indentAction===a.a.Outdent&&(p=o.unshiftIndent(p)),u.shouldDecrease(c)&&(p=o.unshiftIndent(p)),h.appendText&&(p+=h.appendText),r.t(p)}}return u.shouldDecrease(c)?l.action===a.a.Indent?l.indentation:o.unshiftIndent(l.indentation):l.action===a.a.Indent?o.shiftIndent(l.indentation):l.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var o,s,l=t.getLineTokens(n.startLineNumber),c=Object(u.a)(l,n.startColumn-1),d=c.getLineContent(),h=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(h=!0,o=d.substr(0,n.startColumn-1-c.firstCharOffset)):o=l.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?s=d.substr(n.startColumn-1-c.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-c.firstCharOffset);var p=this.getIndentRulesSupport(c.languageId);if(!p)return null;var f=o,g=r.t(o),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?f:t.getLineContent(e)}},v=r.t(l.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===a.a.Indent&&(y=i.shiftIndent(y)),p.shouldDecrease(s)&&(y=i.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var u,l=r.getLineContent(),c=l.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?u=l.substr(n.startColumn-1-r.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(c+u)&&s.shouldDecrease(c+i+u)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==a.a.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),u=s.substr(0,n.startColumn-1-i.firstCharOffset);n.isEmpty()?r=s.substr(n.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);var l="";if(n.startLineNumber>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===i.languageId&&(l=c.getLineContent())}var d=o.onEnter(e,l,u,r);if(!d)return null;var h=d.indentAction,p=d.appendText,f=d.removeText||0;p||(p=h===a.a.Indent||h===a.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:h,appendText:p,removeText:f,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=r.t(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(u.a)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},"ci+S": +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var i=n("MI8n"),o=n("pmY6"),r=n("N0LK"),s=n("0JNc"),a=n("KDc4"),u=n("BFtn"),l=function(){function e(t){if(t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new a.b(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){return new a.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var n=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.b({open:n.open,close:n.close||""}))}this._autoCloseBefore="string"==typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore},e.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t",e}(),c=n("EIAu"),d=function(){function e(e){this._richEditBrackets=e}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets;t=3)for(var o=0,r=this._regExpRules.length;o=2&&n.length>0&&i.length>0)for(o=0,r=this._brackets.length;o=2&&n.length>0)for(o=0,r=this._brackets.length;o1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};var s=this.getPrecedingValidLine(t,n,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};var u=t.getLineContent(s);if(o.shouldIncrease(u)||o.shouldIndentNextLine(u))return{indentation:r.t(u),action:a.a.Indent,line:s};if(o.shouldDecrease(u))return{indentation:r.t(u),action:null,line:s};if(1===s)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};var l=s-1,c=o.getIndentMetadata(t.getLineContent(l));if(!(3&c)&&4&c){for(var d=0,h=l-1;h>0;h--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(i)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};for(h=s;h>0;h--){var p=t.getLineContent(h);if(o.shouldIncrease(p))return{indentation:r.t(p),action:a.a.Indent,line:h};if(o.shouldIndentNextLine(p)){d=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=f;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(o.shouldDecrease(p))return{indentation:r.t(p),action:null,line:h}}return{indentation:r.t(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,o){if(e<4)return null;var s=this._getRichEditSupport(n);if(!s)return null;var u=this.getIndentRulesSupport(n);if(!u)return null;var l=this.getInheritIndentForLine(e,t,i),c=t.getLineContent(i);if(l){var d=l.line;if(void 0!==d){var h=s.onEnter(e,"",t.getLineContent(d),"");if(h){var p=r.t(t.getLineContent(d));return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===a.a.Indent||h.indentAction===a.a.IndentOutdent?p=o.shiftIndent(p):h.indentAction===a.a.Outdent&&(p=o.unshiftIndent(p)),u.shouldDecrease(c)&&(p=o.unshiftIndent(p)),h.appendText&&(p+=h.appendText),r.t(p)}}return u.shouldDecrease(c)?l.action===a.a.Indent?l.indentation:o.unshiftIndent(l.indentation):l.action===a.a.Indent?o.shiftIndent(l.indentation):l.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var o,s,l=t.getLineTokens(n.startLineNumber),c=Object(u.a)(l,n.startColumn-1),d=c.getLineContent(),h=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(h=!0,o=d.substr(0,n.startColumn-1-c.firstCharOffset)):o=l.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?s=d.substr(n.startColumn-1-c.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-c.firstCharOffset);var p=this.getIndentRulesSupport(c.languageId);if(!p)return null;var f=o,g=r.t(o),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?f:t.getLineContent(e)}},v=r.t(l.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===a.a.Indent&&(y=i.shiftIndent(y)),p.shouldDecrease(s)&&(y=i.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var u,l=r.getLineContent(),c=l.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?u=l.substr(n.startColumn-1-r.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(c+u)&&s.shouldDecrease(c+i+u)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==a.a.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),u=s.substr(0,n.startColumn-1-i.firstCharOffset);n.isEmpty()?r=s.substr(n.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);var l="";if(n.startLineNumber>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===i.languageId&&(l=c.getLineContent())}var d=o.onEnter(e,l,u,r);if(!d)return null;var h=d.indentAction,p=d.appendText,f=d.removeText||0;p||(p=h===a.a.Indent||h===a.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:h,appendText:p,removeText:f,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=r.t(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(u.a)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},"ci+S": /*!***********************************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***! \***********************************************************************************************************/ @@ -1634,7 +1634,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/numbers.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/objects.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ @@ -1658,17 +1658,17 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"CodeLensContribution",(function(){return z}));var i=n("X+cX"),o=n("/cxE"),r=n("pmY6"),s=n("vATl"),a=n("sswD"),u=n("twdY"),l=n("6OMU"),c=n("JQT/"),d=n("bY76"),h=n("G2kB"),p=function(){function e(){this.lenses=[],this._disposables=new r.b}return e.prototype.dispose=function(){this._disposables.dispose()},e.prototype.add=function(e,t){this._disposables.add(e);for(var n=0,i=e.lenses;nt.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})),r}))}Object(a.j)("_executeCodeLensProvider",(function(e,t){var n=t.resource,i=t.itemResolveCount;if(!(n instanceof d.a))throw Object(o.b)();var s=e.get(h.a).getModel(n);if(!s)throw Object(o.b)();var a=[],u=new r.b;return f(s,c.a.None).then((function(e){u.add(e);for(var t=[],n=function(e){void 0===i||Boolean(e.symbol.command)?a.push(e.symbol):i-- >0&&e.provider.resolveCodeLens&&t.push(Promise.resolve(e.provider.resolveCodeLens(s,e.symbol,c.a.None)).then((function(t){return a.push(t||e.symbol)})))},o=0,r=e.lenses;o"+s+"",this._commands.set(String(o),r.command)):n+=""+s+"",o+1 | ")}}i?(n||(n=" "),this._domNode.innerHTML=n,this._isEmpty&&t&&g.f(this._domNode,"fadein"),this._isEmpty=!1):this._domNode.innerHTML="no commands"},e.prototype.getCommand=function(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.updatePosition=function(e){var t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}},e.prototype.getPosition=function(){return this._widgetPosition||null},e._idPool=0,e}(),L=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;n0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(u,!1))}return e.prototype._createContentWidgetIfNecessary=function(){this._contentWidget||(this._contentWidget=new O(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))},e.prototype.dispose=function(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e.prototype.isValid=function(){var e=this;return this._decorationIds.some((function(t,n){var i=e._editor.getModel().getDecorationRange(t),o=e._data[n].symbol;return!(!i||_.a.isEmpty(o.range)!==i.isEmpty())}))},e.prototype.updateCodeLensSymbols=function(e,t){var n=this;this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((function(e,i){t.addDecoration({range:e.symbol.range,options:b.a.EMPTY},(function(e){return n._decorationIds[i]=e}))}))},e.prototype.computeIfNecessary=function(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(var t=0;t a:hover { color: "+i+" !important; }"),t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: "+i+" !important; }"))}));var x=n("nnTU"),N=n("sM1p"),k=n("Cg/j"),E=n("9fML"),I=n("QDVR"),M=n("A+jI"),T=n("C/vA"),P=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},R=function(e,t){return function(n,i){t(n,i,e)}},A=Object(k.c)("ICodeLensCache"),F=function(e,t){this.lineCount=e,this.data=t},j=function(){function e(e){var t=this;this._fakeProvider=new(function(){function e(){}return e.prototype.provideCodeLenses=function(){throw new Error("not supported")},e}()),this._cache=new I.a(20,.75);Object(i.k)((function(){return e.remove("codelens/cache",1)}));var n="codelens/cache2",o=e.get(n,1,"{}");this._deserialize(o),Object(T.a)(e.onWillSaveState)((function(i){i.reason===M.c.SHUTDOWN&&e.store(n,t._serialize(),1)}))}return e.prototype.put=function(e,t){var n=t.lenses.map((function(e){var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),i=new p;i.add({lenses:n,dispose:function(){}},this._fakeProvider);var o=new F(e.getLineCount(),i);this._cache.set(e.uri.toString(),o)},e.prototype.get=function(e){var t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0},e.prototype.delete=function(e){this._cache.delete(e.uri.toString())},e.prototype._serialize=function(){var e=Object.create(null);return this._cache.forEach((function(t,n){for(var i=new Set,o=0,r=t.data.lenses;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},B=function(e,t){return function(n,i){t(n,i,e)}},H=function(){for(var e=0,t=0,n=arguments.length;t a > .codicon { line-height: "+n+"px; font-size: "+o+"px; }\n\t\t";this._styleElement.innerHTML=r},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=void 0,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=void 0),this._localToDispose.clear(),this._oldCodeLensModels.clear(),Object(r.f)(this._currentCodeLensModel)},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled){var n=this._codeLensCache.get(t);if(n&&this._renderCodeLensSymbols(n),u.b.has(t)){for(var a=0,l=u.b.all(t);a0&&h.schedule()}))),this._localToDispose.add(this._editor.onDidLayoutChange((function(){h.schedule()}))),this._localToDispose.add(Object(r.h)((function(){if(e._editor.getModel()){var t=s.c.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseUp((function(t){var n;if(9===t.target.type){var i=t.target.element;if("SPAN"===(null==i?void 0:i.tagName)&&(i=i.parentElement),"A"===(null==i?void 0:i.tagName))for(var o=0,r=e._lenses;oi||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(u):(n=[u],o.push(n)))}var c=s.c.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var i=new L,r=0,s=0;s=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var i=[],o=0,r=0,s=t.length,a=1,d=e.getLineCount();a<=d;a++){var h=e.getLineContent(a),p=h.length+1,f=0;if(!(r=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var L=b.a.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(g,1),i.startLineNumber+1,l);if(null!==L){O=u.t(e.getLineContent(i.startLineNumber));if((k=y(L,r))!==(E=y(O,r))){var D=k-E;this.getIndentEditsOfMovingBlock(e,t,i,r,a,D)}}}}else t.addEditOperation(new c.a(i.startLineNumber,1,i.startLineNumber,1),v+"\n")}else{var x;if(g=i.startLineNumber-1,m=e.getLineContent(g),t.addEditOperation(new c.a(g,1,g+1,1),null),t.addEditOperation(new c.a(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+m),this.shouldAutoIndent(e,i))if(d.getLineContent=function(t){return t===g?e.getLineContent(i.startLineNumber):e.getLineContent(t)},null!==(x=this.matchEnterRule(e,l,r,i.startLineNumber,i.startLineNumber-2)))0!==x&&this.getIndentEditsOfMovingBlock(e,t,i,r,a,x);else{var N=b.a.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(i.startLineNumber,1),g,l);if(null!==N){var k,E,I=u.t(e.getLineContent(i.startLineNumber));if((k=y(N,r))!==(E=y(I,r))){D=k-E;this.getIndentEditsOfMovingBlock(e,t,i,r,a,D)}}}}}this._selectionId=t.trackSelection(i)}else this._selectionId=t.trackSelection(this._selection)},e.prototype.buildIndentConverter=function(e,t,n){return{shiftIndent:function(i){return v.a.shiftIndent(i,i.length+1,e,t,n)},unshiftIndent:function(i){return v.a.unshiftIndent(i,i.length+1,e,t,n)}}},e.prototype.matchEnterRule=function(e,t,n,i,o,r){for(var s=o;s>=1;){var a=void 0;if(a=s===o&&void 0!==r?r:e.getLineContent(s),u.D(a)>=0)break;s--}if(s<1||i>e.getLineCount())return null;var l=e.getLineMaxColumn(s),d=b.a.getEnterAction(this._autoIndent,e,new c.a(s,l,s,l));if(d){var h=d.indentation;d.indentAction===_.a.None||d.indentAction===_.a.Indent?h=d.indentation+d.appendText:d.indentAction===_.a.IndentOutdent?h=d.indentation:d.indentAction===_.a.Outdent&&(h=t.unshiftIndent(d.indentation)+d.appendText);var p=e.getLineContent(i);if(this.trimLeft(p).indexOf(this.trimLeft(h))>=0){var f=u.t(e.getLineContent(i)),g=u.t(h),m=b.a.getIndentMetadata(e,i);return null!==m&&2&m&&(g=t.unshiftIndent(g)),y(g,n)-y(f,n)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==b.a.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,n,i,o,r){for(var s=n.startLineNumber;s<=n.endLineNumber;s++){var a=e.getLineContent(s),l=u.t(a),d=C(y(l,i)+r,i,o);d!==l&&(t.addEditOperation(new c.a(s,1,s,l.length+1),d),s===n.endLineNumber&&n.endColumn<=l.length+1&&""===d&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(S.getCollator().compare),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}var L,D=(L=function(e,t){return(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),x=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return D(t,e),t.prototype.run=function(e,t){for(var n=[],i=0,o=t.getSelections()||[];i1&&(d-=1,p=i.getLineMaxColumn(d)),r.push(l.a.replace(new f.a(d,p,h,g),"")),s.push(new f.a(d-o,c.positionColumn,d-o,c.positionColumn)),o+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}},t.prototype._getLinesToRemove=function(e){var t=e.getSelections().map((function(e){var t=e.endLineNumber;return e.startLineNumber=t[o].startLineNumber?i.endLineNumber=t[o].endLineNumber:(n.push(i),i=t[o]);return n.push(i),n},t}(s.b),W=function(e){function t(){return e.call(this,{id:"editor.action.indentLines",label:i.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2137,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.indent(n.context.config,t.getModel(),t.getSelections())),t.pushUndoStop())},t}(s.b),V=function(e){function t(){return e.call(this,{id:"editor.action.outdentLines",label:i.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2135,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)},t}(s.b),B=function(e){function t(){return e.call(this,{id:"editor.action.insertLineBefore",label:i.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:3075,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertBefore(n.context.config,t.getModel(),t.getSelections())))},t}(s.b),H=function(e){function t(){return e.call(this,{id:"editor.action.insertLineAfter",label:i.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2051,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertAfter(n.context.config,t.getModel(),t.getSelections())))},t}(s.b),z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){if(t.hasModel()){for(var n=t.getSelection(),i=this._getRangesToDelete(t),o=[],r=0,s=i.length-1;r0){var s=t.startLineNumber-o;r=new f.a(s,t.startColumn,s,t.startColumn)}else r=new f.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)})),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections();if(null===t)return[];var n=t,i=e.getModel();return null===i?[]:(n.sort(c.a.compareRangesUsingStarts),n=n.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:i.getLineContent(t).length+1;return new c.a(t,n,e.startLineNumber,1)}return new c.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.a(e.startLineNumber,1,e.endLineNumber,e.endColumn)})))},t}(z),K=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:i.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:g.a.writable,kbOpts:{kbExpr:g.a.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})||this}return D(t,e),t.prototype._getEndCursorState=function(e,t){for(var n=null,i=[],o=0,r=t.length;oe.endLineNumber+1?(o.push(e),t):new f.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));o.push(r);var s=t.getModel();if(null!==s){for(var a=[],u=[],d=i,h=0,p=0,g=o.length;p=1){var x=!0;""===S&&(x=!1),!x||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(x=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var N=L.substr(D-1);S+=(x?" ":"")+N,_=x?N.length+1:N.length}else _=0}var k=new c.a(v,1,b,y);if(!k.isEmpty()){var E=void 0;m.isEmpty()?(a.push(l.a.replace(k,S)),E=new f.a(k.startLineNumber-h,S.length-_+1,v-h,S.length-_+1)):m.startLineNumber===m.endLineNumber?(a.push(l.a.replace(k,S)),E=new f.a(m.startLineNumber-h,m.startColumn,m.endLineNumber-h,m.endColumn)):(a.push(l.a.replace(k,S)),E=new f.a(m.startLineNumber-h,m.startColumn,m.startLineNumber-h,S.length-C)),null!==c.a.intersectRanges(k,i)?d=E:u.push(E)}h+=k.endLineNumber-k.startLineNumber}u.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,u),t.pushUndoStop()}}}},t}(s.b),G=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:i.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:g.a.writable})||this}return D(t,e),t.prototype.run=function(e,t){var n=t.getSelections();if(null!==n){var i=t.getModel();if(null!==i){for(var o=[],r=0,s=n.length;r=d){if(l.lineNumber===i.getLineCount())continue;var h=new c.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),p=i.getValueInRange(h).split("").reverse().join("");o.push(new a.a(new f.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),p))}else{h=new c.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),p=i.getValueInRange(h).split("").reverse().join("");o.push(new a.b(h,p,new f.a(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}},t}(s.b),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){var n=t.getSelections();if(null!==n){var i=t.getModel();if(null!==i){for(var o=t.getOption(96),r=[],s=0,u=n.length;s=0?(o=!0,i+=s):o?(o=!1,i+=s.toLocaleUpperCase()):i+=s.toLocaleLowerCase()}return i},t}(Y);Object(s.f)(N),Object(s.f)(k),Object(s.f)(E),Object(s.f)(M),Object(s.f)(T),Object(s.f)(R),Object(s.f)(A),Object(s.f)(F),Object(s.f)(j),Object(s.f)(W),Object(s.f)(V),Object(s.f)(B),Object(s.f)(H),Object(s.f)(U),Object(s.f)(K),Object(s.f)(q),Object(s.f)(G),Object(s.f)(Z),Object(s.f)(X),Object(s.f)(Q)},dgXF: /*!*****************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js + 7 modules ***! @@ -1718,9 +1718,9 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1761,13 +1761,13 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codiconLabel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickOutline.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/cancellation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1779,7 +1779,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ @@ -1787,20 +1787,20 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineTree.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickOutline.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js (<- Module is referenced from these modules with unsupported syntax: include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1831,7 +1831,7 @@ /*! exports provided: ContextMenuController */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1847,11 +1847,11 @@ /*! exports provided: ElementsDragAndDropData, ExternalElementsDragAndDropData, DesktopDragAndDropData, ListView */ /*! exports used: ElementsDragAndDropData, ListView */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/browser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/touch.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1944,7 +1944,7 @@ /*! exports provided: IPeekViewService, PeekContext, getOuterEditor, PeekViewWidget, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground, peekViewBorder, peekViewResultsBackground, peekViewResultsMatchForeground, peekViewResultsFileForeground, peekViewResultsSelectionBackground, peekViewResultsSelectionForeground, peekViewEditorBackground, peekViewEditorGutterBackground, peekViewResultsMatchHighlight, peekViewEditorMatchHighlight, peekViewEditorMatchHighlightBorder */ /*! exports used: IPeekViewService, PeekContext, PeekViewWidget, getOuterEditor, peekViewBorder, peekViewEditorBackground, peekViewEditorGutterBackground, peekViewEditorMatchHighlight, peekViewEditorMatchHighlightBorder, peekViewResultsBackground, peekViewResultsFileForeground, peekViewResultsMatchForeground, peekViewResultsMatchHighlight, peekViewResultsSelectionBackground, peekViewResultsSelectionForeground, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1957,10 +1957,10 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return F})),n.d(t,"c",(function(){return W})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return B})),n.d(t,"r",(function(){return H})),n.d(t,"e",(function(){return z})),n.d(t,"j",(function(){return U})),n.d(t,"l",(function(){return K})),n.d(t,"k",(function(){return q})),n.d(t,"n",(function(){return G})),n.d(t,"o",(function(){return Y})),n.d(t,"f",(function(){return Z})),n.d(t,"g",(function(){return X})),n.d(t,"m",(function(){return Q})),n.d(t,"h",(function(){return J})),n.d(t,"i",(function(){return $}));n("e1ni");var i,o,r,s=n("EffR"),a=n("WqXY"),u=n("8HAY"),l=n("zrhQ"),c=n("MI8n"),d=n("qj0h"),h=n("N0LK"),p=n("Vxe3"),f=n("03kh"),g=(n("uWgD"),n("cMOf")),m=n("nD70"),v=n("pmY6"),_=n("aokT"),b=n("tX9W"),y=new l.a(new l.c(0,122,204)),C={showArrow:!0,showFrame:!0,className:"",frameColor:y,arrowColor:y,keepEditorSelection:!1},w=function(){function e(e,t,n,i,o,r){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),S=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),O=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}return e.prototype.dispose=function(){this.hide(),s.O(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){s.O(this._ruleName),s.v(".monaco-editor "+this._ruleName,"border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ")},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:_.a.fromPositions(e),options:{className:this._ruleName,stickiness:1}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new m.a(".arrow-decoration-"),e}(),L=function(){function e(e,t){var n=this;void 0===t&&(t={}),this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new v.b,this.container=null,this._isShowing=!1,this.editor=e,this.options=d.c(t),d.g(this.options,C,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()},e.prototype.create=function(){s.f(this.domNode,"zone-widget"),this.options.className&&s.f(this.domNode,this.options.className),this.container=document.createElement("div"),s.f(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new O(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container&&this.options.frameColor){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){if(this.domNode.style.height=e+"px",this.container){var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel();if(t){var n=t.getDecorationRange(e);if(n)return n.getStartPosition()}}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=_.a.isIRange(e)?_.a.lift(e):_.a.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:b.a.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getOption(49),t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t},e.prototype._showImpl=function(e,t){var n=this,i=e.getStartPosition(),o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(o)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getOption(49),u=this.editor.getLayoutInfo().height/a*.8;t>=u&&(t=u);var l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new w(s,i.lineNumber,i.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new S("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.container&&this.options.showFrame){var d=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=d+"px",this.container.style.borderBottomWidth=d+"px"}var h=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,r),this.options.keepEditorSelection||this.editor.setSelection(e);var p=this.editor.getModel();if(p){var f=e.endLineNumber+1;f<=p.getLineCount()?this.revealLine(f,!1):this.revealLine(p.getLineCount(),!0)}},e.prototype.revealLine=function(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){this.container&&(t&&this.container.classList.remove(t),s.f(this.container,e))},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone&&(t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id))}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash||(this._resizeSash=this._disposables.add(new g.a(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((function(n){if(e){var i=(n.currentY-e.startY)/t.editor.getOption(49),o=i<0?Math.ceil(i):Math.floor(i),r=e.heightInLines+o;r>5&&r<35&&t._relayout(r)}}))))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}(),D=n("3/fG"),x=n("T8No"),N=n("Cg/j"),k=n("9fML"),E=n("sswD"),I=n("MD5Z"),M=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),T=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},P=function(e,t){return function(n,i){t(n,i,e)}},R=Object(N.c)("IPeekViewService");Object(k.b)(R,function(){function e(){this._widgets=new Map}return e.prototype.addExclusiveWidget=function(e,t){var n=this,i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((function(){var i=n._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),n._widgets.delete(e))}))})},e}()),(r=o||(o={})).inPeekEditor=new x.d("inReferenceSearchEditor",!0),r.notInPeekEditor=r.inPeekEditor.toNegated();var A=function(){function e(e,t){e instanceof f.a&&o.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.ID="editor.contrib.referenceController",e=T([P(1,x.c)],e)}();function F(e){var t=e.get(p.a).getFocusedCodeEditor();return t instanceof f.a?t.getParentEditor():t}Object(E.h)(A.ID,A);var j={headerBackgroundColor:l.a.white,primaryHeadingColor:l.a.fromHex("#333333"),secondaryHeadingColor:l.a.fromHex("#6c6c6cb3")},W=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new c.a,i.onDidClose=i._onDidClose.event,d.g(i.options,j,!1),i}return M(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&t.headerBackgroundColor&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&t.primaryHeadingColor&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&t.secondaryHeadingColor&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&t.frameColor&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=s.a(".head"),this._bodyElement=s.a(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,n=s.a(".peekview-title");s.q(this._headElement,n),s.o(n,"click",(function(e){return t._onTitleClick(e)})),this._fillTitleIcon(n),this._primaryHeading=s.a("span.filename"),this._secondaryHeading=s.a("span.dirname"),this._metaHeading=s.a("span.meta"),s.q(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);var i=s.a(".peekview-actions");s.q(this._headElement,i);var o=this._getActionBarOptions();this._actionbarWidget=new a.a(i,o),this._disposables.add(this._actionbarWidget),this._actionbarWidget.push(new u.a("peekview.close",D.a("label.close","Close"),"codicon-close",!0,(function(){return t.dispose(),Promise.resolve()})),{label:!1,icon:!0})},t.prototype._fillTitleIcon=function(e){},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerHTML=h.o(e),this._primaryHeading.setAttribute("aria-label",e),t?this._secondaryHeading.innerHTML=h.o(t):s.t(this._secondaryHeading))},t.prototype.setMetaTitle=function(e){this._metaHeading&&(e?(this._metaHeading.innerHTML=h.o(e),s.X(this._metaHeading)):s.J(this._metaHeading))},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getOption(49)),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement&&(this._headElement.style.height=e+"px",this._headElement.style.lineHeight=this._headElement.style.height)},t.prototype._doLayoutBody=function(e,t){this._bodyElement&&(this._bodyElement.style.height=e+"px")},t}(L),V=Object(I.Tb)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},D.a("peekViewTitleBackground","Background color of the peek view title area.")),B=Object(I.Tb)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},D.a("peekViewTitleForeground","Color of the peek view title.")),H=Object(I.Tb)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},D.a("peekViewTitleInfoForeground","Color of the peek view title info.")),z=Object(I.Tb)("peekView.border",{dark:"#007acc",light:"#007acc",hc:I.e},D.a("peekViewBorder","Color of the peek view borders and arrow.")),U=Object(I.Tb)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:l.a.black},D.a("peekViewResultsBackground","Background color of the peek view result list.")),K=Object(I.Tb)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:l.a.white},D.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),q=Object(I.Tb)("peekViewResult.fileForeground",{dark:l.a.white,light:"#1E1E1E",hc:l.a.white},D.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),G=Object(I.Tb)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},D.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Y=Object(I.Tb)("peekViewResult.selectionForeground",{dark:l.a.white,light:"#6C6C6C",hc:l.a.white},D.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Z=Object(I.Tb)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:l.a.black},D.a("peekViewEditorBackground","Background color of the peek view editor.")),X=Object(I.Tb)("peekViewEditorGutter.background",{dark:Z,light:Z,hc:Z},D.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Q=Object(I.Tb)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},D.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),J=Object(I.Tb)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},D.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),$=Object(I.Tb)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:I.b},D.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},ic2d: /*!********************************************************************************!*\ @@ -2027,7 +2027,7 @@ \********************************************************************************************/ /*! exports provided: IListService, ListService, WorkbenchListSupportsMultiSelectContextKey, WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus, WorkbenchListDoubleSelection, WorkbenchListMultiSelection, WorkbenchListSupportsKeyboardNavigation, WorkbenchListAutomaticKeyboardNavigationKey, WorkbenchListAutomaticKeyboardNavigation, didBindWorkbenchListAutomaticKeyboardNavigation, multiSelectModifierSettingKey, openModeSettingKey, horizontalScrollingKey, keyboardNavigationSettingKey, automaticKeyboardNavigationSettingKey, WorkbenchObjectTree, WorkbenchDataTree, WorkbenchAsyncDataTree, WorkbenchCompressibleAsyncDataTree */ /*! exports used: IListService, ListService, WorkbenchAsyncDataTree, WorkbenchListFocusContextKey */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2039,7 +2039,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/iterator.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2047,7 +2047,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2093,7 +2093,7 @@ /*! exports provided: MarkerController, NextMarkerAction */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2101,8 +2101,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/labels.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2113,7 +2113,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"MarkerController",(function(){return q})),n.d(t,"NextMarkerAction",(function(){return Y}));var i,o=n("3/fG"),r=n("MI8n"),s=n("pmY6"),a=n("T8No"),u=n("tADe"),l=n("aokT"),c=n("sswD"),d=n("t9D7"),h=n("wQH0"),p=(n("/oaI"),n("EffR")),f=n("MD5Z"),g=n("zrhQ"),m=n("GJhM"),v=n("3rx1"),_=n("6OMU"),b=n("iNS8"),y=n("gslv"),C=n("S3by");(i||(i={})).className=function(e){switch(e){case C.a.Ignore:return"severity-ignore codicon-info";case C.a.Info:return"codicon-info";case C.a.Warning:return"codicon-warning";case C.a.Error:return"codicon-error"}return""},Object(d.e)((function(e,t){var n=e.getColor(f.Pb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-error,\n\t\t\t.markers-panel .marker-icon.codicon-error,\n\t\t\t.extensions-viewlet > .extensions .codicon-error,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-error {\n\t\t\t\tcolor: "+n+";\n\t\t\t}\n\t\t");var i=e.getColor(f.Rb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-warning,\n\t\t\t.markers-panel .marker-icon.codicon-warning,\n\t\t\t.extensions-viewlet > .extensions .codicon-warning,\n\t\t\t.extension-editor .codicon-warning,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-warning {\n\t\t\t\tcolor: "+i+";\n\t\t\t}\n\t\t");var o=e.getColor(f.Qb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-info,\n\t\t\t.markers-panel .marker-icon.codicon-info,\n\t\t\t.extensions-viewlet > .extensions .codicon-info,\n\t\t\t.extension-editor .codicon-info,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-info {\n\t\t\t\tcolor: "+o+";\n\t\t\t}\n\t\t")}));var w,S=(w=function(e,t){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){function e(e,t,n,i){var o=this;this._openerService=i,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new s.b,this._editor=t;var r=document.createElement("div");r.className="descriptioncontainer",r.setAttribute("aria-live","assertive"),r.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),p.f(this._messageBlock,"message"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(p.o(this._relatedBlock,"click",(function(e){e.preventDefault();var t=o._relatedDiagnostics.get(e.target);t&&n(t)}))),this._scrollable=new m.b(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((function(e){r.style.left="-"+e.scrollLeft+"px",r.style.top="-"+e.scrollTop+"px"}))),this._disposables.add(this._scrollable)}return e.prototype.dispose=function(){Object(s.f)(this._disposables)},e.prototype.update=function(e){var t=this,n=e.source,i=e.message,o=e.relatedInformation,r=e.code,s=((null==n?void 0:n.length)||0)+"()".length;r&&(s+="string"==typeof r?r.length:r.value.length);var a=i.split(/\r\n|\r|\n/g);this._lines=a.length,this._longestLineLength=0;for(var u=0,l=a;u1?o.a("problems","{0} of {1} problems",n,r):o.a("change","{0} of {1} problem",n,r);this.setTitle(Object(y.b)(d.uri),h)}this._icon.className="codicon "+i.className(u.c.toSeverity(this._severity)),this.editor.revealPositionInCenter(c,0),this.editor.focus()},t.prototype.updateMarker=function(e){this._container.classList.remove("stale"),this._message.update(e)},t.prototype.showStale=function(){this._container.classList.add("stale"),this._relayout()},t.prototype._doLayoutBody=function(t,n){e.prototype._doLayoutBody.call(this,t,n),this._heightInPixel=t,this._message.layout(t,n),this._container.style.height=t+"px"},t.prototype._onWidth=function(e){this._message.layout(this._heightInPixel,e)},t.prototype._relayout=function(){e.prototype._relayout.call(this,this.computeRequiredHeight())},t.prototype.computeRequiredHeight=function(){return 3+this._message.getHeightInLines()},t}(b.c),D=Object(f.Kb)(f.q,f.p),x=Object(f.Kb)(f.P,f.O),N=Object(f.Kb)(f.H,f.G),k=Object(f.Tb)("editorMarkerNavigationError.background",{dark:D,light:D,hc:D},o.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),E=Object(f.Tb)("editorMarkerNavigationWarning.background",{dark:x,light:x,hc:x},o.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),I=Object(f.Tb)("editorMarkerNavigationInfo.background",{dark:N,light:N,hc:N},o.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),M=Object(f.Tb)("editorMarkerNavigation.background",{dark:"#2D2D30",light:g.a.white,hc:"#0C141F"},o.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(d.e)((function(e,t){var n=e.getColor(f.ec);n&&(t.addRule(".monaco-editor .marker-widget a { color: "+n+"; }"),t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: "+n+"; }"))}));var T=n("N0LK"),P=n("Vxe3"),R=n("/cxE"),A=n("fjLI"),F=n("8HAY"),j=n("bexQ"),W=n("W9cx"),V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),B=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},H=function(e,t){return function(n,i){t(n,i,e)}},z=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},U=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(G.compareMarker),this._nextIdx=t?Math.max(-1,Object(_.c)(this._markers,t,G.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var o=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(o)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){return Object(_.h)(this._markers,(function(t){return l.a.containsPosition(t,e)}))},Object.defineProperty(e.prototype,"total",{get:function(){return this._markers.length},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return 1+this._markers.indexOf(e)},e.prototype.dispose=function(){this._toUnbind.dispose()},e}(),q=function(){function e(e,t,n,i,o,r,a){this._markerService=t,this._contextKeyService=n,this._themeService=i,this._editorService=o,this._keybindingService=r,this._openerService=a,this._model=null,this._widget=null,this._disposeOnClose=new s.b,this._editor=e,this._widgetVisible=J.bindTo(this._contextKeyService)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._cleanUp(),this._disposeOnClose.dispose()},e.prototype._cleanUp=function(){this._widgetVisible.reset(),this._disposeOnClose.clear(),this._widget=null,this._model=null},e.prototype.getOrCreateModel=function(){var e=this;if(this._model)return this._model;var t=this._getMarkers();this._model=new K(this._editor,t),this._markerService.onMarkerChanged(this._onMarkerChanged,this,this._disposeOnClose);var n=this._keybindingService.lookupKeybinding(Z.ID),i=this._keybindingService.lookupKeybinding(Y.ID),o=[new F.a(Y.ID,Y.LABEL+(i?" ("+i.getLabel()+")":""),"show-next-problem codicon-chevron-down",this._model.canNavigate(),(function(){return z(e,void 0,void 0,(function(){return U(this,(function(e){return this._model&&this._model.move(!0,!0),[2]}))}))})),new F.a(Z.ID,Z.LABEL+(n?" ("+n.getLabel()+")":""),"show-previous-problem codicon-chevron-up",this._model.canNavigate(),(function(){return z(e,void 0,void 0,(function(){return U(this,(function(e){return this._model&&this._model.move(!1,!0),[2]}))}))}))];this._widget=new L(this._editor,o,this._themeService,this._openerService),this._widgetVisible.set(!0),this._widget.onDidClose((function(){return e.closeMarkersNavigation()}),this,this._disposeOnClose),this._disposeOnClose.add(this._model),this._disposeOnClose.add(this._widget);for(var r=0,s=o;re.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o,r,s){var a,u=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,h=t.endColumn,p=r.getLineContent(u),f=r.getLineContent(d),g=p.lastIndexOf(n,l-1+n.length),m=f.indexOf(i,h-1-i.length);if(-1!==g&&-1!==m)if(u===d){p.substring(g+n.length,m).indexOf(i)>=0&&(g=-1,m=-1)}else{var v=p.substring(g+n.length),_=f.substring(0,m);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(g=-1,m=-1)}-1!==g&&-1!==m?(o&&g+n.length0&&32===f.charCodeAt(m-1)&&(i=" "+i,m-=1),a=e._createRemoveBlockCommentOperations(new c.a(u,g+n.length+1,d,m+1),n,i)):(a=e._createAddBlockCommentOperations(t,n,i,this._insertSpace),this._usedEndToken=1===a.length?i:null);for(var b=0,y=a;ba?r-1:r}},e}(),m=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return m(t,e),t.prototype.run=function(e,t){if(t.hasModel()){for(var n=t.getModel(),i=[],o=t.getSelections(),r=n.getOptions(),s=t.getOption(13),a=0,u=o;a=u?o=Math.max(o,u+l-i):(t[n++]=new F(i,o),i=u,o=l)}return t[n++]=new F(i,o),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;ia)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=1073741824);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),H=n("dBaI"),z=n("baJR"),U=n("t9D7"),K=n("/UlZ"),q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),G=!!f.f||!(f.d||m.h||m.k),Y=m.f,Z=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),X=function(){function e(e,t){this.themeType=t;var n=e.options,i=n.get(34);this.renderWhitespace=n.get(74),this.renderControlCharacters=n.get(69),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(23),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(49),this.stopRenderingLineAfter=n.get(88),this.fontLigatures=n.get(35)}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),Q=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(p.b)(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!Y&&this._options.themeType!==U.b&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=H.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn),u=null;if(Y||s.themeType===U.b||"selection"===this._options.renderWhitespace)for(var l=0,c=i.selections;lt)){var h=d.startLineNumber===t?d.startColumn:r.minColumn,p=d.endLineNumber===t?d.endColumn:r.maxColumn;h');var g=Object(z.d)(f,o);o.appendASCIIString("");var m=null;return G&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===g.containsForeignElements&&r.content.length<300&&f.lineTokens.getCount()<100&&(m=new J(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping)),m||(m=te(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping,g.containsRTL,g.containsForeignElements)),this._renderedViewLine=m,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter,o=!1;-1!==i&&e>i+1&&t>i+1&&(o=!0),-1!==i&&e>i+1&&(e=i+1),-1!==i&&t>i+1&&(t=i+1);var r=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return r&&r.length>0?new W(o,r):null},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1},e.CLASS_NAME="view-line",e}(),J=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new F(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),$=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(e){return e.domNode.firstChild},e.prototype.getWidth=function(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(this.domNode,e,n);if(-1===i)return null;var o=this._readPixelOffset(this.domNode,t,n);return-1===o?null:[new F(i,o-i)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n,i){if(t===n){var o=this._readPixelOffset(e,t,i);return-1===o?null:[new F(o,0)]}return this._readRawVisibleRangesForRange(e,t,n,i)},e.prototype._readPixelOffset=function(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();var i=this._getReadingTarget(e);return i.firstChild?i.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){var o=this._pixelOffsetCache[t];if(-1!==o)return o;var r=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=r,r}return this._actualReadPixelOffset(e,t,n)},e.prototype._actualReadPixelOffset=function(e,t,n){if(0===this._characterMapping.length){var i=B.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return i&&0!==i.length?i[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var o=this._characterMapping.charOffsetToPartData(t-1),r=z.a.getPartIndex(o),s=z.a.getCharIndex(o),a=B.readHorizontalRanges(this._getReadingTarget(e),r,s,r,s,n.clientRectDeltaLeft,n.endNode);return a&&0!==a.length?a[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new F(0,this.getWidth())];var o=this._characterMapping.charOffsetToPartData(t-1),r=z.a.getPartIndex(o),s=z.a.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(n-1),u=z.a.getPartIndex(a),l=z.a.getCharIndex(a);return B.readHorizontalRanges(this._getReadingTarget(e),r,s,u,l,i.clientRectDeltaLeft,i.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i,o){var r=e.prototype._readVisibleRangesForRange.call(this,t,n,i,o);if(!r||0===r.length||n===i||1===n&&i===this._characterMapping.length)return r;if(!this.input.containsRTL){var s=this._readPixelOffset(t,i,o);if(-1!==s){var a=r[r.length-1];a.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),de=function(){function e(e,t,n){this.model=e.model;var i=e.configuration.options;this.layoutInfo=i.get(107),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(49),this.typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),r=null,s=void 0,a=null;return n.afterLineNumber!==o&&(a=new oe.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(r=new oe.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ge._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),pe={isAfterLines:!0};function fe(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var ge=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=T.collect(t,this._viewHelper.viewDomNode);return!(!ce.isChildOfContentWidgets(n)&&!ce.isChildOfOverflowingContentWidgets(n))||!!ce.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,o){var r=new de(this._context,this._viewHelper,t),s=new he(r,n,i,o);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(0)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(0);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=n,s=null;return(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s||e._hitTestContentWidget(t,r))||e._hitTestOverlayWidget(t,r))||e._hitTestMinimap(t,r))||e._hitTestScrollbarSlider(t,r))||e._hitTestViewZone(t,r))||e._hitTestMargin(t,r))||e._hitTestViewCursor(t,r))||e._hitTestTextArea(t,r))||e._hitTestViewLines(t,r,i))||e._hitTestScrollbar(t,r))||n.fulfill(0)},e._hitTestContentWidget=function(e,t){if(ce.isChildOfContentWidgets(t.targetPath)||ce.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null},e._hitTestOverlayWidget=function(e,t){if(ce.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=r=e.lastRenderData.lastViewCursorsRenderData;no.contentLeft+o.width)){var c=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(c<=a&&a<=c+o.height)return t.fulfill(6,o.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?8:5;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return ce.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r))}return null},e._hitTestViewLines=function(t,n,i){if(!ce.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),r=t.model.getLineMaxColumn(o);return n.fulfill(7,new oe.a(o,r),void 0,pe)}if(i){if(ce.isStrictChildOfViewLines(n.targetPath)){var s=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),u=fe(n.mouseContentHorizontalOffset-a);return n.fulfill(7,new oe.a(s,1),void 0,u)}var l=t.getLineWidth(s);if(n.mouseContentHorizontalOffset>=l){u=fe(n.mouseContentHorizontalOffset-l);var c=new oe.a(s,t.model.getLineMaxColumn(s));return n.fulfill(7,c,void 0,u)}}return n.fulfill(0)}var d=e._doHitTest(t,n);return d.position?e.createMouseTargetFromHitTestPosition(t,n,d.position.lineNumber,d.position.column):this._createMouseTarget(t,n.withTarget(d.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(ce.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new oe.a(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if(ce.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(11,new oe.a(i,o))}}return null},e._hitTestScrollbar=function(e,t){if(ce.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new oe.a(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.options,o=i.get(107),r=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-o.contentLeft;return e._getMouseColumn(r,i.get(34).typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new oe.a(n,i),r=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>r){if(m.e&&1===o.column){var s=fe(t.mouseContentHorizontalOffset-r);return t.fulfill(7,new oe.a(n,e.model.getLineMaxColumn(n)),void 0,s)}var a=fe(t.mouseContentHorizontalOffset-r);return t.fulfill(7,o,void 0,a)}var u=e.visibleRangeForPosition(n,i);if(!u)return t.fulfill(0,o);var l=u.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,o);var c=[];if(c.push({offset:u.left,column:i}),i>1){var d=e.visibleRangeForPosition(n,i-1);d&&c.push({offset:d.left,column:i-1})}if(i=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var r=new C(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n,i=r.E(e.viewDomNode);if(!(n=i?void 0===i.caretRangeFromPoint?function(e,t,n){var i=document.createRange(),o=e.elementFromPoint(t,n);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE;)o=o.lastChild;var r=o.getBoundingClientRect(),s=window.getComputedStyle(o,null).getPropertyValue("font"),a=o.innerText,u=r.left,l=0,c=void 0;if(t>r.left+r.width)l=a.length;else for(var d=me.getInstance(),h=0;h0?1:-1;ve.a.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}}),{capture:!0,passive:!1})),s._context.addEventHandler(s),s}return be(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new w(e,t).toPageCoordinates(),i=O(this.viewHelper.viewDomNode);return n.yi.y+i.height||n.xi.x+i.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),i,n,null)},t.prototype._createMouseTarget=function(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||(e.timestampt.y+t.height){var a,u;r=i.getCurrentScrollTop()+(e.posy-t.y);if(a=de.getZoneAtCoord(this._context,r))if(u=this._helpPositionJumpOverViewZone(a))return new le(null,13,o,u);var l=i.getLineNumberAtVerticalOffset(r);return new le(null,13,o,new oe.a(l,n.getLineMaxColumn(l)))}var c=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new le(null,13,o,new oe.a(c,n.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new le(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new oe.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(u.a),Se=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),Oe=n("CjF5"),Le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function De(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var xe=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(r.m(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),De)),o._register(r.j(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return Le(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new L(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Ce),Ne=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(r.m(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),De)),o._register(r.j(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return Le(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new L(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Ce),ke=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;o._register(g.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Tap,(function(e){return o.onTap(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Change,(function(e){return o.onChange(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Contextmenu,(function(e){return o._onContextMenu(new L(e,o.viewHelper.viewDomNode),!1)}))),o._lastPointerType="mouse",o._register(r.j(o.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;o._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var s=new x(o.viewHelper.viewDomNode);return o._register(s.onPointerMoveThrottled(o.viewHelper.viewDomNode,(function(e){return o._onMouseMove(e)}),ye(o.mouseTargetFactory),Ce.MOUSE_MOVE_MINIMUM_TIME)),o._register(s.onPointerUp(o.viewHelper.viewDomNode,(function(e){return o._onMouseUp(e)}))),o._register(s.onPointerLeave(o.viewHelper.viewDomNode,(function(e){return o._onMouseLeave(e)}))),o._register(s.onPointerDown(o.viewHelper.viewDomNode,(function(e){return o._onMouseDown(e)}))),o}return Le(t,e),t.prototype.onTap=function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new L(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}},t.prototype.onChange=function(e){"touch"===this._lastPointerType&&this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype._onMouseDown=function(t){t.target&&this.viewHelper.linesContentDomNode.contains(t.target)&&"touch"===this._lastPointerType||e.prototype._onMouseDown.call(this,t)},t}(Ce),Ee=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o._register(g.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Tap,(function(e){return o.onTap(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Change,(function(e){return o.onChange(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Contextmenu,(function(e){return o._onContextMenu(new L(e,o.viewHelper.viewDomNode),!1)}))),o}return Le(t,e),t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new L(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(Ce),Ie=function(e){function t(t,n,i){var o=e.call(this)||this;return window.navigator.msPointerEnabled?o.handler=o._register(new xe(t,n,i)):f.c&&Oe.a.pointerEvents?o.handler=o._register(new ke(t,n,i)):window.TouchEvent?o.handler=o._register(new Ee(t,n,i)):window.navigator.pointerEnabled||window.PointerEvent?o.handler=o._register(new Ne(t,n,i)):o.handler=o._register(new Ce(t,n,i)),o}return Le(t,e),t.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},t}(u.a),Me=(n("VvMK"),n("N0LK")),Te=n("5TxY"),Pe=n("Comh"),Re=(n("Krc3"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t}(E),Fe=n("kYye"),je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),We=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new oe.a(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return je(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.options;this._lineHeight=e.get(49);var t=e.get(50);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(71);var n=e.get(107);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new oe.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=f.d?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='
    ',s=this._context.model.getLineCount(),a=[],u=i;u<=o;u++){var l=u-i;if(this._renderFinalNewline||u!==s||0!==this._context.model.getLineLength(u)){var c=this._getLineRenderLineNumber(u);a[l]=c?r+c+"
    ":""}else a[l]=""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(Ae);Object(U.e)((function(e,t){var n=e.getColor(Fe.k);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(Fe.b);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Be=function(e){function t(n){var i=e.call(this,n)||this,o=i._context.configuration.options,r=o.get(107);return i._canUseLayerHinting=!o.get(22),i._contentLeft=r.contentLeft,i._glyphMarginLeft=r.glyphMarginLeft,i._glyphMarginWidth=r.glyphMarginWidth,i._domNode=Object(p.b)(document.createElement("div")),i._domNode.setClassName(t.OUTER_CLASS_NAME),i._domNode.setPosition("absolute"),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i._glyphMarginBackgroundDomNode=Object(p.b)(document.createElement("div")),i._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),i._domNode.appendChild(i._glyphMarginBackgroundDomNode),i}return Ve(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._canUseLayerHinting=!t.get(22),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(M),He=n("5v8Y"),ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ue=function(){function e(e){this.type=1,this._source=e}return e.prototype.hasChanged=function(e){return this._source.hasChanged(e)},e}(),Ke=function(e){this.type=2,this.contentWidth=e.contentWidth,this.contentHeight=e.contentHeight,this.contentWidthChanged=e.contentWidthChanged,this.contentHeightChanged=e.contentHeightChanged},qe=function(e,t){this.type=3,this.selections=e,this.modelSelections=t},Ge=function(){this.type=4},Ye=function(){this.type=5},Ze=function(e){this.type=6,this.isFocused=e},Xe=function(){this.type=7},Qe=function(){this.type=8},Je=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},$e=function(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t},et=function(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t},tt=function(e,t,n,i,o){this.type=12,this.source=e,this.range=t,this.verticalType=n,this.revealHorizontal=i,this.scrollType=o},nt=function(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},it=function(){this.type=14},ot=function(e){this.type=15,this.ranges=e},rt=function(){this.type=16},st=function(){this.type=17},at=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return ze(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new ut),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;n0)return new Pe.b(i,i.length,i.length,n,n)}}return Pe.b.EMPTY}return Pe.a.fromEditorSelection(e,a,o._selections[0],o._accessibilityPageSize,0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Te.b(u,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=!1,n=null,i=null;e.metadata&&(t=o._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),o._viewController.paste("keyboard",e.text,t,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new tt("keyboard",new re.a(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new dt(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,ht?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){m.f?o._visibleTextArea=o._visibleTextArea.setWidth(0):o._visibleTextArea=o._visibleTextArea.setWidth(function(e,t){var n=document.createElement("canvas").getContext("2d");n.font=(i=t,o="normal",r=i.fontWeight,s=i.fontSize,a=i.lineHeight,u=i.fontFamily,o+" normal "+r+" "+s+"px / "+a+"px "+u);var i,o,r,s,a,u;var l=n.measureText(e);return m.h?l.width+2:l.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new Ze(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new Ze(!1))}))),o}return ct(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(He.a)(this._context.configuration.options.get(96)),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Me.z(t.charCodeAt(0)))return t}return""},t.prototype._getAriaLabel=function(e){return 1===e.get(2)?o.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press Alt+F1 for options."):e.get(4)},t.prototype._setAccessibilityOptions=function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===K.e.accessibilityPageSize.defaultValue?this._accessibilityPageSize=160:this._accessibilityPageSize=t},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(34),this._lineHeight=t.get(49),this._emptySelectionClipboard=t.get(25),this._copyWithSyntaxHighlighting=t.get(15),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),f.g&&e.hasChanged(68)&&(t.get(68)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.getLastRenderData=function(){return this._lastRenderPosition},t.prototype.setAriaOptions=function(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant"))},t.prototype.prepareRender=function(e){this._primaryCursorPosition=new oe.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():f.e?this._renderInsideEditor(this._primaryCursorPosition,t,e,ht?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,ht?0:1,ht?0:1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){this._lastRenderPosition=e;var r=this.textArea,s=this.textAreaCover;c.a.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(c.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),ht)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);var n=this._context.configuration.options;n.get(40)?t.setClassName("monaco-editor-background textAreaCover "+Be.OUTER_CLASS_NAME):0!==n.get(50).renderType?t.setClassName("monaco-editor-background textAreaCover "+We.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(M);var ft=n("1YUG"),gt=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t)},e.prototype.paste=function(e,t,n,i,o){this.commandDelegate.paste(e,t,n,i,o)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(ft.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this._convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(ft.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype._moveToSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype._columnSelect=function(e,t,n){e=this._validateViewColumn(e),this._execMouseCommand(ft.CoreNavigationCommands.ColumnSelect,{position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})},e.prototype._createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ft.CoreNavigationCommands.CreateCursor,{position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype._lastCursorMoveToSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype._wordSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype._wordSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype._lastCursorWordSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype._lineSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype._lineSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype._lastCursorLineSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype._lastCursorLineSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype._selectAll=function(){this._execMouseCommand(ft.CoreNavigationCommands.SelectAll,{})},e.prototype._convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e.prototype.emitMouseWheel=function(e){this.outgoingEvents.emitMouseWheel(e)},e}(),mt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vt=function(e){function t(t){var n=e.call(this)||this;return n.onDidContentSizeChange=null,n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n.onMouseWheel=null,n._viewModel=t,n}return mt(t,e),t.prototype.emitContentSizeChange=function(e){this.onDidContentSizeChange&&this.onDidContentSizeChange(e)},t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)},t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseWheel=function(e){this.onMouseWheel&&this.onMouseWheel(e)},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return t.convertViewToModelMouseTarget(e,this._viewModel.coordinatesConverter)},t.convertViewToModelMouseTarget=function(e,t){return new _t(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)},t}(u.a),_t=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return le.toString(this)},e}(),bt=n("erNZ"),yt=function(){function e(e){this._createLine=e,this._set(1,[])}return e.prototype.flush=function(){this._set(1,[])},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),Ct=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yt((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object(p.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return!!e.hasChanged(107)},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt)(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1);else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),Dt=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options.get(107);return n._contentWidth=i.contentWidth,n.domNode.setHeight(0),n}return St(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options.get(107);return this._contentWidth=n.contentWidth,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(Ot),xt=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._contentLeft=o.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),c.a.applyFontInfo(n.domNode,i.get(34)),n}return St(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options;c.a.applyFontInfo(this.domNode,n.get(34));var i=n.get(107);return this._contentLeft=i.contentLeft,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(Ot),Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kt=function(e,t){this.top=e,this.left=t},Et=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Object(p.b)(document.createElement("div")),T.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object(p.b)(document.createElement("div")),T.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Nt(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.onConfigurationChanged=function(e){for(var t=0,n=Object.keys(this._widgets);t=i,c=a,d=o.viewportHeight-a>=i,h=e.left,p=t.left;return h+n>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-n),p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),ha&&(u-=o=u-(a-i),n-=o);u=22,b=c+i<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:_,aboveTop:Math.max(l,22),aboveLeft:f,fitsBelow:b,belowTop:c,belowLeft:v}:{fitsAbove:_,aboveTop:Math.max(s,22),aboveLeft:p,fitsBelow:b,belowTop:a,belowLeft:m}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new kt(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];for(var n=t[0],i=t[0],o=0,r=t;oi.lineNumber&&(i=s)}for(var a=1073741824,u=0,l=n.ranges;ue.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),Mt=(n("kw+w"),n("6OMU")),Tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pt=!0,Rt=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._renderLineHighlight=i.get(72),n._contentLeft=o.contentLeft,n._contentWidth=o.contentWidth,n._selectionIsEmpty=!0,n._cursorLineNumbers=[],n._selections=[],n._renderData=null,n._context.addEventHandler(n),n}return Tt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype._readFromSelections=function(){var e=!1,t=Pt?this._selections.slice(0,1):this._selections,n=t.map((function(e){return e.positionLineNumber}));n.sort((function(e,t){return e-t})),Mt.g(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);var i=t.every((function(e){return e.isEmpty()}));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e},t.prototype.onThemeChanged=function(e){return this._readFromSelections()},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._renderLineHighlight=t.get(72),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._readFromSelections()},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged||e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._shouldRenderThis()){for(var t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length,r=0,s=[],a=n;a<=i;a++){for(var u=a-n;r=this._renderData.length?"":this._renderData[n]},t}(Ae),At=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),t.prototype._renderOne=function(e){return'
    '},t.prototype._shouldRenderThis=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._shouldRenderOther=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(Rt),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),t.prototype._renderOne=function(e){return'
    '},t.prototype._shouldRenderThis=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._shouldRenderOther=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(Rt);Object(U.e)((function(e,t){Pt=!1;var n=e.getColor(Fe.i);if(n&&(t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }")),!n||n.isTransparent()||e.defines(Fe.j)){var i=e.getColor(Fe.j);i&&(Pt=!0,t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));n("Vtyv");var jt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wt=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return jt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:re.a.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,l=[],c=a;c<=u;c++){l[c-a]=""}this._renderWholeLineDecorations(e,n,l),this._renderNormalDecorations(e,n,l),this._renderResult=l},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++){n[h-o]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,s=!1,a=null,u=0,l=t.length;u';s[d]+=m}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ae),Vt=n("GJhM"),Bt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ht=function(e){function t(t,n,i,o){var s=e.call(this,t)||this,a=s._context.configuration.options,u=a.get(78),l=a.get(56),c=a.get(27),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+Object(U.d)(t.theme.type),useShadows:!1,lazyRender:!0,vertical:u.vertical,horizontal:u.horizontal,verticalHasArrows:u.verticalHasArrows,horizontalHasArrows:u.horizontalHasArrows,verticalScrollbarSize:u.verticalScrollbarSize,verticalSliderSize:u.verticalSliderSize,horizontalScrollbarSize:u.horizontalScrollbarSize,horizontalSliderSize:u.horizontalSliderSize,handleMouseWheel:u.handleMouseWheel,alwaysConsumeMouseWheel:u.alwaysConsumeMouseWheel,arrowSize:u.arrowSize,mouseWheelScrollSensitivity:l,fastScrollSensitivity:c};s.scrollbar=s._register(new Vt.c(n.domNode,d,s._context.viewLayout.getScrollable())),T.write(s.scrollbar.getDomNode(),5),s.scrollbarDomNode=Object(p.b)(s.scrollbar.getDomNode()),s.scrollbarDomNode.setPosition("absolute"),s._setLayout();var h=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=s._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var r=e.scrollLeft;r&&(i.scrollLeft=s._context.viewLayout.getCurrentScrollLeft()+r,e.scrollLeft=0)}s._context.viewLayout.setScrollPositionNow(i)};return s._register(r.j(i.domNode,"scroll",(function(e){return h(i.domNode,!0,!0)}))),s._register(r.j(n.domNode,"scroll",(function(e){return h(n.domNode,!0,!1)}))),s._register(r.j(o.domNode,"scroll",(function(e){return h(o.domNode,!0,!1)}))),s._register(r.j(s.scrollbarDomNode.domNode,"scroll",(function(e){return h(s.scrollbarDomNode.domNode,!0,!1)}))),s}return Bt(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.options,t=e.get(107);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(54).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.hasChanged(78)||e.hasChanged(56)||e.hasChanged(27)){var t=this._context.configuration.options,n=t.get(78),i=t.get(56),o=t.get(27),r={handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:o};this.scrollbar.updateOptions(r)}return e.hasChanged(107)&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(U.d)(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(M),zt=(n("hHjc"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Ut=function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)},Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[]}if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
    =this._renderResult.length?"":this._renderResult[n]},t}(Kt),Gt=(n("C6rC"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Yt=function(e){function t(t){var n=e.call(this)||this;n._context=t,n._primaryLineNumber=0;var i=n._context.configuration.options,o=i.get(108),r=i.get(34);return n._lineHeight=i.get(49),n._spaceWidth=r.spaceWidth,n._enabled=i.get(70),n._activeIndentEnabled=i.get(43),n._maxIndentLeft=-1===o.wrappingColumn?-1:o.wrappingColumn*r.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return Gt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(108),i=t.get(34);return this._lineHeight=t.get(49),this._spaceWidth=i.spaceWidth,this._enabled=t.get(70),this._activeIndentEnabled=t.get(43),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getOptions().indentSize*this._spaceWidth,o=e.scrollWidth,r=this._lineHeight,s=this._context.model.getLinesIndentGuides(t,n),a=0,u=0,l=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var c=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);a=c.startLineNumber,u=c.endLineNumber,l=c.indent}for(var d=[],h=t;h<=n;h++){var p=a<=h&&h<=u,f=h-t,g=s[f],m="";if(g>=1)for(var v=e.visibleRangeForPosition(new oe.a(h,1)),_=v?v.left:0,b=1;b<=g;b++){if(m+='
    ',(_+=i)>o||this._maxIndentLeft>0&&_>this._maxIndentLeft)break}d[f]=m}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ae);Object(U.e)((function(e,t){var n=e.getColor(Fe.h);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(Fe.a)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")}));n("OKK6");var Zt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xt=function(){function e(){this._currentVisibleRange=new re.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Qt=function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r},Jt=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new Ct(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration,r=i._context.configuration.options,s=r.get(34),a=r.get(108);return i._lineHeight=r.get(49),i._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,i._isViewportWrapping=a.isViewportWrapping,i._revealHorizontalRightPadding=r.get(75),i._cursorSurroundingLines=r.get(19),i._cursorSurroundingLinesStyle=r.get(20),i._canUseLayerHinting=!r.get(22),i._viewLineOptions=new X(o,i._context.theme.type),T.write(i.domNode,7),i.domNode.setClassName("view-lines"),c.a.applyFontInfo(i.domNode,s),i._maxLineWidth=0,i._asyncUpdateLineWidths=new _.d((function(){i._updateLineWidthsSlow()}),200),i._lastRenderedData=new Xt,i._horizontalRevealRequest=null,i}return Zt(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new Q(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(108)&&(this._maxLineWidth=0);var t=this._context.configuration.options,n=t.get(34),i=t.get(108);return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(75),this._cursorSurroundingLines=t.get(19),this._cursorSurroundingLinesStyle=t.get(20),this._canUseLayerHinting=!t.get(22),c.a.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(107)&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new X(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Qt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new oe.a(i,1);var o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;var s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,i=re.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;var o=[],r=0,s=new Z(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new oe.a(i.startLineNumber,1)).lineNumber);for(var u=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),c=i.startLineNumber;c<=i.endLineNumber;c++)if(!(cl)){var d=c===i.startLineNumber?i.startColumn:1,h=c===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(c),p=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(d,h,s);if(p){if(t&&cthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new Z(this.domNode.domNode,this._textRangeRestingSpot))},t.prototype.visibleRangeForPosition=function(e){var t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new j(t.outsideRenderedLine,t.ranges[0].left):null},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthu)s=o;else if(1===i||2===i)if(2===i&&a<=o&&r<=l)s=a;else{var d=(o+r)/2;s=Math.max(0,d-u/2)}else s=this._computeMinimumScrolling(a,l,o,r,3===i,4===i);return s},t.prototype._computeScrollLeftToRevealRange=function(e,n,i){var o=0,r=this._context.viewLayout.getCurrentViewport(),s=r.left,a=s+r.width,u=this._visibleRangesForLineRange(e,n,i),l=1073741824,c=0;if(!u)return{scrollLeft:s,maxHorizontalOffset:o};for(var d=0,h=u.ranges;dc&&(c=p.left+p.width)}return o=c,l=Math.max(0,l-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,l,c),maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(M),$t=(n("J+ZK"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),en=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options.get(107);return n._decorationsLeft=i.decorationsLeft,n._decorationsWidth=i.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return $t(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(107);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o
    ',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,d=u.length;c';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(Kt),on=(n("8gvo"),function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e.Empty=new e(0,0,0,0),e}()),rn=n("twdY"),sn=function(){function e(){var e=this;this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),rn.B.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=rn.B.getColorMap();if(!e)return this._colors=[on.Empty],void(this._backgroundIsLight=!0);this._colors=[on.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),an=n("MD5Z"),un=function(){for(var e=[],t=32;t<=126;t++)e.push(t);return e.push(65533),e}(),ln=function(){function e(t,n){this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;ie.width||n+l>e.height)console.warn("bad render request outside image data");else for(var c=a?this.charDataLight:this.charDataNormal,d=function(e,t){return(e-=32)<0||e>96?t<=2?(e+96)%96:95:e}(i,s),h=4*e.width,p=r.r,f=r.g,g=r.b,m=o.r-p,v=o.g-f,_=o.b-g,b=e.data,y=d*u*l,C=n*h+4*t,w=0;we.width||n+a>e.height)console.warn("bad render request outside image data");else for(var u=4*e.width,l=o.r,c=o.g,d=o.b,h=l+.5*(i.r-l),p=c+.5*(i.g-c),f=d+.5*(i.b-d),g=e.data,m=n*u+4*t,v=0;v>1]=dn[e[n]]<<4|15&dn[e[n+1]];return t},pn={1:Object(cn.a)((function(){return hn("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:Object(cn.a)((function(){return hn("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")}))},fn=function(){function e(){}return e.create=function(t,n){return this.lastCreated&&t===this.lastCreated.scale&&n===this.lastFontFamily?this.lastCreated:(i=pn[t]?new ln(pn[t](),t):e.createFromSampleData(e.createSampleData(n).data,t),this.lastFontFamily=n,this.lastCreated=i,i);var i},e.createSampleData=function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold 16px "+e,n.textBaseline="middle";for(var i=0,o=0,r=un;o0)for(var l=255/a,c=0;c=s+y)return new e(a,u,_,b,c,C=1,s);var C=Math.max(1,Math.floor(n-b*h/p));return l&&l.scrollHeight===u&&(l.scrollTop>a&&(C=Math.min(C,l.startLineNumber)),l.scrollTop140)n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})}}),(function(){n._slider.toggleClassName("active",!1)}))}})),n._gestureDisposable=g.b.addTarget(n._domNode.domNode),n._sliderTouchStartListener=r.j(n._domNode.domNode,g.a.Start,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&(n._slider.toggleClassName("active",!0),n._gestureInProgress=!0,n.scrollDueToTouchEvent(e))})),n._sliderTouchMoveListener=r.o(n._domNode.domNode,g.a.Change,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&n._gestureInProgress&&n.scrollDueToTouchEvent(e)})),n._sliderTouchEndListener=r.o(n._domNode.domNode,g.a.End,(function(e){e.preventDefault(),e.stopPropagation(),n._gestureInProgress=!1,n._slider.toggleClassName("active",!1)})),n}return mn(t,e),t.prototype.scrollDueToTouchEvent=function(e){var t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._context.viewLayout.setScrollPositionNow({scrollTop:n})},t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||this._options.canvasInnerWidth>0&&this._options.canvasInnerHeight>0&&(this._buffers=new Sn(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers?this._buffers.getBuffer():null},t.prototype._onOptionsMaybeChanged=function(){var e=new bn(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._renderDecorations=!0,!0},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.onDecorationsChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onThemeChanged=function(e){return this._context.model.invalidateMinimapColorCache(),this._selectionColor=this._context.theme.getColor(an.Ib),this._renderDecorations=!0,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=yn.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*_n(this._options.renderMinimap,this._options.fontScale)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)},t.prototype.renderDecorations=function(e){if(this._renderDecorations){this._renderDecorations=!1;var t=this._context.model.getDecorationsInViewport(new re.a(e.startLineNumber,1,e.endLineNumber,this._context.model.getLineMaxColumn(e.endLineNumber))),n=this._options,i=n.renderMinimap,o=n.canvasInnerWidth,r=n.canvasInnerHeight,s=vn(i,this._options.fontScale),a=_n(0,this._options.fontScale),u=this._context.model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,o,r);for(var c=new Map,d=0;dthis._options.canvasInnerHeight)){var d=t.get(r),h=!d;if(!d){var p=this._context.model.getLineContent(r);d=[K.f];for(var f=1;fr?d.length-1:_-1;if(w>0){var S=d[w]-C||2;this.renderDecoration(e,i,C,c,S,s)}h&&this.renderLineHighlight(e,i,c,s)}},t.prototype.renderLineHighlight=function(e,t,n,i){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(K.f,n,e.canvas.width,i)},t.prototype.renderDecoration=function(e,t,n,i,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,o,r)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=this._options.charRenderer(),o=e.startLineNumber,r=e.endLineNumber,s=vn(n,this._options.fontScale);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new wn(e,a.imageData,a.lines)}var u=this._getBuffer();if(!u)return null;for(var l=t._renderUntouchedLines(u,o,r,s,this._lastRenderData),c=l[0],d=l[1],h=l[2],p=this._context.model.getMinimapLinesRenderingData(o,r,h),f=p.tabSize,g=this._tokensColorTracker.getColor(2),m=this._tokensColorTracker.backgroundIsLight(),v=0,_=[],b=0,y=r-o+1;b=0&&Lp)return;var w=c.charCodeAt(g);if(9===w){var S=a-(g+m)%a;m+=S-1,f+=S*h}else if(32===w)f+=h;else for(var O=Me.y(w)?2:1,L=0;Lp)return}},t}(M);Object(U.e)((function(e,t){var n=e.getColor(an.Xb);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(an.Yb);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(an.Wb);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(an.Vb);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")}));n("cl4r");var Ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Dn=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options.get(107);return n._widgets={},n._verticalScrollbarWidth=i.verticalScrollbarWidth,n._minimapWidth=i.minimapWidth,n._horizontalScrollbarHeight=i.horizontalScrollbarHeight,n._editorHeight=i.height,n._editorWidth=i.width,n._domNode=Object(p.b)(document.createElement("div")),T.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return Ln(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(107);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0},t.prototype.addWidget=function(e){var t=Object(p.b)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=3){var o,r,s,a=i-(o=Math.floor(i/3))-(r=Math.floor(i/3)),u=(s=e)+o;return[[0,s,u,s,s+o+a,s,u,s],[0,o,a,o+a,r,o+a+r,a+r,o+a+r]]}if(2===n)return[[0,s=e,s,s,s+(o=Math.floor(i/2)),s,s,s],[0,o,o,o,r=i-o,o+r,o+r,o+r]];return[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}(),En=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=Object(p.b)(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setContain("strict"),n._domNode.setAttribute("aria-hidden","true"),n._updateSettings(!1),n._tokensColorTrackerListener=rn.B.onDidChange((function(e){e.changedColorMap&&n._updateSettings(!0)})),n._cursorPositions=[],n}return Nn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new kn(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(k=t-a),O=k-a,I=k+a;O>_+1||C!==m?(0!==b&&u.fillRect(l[m],v,c[m],_-v),m=C,v=O,_=I):I>_&&(_=I)}u.fillRect(l[m],v,c[m],_-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){var L=2*this._settings.pixelRatio|0,D=L/2|0,x=this._settings.x[7],N=this._settings.w[7];u.fillStyle=this._settings.cursorColor;for(v=-100,_=-100,b=0,y=this._cursorPositions.length;bt&&(k=t-D);var I=(O=k-D)+L;O>_+1?(0!==b&&u.fillRect(x,v,N,_-v),v=O,_=I):I>_&&(_=I)}u.fillRect(x,v,N,_-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")},t}(M),In=n("MvK1"),Mn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tn=function(e){function t(t,n){var i=e.call(this)||this;i._context=t;var o=i._context.configuration.options;return i._domNode=Object(p.b)(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._domNode.setContain("strict"),i._zoneManager=new In.b((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(o.get(49)),i._zoneManager.setPixelRatio(o.get(105)),i._context.addEventHandler(i),i}return Mn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return e.hasChanged(49)&&(this._zoneManager.setLineHeight(t.get(49)),this._render()),e.hasChanged(105)&&(this._zoneManager.setPixelRatio(t.get(105)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t;a=d?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=d,s=h)}e.fillRect(0,r,i,s-r)},t}(E),Pn=(n("7zd4"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Rn=function(e){function t(t){var n=e.call(this,t)||this;n.domNode=Object(p.b)(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[];var i=n._context.configuration.options;return n._rulers=i.get(77),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n}return Pn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._rulers=t.get(77),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){(r=Object(p.b)(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--}else for(var o=e-t;o>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),o--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.options.get(107);0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?this._width=e.width:this._width=e.width-e.minimapWidth-e.verticalScrollbarWidth},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(78);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(M);Object(U.e)((function(e,t){var n=e.getColor(an.Vb);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")}));n("eC1c");var jn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wn=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},Vn=function(e,t){this.lineNumber=e,this.ranges=t};function Bn(e){return new Wn(e)}function Hn(e){return new Vn(e.lineNumber,e.ranges.map(Bn))}var zn=m.f,Un=function(e){function t(t){var n=e.call(this)||this;n._previousFrameVisibleRangesWithStyle=[],n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._roundedSelection=i.get(76),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return jn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._roundedSelection=t.get(76),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}a=0;for(var l=t.length;a0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Kn(d-g)g&&(p.top=1),Kn(h-m)'},t.prototype._actualRenderOneSelection=function(e,n,i,o){if(0!==o.length)for(var r=!!o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o[0].lineNumber,l=o[o.length-1].lineNumber,c=0,d=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map((function(e){return e[0]+e[1]}))},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Ae);function Kn(e){return e<0?-e:e}Object(U.e)((function(e,t){var n=e.getColor(an.K);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(an.F);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(an.L);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")}));n("2Tsy");var qn=function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r},Gn=function(){function e(e){this._context=e;var t=this._context.configuration.options,n=t.get(34);this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(p.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),c.a.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new oe.a(1,1),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(34);return this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),c.a.applyFontInfo(this._domNode,n),!0},e.prototype.onCursorPositionChanged=function(e){return this._position=e,!0},e.prototype._prepareRender=function(e){var t="";if(this._cursorStyle===K.g.Line||this._cursorStyle===K.g.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;if(this._cursorStyle===K.g.Line){if((n=r.u(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){var o=this._context.model.getLineContent(this._position.lineNumber),s=Me.E(o,this._position.column-1);t=o.substr(this._position.column-1,s)}}else n=r.u(1);var a=i.left;n>=2&&a>=1&&(a-=1);var u=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new qn(u,a,n,this._lineHeight,t,"")}var l=this._context.model.getLineContent(this._position.lineNumber),c=Me.E(l,this._position.column-1),d=e.linesVisibleRangesForRange(new re.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+c),!1);if(!d||0===d.length)return null;var h=d[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;var p=h.ranges[0],f=p.width<1?this._typicalHalfwidthCharacterWidth:p.width,g="";if(this._cursorStyle===K.g.Block){var m=this._context.model.getViewLineData(this._position.lineNumber);t=l.substr(this._position.column-1,c);var v=m.tokens.findTokenIndexAtOffset(this._position.column-1);g=m.tokens.getClassName(v)}var _=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,b=this._lineHeight;return this._cursorStyle!==K.g.Underline&&this._cursorStyle!==K.g.UnderlineThin||(_+=this._lineHeight-2,b=2),new qn(_,p.left,f,b,t,g)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e}(),Yn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zn=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options;return n._readOnly=i.get(68),n._cursorBlinking=i.get(16),n._cursorStyle=i.get(18),n._cursorSmoothCaretAnimation=i.get(17),n._selectionIsEmpty=!0,n._isVisible=!1,n._primaryCursor=new Gn(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=Object(p.b)(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new _.e,n._cursorFlatBlinkInterval=new _.c,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return Yn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;this._readOnly=t.get(68),this._cursorBlinking=t.get(16),this._cursorStyle=t.get(18),this._cursorSmoothCaretAnimation=t.get(17),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(var n=0,i=this._secondaryCursors.length;nt.length){var r=this._secondaryCursors.length-t.length;for(i=0;in){var r=t-n;for(o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;td&&S.index--}e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),o--}}}}},e}(),ai=n("snIX"),ui=n("GR/f"),li=n("iuje"),ci=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var di=function(e,t,n,i,o,r){this.selections=e,this.modelVersionId=t,this.oldSelections=n,this.oldModelVersionId=i,this.source=o,this.reason=r},hi=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll()}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(var t=0,n=this.cursorState.length;t=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0},e}(),fi=function(e){function t(t,n,i){var o=e.call(this)||this;o._onDidReachMaxCursorCount=o._register(new a.a),o.onDidReachMaxCursorCount=o._onDidReachMaxCursorCount.event,o._onDidAttemptReadOnlyEdit=o._register(new a.a),o.onDidAttemptReadOnlyEdit=o._onDidAttemptReadOnlyEdit.event,o._onDidChange=o._register(new a.a),o.onDidChange=o._onDidChange.event,o._configuration=t,o._model=n,o._knownModelVersionId=o._model.getVersionId(),o._viewModel=i,o.context=new se.c(o._configuration,o._model,o._viewModel),o._cursors=new si(o.context),o._isHandling=!1,o._isDoingComposition=!1,o._selectionsWhenCompositionStarted=null,o._columnSelectData=null,o._autoClosedActions=[],o._prevEditOperationType=0,o._register(o._model.onDidChangeRawContent((function(e){if(o._knownModelVersionId=e.versionId,!o._isHandling){var t=e.containsEvent(1);o._onModelContentChanged(t)}}))),o._register(i.addEventListener((function(e){(function(e){for(var t=0,n=e.length;t0)for(var e=this._cursors.getSelections(),t=0;tt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new hi(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n,i){this._revealRange(e,n,0,t,i)},t.prototype.revealRange=function(e,t,n,i,o){this.emitCursorRevealRange(e,n,i,t,o)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}},t.prototype._interpretCommandResult=function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()},t.prototype._emitStateChangedIfNecessary=function(e,t,n){var i=new hi(this._model,this);if(i.equals(n))return!1;var o=this._cursors.getSelections(),r=this._cursors.getViewSelections();try{this._beginEmit().emit(new qe(r,o))}finally{this._endEmit()}if(!n||n.cursorState.length!==i.cursorState.length||i.cursorState.some((function(e,t){return!e.modelState.equals(n.cursorState[t].modelState)}))){var s=n?n.cursorState.map((function(e){return e.modelState.selection})):null,a=n?n.modelVersionId:0;this._onDidChange.fire(new di(o,i.modelVersionId,s,a,e||"keyboard",t))}return!0},t.prototype._revealRange=function(e,t,n,i,o){var r=this._cursors.getViewPositions(),s=r[0];if(1===t)for(var a=1;a1)return;var u=new re.a(s.lineNumber,s.column,s.lineNumber,s.column);this.emitCursorRevealRange(e,u,n,i,o)},t.prototype.emitCursorRevealRange=function(e,t,n,i,o){try{this._beginEmit().emit(new tt(e,t,n,i,o))}finally{this._endEmit()}},t.prototype._findAutoClosingPairs=function(e){if(!e.length)return null;for(var t=[],n=0,i=e.length;n=0)return null;var r=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;var s=r[1],a=this.context.config.autoClosingPairsClose2.get(s);if(!a||1!==a.length)return null;var u=a[0].open,l=o.text.length-r[2].length-1,c=o.text.lastIndexOf(u,l-1);if(-1===c)return null;t.push([c,l])}return t},t.prototype.executeEdits=function(e,t,n){var i=this,o=null;"snippet"===e&&(o=this._findAutoClosingPairs(t)),o&&(t[0]._isTracked=!0);var r=[],s=[],a=this._model.pushEditOperations(this.getSelections(),t,(function(e){if(o)for(var t=0,a=o.length;t0&&this._pushAutoClosedAction(r,s)},t.prototype.trigger=function(e,t,n){var i=li.b;if(t===i.CompositionStart)return this._isDoingComposition=!0,void(this._selectionsWhenCompositionStarted=this.getSelections().slice(0));if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.options.get(68))this._onDidAttemptReadOnlyEdit.fire(void 0);else{var o=new hi(this._model,this),r=0;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:r=4,this._paste(n.text,n.pasteOnNewLine,n.multicursorText||[]);break;case i.Cut:this._cut();break;case i.Undo:r=5,this._interpretCommandResult(this._model.undo());break;case i.Redo:r=6,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(s.e)(e)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,r,o)&&this._revealRange(e,0,0,!0,0)}},t.prototype._interpretCompositionEnd=function(e){if(!this._isDoingComposition&&"keyboard"===e){var t=pi.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(ui.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this._selectionsWhenCompositionStarted,this.getSelections(),t)),this._selectionsWhenCompositionStarted=null}},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(ui.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=t.length,i=0;i0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,(function(n){for(var i=[],o=0;o0?(i[n].sort(u),l[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new _e.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new _e.a(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):l[n]=e.selectionsBefore[n]};for(o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var s=0;s0&&n--}}return t},e}(),mi=n("9Y+e"),vi=n("wQH0"),_i=n("TQUy"),bi=n("QuOb"),yi=function(){function e(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return e.prototype.insert=function(e){this._hasPending=!0,this._inserts.push(e)},e.prototype.change=function(e){this._hasPending=!0,this._changes.push(e)},e.prototype.remove=function(e){this._hasPending=!0,this._removes.push(e)},e.prototype.mustCommit=function(){return this._hasPending},e.prototype.commit=function(e){if(this._hasPending){var t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}},e}(),Ci=function(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0},wi=function(){function e(t,n){this._instanceId=Me.M(++e.INSTANCE_COUNT),this._pendingChanges=new yi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=n}return e.findInsertionIndex=function(e,t,n){for(var i=0,o=e.length;i>>1;t===e[r].afterLineNumber?n0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(var i=0,o=e;it&&(this._arr[n].afterLineNumber-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){if(this._checkPendingChanges(),-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;tthis.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this.getWhitespacesCount();-1===u?(u=l,i=a+1,n=0):(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));var c=s,d=c,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),d-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){(c<=f&&ff)&&(g=m)}for(c+=o,p[m-r]=d,d+=o;i===m;)d+=n,c+=n,++u>=l?i=a+1:(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));if(c>=t){a=m;break}}-1===g&&(g=a);var v=0|this.getVerticalOffsetForLineNumber(a),_=r,b=a;return _t&&b--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:_,completelyVisibleEndLineNumber:b}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){this._checkPendingChanges(),e|=0;var t=this.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this.getWhitespacesAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){this._checkPendingChanges(),e|=0;var t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=o+this.getHeightForWhitespaceIndex(i))t=i+1;else{if(e>=o)return i;n=i}}return t},e.prototype.getWhitespaceAtVerticalOffset=function(e){this._checkPendingChanges(),e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._checkPendingChanges(),this._arr.slice(0)},e.prototype.getWhitespacesCount=function(){return this._checkPendingChanges(),this._arr.length},e.prototype.getIdForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber},e.prototype.getHeightForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height},e.INSTANCE_COUNT=0,e}(),Si=n("qNAo"),Oi=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Li=function(){function e(e,t,n,i){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(n|=0)<0&&(n=0),(i|=0)<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}return e.prototype.equals=function(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight},e}(),Di=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidContentSizeChange=i._register(new a.a),i.onDidContentSizeChange=i._onDidContentSizeChange.event,i._dimensions=new Li(0,0,0,0),i._scrollable=i._register(new bi.a(t,n)),i.onDidScroll=i._scrollable.onScroll,i}return Oi(t,e),t.prototype.getScrollable=function(){return this._scrollable},t.prototype.setSmoothScrollDuration=function(e){this._scrollable.setSmoothScrollDuration(e)},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._dimensions},t.prototype.setScrollDimensions=function(e){if(!this._dimensions.equals(e)){var t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight});var n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire({contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentWidthChanged:n,contentHeightChanged:i})}},t.prototype.getFutureScrollPosition=function(){return this._scrollable.getFutureScrollPosition()},t.prototype.getCurrentScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t}(u.a),xi=function(e){function t(t,n,i){var o=e.call(this)||this;o._configuration=t;var r=o._configuration.options,s=r.get(107);return o._linesLayout=new wi(n,r.get(49)),o._scrollable=o._register(new Di(0,i)),o._configureSmoothScrollDuration(),o._scrollable.setScrollDimensions(new Li(s.contentWidth,0,s.height,0)),o.onDidScroll=o._scrollable.onDidScroll,o.onDidContentSizeChange=o._scrollable.onDidContentSizeChange,o._updateHeight(),o}return Oi(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getScrollable=function(){return this._scrollable.getScrollable()},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(87)?125:0)},t.prototype.onConfigurationChanged=function(e){var t=this._configuration.options;if(e.hasChanged(49)&&this._linesLayout.setLineHeight(t.get(49)),e.hasChanged(107)){var n=t.get(107),i=n.contentWidth,o=n.height,r=this._scrollable.getScrollDimensions(),s=r.scrollWidth;this._scrollable.setScrollDimensions(new Li(i,r.contentWidth,o,this._getContentHeight(i,o,s)))}else this._updateHeight();e.hasChanged(87)&&this._configureSmoothScrollDuration()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e,t){var n=this._configuration.options.get(78);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize},t.prototype._getContentHeight=function(e,t,n){var i=this._configuration.options,o=this._linesLayout.getLinesTotalHeight();return i.get(80)?o+=t-i.get(49):o+=this._getHorizontalScrollbarHeight(e,n),o},t.prototype._updateHeight=function(){var e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.scrollWidth;this._scrollable.setScrollDimensions(new Li(t,e.contentWidth,n,this._getContentHeight(t,n,i)))},t.prototype.getCurrentViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Si.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Si.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeContentWidth=function(e){var t=this._configuration.options,n=t.get(108),i=t.get(34);if(n.isViewportWrapping){var o=t.get(107),r=t.get(54);return e>o.contentWidth+i.typicalHalfwidthCharacterWidth&&r.enabled&&"right"===r.side?e+o.verticalScrollbarWidth:e}var s=t.get(79)*i.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,a)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Li(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()},t.prototype.saveState=function(){var e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.changeWhitespace=function(e){return this._linesLayout.changeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getContentWidth=function(){return this._scrollable.getScrollDimensions().contentWidth},t.prototype.getScrollWidth=function(){return this._scrollable.getScrollDimensions().scrollWidth},t.prototype.getContentHeight=function(){return this._scrollable.getScrollDimensions().contentHeight},t.prototype.getScrollHeight=function(){return this._scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this._scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this._scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(u.a),Ni=n("tX9W"),ki=n("LeU+"),Ei=function(e,t){this.outputLineIndex=e,this.outputOffset=t},Ii=function(){function e(e,t,n){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n}return e.getInputOffsetOfOutputPosition=function(e,t,n){return 0===t?n:e[t-1]+n},e.getOutputPositionOfInputOffset=function(e,t){for(var n=0,i=e.length-1,o=0,r=0;n<=i;){var s=e[o=n+(i-n)/2|0];if(t<(r=o>0?e[o-1]:0))i=o-1;else{if(!(t>=s))break;n=o+1}}return new Ei(o,t-r)},e}(),Mi=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){return this._lines.convertViewRangeToModelRange(e)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){return this._lines.validateViewRange(e,t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){return this._lines.convertModelRangeToViewRange(e)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}(),Ti=function(){function e(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}return e.prototype._invalidate=function(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)},e.prototype._ensureValid=function(){if(!this._isValid){for(var e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=i+n;for(var o=0;o0?this._modelToView[t-1]:0;return new ki.b(t,e-n)},e}(),Pi=function(){function e(e,t,n,i,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=i,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new Mi(this)},e.prototype._constructLines=function(e,t){var n=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var i=this.model.getLinesContent(),o=i.length,r=this.createLineBreaksComputer(),s=0;s=c&&f<=d,m=Bi(a[s],!g);u[s]=m.getViewLineCount(),this.lines[s]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Ti(u)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(re.a.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,s=1,a=n.length;sr+1?(i.push(new re.a(o,1,r,1)),o=u.startLineNumber,r=u.endLineNumber):u.endLineNumber>r&&(r=u.endLineNumber)}return i.push(new re.a(o,1,r,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(re.a.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r=d&&m<=h?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),v=!0):(g=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),v=!0)),v){var _=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,_)}}return g||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)},e.prototype.setWrappingSettings=function(e,t,n,i){var o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(o&&r&&s&&a)return!1;var u=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;var l=null;if(u){l=[];for(var c=0,d=this.lines.length;cs?(p=(h=(l=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+s-1)+1)+(o-s)-1,a=!0):ot?t:0|e},e.prototype.getActiveIndentGuide=function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],r=[],s=[],a=n.lineNumber-1,u=i.lineNumber-1,l=null,c=a;c<=u;c++){var d=this.lines[c];if(d.isVisible()){var h=d.getViewLineNumberOfModelPosition(0,c===a?n.column:1),p=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),f=0;(C=p-h+1)>1&&1===d.getViewLineMinColumn(this.model,c+1,p)&&(f=0===h?1:2),r.push(C),s.push(f),null===l&&(l=new oe.a(c+1,0))}else null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,c)),l=null)}null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,i.lineNumber)),l=null);for(var g=t-e+1,m=new Array(g),v=0,_=0,b=o.length;_t&&(p=!0,h=t-o+1);var f=d+h;if(c.getViewLinesData(this.model,u+1,d,f,o-e,n,a),o+=h,p)break}}return a},e.prototype.validateViewPosition=function(e,t,n){e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),u=s.getViewLineMaxColumn(this.model,o+1,r);tu&&(t=u);var l=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new oe.a(o+1,l)).equals(n)?new oe.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.validateViewRange=function(e,t){var n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new re.a(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new oe.a(i+1,r))},e.prototype.convertViewRangeToModelRange=function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new re.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.convertModelPositionToViewPosition=function(e,t){for(var n=this.model.validatePosition(new oe.a(e,t)),i=n.lineNumber,o=n.column,r=i-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new oe.a(1,1);var a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));return s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[i-1].getViewPositionOfModelPosition(a,o)},e.prototype.convertModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new re.a(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new re.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new Ui,r=0,s=i;rt.id?1:0:n}));for(var d=[],h=0,p=null,f=0,g=r;f0&&(r=Wi(this._lineBreakData.wrappedTextIndentLength)+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=Wi(this._lineBreakData.wrappedTextIndentLength)+r);var s=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,u=n+10&&(l=this._lineBreakData.wrappedTextIndentLength);var c=e.getLineTokens(t),d=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new Si.c(r,u,s,a,d,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(o+=this._lineBreakData.wrappedTextIndentLength),new oe.a(e+i,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+Ii.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex},e}(),ji=[""];function Wi(e){if(e>=ji.length)for(var t=1;t<=e;t++)ji[t]=Vi(t);return ji[e]}function Vi(e){return new Array(e+1).join(" ")}function Bi(e,t){return null===e?t?Ri.INSTANCE:Ai.INSTANCE:new Fi(e,t)}var Hi=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),zi=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new Hi(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n,i){return!1},e.prototype.createLineBreaksComputer=function(){var e=[];return{addRequest:function(t,n){e.push(null)},finalize:function(){return e}}},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new $e(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new et(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new Je(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}(),Ki=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var i=e.range,o=e.options,r=void 0;if(o.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new oe.a(i.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new oe.a(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));r=new re.a(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Si.e(r,o),this._decorationsCache[t]=n}return n},e.prototype.getDecorationsViewportData=function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object(K.j)(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber,o=[],r=0,s=[],a=n;a<=i;a++)s[a-n]=[];for(var u=0,l=t.length;u=2&&e.viewportStartLineTrackedRange){var L=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(L){var D=e.coordinatesConverter.convertModelPositionToViewPosition(L.getStartPosition()),x=e.viewLayout.getVerticalOffsetForLineNumber(D.lineNumber);e.viewLayout.setScrollPositionNow({scrollTop:x+e.viewportStartLineDelta})}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],i=0,o=t.ranges.length;ia||(r0&&u[c-1]===u[c]||(l+=this.model.getLineContent(u[c])+i);return l}if(o&&t){for(var d=[],h=0,p=0,f=e;p'+this._getHTMLToCopy(i,s)+""}},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",u=n;u<=o;u++){var l=this.model.getLineTokens(u),c=l.getLineContent(),d=u===n?i-1:0,h=u===o?r-1:c.length;a+=""===c?"
    ":Object(_i.a)(c,l.inflate(),t,d,h,s,f.h)}return a},t.prototype._getColorMap=function(){var e=rn.B.getColorMap(),t=["#000000"];if(e)for(var n=1,i=e.length;n=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue},t}(to.a),oo=[],ro=[],so=function(){function e(e,t){this.classifier=new io(e,t)}return e.create=function(t){return new e(t.get(99),t.get(98))},e.prototype.createLineBreaksComputer=function(e,t,n,i){var o=this;t|=0,n=+n;var r=[],s=[];return{addRequest:function(e,t){r.push(e),s.push(t)},finalize:function(){for(var a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[],l=0,c=r.length;l=0)for(var _=Math.abs(l[v]-g);v+1=_)break;_=j,v++}for(;vg){S=E,O=L-T,L-w>d&&(C=0),N=!1;break}D=I,x=M}if(N){f>0&&(h[f]=u[u.length-1],p[f]=l[u.length-1],f++);break}}if(0===C){L=y,I=n.charCodeAt(b),M=e.get(I);var P=!1;for(k=b-1;k>=0;k--){E=k+1;if(9===(D=n.charCodeAt(k))){P=!0;break}x=void 0;var R=void 0;if(Me.A(D)?(k--,x=0,R=2):(x=e.get(D),R=Me.y(D)?r:1),L<=g){if(0===S&&(S=E,O=L),L<=g-d)break;if(ho(D,x,I,M)){C=E,w=L;break}}L-=R,I=D,M=x}if(0!==C){var A=d-(O-w);if(A<=i){var F=n.charCodeAt(S);T=void 0;A-(T=Me.z(F)?2:lo(F,O,i,r))<0&&(C=0)}}if(P){v--;continue}}for(0===C&&(C=S,w=O),h[f]=C,p[f]=w,f++,g=w+d;v<0||v=_)break;_=j,v++}}return 0===f?null:(h.length=f,p.length=f,oo=t.breakOffsets,ro=t.breakOffsetsVisibleColumn,t.breakOffsets=h,t.breakOffsetsVisibleColumn=p,t.wrappedTextIndentLength=c,t)}function uo(e,t,n,i,o,r){if(-1===i)return null;var s=t.length;if(s<=1)return null;var a=po(t,n,i,o,r),u=i-a,l=[],c=[],d=0,h=0,p=0,f=i,g=t.charCodeAt(0),m=e.get(g),v=lo(g,0,n,o),_=1;Me.z(g)&&(v+=1,g=t.charCodeAt(1),m=e.get(g),_++);for(var b=_;bf&&((0===h||v-p>u)&&(h=y,p=v-S),l[d]=h,c[d]=p,d++,f=p+u,h=0),g=C,m=w}return 0===d?null:(l[d]=s,c[d]=v,new Ii(l,c,a))}function lo(e,t,n,i){return 9===e?n-t%n:Me.y(e)?i:1}function co(e,t){return t-e%t}function ho(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function po(e,t,n,i,o){var r=0;if(0!==o){var s=Me.q(e);if(-1!==s){for(var a=0;an&&(r=0)}}return r}var fo=function(){function e(){}return e.create=function(){return new e},e.prototype.createLineBreaksComputer=function(e,t,n,i){t|=0,n=+n;var o=[];return{addRequest:function(e,t){o.push(e)},finalize:function(){return function(e,t,n,i,o){if(-1===i){for(var r=[],s=0,a=e.length;su?(_=0,b=0):y=u-S}var O=v.substr(_),L=go(O,b,n,y,d);h[s]=_,p[s]=b,f[s]=O,g[s]=L[0],m[s]=L[1]}l.innerHTML=d.build(),l.style.position="absolute",l.style.top="10000",l.style.wordWrap="break-word",document.body.appendChild(l);var D=document.createRange(),x=Array.prototype.slice.call(l.children,0),N=[];for(s=0;s');for(var r=e.length,s=t,a=0,u=[],l=[],c=0"),[u,l]}function mo(e,t,n,i){if(n.length<=1)return null;var o=[];return function e(t,n,i,o,r,s,a,u){if(o===s)return;if(r=r||vo(t,n,i[o],i[o+1]),a=a||vo(t,n,i[s],i[s+1]),Math.abs(r[0].top-a[0].top)<=.1)return;if(o+1===s)return void u.push(s);var l=o+(s-o)/2|0,c=vo(t,n,i[l],i[l+1]);e(t,n,i,o,r,l,c,u),e(t,n,i,l,c,s,a,u)}(e,t.firstChild,i,0,null,n.length-1,null,o),0===o.length?null:(o.push(n.length),o)}function vo(e,t,n,i){return e.setStart(t,n),e.setEnd(t,i),e.getClientRects()}var _o=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},yo=function(e,t){return function(n,i){t(n,i,e)}},Co=0,wo=function(){function e(e,t,n,i,o,r){this.model=e,this.viewModel=t,this.cursor=n,this.view=i,this.hasRealView=o,this.listenersToRemove=r}return e.prototype.dispose=function(){Object(u.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.cursor.dispose(),this.viewModel.dispose()},e}(),So=function(e){function t(t,n,i,o,r,u,l,c,h,p){var f=e.call(this)||this;f._onDidDispose=f._register(new a.a),f.onDidDispose=f._onDidDispose.event,f._onDidChangeModelContent=f._register(new a.a),f.onDidChangeModelContent=f._onDidChangeModelContent.event,f._onDidChangeModelLanguage=f._register(new a.a),f.onDidChangeModelLanguage=f._onDidChangeModelLanguage.event,f._onDidChangeModelLanguageConfiguration=f._register(new a.a),f.onDidChangeModelLanguageConfiguration=f._onDidChangeModelLanguageConfiguration.event,f._onDidChangeModelOptions=f._register(new a.a),f.onDidChangeModelOptions=f._onDidChangeModelOptions.event,f._onDidChangeModelDecorations=f._register(new a.a),f.onDidChangeModelDecorations=f._onDidChangeModelDecorations.event,f._onDidChangeConfiguration=f._register(new a.a),f.onDidChangeConfiguration=f._onDidChangeConfiguration.event,f._onDidChangeModel=f._register(new a.a),f.onDidChangeModel=f._onDidChangeModel.event,f._onDidChangeCursorPosition=f._register(new a.a),f.onDidChangeCursorPosition=f._onDidChangeCursorPosition.event,f._onDidChangeCursorSelection=f._register(new a.a),f.onDidChangeCursorSelection=f._onDidChangeCursorSelection.event,f._onDidAttemptReadOnlyEdit=f._register(new a.a),f.onDidAttemptReadOnlyEdit=f._onDidAttemptReadOnlyEdit.event,f._onDidLayoutChange=f._register(new a.a),f.onDidLayoutChange=f._onDidLayoutChange.event,f._editorTextFocus=f._register(new Oo),f.onDidFocusEditorText=f._editorTextFocus.onDidChangeToTrue,f.onDidBlurEditorText=f._editorTextFocus.onDidChangeToFalse,f._editorWidgetFocus=f._register(new Oo),f.onDidFocusEditorWidget=f._editorWidgetFocus.onDidChangeToTrue,f.onDidBlurEditorWidget=f._editorWidgetFocus.onDidChangeToFalse,f._onWillType=f._register(new a.a),f.onWillType=f._onWillType.event,f._onDidType=f._register(new a.a),f.onDidType=f._onDidType.event,f._onDidCompositionStart=f._register(new a.a),f.onDidCompositionStart=f._onDidCompositionStart.event,f._onDidCompositionEnd=f._register(new a.a),f.onDidCompositionEnd=f._onDidCompositionEnd.event,f._onDidPaste=f._register(new a.a),f.onDidPaste=f._onDidPaste.event,f._onMouseUp=f._register(new a.a),f.onMouseUp=f._onMouseUp.event,f._onMouseDown=f._register(new a.a),f.onMouseDown=f._onMouseDown.event,f._onMouseDrag=f._register(new a.a),f.onMouseDrag=f._onMouseDrag.event,f._onMouseDrop=f._register(new a.a),f.onMouseDrop=f._onMouseDrop.event,f._onContextMenu=f._register(new a.a),f.onContextMenu=f._onContextMenu.event,f._onMouseMove=f._register(new a.a),f.onMouseMove=f._onMouseMove.event,f._onMouseLeave=f._register(new a.a),f.onMouseLeave=f._onMouseLeave.event,f._onMouseWheel=f._register(new a.a),f.onMouseWheel=f._onMouseWheel.event,f._onKeyUp=f._register(new a.a),f.onKeyUp=f._onKeyUp.event,f._onKeyDown=f._register(new a.a),f.onKeyDown=f._onKeyDown.event,f._onDidContentSizeChange=f._register(new a.a),f.onDidContentSizeChange=f._onDidContentSizeChange.event,f._onDidScrollChange=f._register(new a.a),f.onDidScrollChange=f._onDidScrollChange.event,f._onDidChangeViewZones=f._register(new a.a),f.onDidChangeViewZones=f._onDidChangeViewZones.event,f._domElement=t,f._id=++Co,f._decorationTypeKeysToIds={},f._decorationTypeSubtypes={},f.isSimpleWidget=i.isSimpleWidget||!1,f._telemetryData=i.telemetryData,n=n||{},f._configuration=f._register(f._createConfiguration(n,p)),f._register(f._configuration.onDidChange((function(e){f._onDidChangeConfiguration.fire(e);var t=f._configuration.options;if(e.hasChanged(107)){var n=t.get(107);f._onDidLayoutChange.fire(n)}}))),f._contextKeyService=f._register(l.createScoped(f._domElement)),f._notificationService=h,f._codeEditorService=r,f._commandService=u,f._themeService=c,f._register(new Lo(f,f._contextKeyService)),f._register(new Do(f,f._contextKeyService)),f._instantiationService=o.createChild(new Qi.a([Zi.c,f._contextKeyService])),f._modelData=null,f._contributions={},f._actions={},f._focusTracker=new xo(t),f._focusTracker.onChange((function(){f._editorWidgetFocus.setValue(f._focusTracker.hasFocus())})),f._contentWidgets={},f._overlayWidgets={};for(var g=0,m=Array.isArray(i.contributions)?i.contributions:d.d.getEditorContributions();g1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))},t}(u.a),Do=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._contextKeyService=n,i._langId=vi.a.languageId.bindTo(n),i._hasCompletionItemProvider=vi.a.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=vi.a.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=vi.a.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=vi.a.hasDefinitionProvider.bindTo(n),i._hasDeclarationProvider=vi.a.hasDeclarationProvider.bindTo(n),i._hasImplementationProvider=vi.a.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=vi.a.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=vi.a.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=vi.a.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=vi.a.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=vi.a.hasReferenceProvider.bindTo(n),i._hasRenameProvider=vi.a.hasRenameProvider.bindTo(n),i._hasSignatureHelpProvider=vi.a.hasSignatureHelpProvider.bindTo(n),i._hasDocumentFormattingProvider=vi.a.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=vi.a.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasMultipleDocumentFormattingProvider=vi.a.hasMultipleDocumentFormattingProvider.bindTo(n),i._hasMultipleDocumentSelectionFormattingProvider=vi.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),i._isInWalkThrough=vi.a.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(rn.d.onDidChange(o)),i._register(rn.a.onDidChange(o)),i._register(rn.b.onDidChange(o)),i._register(rn.f.onDidChange(o)),i._register(rn.e.onDidChange(o)),i._register(rn.q.onDidChange(o)),i._register(rn.C.onDidChange(o)),i._register(rn.p.onDidChange(o)),i._register(rn.i.onDidChange(o)),i._register(rn.m.onDidChange(o)),i._register(rn.u.onDidChange(o)),i._register(rn.v.onDidChange(o)),i._register(rn.g.onDidChange(o)),i._register(rn.j.onDidChange(o)),i._register(rn.x.onDidChange(o)),o(),i}return _o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){var e=this;this._contextKeyService.bufferChangeEvents((function(){e._langId.reset(),e._hasCompletionItemProvider.reset(),e._hasCodeActionsProvider.reset(),e._hasCodeLensProvider.reset(),e._hasDefinitionProvider.reset(),e._hasDeclarationProvider.reset(),e._hasImplementationProvider.reset(),e._hasTypeDefinitionProvider.reset(),e._hasHoverProvider.reset(),e._hasDocumentHighlightProvider.reset(),e._hasDocumentSymbolProvider.reset(),e._hasReferenceProvider.reset(),e._hasRenameProvider.reset(),e._hasDocumentFormattingProvider.reset(),e._hasDocumentSelectionFormattingProvider.reset(),e._hasSignatureHelpProvider.reset(),e._isInWalkThrough.reset()}))},t.prototype._update=function(){var e=this,t=this._editor.getModel();t?this._contextKeyService.bufferChangeEvents((function(){e._langId.set(t.getLanguageIdentifier().language),e._hasCompletionItemProvider.set(rn.d.has(t)),e._hasCodeActionsProvider.set(rn.a.has(t)),e._hasCodeLensProvider.set(rn.b.has(t)),e._hasDefinitionProvider.set(rn.f.has(t)),e._hasDeclarationProvider.set(rn.e.has(t)),e._hasImplementationProvider.set(rn.q.has(t)),e._hasTypeDefinitionProvider.set(rn.C.has(t)),e._hasHoverProvider.set(rn.p.has(t)),e._hasDocumentHighlightProvider.set(rn.i.has(t)),e._hasDocumentSymbolProvider.set(rn.m.has(t)),e._hasReferenceProvider.set(rn.u.has(t)),e._hasRenameProvider.set(rn.v.has(t)),e._hasSignatureHelpProvider.set(rn.x.has(t)),e._hasDocumentFormattingProvider.set(rn.g.has(t)||rn.j.has(t)),e._hasDocumentSelectionFormattingProvider.set(rn.j.has(t)),e._hasMultipleDocumentFormattingProvider.set(rn.g.all(t).length+rn.j.all(t).length>1),e._hasMultipleDocumentSelectionFormattingProvider.set(rn.j.all(t).length>1),e._isInWalkThrough.set(t.uri.scheme===l.b.walkThroughSnippet)})):this.reset()},t}(u.a),xo=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new a.a),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(r.Z(t)),n._register(n._domFocusTracker.onDidFocus((function(){n._hasFocus=!0,n._onChange.fire(void 0)}))),n._register(n._domFocusTracker.onDidBlur((function(){n._hasFocus=!1,n._onChange.fire(void 0)}))),n}return _o(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(u.a),No=encodeURIComponent("");function Eo(e){return No+encodeURIComponent(e.toString())+ko}var Io=encodeURIComponent('');Object(U.e)((function(e,t){var n=e.getColor(an.p);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(an.q);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+Eo(i)+'") repeat-x bottom left; }');var o=e.getColor(an.O);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(an.P);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+Eo(r)+'") repeat-x bottom left; }');var s=e.getColor(an.G);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(an.H);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+Eo(a)+'") repeat-x bottom left; }');var u=e.getColor(an.y);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(an.z);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(Io+encodeURIComponent(l.toString())+Mo+'") no-repeat bottom left; }'));var c=e.getColor(Fe.o);c&&t.addRule(".monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; }");var d=e.getColor(Fe.n);d&&t.addRule(".monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed "+d+"; }");var h=e.getColor(an.x)||"inherit";t.addRule(".monaco-editor .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: "+h+"}")}))},nD70: /*!**********************************************************************!*\ @@ -2273,7 +2273,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2284,22 +2284,22 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"getSelectionSearchString",(function(){return vt})),n.d(t,"CommonFindController",(function(){return _t})),n.d(t,"FindController",(function(){return bt})),n.d(t,"StartFindAction",(function(){return yt})),n.d(t,"StartFindWithSelectionAction",(function(){return Ct})),n.d(t,"MatchFindAction",(function(){return wt})),n.d(t,"NextMatchFindAction",(function(){return St})),n.d(t,"NextMatchFindAction2",(function(){return Ot})),n.d(t,"PreviousMatchFindAction",(function(){return Lt})),n.d(t,"PreviousMatchFindAction2",(function(){return Dt})),n.d(t,"SelectionMatchFindAction",(function(){return xt})),n.d(t,"NextSelectionMatchFindAction",(function(){return Nt})),n.d(t,"PreviousSelectionMatchFindAction",(function(){return kt})),n.d(t,"StartFindReplaceAction",(function(){return Et}));var i=n("3/fG"),o=n("X+cX"),r=n("pmY6"),s=n("N0LK"),a=n("sswD"),u=n("wQH0"),l=n("LCkn"),c=n("cGHE"),d=n("aokT"),h=n("gCVg"),p=n("jAJ/"),f=n("M1Kb"),g=n("tX9W"),m=n("MD5Z"),v=n("t9D7"),_=function(){function e(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}return e.prototype.dispose=function(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.reset=function(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.getCount=function(){return this._decorations.length},e.prototype.getFindScope=function(){return this._findScopeDecorationId?this._editor.getModel().getDecorationRange(this._findScopeDecorationId):null},e.prototype.getStartPosition=function(){return this._startPosition},e.prototype.setStartPosition=function(e){this._startPosition=e,this.setCurrentFindMatch(null)},e.prototype._getDecorationIndex=function(e){var t=this._decorations.indexOf(e);return t>=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=0,i=this._editor.getModel().getDecorationsInRange(t);n1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var a=i._editor.getModel().getLineCount(),u=i._editor.getLayoutInfo().height/a,l=Math.max(2,Math.ceil(3/u)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,p=1,f=t.length;p=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(s.push({range:new d.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=g.startLineNumber,h=g.endLineNumber)}s.push({range:new d.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(p=0,f=t.length;p=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0){for(var n=[],i=0;i0;){if(e0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new c.a(n,i)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),this._decorations.getCount()<19999){var i=this._decorations.matchBeforePosition(t);return i&&i.isEmpty()&&i.getStartPosition().equals(t)&&(t=this._prevSearchPosition(t),i=this._decorations.matchBeforePosition(t)),void(i&&this._setCurrentFindMatch(i))}if(!this._cannotFind()){var o=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),o);r.getEndPosition().isBefore(t)&&(t=r.getEndPosition()),t.isBefore(r.getStartPosition())&&(t=r.getEndPosition());var s=t.lineNumber,a=t.column,u=this._editor.getModel(),l=new c.a(s,a),d=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,!1);if(d&&d.range.isEmpty()&&d.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),d=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,!1)),d)return n||r.containsRange(d.range)?void this._setCurrentFindMatch(d.range):this._moveToPrevMatch(d.range.getStartPosition(),!0)}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new c.a(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<19999){var t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}var n=this._getNextMatch(e,!1,!0);n&&this._setCurrentFindMatch(n.range)},e.prototype._getNextMatch=function(t,n,i,o){if(void 0===o&&(o=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),s=e._getSearchRange(this._editor.getModel(),r);s.getEndPosition().isBefore(t)&&(t=s.getStartPosition()),t.isBefore(s.getStartPosition())&&(t=s.getStartPosition());var a=t.lineNumber,u=t.column,l=this._editor.getModel(),d=new c.a(a,u),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n);return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n)),h?o||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),n,i,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new L(null);for(var t=new x(e),n=0,i=e.length;n=i)break;if(36===(a=e.charCodeAt(n))){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var r=a-48;if(n+1=i)break;var a;switch(a=e.charCodeAt(n)){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}(this._state.replaceString):L.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches,this._state.preserveCase),o=new l.a(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new c.a(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new p.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="mu";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,o=this._editor.getModel(),r=o.getValue(1),s=o.getFullModelRange(),a=this._getReplacePattern(),u=this._state.preserveCase;i=a.hasReplacementPatterns||u?r.replace(t,(function(){return a.buildReplaceString(arguments,u)})):r.replace(t,a.buildReplaceString(null,u));var c=new l.b(s,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),i=[],o=0,r=n.length;ot&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,o=!0),void 0!==n&&(d.a.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(i)},t.prototype.change=function(e,t,n){void 0===n&&(n=!0);var i={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1,r=this.isRegex,s=this.wholeWord,a=this.matchCase,u=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,i.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,i.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,i.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,i.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&(d.a.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,i.searchScope=!0,o=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(o=!0,i.isRegex=!0),s!==this.wholeWord&&(o=!0,i.wholeWord=!0),a!==this.matchCase&&(o=!0,i.matchCase=!0),u!==this.preserveCase&&(o=!0,i.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(i)},t}(r.a),be=(n("AbCa"),n("OBOq")),ye=n("cMOf"),Ce=n("/cxE"),we=n("MNsG"),Se=(n("yqFB"),n("0+8E")),Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Le=i.a("defaultLabel","input"),De=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._showOptionButtons=i,r.fixFocusOnOptionClickEnabled=!0,r._onDidOptionChange=r._register(new ne.a),r.onDidOptionChange=r._onDidOptionChange.event,r._onKeyDown=r._register(new ne.a),r.onKeyDown=r._onKeyDown.event,r._onMouseDown=r._register(new ne.a),r.onMouseDown=r._onMouseDown.event,r._onInput=r._register(new ne.a),r._onKeyUp=r._register(new ne.a),r._onCaseSensitiveKeyDown=r._register(new ne.a),r.onCaseSensitiveKeyDown=r._onCaseSensitiveKeyDown.event,r._onRegexKeyDown=r._register(new ne.a),r.onRegexKeyDown=r._onRegexKeyDown.event,r._lastHighlightFindOptions=0,r.contextViewProvider=n,r.placeholder=o.placeholder||"",r.validation=o.validation,r.label=o.label||Le,r.inputActiveOptionBorder=o.inputActiveOptionBorder,r.inputActiveOptionBackground=o.inputActiveOptionBackground,r.inputBackground=o.inputBackground,r.inputForeground=o.inputForeground,r.inputBorder=o.inputBorder,r.inputValidationInfoBorder=o.inputValidationInfoBorder,r.inputValidationInfoBackground=o.inputValidationInfoBackground,r.inputValidationInfoForeground=o.inputValidationInfoForeground,r.inputValidationWarningBorder=o.inputValidationWarningBorder,r.inputValidationWarningBackground=o.inputValidationWarningBackground,r.inputValidationWarningForeground=o.inputValidationWarningForeground,r.inputValidationErrorBorder=o.inputValidationErrorBorder,r.inputValidationErrorBackground=o.inputValidationErrorBackground,r.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.appendCaseSensitiveLabel||"",a=o.appendWholeWordsLabel||"",u=o.appendRegexLabel||"",l=o.history||[],c=!!o.flexibleHeight,d=!!o.flexibleWidth,h=o.flexibleMaxHeight;r.domNode=document.createElement("div"),$.f(r.domNode,"monaco-findInput"),r.inputBox=r._register(new Se.a(r.domNode,r.contextViewProvider,{placeholder:r.placeholder||"",ariaLabel:r.label||"",validationOptions:{validation:r.validation},inputBackground:r.inputBackground,inputForeground:r.inputForeground,inputBorder:r.inputBorder,inputValidationInfoBackground:r.inputValidationInfoBackground,inputValidationInfoForeground:r.inputValidationInfoForeground,inputValidationInfoBorder:r.inputValidationInfoBorder,inputValidationWarningBackground:r.inputValidationWarningBackground,inputValidationWarningForeground:r.inputValidationWarningForeground,inputValidationWarningBorder:r.inputValidationWarningBorder,inputValidationErrorBackground:r.inputValidationErrorBackground,inputValidationErrorForeground:r.inputValidationErrorForeground,inputValidationErrorBorder:r.inputValidationErrorBorder,history:l,flexibleHeight:c,flexibleWidth:d,flexibleMaxHeight:h})),r.regex=r._register(new pe({appendTitle:u,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.regex.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.regex.onKeyDown((function(e){r._onRegexKeyDown.fire(e)}))),r.wholeWords=r._register(new he({appendTitle:a,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.wholeWords.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r.caseSensitive=r._register(new de({appendTitle:s,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.caseSensitive.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.caseSensitive.onKeyDown((function(e){r._onCaseSensitiveKeyDown.fire(e)}))),r._showOptionButtons&&(r.inputBox.paddingRight=r.caseSensitive.width()+r.wholeWords.width()+r.regex.width());var p=[r.caseSensitive.domNode,r.wholeWords.domNode,r.regex.domNode];r.onkeydown(r.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=p.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%p.length:e.equals(15)&&(n=0===t?p.length-1:t-1),e.equals(9)?p[t].blur():n>=0&&p[n].focus(),$.c.stop(e,!0)}}}));var f=document.createElement("div");return f.className="controls",f.style.display=r._showOptionButtons?"block":"none",f.appendChild(r.caseSensitive.domNode),f.appendChild(r.wholeWords.domNode),f.appendChild(r.regex.domNode),r.domNode.appendChild(f),t&&t.appendChild(r.domNode),r.onkeydown(r.inputBox.inputElement,(function(e){return r._onKeyDown.fire(e)})),r.onkeyup(r.inputBox.inputElement,(function(e){return r._onKeyUp.fire(e)})),r.oninput(r.inputBox.inputElement,(function(e){return r._onInput.fire()})),r.onmousedown(r.inputBox.inputElement,(function(e){return r._onMouseDown.fire(e)})),r}return Oe(t,e),t.prototype.enable=function(){$.P(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){$.f(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setFocusInputOnOptionClick=function(e){this.fixFocusOnOptionClickEnabled=e},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){$.P(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,$.f(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t}(ee.a),xe=n("nrhi"),Ne=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ke=i.a("defaultLabel","input"),Ee=i.a("label.preserveCaseCheckbox","Preserve Case"),Ie=function(e){function t(t){return e.call(this,{actionClassName:"codicon-preserve-case",title:Ee+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionBackground:t.inputActiveOptionBackground})||this}return Ne(t,e),t}(se),Me=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._showOptionButtons=i,r.fixFocusOnOptionClickEnabled=!0,r.cachedOptionsWidth=0,r._onDidOptionChange=r._register(new ne.a),r.onDidOptionChange=r._onDidOptionChange.event,r._onKeyDown=r._register(new ne.a),r.onKeyDown=r._onKeyDown.event,r._onMouseDown=r._register(new ne.a),r._onInput=r._register(new ne.a),r._onKeyUp=r._register(new ne.a),r._onPreserveCaseKeyDown=r._register(new ne.a),r.onPreserveCaseKeyDown=r._onPreserveCaseKeyDown.event,r.contextViewProvider=n,r.placeholder=o.placeholder||"",r.validation=o.validation,r.label=o.label||ke,r.inputActiveOptionBorder=o.inputActiveOptionBorder,r.inputActiveOptionBackground=o.inputActiveOptionBackground,r.inputBackground=o.inputBackground,r.inputForeground=o.inputForeground,r.inputBorder=o.inputBorder,r.inputValidationInfoBorder=o.inputValidationInfoBorder,r.inputValidationInfoBackground=o.inputValidationInfoBackground,r.inputValidationInfoForeground=o.inputValidationInfoForeground,r.inputValidationWarningBorder=o.inputValidationWarningBorder,r.inputValidationWarningBackground=o.inputValidationWarningBackground,r.inputValidationWarningForeground=o.inputValidationWarningForeground,r.inputValidationErrorBorder=o.inputValidationErrorBorder,r.inputValidationErrorBackground=o.inputValidationErrorBackground,r.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.history||[],a=!!o.flexibleHeight,u=!!o.flexibleWidth,l=o.flexibleMaxHeight;r.domNode=document.createElement("div"),$.f(r.domNode,"monaco-findInput"),r.inputBox=r._register(new Se.a(r.domNode,r.contextViewProvider,{ariaLabel:r.label||"",placeholder:r.placeholder||"",validationOptions:{validation:r.validation},inputBackground:r.inputBackground,inputForeground:r.inputForeground,inputBorder:r.inputBorder,inputValidationInfoBackground:r.inputValidationInfoBackground,inputValidationInfoForeground:r.inputValidationInfoForeground,inputValidationInfoBorder:r.inputValidationInfoBorder,inputValidationWarningBackground:r.inputValidationWarningBackground,inputValidationWarningForeground:r.inputValidationWarningForeground,inputValidationWarningBorder:r.inputValidationWarningBorder,inputValidationErrorBackground:r.inputValidationErrorBackground,inputValidationErrorForeground:r.inputValidationErrorForeground,inputValidationErrorBorder:r.inputValidationErrorBorder,history:s,flexibleHeight:a,flexibleWidth:u,flexibleMaxHeight:l})),r.preserveCase=r._register(new Ie({appendTitle:"",isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.preserveCase.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.preserveCase.onKeyDown((function(e){r._onPreserveCaseKeyDown.fire(e)}))),r._showOptionButtons?r.cachedOptionsWidth=r.preserveCase.width():r.cachedOptionsWidth=0;var c=[r.preserveCase.domNode];r.onkeydown(r.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=c.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%c.length:e.equals(15)&&(n=0===t?c.length-1:t-1),e.equals(9)?c[t].blur():n>=0&&c[n].focus(),$.c.stop(e,!0)}}}));var d=document.createElement("div");return d.className="controls",d.style.display=r._showOptionButtons?"block":"none",d.appendChild(r.preserveCase.domNode),r.domNode.appendChild(d),t&&t.appendChild(r.domNode),r.onkeydown(r.inputBox.inputElement,(function(e){return r._onKeyDown.fire(e)})),r.onkeyup(r.inputBox.inputElement,(function(e){return r._onKeyUp.fire(e)})),r.oninput(r.inputBox.inputElement,(function(e){return r._onInput.fire()})),r.onmousedown(r.inputBox.inputElement,(function(e){return r._onMouseDown.fire(e)})),r}return Ne(t,e),t.prototype.enable=function(){$.P(this.domNode,"disabled"),this.inputBox.enable(),this.preserveCase.enable()},t.prototype.disable=function(){$.f(this.domNode,"disabled"),this.inputBox.disable(),this.preserveCase.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getPreserveCase=function(){return this.preserveCase.checked},t.prototype.setPreserveCase=function(e){this.preserveCase.checked=e},t.prototype.focusOnPreserve=function(){this.preserveCase.focus()},t.prototype.validate=function(){this.inputBox&&this.inputBox.validate()},Object.defineProperty(t.prototype,"width",{set:function(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(ee.a),Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pe=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Re=function(e,t){return function(n,i){t(n,i,e)}};function Ae(e,t){return e.getContext(document.activeElement).getValue(t)}function Fe(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new k.d(n,t).bindTo(e)}(n,t,"historyNavigationWidget"),{scopedContextKeyService:n,historyNavigationEnablement:new k.d("historyNavigationEnabled",!0).bindTo(n)}}var je=function(e){function t(t,n,i,o,r){void 0===r&&(r=!1);var s=e.call(this,t,n,r,i)||this;return s._register(Fe(o,{target:s.inputBox.element,historyNavigator:s.inputBox}).scopedContextKeyService),s}return Te(t,e),t=Pe([Re(3,k.c)],t)}(De),We=function(e){function t(t,n,i,o,r){void 0===r&&(r=!1);var s=e.call(this,t,n,r,i)||this;return s._register(Fe(o,{target:s.inputBox.element,historyNavigator:s.inputBox}).scopedContextKeyService),s}return Te(t,e),t=Pe([Re(3,k.c)],t)}(Me);xe.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:k.a.and(k.a.has("historyNavigationWidget"),k.a.equals("historyNavigationEnabled",!0)),primary:16,secondary:[528],handler:function(e,t){var n=Ae(e.get(k.c),"historyNavigationWidget");n&&n.historyNavigator.showPreviousValue()}}),xe.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:k.a.and(k.a.has("historyNavigationWidget"),k.a.equals("historyNavigationEnabled",!0)),primary:18,secondary:[530],handler:function(e,t){var n=Ae(e.get(k.c),"historyNavigationWidget");n&&n.historyNavigator.showNextValue()}});var Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Be=i.a("label.find","Find"),He=i.a("placeholder.find","Find"),ze=i.a("label.previousMatchButton","Previous match"),Ue=i.a("label.nextMatchButton","Next match"),Ke=i.a("label.toggleSelectionFind","Find in selection"),qe=i.a("label.closeButton","Close"),Ge=i.a("label.replace","Replace"),Ye=i.a("placeholder.replace","Replace"),Ze=i.a("label.replaceButton","Replace"),Xe=i.a("label.replaceAllButton","Replace All"),Qe=i.a("label.toggleReplaceButton","Toggle Replace mode"),Je=i.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",19999),$e=i.a("label.matchesLocation","{0} of {1}"),et=i.a("label.noResults","No Results"),tt=69,nt=we.e?256:2048,it=function(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"};function ot(e,t,n){var i=!!t.match(/\n/);n&&i&&n.selectionStart>0&&e.stopPropagation()}function rt(e,t,n){var i=!!t.match(/\n/);n&&i&&n.selectionEnd0&&0===this._state.matchesCount;$.Y(this._domNode,"no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=tt+"px",this._state.matchesCount>=19999?this._matchesCount.title=Je:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=19999&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.r($e,n,t)}else e=et;this._matchesCount.appendChild(document.createTextNode(e)),Object(be.a)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString),!0),tt=Math.max(tt,this._matchesCount.clientWidth)},t.prototype._getAriaLabel=function(e,t,n){return e===et?""===n?i.a("ariaSearchNoResultEmpty","{0} found",e):i.a("ariaSearchNoResult","{0} found for {1}",e,n):t?i.a("ariaSearchNoResultWithLineNum","{0} found for {1} at {2}",e,n,t.startLineNumber+":"+t.startColumn):i.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for {1}",e,n)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t),this._nextBtn.setEnabled(this._isVisible&&e&&t),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),$.Y(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-right",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-down",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var n=!this._codeEditor.getOption(68);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)},t.prototype._reveal=function(){var e=this;if(!this._isVisible){this._isVisible=!0;var t=this._codeEditor.getSelection();switch(this._codeEditor.getOption(28).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":var n=!!t&&t.startLineNumber!==t.endLineNumber;this._toggleSelectionFind.checked=n}this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){$.f(e._domNode,"visible"),e._domNode.setAttribute("aria-hidden","false")}),0),setTimeout((function(){e._findInput.validate()}),200),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getOption(28).seedSearchStringFromSelection&&t){var o=this._codeEditor.getDomNode();if(o){var r=$.C(o),s=this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),a=r.left+(s?s.left:0),u=s?s.top:0;if(this._viewZone&&ut.startLineNumber&&(i=!1);var l=$.F(this._domNode).left;a>l&&(i=!1);var c=this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());r.left+(c?c.left:0)>l&&(i=!1)}}}this._showViewZone(i)}},t.prototype._hide=function(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),$.P(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())},t.prototype._layoutViewZone=function(){var e=this;if(this._codeEditor.getOption(28).addExtraSpaceOnTop){if(this._isVisible){var t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((function(n){t.heightInPx=e._getHeight(),e._viewZoneId=n.addZone(t),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+t.heightInPx)}))}}else this._removeViewZone()},t.prototype._showViewZone=function(e){var t=this;if((void 0===e&&(e=!0),this._isVisible)&&this._codeEditor.getOption(28).addExtraSpaceOnTop){void 0===this._viewZone&&(this._viewZone=new it(0));var n=this._viewZone;this._codeEditor.changeViewZones((function(i){if(void 0!==t._viewZoneId){var o=t._getHeight();if(o===n.heightInPx)return;var r=o-n.heightInPx;return n.heightInPx=o,i.layoutZone(t._viewZoneId),void(e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+r))}r=t._getHeight();n.heightInPx=r,t._viewZoneId=i.addZone(n),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+r)}))}},t.prototype._removeViewZone=function(){var e=this;this._codeEditor.changeViewZones((function(t){void 0!==e._viewZoneId&&(t.removeZone(e._viewZoneId),e._viewZoneId=void 0,e._viewZone&&(e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()-e._viewZone.heightInPx),e._viewZone=void 0))}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.Y),inputActiveOptionBackground:e.getColor(m.X),inputBackground:e.getColor(m.Z),inputForeground:e.getColor(m.bb),inputBorder:e.getColor(m.ab),inputValidationInfoBackground:e.getColor(m.fb),inputValidationInfoForeground:e.getColor(m.hb),inputValidationInfoBorder:e.getColor(m.gb),inputValidationWarningBackground:e.getColor(m.ib),inputValidationWarningForeground:e.getColor(m.kb),inputValidationWarningBorder:e.getColor(m.jb),inputValidationErrorBackground:e.getColor(m.cb),inputValidationErrorForeground:e.getColor(m.eb),inputValidationErrorBorder:e.getColor(m.db)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible&&$.M(this._domNode)){var e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)$.f(this._domNode,"hiddenEditor");else{$.I(this._domNode,"hiddenEditor")&&$.P(this._domNode,"hiddenEditor");var t=e.width,n=e.minimapWidth,i=!1,o=!1,r=!1;if(this._resized)if($.H(this._domNode)>419)return this._domNode.style.maxWidth=t-28-n-15+"px",void(this._replaceInput.width=$.H(this._findInput.domNode));if(447+n>=t&&(o=!0),447+n-tt>=t&&(r=!0),447+n-tt>=t+50&&(i=!0),$.Y(this._domNode,"collapsed-find-widget",i),$.Y(this._domNode,"narrow-find-widget",r),$.Y(this._domNode,"reduced-find-widget",o),r||i||(this._domNode.style.maxWidth=t-28-n-15+"px"),this._resized){this._findInput.inputBox.layout();var s=this._findInput.inputBox.element.clientWidth;s>0&&(this._replaceInput.width=s)}else this._isReplaceVisible&&(this._replaceInput.width=$.H(this._findInput.domNode))}}},t.prototype._getHeight=function(){var e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4},t.prototype._tryUpdateHeight=function(){var e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=e+"px",!0)},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInput.select(),this._replaceInput.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(d.a.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3|nt)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ot(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3|nt)?(we.h&&we.f&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(i.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store("ctrlEnterReplaceAll.windows.donotask",!0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ot(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildDomNode=function(){var e=this;this._findInput=this._register(new je(null,this._contextViewProvider,{width:221,label:Be,placeholder:He,appendCaseSensitiveLabel:this._keybindingLabelFor(K),appendWholeWordsLabel:this._keybindingLabelFor(q),appendRegexLabel:this._keybindingLabelFor(G),validation:function(t){if(0===t.length||!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._ignoreChangeEvent||e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInput.focus(),t.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceInput.focusOnPreserve(),t.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((function(t){e._tryUpdateHeight()&&e._showViewZone()}))),we.d&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new at({label:ze+this._keybindingLabelFor(V),className:"codicon codicon-arrow-up",onTrigger:function(){e._codeEditor.getAction(V).run().then(void 0,Ce.e)}})),this._nextBtn=this._register(new at({label:Ue+this._keybindingLabelFor(W),className:"codicon codicon-arrow-down",onTrigger:function(){e._codeEditor.getAction(W).run().then(void 0,Ce.e)}}));var t=document.createElement("div");t.className="find-part",t.appendChild(this._findInput.domNode);var n=document.createElement("div");n.className="find-actions",t.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new se({actionClassName:"codicon codicon-selection",title:Ke+this._keybindingLabelFor(Y),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((function(){if(e._toggleSelectionFind.checked){if(e._codeEditor.hasModel()){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()||e._state.change({searchScope:t},!0)}}else e._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new at({label:qe+this._keybindingLabelFor(U),className:"codicon codicon-close",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new We(null,void 0,{label:Ge,placeholder:Ye,history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((function(t){return e._onReplaceInputKeyDown(t)}))),this._register(this._replaceInput.inputBox.onDidChange((function(){e._state.change({replaceString:e._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((function(t){e._isReplaceVisible&&e._tryUpdateHeight()&&e._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((function(){e._state.change({preserveCase:e._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((function(t){t.equals(2)&&(e._prevBtn.isEnabled()?e._prevBtn.focus():e._nextBtn.isEnabled()?e._nextBtn.focus():e._toggleSelectionFind.enabled?e._toggleSelectionFind.focus():e._closeBtn.isEnabled()&&e._closeBtn.focus(),t.preventDefault())}))),this._replaceBtn=this._register(new at({label:Ze+this._keybindingLabelFor(Z),className:"codicon codicon-replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new at({label:Xe+this._keybindingLabelFor(X),className:"codicon codicon-replace-all",onTrigger:function(){e._controller.replaceAll()}}));var i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);var o=document.createElement("div");o.className="replace-actions",i.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new at({label:Qe,className:"codicon toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode),e._replaceInput.inputBox.layout()),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("codicon-chevron-down",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-right",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(i),this._resizeSash=new ye.a(this._domNode,this,{orientation:0}),this._resized=!1;var r=419;this._register(this._resizeSash.onDidStart((function(){r=$.H(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(t){e._resized=!0;var n=r+t.startX-t.currentX;n<419||(n>(parseFloat($.z(e._domNode).maxWidth)||0)||(e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode)),e._findInput.inputBox.layout(),e._tryUpdateHeight()))}))),this._register(this._resizeSash.onDidReset((function(){var t=$.H(e._domNode);if(!(t<419)){var n=419;if(!e._resized||419===t){var i=e._codeEditor.getLayoutInfo();n=i.width-28-i.minimapWidth-15,e._resized=!0}e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode)),e._findInput.inputBox.layout()}})))},t.prototype.updateAccessibilitySupport=function(){var e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)},t.ID="editor.contrib.findWidget",t}(ee.a),at=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,(function(e){n._opts.onTrigger(),e.preventDefault()})),n.onkeydown(n._domNode,(function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)})),n}return Ve(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){$.Y(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){$.Y(this._domNode,e,t)},t}(ee.a);Object(v.e)((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(m.t)),n(".currentFindMatch",e.getColor(m.r)),n(".findScope",e.getColor(m.v)),n(".find-widget",e.getColor(m.Q));var i=e.getColor(m.hc);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(m.u);o&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+o+"; box-sizing: border-box; }");var r=e.getColor(m.s);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(m.w);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(m.e);a&&t.addRule(".monaco-editor .find-widget { border: 1px solid "+a+"; }");var u=e.getColor(m.S);u&&t.addRule(".monaco-editor .find-widget { color: "+u+"; }");var l=e.getColor(m.U);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var c=e.getColor(m.T);if(c)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}");else{var d=e.getColor(m.R);d&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+d+"; width: 3px !important; margin-left: -4px;}")}var h=e.getColor(m.V);h&&t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: "+h+"; }")}));var ut=n("9XeP"),lt=n("Uzvx"),ct=n("Cg/j"),dt=n("bexQ"),ht=n("A+jI"),pt=n("sM1p"),ft=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},mt=function(e,t){return function(n,i){t(n,i,e)}};function vt(e){if(!e.hasModel())return null;var t=e.getSelection();if(t.startLineNumber===t.endLineNumber)if(t.isEmpty()){var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}else if(e.getModel().getValueLengthInRange(t)<524288)return e.getModel().getValueInRange(t);return null}var _t=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s._editor=t,s._findWidgetVisible=E.bindTo(n),s._contextKeyService=n,s._storageService=i,s._clipboardService=r,s._updateHistoryDelayer=new o.a(500),s._state=s._register(new _e),s.loadQueryState(),s._register(s._state.onFindReplaceStateChange((function(e){return s._onStateChanged(e)}))),s._model=null,s._register(s._editor.onDidChangeModel((function(){var e=s._editor.getModel()&&s._state.isRevealed;s.disposeModel(),s._state.change({searchScope:null,matchCase:s._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:s._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:s._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:s._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&s._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1})}))),s}return ft(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)},t.prototype.isFindInputFocused=function(){return!!I.getValue(this._contextKeyService)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.p(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.hasModel()){var t,n={isRevealed:!0};if(e.seedSearchStringFromSelection)(t=vt(this._editor))&&(this._state.isRegex?n.searchString=s.p(t):n.searchString=t);if(!n.searchString&&e.seedSearchStringFromGlobalClipboard)(t=this.getGlobalBufferTerm())&&(n.searchString=t);if(e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){var i=this._editor.getSelection();i.isEmpty()||(n.searchScope=i)}this._state.change(n,!1),this._model||(this._model=new J(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getOption(28).globalFindClipboard&&this._clipboardService&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getOption(28).globalFindClipboard&&this._clipboardService&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=gt([mt(1,k.c),mt(2,ht.a),mt(3,ut.a)],t)}(r.a),bt=function(e){function t(t,n,i,o,r,s,a,u){var l=e.call(this,t,i,a,u)||this;return l._contextViewService=n,l._keybindingService=o,l._themeService=r,l._notificationService=s,l._widget=null,l._findOptionsWidget=null,l}return ft(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget();var n=this._editor.getSelection(),i=!1;switch(this._editor.getOption(28).autoFindInSelection){case"always":i=!0;break;case"never":i=!1;break;case"multiline":i=!!n&&n.startLineNumber!==n.endLineNumber}t.updateSearchScope=i,e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new st(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ge(this._editor,this._state,this._keybindingService,this._themeService))},t=gt([mt(1,lt.b),mt(2,k.c),mt(3,dt.a),mt(4,v.c),mt(5,pt.a),mt(6,ht.a),mt(7,Object(ct.d)(ut.a))],t)}(_t),yt=function(e){function t(){return e.call(this,{id:F,label:i.a("startFindAction","Find"),alias:"Find",precondition:void 0,kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:17,group:"3_find",title:i.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(28).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1})},t}(a.b),Ct=function(e){function t(){return e.call(this,{id:j,label:i.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),n.setGlobalBufferTerm(n.getState().searchString))},t}(a.b),wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),this._run(n))},t}(a.b),St=function(e){function t(){return e.call(this,{id:W,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(wt),Ot=function(e){function t(){return e.call(this,{id:W,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:k.a.and(u.a.focus,I),primary:3,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(wt),Lt=function(e){function t(){return e.call(this,{id:V,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(wt),Dt=function(e){function t(){return e.call(this,{id:V,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:k.a.and(u.a.focus,I),primary:1027,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(wt),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);if(n){var i=vt(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),this._run(n))}},t}(a.b),Nt=function(e){function t(){return e.call(this,{id:B,label:i.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:2109,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(xt),kt=function(e){function t(){return e.call(this,{id:H,label:i.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:3133,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(xt),Et=function(e){function t(){return e.call(this,{id:z,label:i.a("startReplace","Replace"),alias:"Replace",precondition:void 0,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:17,group:"3_find",title:i.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return ft(t,e),t.prototype.run=function(e,t){if(t.hasModel()&&!t.getOption(68)){var n=_t.get(t),i=t.getSelection(),o=n.isFindInputFocused(),r=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getOption(28).seedSearchStringFromSelection&&!o,s=o||r?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r,seedSearchStringFromGlobalClipboard:t.getOption(28).seedSearchStringFromSelection,shouldFocus:s,shouldAnimate:!0,updateSearchScope:!1})}},t}(a.b);Object(a.h)(_t.ID,bt),Object(a.f)(yt),Object(a.f)(Ct),Object(a.f)(St),Object(a.f)(Ot),Object(a.f)(Lt),Object(a.f)(Dt),Object(a.f)(Nt),Object(a.f)(kt),Object(a.f)(Et);var It=a.c.bindToContribution(_t.get);Object(a.g)(new It({id:U,precondition:E,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:9,secondary:[1033]}})),Object(a.g)(new It({id:K,precondition:void 0,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:T.primary,mac:T.mac,win:T.win,linux:T.linux}})),Object(a.g)(new It({id:q,precondition:void 0,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),Object(a.g)(new It({id:G,precondition:void 0,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.g)(new It({id:Y,precondition:void 0,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),Object(a.g)(new It({id:Z,precondition:E,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:3094}})),Object(a.g)(new It({id:Z,precondition:E,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:k.a.and(u.a.focus,M),primary:3}})),Object(a.g)(new It({id:X,precondition:E,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:2563}})),Object(a.g)(new It({id:X,precondition:E,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:k.a.and(u.a.focus,M),primary:void 0,mac:{primary:2051}}})),Object(a.g)(new It({id:Q,precondition:E,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:515}}))},oiKk: @@ -2385,8 +2385,8 @@ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/browser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2402,10 +2402,10 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ @@ -2416,7 +2416,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"ModesHoverController",(function(){return ve}));n("uAX5");var i,o=n("3/fG"),r=n("/kV6"),s=n("pmY6"),a=n("sswD"),u=n("aokT"),l=n("wQH0"),c=n("WBhO"),d=n("EffR"),h=n("JQT/"),p=n("zrhQ"),f=n("eLzo"),g=n("cGHE"),m=n("tX9W"),v=n("twdY"),_=n("ZIMw"),b=n("kqbb"),y=n("MI8n"),C=function(){function e(e,t,n){this.presentationIndex=n,this._onColorFlushed=new y.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new y.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new y.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;n0,n&&i)?e:void 0;var t,n,i}),(function(e){Object(F.f)(e)}))}));return Promise.all(i).then(A.d)}Object(a.k)("_executeHoverProvider",(function(e,t){return j(e,t,h.a.None)}));var W=n("X+cX"),V=function(){function e(e,t,n,i,o){var r=this;this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new W.d((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new W.d((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new W.d((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=n,this._progressCallback=i}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(W.f)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):Object(F.e)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e}(),B=n("GJhM"),H=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),z=function(){for(var e=0,t=0,n=arguments.length;tthis._editor.getModel().getLineCount())return[];var i=b.ColorDetector.get(this._editor),o=t.getLineMaxColumn(n),r=this._editor.getLineDecorations(n),s=!1,a=this._range,l=r.map((function(r){var l=r.range.startLineNumber===n?r.range.startColumn:1,c=r.range.endLineNumber===n?r.range.endColumn:o;if(l>a.startColumn||a.endColumn>c)return null;var d=new u.a(a.startLineNumber,l,a.startLineNumber,c),h=e._markerDecorationsService.getMarker(t,r);if(h)return new oe(d,h);var p=i.getColorData(r.range.getStartPosition());if(!s&&p){s=!0;var g=p.colorInfo,m=g.color,v=g.range;return new ie(v,m,p.provider)}return Object(f.b)(r.options.hoverMessage)?null:{contents:r.options.hoverMessage?Object(A.b)(r.options.hoverMessage):[],range:d}}));return Object(A.d)(l)},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof ie?-1:t instanceof ie?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new f.a).appendText(o.a("modesContentHover.loading","Loading..."))]}},e}(),se={type:2,filter:{include:$.b.QuickFix}},ae=function(e){function t(n,i,o,r,a,u){void 0===u&&(u=Z.b);var l=e.call(this,t.ID,n)||this;return l._themeService=o,l._keybindingService=r,l._modeService=a,l._openerService=u,l.renderDisposable=l._register(new s.d),l._messages=[],l._lastRange=null,l._computer=new re(l._editor,i),l._highlightDecorations=[],l._isChangingDecorations=!1,l._shouldFocus=!1,l._colorPicker=null,l._hoverOperation=new V(l._computer,(function(e){return l._withResult(e,!0)}),null,(function(e){return l._withResult(e,!1)}),l._editor.getOption(44).delay),l._register(d.o(l.getDomNode(),d.d.FOCUS,(function(){l._colorPicker&&d.f(l.getDomNode(),"colorpicker-hover")}))),l._register(d.o(l.getDomNode(),d.d.BLUR,(function(){d.P(l.getDomNode(),"colorpicker-hover")}))),l._register(n.onDidChangeConfiguration((function(e){l._hoverOperation.setHoverTime(l._editor.getOption(44).delay)}))),l._register(v.B.onDidChange((function(e){l.isVisible&&l._lastRange&&l._messages.length>0&&(l._domNode.textContent="",l._renderMessages(l._lastRange,l._messages))}))),l}return ee(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){for(var i=[],o=0,r=this._messages.length;o=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var o=1073741824,r=n[0].range?u.a.lift(n[0].range):null,a=document.createDocumentFragment(),l=!0,c=!1,m=new s.b,v=[];if(n.forEach((function(e){if(e.range)if(o=Math.min(o,e.range.startColumn),r=r?u.a.plusRange(r,e.range):u.a.lift(e.range),e instanceof ie){c=!0;var t=e.color,n=t.red,g=t.green,b=t.blue,y=t.alpha,w=new p.c(Math.round(255*n),Math.round(255*g),Math.round(255*b),y),S=new p.a(w);if(!i._editor.hasModel())return;var O=i._editor.getModel(),L=new u.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),D={range:e.range,color:e.color},x=new C(S,[],0),N=new R(a,x,i._editor.getOption(105),i._themeService);Object(_.a)(O,D,e.provider,h.a.None).then((function(t){if(x.colorPresentations=t||[],i._editor.hasModel()){var n=i._editor.getModel().getValueInRange(e.range);x.guessColorPresentation(S,n);var o=function(){var e,t;x.presentation.textEdit?(e=[x.presentation.textEdit],t=(t=new u.a(x.presentation.textEdit.range.startLineNumber,x.presentation.textEdit.range.startColumn,x.presentation.textEdit.range.endLineNumber,x.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+x.presentation.textEdit.text.length)):(e=[{identifier:null,range:L,text:x.presentation.label,forceMoveMarkers:!1}],t=L.setEndPosition(L.endLineNumber,L.startColumn+x.presentation.label.length)),i._editor.pushUndoStop(),i._editor.executeEdits("colorpicker",e),x.presentation.additionalTextEdits&&(e=te(x.presentation.additionalTextEdits),i._editor.executeEdits("colorpicker",e),i.hide()),i._editor.pushUndoStop(),L=t},r=function(t){return Object(_.a)(O,{range:L,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},e.provider,h.a.None).then((function(e){x.colorPresentations=e||[]}))},l=x.onColorFlushed((function(e){r(e).then(o)})),c=x.onDidChangeColor(r);i._colorPicker=N,i.showAt(L.getStartPosition(),L,i._shouldFocus),i.updateContents(a),i._colorPicker.layout(),i.renderDisposable.value=Object(s.e)(l,c,N,m)}}))}else e instanceof oe?(v.push(e),l=!1):e.contents.filter((function(e){return!Object(f.b)(e)})).forEach((function(e){var t=ne("div.hover-row.markdown-hover"),n=d.q(t,ne("div.hover-contents")),o=m.add(new q.a(i._editor,i._modeService,i._openerService));m.add(o.onDidRenderCodeBlock((function(){n.className="hover-contents code-hover-contents",i.onContentsChange()})));var r=m.add(o.render(e));n.appendChild(r.element),a.appendChild(t),l=!1}))})),v.length){v.forEach((function(e){return a.appendChild(i.renderMarkerHover(e))}));var b=1===v.length?v[0]:v.sort((function(e,t){return G.c.compare(e.marker.severity,t.marker.severity)}))[0];a.appendChild(this.renderMarkerStatusbar(b))}c||l||(this.showAt(new g.a(e.startLineNumber,o),r,this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,r?[{range:r,options:t._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1},t.prototype.renderMarkerHover=function(e){var t=this,n=ne("div.hover-row"),i=d.q(n,ne("div.marker.hover-contents")),o=e.marker,r=o.source,s=o.message,a=o.code,u=o.relatedInformation;this._editor.applyFontInfo(i);var l=d.q(i,ne("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,r||a)if("string"==typeof a)(c=d.q(i,ne("span"))).style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&a?r+"("+a+")":r||"("+a+")";else if(a){var c,h=ne("span");if(r)d.q(h,ne("span")).innerText=r;this._codeLink=d.q(h,ne("a.code-link")),this._codeLink.setAttribute("href",a.link.toString()),this._codeLink.onclick=function(e){t._openerService.open(a.link),e.preventDefault(),e.stopPropagation()},d.q(this._codeLink,ne("span")).innerText=a.value,(c=d.q(i,h)).style.opacity="0.6",c.style.paddingLeft="6px"}if(Object(A.q)(u))for(var p=function(e,n,o,r){var s=d.q(i,ne("div"));s.style.marginTop="8px";var a=d.q(s,ne("a"));a.innerText=Object(Y.b)(n)+"("+o+", "+r+"): ",a.style.cursor="pointer",a.onclick=function(e){e.stopPropagation(),e.preventDefault(),t._openerService&&t._openerService.open(n.with({fragment:o+","+r}),{fromUserGesture:!0}).catch(F.e)};var u=d.q(s,ne("span"));u.innerText=e,f._editor.applyFontInfo(u)},f=this,g=0,m=u;g0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){this._renderDisposeables.clear();for(var n=document.createDocumentFragment(),i=0,o=t;i=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},me=function(e,t){return function(n,i){t(n,i,e)}},ve=function(){function e(e,t,n,i,o,r){var a=this;this._editor=e,this._openerService=t,this._modeService=n,this._markerDecorationsService=i,this._keybindingService=o,this._themeService=r,this._toUnhook=new s.b,this._contentWidget=new s.d,this._glyphWidget=new s.d,this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.hasChanged(44)&&(a._hideWidgets(),a._unhookEvents(),a._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget.value||this._createHoverWidgets(),this._contentWidget.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget.value||this._createHoverWidgets(),this._glyphWidget.value},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getOption(44);this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.add(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.add(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.add(this._editor.onMouseMove(t)),this._toUnhook.add(this._editor.onMouseLeave(t)),this._toUnhook.add(this._editor.onDidChangeModel(t)),this._toUnhook.add(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook.clear()},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;9!==t||e.target.detail!==ae.ID?12===t&&e.target.detail===ce.ID||(12!==t&&e.target.detail!==ce.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible()||this._isHoverSticky&&9===t&&e.target.detail===ae.ID||this._isHoverSticky&&12===t&&e.target.detail===ce.ID)){if(7===t){var n=this._editor.getOption(34).typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToText=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),v=function(){this.spacesDiff=0,this.looksLikeAlignment=!1};function _(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||l>0&&c>0)){var d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,_(s,a,h,g,l),!l.looksLikeAlignment||n&&t===l.spacesDiff)){var S=l.spacesDiff;S<=8&&u[S]++,s=h,a=g}}var O=n;o!==r&&(O=oD&&(D=t,L=e)})),4===L&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(L=2)}return{insertSpaces:O,tabSize:L}}function y(e){return(1&e.metadata)>>>0}function C(e,t){e.metadata=254&e.metadata|t<<0}function w(e){return(2&e.metadata)>>>1==1}function S(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function O(e){return(4&e.metadata)>>>2==1}function L(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function D(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function N(e,t){e.metadata=207&e.metadata|t<<4}function k(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var E=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,L(this,!1),N(this,1),x(this,!1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,S(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;L(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),N(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),k(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),I=new E(null,0,0);I.parent=I,I.left=I,I.right=I,C(I,0);var M=function(){function e(){this.root=I,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===I?[]:function(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=[],d=0;for(;s!==I;)if(w(s))S(s.left,!1),S(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!w(s.left)){if(a+s.maxEndn)S(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var h=!0;i&&s.ownerId&&s.ownerId!==i&&(h=!1),o&&O(s)&&(h=!1),h&&(c[d++]=s)}S(s,!0),s.right===I||w(s.right)||(a+=s.delta,s=s.right)}}return S(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===I?[]:function(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;for(;o!==I;)if(w(o))S(o.left,!1),S(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===I||w(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&O(o)&&(c=!1),c&&(u[l++]=o),S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return S(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var n=e.root,i=[],o=0;for(;n!==I;)w(n)?(S(n.left,!1),S(n.right,!1),n=n.parent):n.left===I||w(n.left)?(n.ownerId===t&&(i[o++]=n),S(n,!0),n.right===I||w(n.right)||(n=n.right)):n=n.left;return S(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,n=[],i=0;for(;t!==I;)w(t)?(S(t.left,!1),S(t.right,!1),t=t.parent):t.left===I||w(t.left)?t.right===I||w(t.right)?(n[i++]=t,S(t,!0)):t=t.right:t=t.left;return S(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){A(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){var i=e.root,o=0,r=0,s=0,a=[],u=0;for(;i!==I;)if(w(i))S(i.left,!1),S(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!w(i.left)){if(o+i.maxEndn?S(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),S(i,!0),i.right===I||w(i.right)||(o+=i.delta,i=i.right))}return S(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),S(o,!0)):(S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right))}S(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;rn)&&(1!==i&&(2===i||t))}function P(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),d=e.start,h=!1,p=e.end,f=!1;t<=d&&p<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,f=!0);var g=o?1:u>0?2:0;if(!h&&T(d,s,t,g)&&(h=!0),!f&&T(p,a,t,g)&&(f=!0),c>0&&!o){g=u>l?2:0;!h&&T(d,s,t+c,g)&&(h=!0),!f&&T(p,a,t+c,g)&&(f=!0)}g=o?1:0;!h&&T(d,s,n,g)&&(e.start=t+l,h=!0),!f&&T(p,a,n,g)&&(e.end=t+l,f=!0);var m=l-u;h||(e.start=Math.max(0,d+m)),f||(e.end=Math.max(0,p+m)),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===I)return t.parent=I,t.left=I,t.right=I,C(t,0),e.root=t,e.root;!function(e,t){var n=0,i=e.root,o=t.start,r=t.end;for(;;){if(z(o,r,i.start+n,i.end+n)<0){if(i.left===I){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===I){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=I,t.right=I,C(t,1)}(e,t),H(t.parent);for(var n=t;n!==e.root&&1===y(n.parent);){var i;if(n.parent===n.parent.parent.left)1===y(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&j(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent));else 1===y(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),j(e,n.parent.parent))}return C(e.root,0),t}function A(e,t){var n,i;if(t.left===I?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===I?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==I;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),F(),B(n),void(e.root.parent=I);var o,r=1===y(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,y(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==I&&(i.left.parent=i),i.right!==I&&(i.right.parent=i)),t.detach(),r)return H(n.parent),i!==t&&(H(i),H(i.parent)),void F();for(H(n),H(n.parent),i!==t&&(H(i),H(i.parent));n!==e.root&&0===y(n);)n===n.parent.left?(1===y(o=n.parent.right)&&(C(o,0),C(n.parent,1),j(e,n.parent),o=n.parent.right),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.right)&&(C(o.left,0),C(o,1),W(e,o),o=n.parent.right),C(o,y(n.parent)),C(n.parent,0),C(o.right,0),j(e,n.parent),n=e.root)):(1===y(o=n.parent.left)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.left),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.left)&&(C(o.right,0),C(o,1),j(e,o),o=n.parent.left),C(o,y(n.parent)),C(n.parent,0),C(o.left,0),W(e,n.parent),n=e.root));C(n,0),F()}function F(){I.parent=I,I.delta=0,I.start=0,I.end=0}function j(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==I&&(n.left.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,B(t),B(n)}function W(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==I&&(n.right.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,B(t),B(n)}function V(e){var t=e.end;if(e.left!==I){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==I){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=V(e)}function H(e){for(;e!==I;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function z(e,t,n,i){return e===n?t-i:e-n}var U=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return e.prototype.next=function(){if(this.right!==K)return q(this.right);for(var e=this;e.parent!==K&&e.parent.left!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.prev=function(){if(this.left!==K)return G(this.left);for(var e=this;e.parent!==K&&e.parent.right!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),K=new U(null,0);function q(e){for(;e.left!==K;)e=e.left;return e}function G(e){for(;e.right!==K;)e=e.right;return e}function Y(e){return e===K?0:e.size_left+e.piece.length+Y(e.right)}function Z(e){return e===K?0:e.lf_left+e.piece.lineFeedCnt+Z(e.right)}function X(){K.parent=K}function Q(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==K&&(n.left.parent=t),n.parent=t.parent,t.parent===K?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function J(e,t){var n=t.left;t.left=n.right,n.right!==K&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===K?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function $(e,t){var n,i;if(n=t.left===K?(i=t).right:t.right===K?(i=t).left:(i=q(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),X(),void(e.root.parent=K);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,ne(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,ne(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==K&&(i.left.parent=i),i.right!==K&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,ne(e,i)),t.detach(),n.parent.left===n){var r=Y(n),s=Z(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,te(e,n.parent,a,u)}}if(ne(e,n.parent),o)X();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,Q(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,J(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,Q(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,J(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,Q(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,J(e,n.parent),n=e.root));n.color=0,X()}}function ee(e,t){for(ne(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Q(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,J(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&J(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Q(e,t.parent.parent))}e.root.color=0}function te(e,t,n,i){for(;t!==e.root&&t!==K;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function ne(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=Y((t=t.parent).left)-t.size_left,i=Z(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}K.parent=K,K.left=K,K.right=K,K.color=0;var ie=n("jAJ/");function oe(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var re=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function se(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s0){e[o].lineStarts||(e[o].lineStarts=se(e[o].buffer));var s=new ue(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new ce(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new le(a,se(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==K;)if(i.left!==K&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==K;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}return new l.a(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===K){r=i-e-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}t=t.right}return new l.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==K;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){var e=this,t=[],n=0,i="",o=!1;return this.iterate(this.root,(function(r){if(r===K)return!0;var s=r.piece,a=s.length;if(0===a)return!0;var u=e._buffers[s.bufferIndex].buffer,l=e._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line,h=l[c]+s.start.column;if(o&&(10===u.charCodeAt(h)&&(h++,a--),t[n++]=i,i="",o=!1,0===a))return!0;if(c===d)return e._EOLNormalized||13!==u.charCodeAt(h+a-1)?i+=u.substr(h,a):(o=!0,i+=u.substr(h,a-1)),!0;i+=e._EOLNormalized?u.substring(h,Math.max(h,l[c+1]-e._EOLLength)):u.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;for(var p=c+1;p=_)return l;this.positionInBuffer(e,f(h.index)-m,b);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,b),C=b.line===o.line?b.column-o.column+i:b.column+1,w=C+h[0].length;if(d[l++]=Object(ie.d)(new c.a(n+y,C,n+y,w),h,a),f(h.index)+h[0].length>=_)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ie.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var d=e.startLineNumber,h=a.node;h!==u.node;){var p=this.getLineFeedCnt(h.piece.bufferIndex,l,h.piece.end);if(p>=1){var f=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=f[l.line+p],v=d===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(h,s,d,v,l,this.positionInBuffer(h,m-g),t,n,i,r,o))>=i)return o;d+=p}var _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var b=this.getLineContent(d).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(_),d,_,r,o,n,i))>=i)return o;d++,h=(a=this.nodeAt2(d,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){var y=d===e.startLineNumber?e.startColumn-1:0;b=this.getLineContent(d).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}var C=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,d,C,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,d=e.wordSeparators;if(!a&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,m=-f;-1!==(m=n.indexOf(p,m+f));)if((!d||Object(ie.e)(d,n,g,m,f))&&(s[r++]=new h.b(new c.a(i,m+1+o,i,m+1+f+o),null),r>=u))return r;return r}t.reset(0);do{if((l=t.next(n))&&(s[r++]=Object(ie.d)(new c.a(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r}while(l);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==K){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],d=new ue(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(o,r)){var h={line:d.start.line+1,column:0};d=new ue(d.bufferIndex,h,d.end,this.getLineFeedCnt(d.bufferIndex,h,d.end),d.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var p=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,p),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var f=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=c))break;a=l+1}return n?(n.line=l,n.column=s-d,null):{line:l,column:s-d}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var o=se(i);t.push(new ue(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new le(i,o))}var r=se(e);return t.push(new ue(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new le(e,r)),t}var s=this._buffers[0].buffer.length,a=se(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t)}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==K;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new ue(n.bufferIndex,n.start,r,a,c),te(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new ue(n.bufferIndex,r,n.end,s,l),te(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new ue(i.bufferIndex,i.start,u,l,c),te(this,e,c-s,l-a);var d=new ue(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=se(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==K;)if(n.left!==K&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===K||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==K&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new ue(e.piece.bufferIndex,e.piece.start,n,s,r),te(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ue(t.piece.bufferIndex,a,t.piece.end,l,u),te(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var d=0;d0){v.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];u=0;for(var O=v.length;u0&&v[u-1].lineNumber===b)){var L=v[u].oldContent,D=this.getLineContent(b);0!==D.length&&D!==L&&-1===s.q(D)&&S.push(b)}}}return new h.a(C,w,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new c.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u0){var h=a.lines.length,p=a.lines[0],f=a.lines[h-1];d=1===h?new c.a(u,l,u,l+p.length):new c.a(u,l,u+h-1,f.length+1)}else d=new c.a(u,l,u,l);n=d.endLineNumber,i=d.endColumn,t.push(d),o=a}return t},e._sortOpsAscending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),pe=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new re(oe(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new le(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.i(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new pe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=se(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),ge=function(){this.changeType=1},me=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},ve=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_e=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},be=function(){this.changeType=5},ye=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=[],o=0;o=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new l.a(e.startLineNumber,e.startColumn),t)},e.prototype._acceptDeleteRange=function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)},e}(),Ie=function(e){function t(t){var n=e.call(this)||this;return n._isDisposed=!1,n._textModel=t,n._tokenizationStateStore=new Ee,n._tokenizationSupport=null,n._register(Oe.B.onDidChange((function(e){var t=n._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(n._resetTokenizationState(),n._textModel.clearTokens())}))),n._register(n._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&n._resetTokenizationState()}))),n._register(n._textModel.onDidChangeContentFast((function(e){for(var t=0,i=e.changes.length;t1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)},t.prototype.tokenizeViewport=function(e,t){var n=new xe.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)},t.prototype.reset=function(){this._resetTokenizationState(),this._textModel.clearTokens()},t.prototype.forceTokenization=function(e){var t=new xe.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)},t.prototype.isCheapToTokenize=function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&s>=1;s--){var a=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==a&&a=0;s--){l=(h=Me(u,this._tokenizationSupport,o[s],l)).endState}for(var c=t;c<=n;c++){var d=this._textModel.getLineContent(c),h=Me(u,this._tokenizationSupport,d,l);e.add(c,h.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=h.endState}}},t}(r.a);function Me(e,t,n,o){var r=null;if(t)try{r=t.tokenize2(n,o.clone(),0)}catch(e){Object(i.e)(e)}return r||(r=Object(Le.e)(e.id,n,o,0)),Se.a.convertToEndOffset(r.tokens,n.length),r}var Te=n("0JNc"),Pe=n("cMvZ"),Re=n("BFtn"),Ae=n("EIAu"),Fe=n("746U"),je=n("zrhQ"),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Ve(e){var t=new fe;return t.acceptChunk(e),t.finish()}function Be(e,t){return("string"==typeof e?Ve(e):e).create(t)}var He=0,ze=function(){throw new Error("Invalid change accessor")},Ue=function(e){function t(n,i,r,u){void 0===u&&(u=null);var l=e.call(this)||this;l._onWillDispose=l._register(new o.a),l.onWillDispose=l._onWillDispose.event,l._onDidChangeDecorations=l._register(new $e),l.onDidChangeDecorations=l._onDidChangeDecorations.event,l._onDidChangeLanguage=l._register(new o.a),l.onDidChangeLanguage=l._onDidChangeLanguage.event,l._onDidChangeLanguageConfiguration=l._register(new o.a),l.onDidChangeLanguageConfiguration=l._onDidChangeLanguageConfiguration.event,l._onDidChangeTokens=l._register(new o.a),l.onDidChangeTokens=l._onDidChangeTokens.event,l._onDidChangeOptions=l._register(new o.a),l.onDidChangeOptions=l._onDidChangeOptions.event,l._onDidChangeAttached=l._register(new o.a),l.onDidChangeAttached=l._onDidChangeAttached.event,l._eventEmitter=l._register(new et),He++,l.id="$model"+He,l.isForSimpleWidget=i.isForSimpleWidget,l._associatedResource=null==u?a.a.parse("inmemory://model/"+He):u,l._attachedEditorCount=0,l._buffer=Be(n,i.defaultEOL),l._options=t.resolveOptions(l._buffer,i);var d=l._buffer.getLineCount(),h=l._buffer.getValueLengthInRange(new c.a(1,1,d,l._buffer.getLineLength(d)+1),0);return i.largeFileOptimizations?l._isTooLargeForTokenization=h>t.LARGE_FILE_SIZE_THRESHOLD||d>t.LARGE_FILE_LINE_COUNT_THRESHOLD:l._isTooLargeForTokenization=!1,l._isTooLargeForSyncing=h>t.MODEL_SYNC_LIMIT,l._versionId=1,l._alternativeVersionId=1,l._isDisposed=!1,l._isDisposing=!1,l._languageIdentifier=r||Le.a,l._languageRegistryListener=Pe.a.onDidChange((function(e){e.languageIdentifier.id===l._languageIdentifier.id&&l._onDidChangeLanguageConfiguration.fire({})})),l._instanceId=s.M(He),l._lastDecorationId=0,l._decorations=Object.create(null),l._decorationsTree=new Ke,l._commandManager=new m(l),l._isUndoing=!1,l._isRedoing=!1,l._trimAutoWhitespaceLines=null,l._tokens=new xe.d,l._tokens2=new xe.e,l._tokenization=new Ie(l),l}return We(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=b(e,t.tabSize,t.insertSpaces);return new h.e({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.e({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new Ce(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Be(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Ke,this._commandManager=new m(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ye([new ge],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ye([new be],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.getFormattingOptions=function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new h.e({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=b(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else{if(t=0|o,r<=1)n=1;else n=r>=(h=this.getLineMaxColumn(t))?h:0|r}var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var h;if(s=0|u,l<=1)a=1;else a=l>=(h=this.getLineMaxColumn(s))?h:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof c.a&&!(e instanceof d.a)?e:new c.a(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var i=this._buffer.getLineCharCode(e,t-2);if(s.z(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new l.a(1,1);if(i>r)return new l.a(r,this.getLineMaxColumn(r));if(o<=1)return new l.a(i,1);var a=this.getLineMaxColumn(i);if(o>=a)return new l.a(i,a);if(1===n){var u=this._buffer.getLineCharCode(i,o-2);if(s.z(u))return new l.a(i,o-1)}return new l.a(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof l.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){var a=i>1?this._buffer.getLineCharCode(n,i-2):0,u=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,l=s.z(a),c=s.z(u);return!l&&!c}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof c.a&&!(e instanceof d.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,o=t.column,r=n.lineNumber,a=n.column,u=o>1?this._buffer.getLineCharCode(i,o-2):0,l=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,h=s.z(u),p=s.z(l);return h||p?i===r&&o===a?new c.a(i,o-1,r,a-1):h&&p?new c.a(i,o-1,r,a+1):h?new c.a(i,o-1,r,a):new c.a(i,o,r,a+1):new c.a(i,o,r,a)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new c.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=c.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ie.a(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ie.c.findMatches(this,new ie.a(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ie.a(e,n,i,o).parseSearchRequest();if(!a)return null;var u=this.getLineCount(),l=new c.a(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),d=this.findMatchesLineByLine(l,a,r,1);return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r),d.length>0?d[0]:(l=new c.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(l,a,r,1)).length>0?d[0]:null)}return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ie.c.findPreviousMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,f=u.startLineNumber>_.endLineNumber;if(!p&&!f){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new c.a(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._applyEdits=function(e){for(var t=0,n=e.length;t0?l.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var f=l.range.startLineNumber,g=l.range.endLineNumber,m=g-f,v=d,_=Math.min(m,v),b=v-m,y=_;y>=0;y--){var C=f+y,w=r-u-b+C;a.push(new me(C,this.getLineContent(w)))}if(_this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.a(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;tthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t)},t.prototype.setTokens=function(e){if(0!==e.length){for(var t=[],n=0,i=e.length;nthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)},t.prototype.isCheapToTokenize=function(e){return this._tokenization.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this.validatePosition(new l.a(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],p=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o=0;u--){var l=n.getEndOffset(u);if(l<=a)break;Object(Re.b)(n.getStandardTokenType(u))&&(a=l)}for(var c=Math.min(o.length,e.column-1+s.maxBracketLength),d=null;;){if(!(m=Ae.a.findNextBracketInRange(s.forwardRegex,t,o,a,c)))break;if(m.startColumn<=e.column&&e.column<=m.endColumn){var h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();(v=this._matchFoundBracket(m,s.textIsBracket[h],s.textIsOpenBracket[h]))&&(d=v)}a=m.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){var p=r-1,f=Pe.a.getBracketsSupport(n.getLanguageId(p));if(f&&!Object(Re.b)(n.getStandardTokenType(p))){for(a=Math.max(0,e.column-1-f.maxBracketLength),c=Math.min(o.length,e.column-1+f.maxBracketLength),u=p+1;u=c)break;Object(Re.b)(n.getStandardTokenType(u))&&(c=g)}var m;if((m=Ae.a.findPrevBracketInRange(f.reversedRegex,t,o,a,c))&&m.startColumn<=e.column&&e.column<=m.endColumn){var v;h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(v=this._matchFoundBracket(m,f.textIsBracket[h],f.textIsOpenBracket[h]))return v}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=function(t,n,r,s){for(;;){var a=Ae.a.findPrevBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;s=a.startColumn-1}return null},s=t.lineNumber;s>=1;s--){var a=this._getLineTokens(s),u=a.getCount(),l=this._buffer.getLineContent(s),c=u-1,d=l.length,h=l.length;s===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1);for(var p=!0;c>=0;c--){var f,g=a.getLanguageId(c)===n&&!Object(Re.b)(a.getStandardTokenType(c));if(g)p?d=a.getStartOffset(c):(d=a.getStartOffset(c),h=a.getEndOffset(c));else if(p&&d!==h)if(f=r(s,l,d,h))return f;p=g}if(p&&d!==h)if(f=r(s,l,d,h))return f}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=function(t,n,r,s){for(;;){var a=Ae.a.findNextBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;r=a.endColumn-1}return null},s=this.getLineCount(),a=t.lineNumber;a<=s;a++){var u=this._getLineTokens(a),l=u.getCount(),c=this._buffer.getLineContent(a),d=0,h=0,p=0;a===t.lineNumber&&(d=u.findTokenIndexAtOffset(t.column-1),h=t.column-1,p=t.column-1);for(var f=!0;d=1;o--){var r=this._getLineTokens(o),s=r.getCount(),a=this._buffer.getLineContent(o),u=s-1,l=a.length,c=a.length;if(o===t.lineNumber)u=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1,n!==(h=r.getLanguageId(u))&&(n=h,i=Pe.a.getBracketsSupport(n));for(var d=!0;u>=0;u--){var h;if(n!==(h=r.getLanguageId(u))){if(i&&d&&l!==c){if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=!1}n=h,i=Pe.a.getBracketsSupport(n)}var p,f=!!i&&!Object(Re.b)(r.getStandardTokenType(u));if(f)d?l=r.getStartOffset(u):(l=r.getStartOffset(u),c=r.getEndOffset(u));else if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=f}if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p)}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),i=-1,o=null,r=t.lineNumber;r<=n;r++){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=0,c=0,d=0;if(r===t.lineNumber)l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1,i!==(p=s.getLanguageId(l))&&(i=p,o=Pe.a.getBracketsSupport(i));for(var h=!0;lt)return null;var p=this._getLineTokens(h),f=p.getCount(),g=this._buffer.getLineContent(h),m=0,v=0,_=0;if(h===i.lineNumber)m=p.findTokenIndexAtOffset(i.column-1),v=i.column-1,_=i.column-1,l!==(y=p.getLanguageId(m))&&a(l=y,c=Pe.a.getBracketsSupport(l));for(var b=!0;mo)throw new Error("Illegal value for lineNumber");for(var r=Pe.a.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(t=e;t=0){l=t,c=r;break}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){h=t,p=n;break}}}if(-1!==f&&(-2===f||f=0){f=t,g=r;break}}}},v=0,_=!0,b=0,y=!0,C=0,w=0;_||y;w++){var S=e-w,O=e+w;if(0!==w&&(S<1||So||O>n)&&(y=!1),w>5e4&&(_=!1,y=!1),_){var L=void 0;if((D=this._computeIndentLevel(S-1))>=0?(l=S-1,c=D,L=Math.ceil(D/this._options.indentSize)):(d(S),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(v=S,b=O,0===(C=L))return{startLineNumber:v,endLineNumber:b,indent:C};continue}L>=C?v=S:_=!1}if(y){var D,x=void 0;(D=this._computeIndentLevel(O-1))>=0?(h=O-1,p=D,x=Math.ceil(D/this._options.indentSize)):(m(O),x=this._getIndentLevelForWhitespaceLine(s,p,g)),x>=C?b=O:y=!1}}return{startLineNumber:v,endLineNumber:b,indent:C}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=Pe.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(var p=c-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==u&&(-2===u||u=0){u=p,l=f;break}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(r.a)},tXSY: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return Ue})),n.d(t,"a",(function(){return Xe}));var i=n("/cxE"),o=n("MI8n"),r=n("pmY6"),s=n("N0LK"),a=n("bY76"),u=n("/UlZ"),l=n("cGHE"),c=n("aokT"),d=n("gCVg"),h=n("M1Kb"),p=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),v=function(){this.spacesDiff=0,this.looksLikeAlignment=!1};function _(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||l>0&&c>0)){var d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,_(s,a,h,g,l),!l.looksLikeAlignment||n&&t===l.spacesDiff)){var S=l.spacesDiff;S<=8&&u[S]++,s=h,a=g}}var O=n;o!==r&&(O=oD&&(D=t,L=e)})),4===L&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(L=2)}return{insertSpaces:O,tabSize:L}}function y(e){return(1&e.metadata)>>>0}function C(e,t){e.metadata=254&e.metadata|t<<0}function w(e){return(2&e.metadata)>>>1==1}function S(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function O(e){return(4&e.metadata)>>>2==1}function L(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function D(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function N(e,t){e.metadata=207&e.metadata|t<<4}function k(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var E=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,L(this,!1),N(this,1),x(this,!1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,S(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;L(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),N(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),k(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),I=new E(null,0,0);I.parent=I,I.left=I,I.right=I,C(I,0);var M=function(){function e(){this.root=I,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===I?[]:function(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=[],d=0;for(;s!==I;)if(w(s))S(s.left,!1),S(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!w(s.left)){if(a+s.maxEndn)S(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var h=!0;i&&s.ownerId&&s.ownerId!==i&&(h=!1),o&&O(s)&&(h=!1),h&&(c[d++]=s)}S(s,!0),s.right===I||w(s.right)||(a+=s.delta,s=s.right)}}return S(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===I?[]:function(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;for(;o!==I;)if(w(o))S(o.left,!1),S(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===I||w(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&O(o)&&(c=!1),c&&(u[l++]=o),S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return S(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var n=e.root,i=[],o=0;for(;n!==I;)w(n)?(S(n.left,!1),S(n.right,!1),n=n.parent):n.left===I||w(n.left)?(n.ownerId===t&&(i[o++]=n),S(n,!0),n.right===I||w(n.right)||(n=n.right)):n=n.left;return S(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,n=[],i=0;for(;t!==I;)w(t)?(S(t.left,!1),S(t.right,!1),t=t.parent):t.left===I||w(t.left)?t.right===I||w(t.right)?(n[i++]=t,S(t,!0)):t=t.right:t=t.left;return S(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){A(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){var i=e.root,o=0,r=0,s=0,a=[],u=0;for(;i!==I;)if(w(i))S(i.left,!1),S(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!w(i.left)){if(o+i.maxEndn?S(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),S(i,!0),i.right===I||w(i.right)||(o+=i.delta,i=i.right))}return S(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),S(o,!0)):(S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right))}S(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;rn)&&(1!==i&&(2===i||t))}function P(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),d=e.start,h=!1,p=e.end,f=!1;t<=d&&p<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,f=!0);var g=o?1:u>0?2:0;if(!h&&T(d,s,t,g)&&(h=!0),!f&&T(p,a,t,g)&&(f=!0),c>0&&!o){g=u>l?2:0;!h&&T(d,s,t+c,g)&&(h=!0),!f&&T(p,a,t+c,g)&&(f=!0)}g=o?1:0;!h&&T(d,s,n,g)&&(e.start=t+l,h=!0),!f&&T(p,a,n,g)&&(e.end=t+l,f=!0);var m=l-u;h||(e.start=Math.max(0,d+m)),f||(e.end=Math.max(0,p+m)),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===I)return t.parent=I,t.left=I,t.right=I,C(t,0),e.root=t,e.root;!function(e,t){var n=0,i=e.root,o=t.start,r=t.end;for(;;){if(z(o,r,i.start+n,i.end+n)<0){if(i.left===I){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===I){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=I,t.right=I,C(t,1)}(e,t),H(t.parent);for(var n=t;n!==e.root&&1===y(n.parent);){var i;if(n.parent===n.parent.parent.left)1===y(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&j(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent));else 1===y(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),j(e,n.parent.parent))}return C(e.root,0),t}function A(e,t){var n,i;if(t.left===I?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===I?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==I;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),F(),B(n),void(e.root.parent=I);var o,r=1===y(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,y(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==I&&(i.left.parent=i),i.right!==I&&(i.right.parent=i)),t.detach(),r)return H(n.parent),i!==t&&(H(i),H(i.parent)),void F();for(H(n),H(n.parent),i!==t&&(H(i),H(i.parent));n!==e.root&&0===y(n);)n===n.parent.left?(1===y(o=n.parent.right)&&(C(o,0),C(n.parent,1),j(e,n.parent),o=n.parent.right),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.right)&&(C(o.left,0),C(o,1),W(e,o),o=n.parent.right),C(o,y(n.parent)),C(n.parent,0),C(o.right,0),j(e,n.parent),n=e.root)):(1===y(o=n.parent.left)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.left),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.left)&&(C(o.right,0),C(o,1),j(e,o),o=n.parent.left),C(o,y(n.parent)),C(n.parent,0),C(o.left,0),W(e,n.parent),n=e.root));C(n,0),F()}function F(){I.parent=I,I.delta=0,I.start=0,I.end=0}function j(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==I&&(n.left.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,B(t),B(n)}function W(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==I&&(n.right.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,B(t),B(n)}function V(e){var t=e.end;if(e.left!==I){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==I){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=V(e)}function H(e){for(;e!==I;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function z(e,t,n,i){return e===n?t-i:e-n}var U=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return e.prototype.next=function(){if(this.right!==K)return q(this.right);for(var e=this;e.parent!==K&&e.parent.left!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.prev=function(){if(this.left!==K)return G(this.left);for(var e=this;e.parent!==K&&e.parent.right!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),K=new U(null,0);function q(e){for(;e.left!==K;)e=e.left;return e}function G(e){for(;e.right!==K;)e=e.right;return e}function Y(e){return e===K?0:e.size_left+e.piece.length+Y(e.right)}function Z(e){return e===K?0:e.lf_left+e.piece.lineFeedCnt+Z(e.right)}function X(){K.parent=K}function Q(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==K&&(n.left.parent=t),n.parent=t.parent,t.parent===K?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function J(e,t){var n=t.left;t.left=n.right,n.right!==K&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===K?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function $(e,t){var n,i;if(n=t.left===K?(i=t).right:t.right===K?(i=t).left:(i=q(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),X(),void(e.root.parent=K);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,ne(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,ne(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==K&&(i.left.parent=i),i.right!==K&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,ne(e,i)),t.detach(),n.parent.left===n){var r=Y(n),s=Z(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,te(e,n.parent,a,u)}}if(ne(e,n.parent),o)X();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,Q(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,J(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,Q(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,J(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,Q(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,J(e,n.parent),n=e.root));n.color=0,X()}}function ee(e,t){for(ne(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Q(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,J(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&J(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Q(e,t.parent.parent))}e.root.color=0}function te(e,t,n,i){for(;t!==e.root&&t!==K;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function ne(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=Y((t=t.parent).left)-t.size_left,i=Z(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}K.parent=K,K.left=K,K.right=K,K.color=0;var ie=n("jAJ/");function oe(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var re=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function se(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s0){e[o].lineStarts||(e[o].lineStarts=se(e[o].buffer));var s=new ue(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new ce(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new le(a,se(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==K;)if(i.left!==K&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==K;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}return new l.a(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===K){r=i-e-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}t=t.right}return new l.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==K;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){var e=this,t=[],n=0,i="",o=!1;return this.iterate(this.root,(function(r){if(r===K)return!0;var s=r.piece,a=s.length;if(0===a)return!0;var u=e._buffers[s.bufferIndex].buffer,l=e._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line,h=l[c]+s.start.column;if(o&&(10===u.charCodeAt(h)&&(h++,a--),t[n++]=i,i="",o=!1,0===a))return!0;if(c===d)return e._EOLNormalized||13!==u.charCodeAt(h+a-1)?i+=u.substr(h,a):(o=!0,i+=u.substr(h,a-1)),!0;i+=e._EOLNormalized?u.substring(h,Math.max(h,l[c+1]-e._EOLLength)):u.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;for(var p=c+1;p=_)return l;this.positionInBuffer(e,f(h.index)-m,b);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,b),C=b.line===o.line?b.column-o.column+i:b.column+1,w=C+h[0].length;if(d[l++]=Object(ie.d)(new c.a(n+y,C,n+y,w),h,a),f(h.index)+h[0].length>=_)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ie.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var d=e.startLineNumber,h=a.node;h!==u.node;){var p=this.getLineFeedCnt(h.piece.bufferIndex,l,h.piece.end);if(p>=1){var f=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=f[l.line+p],v=d===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(h,s,d,v,l,this.positionInBuffer(h,m-g),t,n,i,r,o))>=i)return o;d+=p}var _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var b=this.getLineContent(d).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(_),d,_,r,o,n,i))>=i)return o;d++,h=(a=this.nodeAt2(d,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){var y=d===e.startLineNumber?e.startColumn-1:0;b=this.getLineContent(d).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}var C=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,d,C,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,d=e.wordSeparators;if(!a&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,m=-f;-1!==(m=n.indexOf(p,m+f));)if((!d||Object(ie.e)(d,n,g,m,f))&&(s[r++]=new h.b(new c.a(i,m+1+o,i,m+1+f+o),null),r>=u))return r;return r}t.reset(0);do{if((l=t.next(n))&&(s[r++]=Object(ie.d)(new c.a(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r}while(l);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==K){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],d=new ue(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(o,r)){var h={line:d.start.line+1,column:0};d=new ue(d.bufferIndex,h,d.end,this.getLineFeedCnt(d.bufferIndex,h,d.end),d.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var p=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,p),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var f=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=c))break;a=l+1}return n?(n.line=l,n.column=s-d,null):{line:l,column:s-d}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var o=se(i);t.push(new ue(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new le(i,o))}var r=se(e);return t.push(new ue(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new le(e,r)),t}var s=this._buffers[0].buffer.length,a=se(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t)}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==K;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new ue(n.bufferIndex,n.start,r,a,c),te(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new ue(n.bufferIndex,r,n.end,s,l),te(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new ue(i.bufferIndex,i.start,u,l,c),te(this,e,c-s,l-a);var d=new ue(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=se(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==K;)if(n.left!==K&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===K||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==K&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new ue(e.piece.bufferIndex,e.piece.start,n,s,r),te(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ue(t.piece.bufferIndex,a,t.piece.end,l,u),te(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var d=0;d0){v.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];u=0;for(var O=v.length;u0&&v[u-1].lineNumber===b)){var L=v[u].oldContent,D=this.getLineContent(b);0!==D.length&&D!==L&&-1===s.q(D)&&S.push(b)}}}return new h.a(C,w,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new c.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u0){var h=a.lines.length,p=a.lines[0],f=a.lines[h-1];d=1===h?new c.a(u,l,u,l+p.length):new c.a(u,l,u+h-1,f.length+1)}else d=new c.a(u,l,u,l);n=d.endLineNumber,i=d.endColumn,t.push(d),o=a}return t},e._sortOpsAscending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),pe=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new re(oe(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new le(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.i(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new pe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=se(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),ge=function(){this.changeType=1},me=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},ve=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_e=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},be=function(){this.changeType=5},ye=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=[],o=0;o=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new l.a(e.startLineNumber,e.startColumn),t)},e.prototype._acceptDeleteRange=function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)},e}(),Ie=function(e){function t(t){var n=e.call(this)||this;return n._isDisposed=!1,n._textModel=t,n._tokenizationStateStore=new Ee,n._tokenizationSupport=null,n._register(Oe.B.onDidChange((function(e){var t=n._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(n._resetTokenizationState(),n._textModel.clearTokens())}))),n._register(n._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&n._resetTokenizationState()}))),n._register(n._textModel.onDidChangeContentFast((function(e){for(var t=0,i=e.changes.length;t1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)},t.prototype.tokenizeViewport=function(e,t){var n=new xe.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)},t.prototype.reset=function(){this._resetTokenizationState(),this._textModel.clearTokens()},t.prototype.forceTokenization=function(e){var t=new xe.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)},t.prototype.isCheapToTokenize=function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&s>=1;s--){var a=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==a&&a=0;s--){l=(h=Me(u,this._tokenizationSupport,o[s],l)).endState}for(var c=t;c<=n;c++){var d=this._textModel.getLineContent(c),h=Me(u,this._tokenizationSupport,d,l);e.add(c,h.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=h.endState}}},t}(r.a);function Me(e,t,n,o){var r=null;if(t)try{r=t.tokenize2(n,o.clone(),0)}catch(e){Object(i.e)(e)}return r||(r=Object(Le.e)(e.id,n,o,0)),Se.a.convertToEndOffset(r.tokens,n.length),r}var Te=n("0JNc"),Pe=n("cMvZ"),Re=n("BFtn"),Ae=n("EIAu"),Fe=n("746U"),je=n("zrhQ"),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Ve(e){var t=new fe;return t.acceptChunk(e),t.finish()}function Be(e,t){return("string"==typeof e?Ve(e):e).create(t)}var He=0,ze=function(){throw new Error("Invalid change accessor")},Ue=function(e){function t(n,i,r,u){void 0===u&&(u=null);var l=e.call(this)||this;l._onWillDispose=l._register(new o.a),l.onWillDispose=l._onWillDispose.event,l._onDidChangeDecorations=l._register(new $e),l.onDidChangeDecorations=l._onDidChangeDecorations.event,l._onDidChangeLanguage=l._register(new o.a),l.onDidChangeLanguage=l._onDidChangeLanguage.event,l._onDidChangeLanguageConfiguration=l._register(new o.a),l.onDidChangeLanguageConfiguration=l._onDidChangeLanguageConfiguration.event,l._onDidChangeTokens=l._register(new o.a),l.onDidChangeTokens=l._onDidChangeTokens.event,l._onDidChangeOptions=l._register(new o.a),l.onDidChangeOptions=l._onDidChangeOptions.event,l._onDidChangeAttached=l._register(new o.a),l.onDidChangeAttached=l._onDidChangeAttached.event,l._eventEmitter=l._register(new et),He++,l.id="$model"+He,l.isForSimpleWidget=i.isForSimpleWidget,l._associatedResource=null==u?a.a.parse("inmemory://model/"+He):u,l._attachedEditorCount=0,l._buffer=Be(n,i.defaultEOL),l._options=t.resolveOptions(l._buffer,i);var d=l._buffer.getLineCount(),h=l._buffer.getValueLengthInRange(new c.a(1,1,d,l._buffer.getLineLength(d)+1),0);return i.largeFileOptimizations?l._isTooLargeForTokenization=h>t.LARGE_FILE_SIZE_THRESHOLD||d>t.LARGE_FILE_LINE_COUNT_THRESHOLD:l._isTooLargeForTokenization=!1,l._isTooLargeForSyncing=h>t.MODEL_SYNC_LIMIT,l._versionId=1,l._alternativeVersionId=1,l._isDisposed=!1,l._isDisposing=!1,l._languageIdentifier=r||Le.a,l._languageRegistryListener=Pe.a.onDidChange((function(e){e.languageIdentifier.id===l._languageIdentifier.id&&l._onDidChangeLanguageConfiguration.fire({})})),l._instanceId=s.M(He),l._lastDecorationId=0,l._decorations=Object.create(null),l._decorationsTree=new Ke,l._commandManager=new m(l),l._isUndoing=!1,l._isRedoing=!1,l._trimAutoWhitespaceLines=null,l._tokens=new xe.d,l._tokens2=new xe.e,l._tokenization=new Ie(l),l}return We(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=b(e,t.tabSize,t.insertSpaces);return new h.e({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.e({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new Ce(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Be(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Ke,this._commandManager=new m(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ye([new ge],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ye([new be],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.getFormattingOptions=function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new h.e({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=b(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else{if(t=0|o,r<=1)n=1;else n=r>=(h=this.getLineMaxColumn(t))?h:0|r}var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var h;if(s=0|u,l<=1)a=1;else a=l>=(h=this.getLineMaxColumn(s))?h:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof c.a&&!(e instanceof d.a)?e:new c.a(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var i=this._buffer.getLineCharCode(e,t-2);if(s.z(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new l.a(1,1);if(i>r)return new l.a(r,this.getLineMaxColumn(r));if(o<=1)return new l.a(i,1);var a=this.getLineMaxColumn(i);if(o>=a)return new l.a(i,a);if(1===n){var u=this._buffer.getLineCharCode(i,o-2);if(s.z(u))return new l.a(i,o-1)}return new l.a(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof l.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){var a=i>1?this._buffer.getLineCharCode(n,i-2):0,u=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,l=s.z(a),c=s.z(u);return!l&&!c}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof c.a&&!(e instanceof d.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,o=t.column,r=n.lineNumber,a=n.column,u=o>1?this._buffer.getLineCharCode(i,o-2):0,l=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,h=s.z(u),p=s.z(l);return h||p?i===r&&o===a?new c.a(i,o-1,r,a-1):h&&p?new c.a(i,o-1,r,a+1):h?new c.a(i,o-1,r,a):new c.a(i,o,r,a+1):new c.a(i,o,r,a)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new c.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=c.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ie.a(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ie.c.findMatches(this,new ie.a(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ie.a(e,n,i,o).parseSearchRequest();if(!a)return null;var u=this.getLineCount(),l=new c.a(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),d=this.findMatchesLineByLine(l,a,r,1);return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r),d.length>0?d[0]:(l=new c.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(l,a,r,1)).length>0?d[0]:null)}return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ie.c.findPreviousMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,f=u.startLineNumber>_.endLineNumber;if(!p&&!f){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new c.a(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._applyEdits=function(e){for(var t=0,n=e.length;t0?l.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var f=l.range.startLineNumber,g=l.range.endLineNumber,m=g-f,v=d,_=Math.min(m,v),b=v-m,y=_;y>=0;y--){var C=f+y,w=r-u-b+C;a.push(new me(C,this.getLineContent(w)))}if(_this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.a(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;tthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t)},t.prototype.setTokens=function(e){if(0!==e.length){for(var t=[],n=0,i=e.length;nthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)},t.prototype.isCheapToTokenize=function(e){return this._tokenization.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this.validatePosition(new l.a(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],p=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o=0;u--){var l=n.getEndOffset(u);if(l<=a)break;Object(Re.b)(n.getStandardTokenType(u))&&(a=l)}for(var c=Math.min(o.length,e.column-1+s.maxBracketLength),d=null;;){if(!(m=Ae.a.findNextBracketInRange(s.forwardRegex,t,o,a,c)))break;if(m.startColumn<=e.column&&e.column<=m.endColumn){var h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();(v=this._matchFoundBracket(m,s.textIsBracket[h],s.textIsOpenBracket[h]))&&(d=v)}a=m.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){var p=r-1,f=Pe.a.getBracketsSupport(n.getLanguageId(p));if(f&&!Object(Re.b)(n.getStandardTokenType(p))){for(a=Math.max(0,e.column-1-f.maxBracketLength),c=Math.min(o.length,e.column-1+f.maxBracketLength),u=p+1;u=c)break;Object(Re.b)(n.getStandardTokenType(u))&&(c=g)}var m;if((m=Ae.a.findPrevBracketInRange(f.reversedRegex,t,o,a,c))&&m.startColumn<=e.column&&e.column<=m.endColumn){var v;h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(v=this._matchFoundBracket(m,f.textIsBracket[h],f.textIsOpenBracket[h]))return v}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=function(t,n,r,s){for(;;){var a=Ae.a.findPrevBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;s=a.startColumn-1}return null},s=t.lineNumber;s>=1;s--){var a=this._getLineTokens(s),u=a.getCount(),l=this._buffer.getLineContent(s),c=u-1,d=l.length,h=l.length;s===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1);for(var p=!0;c>=0;c--){var f,g=a.getLanguageId(c)===n&&!Object(Re.b)(a.getStandardTokenType(c));if(g)p?d=a.getStartOffset(c):(d=a.getStartOffset(c),h=a.getEndOffset(c));else if(p&&d!==h)if(f=r(s,l,d,h))return f;p=g}if(p&&d!==h)if(f=r(s,l,d,h))return f}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=function(t,n,r,s){for(;;){var a=Ae.a.findNextBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;r=a.endColumn-1}return null},s=this.getLineCount(),a=t.lineNumber;a<=s;a++){var u=this._getLineTokens(a),l=u.getCount(),c=this._buffer.getLineContent(a),d=0,h=0,p=0;a===t.lineNumber&&(d=u.findTokenIndexAtOffset(t.column-1),h=t.column-1,p=t.column-1);for(var f=!0;d=1;o--){var r=this._getLineTokens(o),s=r.getCount(),a=this._buffer.getLineContent(o),u=s-1,l=a.length,c=a.length;if(o===t.lineNumber)u=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1,n!==(h=r.getLanguageId(u))&&(n=h,i=Pe.a.getBracketsSupport(n));for(var d=!0;u>=0;u--){var h;if(n!==(h=r.getLanguageId(u))){if(i&&d&&l!==c){if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=!1}n=h,i=Pe.a.getBracketsSupport(n)}var p,f=!!i&&!Object(Re.b)(r.getStandardTokenType(u));if(f)d?l=r.getStartOffset(u):(l=r.getStartOffset(u),c=r.getEndOffset(u));else if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=f}if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p)}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),i=-1,o=null,r=t.lineNumber;r<=n;r++){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=0,c=0,d=0;if(r===t.lineNumber)l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1,i!==(p=s.getLanguageId(l))&&(i=p,o=Pe.a.getBracketsSupport(i));for(var h=!0;lt)return null;var p=this._getLineTokens(h),f=p.getCount(),g=this._buffer.getLineContent(h),m=0,v=0,_=0;if(h===i.lineNumber)m=p.findTokenIndexAtOffset(i.column-1),v=i.column-1,_=i.column-1,l!==(y=p.getLanguageId(m))&&a(l=y,c=Pe.a.getBracketsSupport(l));for(var b=!0;mo)throw new Error("Illegal value for lineNumber");for(var r=Pe.a.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(t=e;t=0){l=t,c=r;break}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){h=t,p=n;break}}}if(-1!==f&&(-2===f||f=0){f=t,g=r;break}}}},v=0,_=!0,b=0,y=!0,C=0,w=0;_||y;w++){var S=e-w,O=e+w;if(0!==w&&(S<1||So||O>n)&&(y=!1),w>5e4&&(_=!1,y=!1),_){var L=void 0;if((D=this._computeIndentLevel(S-1))>=0?(l=S-1,c=D,L=Math.ceil(D/this._options.indentSize)):(d(S),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(v=S,b=O,0===(C=L))return{startLineNumber:v,endLineNumber:b,indent:C};continue}L>=C?v=S:_=!1}if(y){var D,x=void 0;(D=this._computeIndentLevel(O-1))>=0?(h=O-1,p=D,x=Math.ceil(D/this._options.indentSize)):(m(O),x=this._getIndentLevelForWhitespaceLine(s,p,g)),x>=C?b=O:y=!1}}return{startLineNumber:v,endLineNumber:b,indent:C}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=Pe.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(var p=c-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==u&&(-2===u||u=0){u=p,l=f;break}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(r.a)},tXSY: /*!****************************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js + 3 modules ***! \****************************************************************************************************/ @@ -2565,8 +2565,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2574,7 +2574,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/label/common/label.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */function(e,t,n){"use strict";n.r(t),n.d(t,"SnippetController2",(function(){return U}));var i=n("pmY6"),o=n("N0LK"),r=n("sswD"),s=n("aokT"),a=n("gCVg"),u=n("wQH0"),l=n("QVNv"),c=n("T8No"),d=n("09fa"),h=n("6OMU"),p=(n("dFcq"),n("0/Sa")),f=n("tX9W"),g=n("9XeP"),m=n("EWX2"),v=n("Cg/j"),_=n("uACm"),b=n("3/fG"),y=n("MrjW"),C=n("gslv"),w=n("cMvZ"),S=n("bY76");function O(e){return e instanceof S.a}var L=n("3rx1"),D=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){for(var t=0,n=this._delegates;t=0){for(var i=[],o=0,r=this._placeholderGroups[this._placeholderGroupsIdx];o0&&this._editor.executeEdits("snippet.placeholderTransform",i)}var d=!1;!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,d=!0);var h=this._editor.getModel().changeDecorations((function(t){for(var i=new Set,o=[],r=0,s=n._placeholderGroups[n._placeholderGroupsIdx];r0)return!0}t=t.parent}return!1},Object.defineProperty(e.prototype,"isAtFirstPlaceholder",{get:function(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAtLastPlaceholder",{get:function(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPlaceholder",{get:function(){return this._snippet.placeholders.length>0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,n=this._placeholderGroups;t0&&O!==d.getLineFirstNonWhitespaceColumn(W.positionLineNumber),!0),U.resolveVariables(new D([f,new k(y,V,L.length,"spread"===t.getOption(60)),new x(d,W),new E(d),new I,new M(h),new T]));var q=d.getOffsetAt(K)+C;C+=U.toString().length-d.getValueLengthInRange(z),l[V]=p.a.replace(z,U.toString()),c[V]=new F(t,U,q)}return{edits:l,snippets:c}},e.prototype.dispose=function(){Object(i.f)(this._snippets)},e.prototype._logInfo=function(){return'template="'+this._template+'", merged_templates="'+this._templateMerges.join(" -> ")+'"'},e.prototype.insert=function(){var t=this;if(this._editor.hasModel()){var n=e.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText),i=n.edits,o=n.snippets;this._snippets=o,this._editor.executeEdits("snippet",i,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return a.a.fromPositions(e.range.getEndPosition())}))})),this._editor.revealRange(this._editor.getSelections()[0])}},e.prototype.merge=function(t,n){var i=this;if(void 0===n&&(n=j),this._editor.hasModel()){this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var o=e.createEditsAndSnippets(this._editor,t,n.overwriteBefore,n.overwriteAfter,!0,n.adjustWhitespace,n.clipboardText),r=o.edits,s=o.snippets;this._editor.executeEdits("snippet",r,(function(e){for(var t=0,n=i._snippets;t0},e}(),V=function(){return(V=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},H=function(e,t){return function(n,i){t(n,i,e)}},z={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0},U=function(){function e(t,n,o){this._editor=t,this._logService=n,this._snippetListener=new i.b,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(o),this._hasNextTabstop=e.HasNextTabstop.bindTo(o),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(o)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(i.f)(this._session),this._snippetListener.dispose()},e.prototype.insert=function(e,t){try{this._doInsert(e,void 0===t?z:V(V({},z),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}},e.prototype._doInsert=function(e,t){var n=this;this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new W(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((function(e){return e.isFlush&&n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeModel((function(){return n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((function(){return n._updateState()}))))},e.prototype._updateState=function(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this;if(this._session&&this._editor.hasModel()){var t=this._session.choice;if(t){if(this._currentChoice!==t){this._currentChoice=t,this._editor.setSelections(this._editor.getSelections().map((function(e){return a.a.fromPositions(e.getStartPosition())})));var n=t.options[0];Object(l.f)(this._editor,t.options.map((function(t,i){return{kind:13,label:t.value,insertText:t.value,sortText:Object(o.J)("a",i+1),range:s.a.fromPositions(e._editor.getPosition(),e._editor.getPosition().delta(0,n.value.length))}})))}}else this._currentChoice=void 0}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(e){void 0===e&&(e=!1),this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),Object(i.f)(this._session),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])},e.prototype.prev=function(){this._session&&this._session.prev(),this._updateState()},e.prototype.next=function(){this._session&&this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return Boolean(this._inSnippet.get())},e.ID="snippetController2",e.InSnippetMode=new c.d("inSnippetMode",!1),e.HasNextTabstop=new c.d("hasNextTabstop",!1),e.HasPrevTabstop=new c.d("hasPrevTabstop",!1),e=B([H(1,d.a),H(2,c.c)],e)}();Object(r.h)(U.ID,U);var K=r.c.bindToContribution(U.get);Object(r.g)(new K({id:"jumpToNextSnippetPlaceholder",precondition:c.a.and(U.InSnippetMode,U.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:u.a.editorTextFocus,primary:2}})),Object(r.g)(new K({id:"jumpToPrevSnippetPlaceholder",precondition:c.a.and(U.InSnippetMode,U.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:u.a.editorTextFocus,primary:1026}})),Object(r.g)(new K({id:"leaveSnippet",precondition:U.InSnippetMode,handler:function(e){return e.cancel(!0)},kbOpts:{weight:130,kbExpr:u.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(r.g)(new K({id:"acceptSnippet",precondition:U.InSnippetMode,handler:function(e){return e.finish()}}))},tYmi: @@ -2649,7 +2649,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"c",(function(){return y}));var i,o=n("N0LK"),r=n("JQT/"),s=n("pmY6"),a=n("sswD"),u=n("T8No"),l=n("24hK"),c=n("Cg/j"),d=n("9fML"),h=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=Object(c.c)("IEditorCancelService"),f=new u.d("cancellableOperation",!1);Object(d.b)(p,function(){function e(){this._tokens=new WeakMap}return e.prototype.add=function(e,t){var n,i=this._tokens.get(e);return i||(i=e.invokeWithinContext((function(e){return{key:f.bindTo(e.get(u.c)),tokens:new l.a}})),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),function(){n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}},e.prototype.cancel=function(e){var t=this._tokens.get(e);if(t){var n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},e}(),!0);var g=function(e){function t(t,n){var i=e.call(this,n)||this;return i.editor=t,i._unregister=t.invokeWithinContext((function(e){return e.get(p).add(t,i)})),i}return h(t,e),t.prototype.dispose=function(){this._unregister(),e.prototype.dispose.call(this)},t}(r.b);Object(a.g)(new(function(e){function t(){return e.call(this,{id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})||this}return h(t,e),t.prototype.runEditorCommand=function(e,t){e.get(p).cancel(t)},t}(a.c)));var m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=function(){function e(e,t){if(this.flags=t,0!=(1&this.flags)){var n=e.getModel();this.modelVersionId=n?o.r("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}return e.prototype._equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}(),_=function(e){function t(t,n,i){var o=e.call(this,t,i)||this;return o.editor=t,o._listener=new s.b,4&n&&o._listener.add(t.onDidChangeCursorPosition((function(e){return o.cancel()}))),2&n&&o._listener.add(t.onDidChangeCursorSelection((function(e){return o.cancel()}))),8&n&&o._listener.add(t.onDidScrollChange((function(e){return o.cancel()}))),1&n&&(o._listener.add(t.onDidChangeModel((function(e){return o.cancel()}))),o._listener.add(t.onDidChangeModelContent((function(e){return o.cancel()})))),o}return m(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)},t}(g),b=function(e){function t(t,n){var i=e.call(this,n)||this;return i._listener=t.onDidChangeContent((function(){return i.cancel()})),i}return m(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)},t}(r.b),y=function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var n=null,i=0;if(0!==t.getScrollTop()){var o=t.getVisibleRanges();if(o.length>0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}()},vMFT: /*!****************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/base/parts/tree/browser/tree.css ***! diff --git a/p__Problemset__NewItem__index.da22b3f7.async.js b/p__Problemset__NewItem__index.da22b3f7.async.js new file mode 100644 index 0000000000..26cd712a5c --- /dev/null +++ b/p__Problemset__NewItem__index.da22b3f7.async.js @@ -0,0 +1,1006 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[187,5,6,7,8,16],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.defineMode("stex",(function(t,e){function n(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(t,e){t.f=e}function s(t,e){var i;if(t.match(/^\\[a-zA-Z@]+/)){var s=t.current().slice(1);return n(e,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(e,c),i.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(e))?(i.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(n(e,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(i=function(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(i.argument=t.current()),i.styleIdentifier())}function l(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return o(e,s),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function c(t,e){var n=t.peek();return"{"==n||"["==n?(r(e).openBracket(n),t.eat(n),o(e,s),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(o(e,s),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),s(t,e))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:s}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=s,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"0dNJ": +/*!************************************************************!*\ + !*** ./src/pages/Problemset/NewItem/index.tsx + 6 modules ***! + \************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problemset/NewItem/components/editor.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problemset/NewItem/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/CustomTree/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullChildEditor/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullMDEditor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Knowledge/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/problemset.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.r(e);n("g9YV");var r=n("wCAj"),i=(n("+L6B"),n("2/Rp")),a=(n("BoS7"),n("Sdc0")),o=(n("6UJt"),n("DFOY")),s=(n("7Kak"),n("9yH6")),l=(n("sPJy"),n("bE4q")),c=(n("2qtc"),n("kLXV")),u=n("9og8"),h=n("oBTY"),d=n("k1fw"),f=(n("miYZ"),n("tsqr")),p=(n("y8nQ"),n("Vl3Y")),g=n("tJVT"),m=n("PpiC"),v=(n("OaEy"),n("2fM7")),y=(n("DZo9"),n("8z0m")),b=n("WmNS"),x=n.n(b),S=n("q1tI"),C=n.n(S),E=n("9kvl"),k=n("m3rI"),w=n("yFVG"),T=n.n(w),O=(n("5Dmo"),n("3S7+")),L=n("Ot1p"),A=n("9Bee"),D=n("EgHG"),R=n.n(D),_=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],I=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),i=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","onRef","isEdit"]),Object(S.useState)([])),a=Object(g.a)(i,2),o=a[0],s=a[1],l=Object(S.useState)(),c=Object(g.a)(l,2),u=c[0],d=c[1],p=Object(S.useState)(),v=Object(g.a)(p,2),y=v[0],b=v[1],x=Object(S.useState)(""),E=Object(g.a)(x,2),k=E[0],w=E[1],T=Object(S.useState)(""),D=Object(g.a)(T,2),I=D[0],N=D[1];Object(S.useEffect)((function(){s(["","","",""])}),[]),Object(S.useEffect)((function(){var t,e,i,a;n.editData&&r&&(w(null===(t=n.editData)||void 0===t?void 0:t.name),N(null===(e=n.editData)||void 0===e?void 0:e.analysis),s(null===(i=n.editData)||void 0===i?void 0:i.choices.map((function(t){return t.choice_text}))),b(null===(a=n.editData)||void 0===a?void 0:a.choices.findIndex((function(t){return t.is_answer}))))}),[n.editData]),Object(S.useImperativeHandle)(e,(function(){return{onSave:M,Clear:P}}));var M=function(){if(!k)return f.b.info("请您输入题干"),!1;var t=o.findIndex((function(t){return!t}));if(t>-1)return f.b.info("请先输入 ".concat(_[t]," 选项的内容")),!1;if(console.log("activeAnswer: ",y),"number"!=typeof y)return f.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;var e=o.map((function(t,e){return{choice_text:t,is_answer:y===e?1:0}}));return{name:k,choices:e,analysis:I}},P=function(){s(["","","",""]),w(""),N(""),b("")};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement(L.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:k,onChange:function(t){return w(t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"答案选项:",C.a.createElement("span",{className:R.a.colorGray},"点击选项可设置正确答案"))),o.map((function(t,e){return C.a.createElement("div",{className:R.a.choiceWrap,key:e},C.a.createElement(O.a,{title:"点击设置为标准答案",placement:"left"},C.a.createElement("div",{className:"".concat(R.a.answer," ").concat(y===e?R.a.activeAnswer:""),onClick:function(){return b(e)}},_[e])),C.a.createElement("div",{className:R.a.editorWrap},u===e?C.a.createElement(L.a,{id:"single-question-option-".concat(e),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:t,onChange:function(t){o[e]=t,s(o)}}):C.a.createElement("div",{className:R.a.htmlWrap,onClick:function(){return d(e)}},C.a.createElement(A.a,{value:t}))),e>1&&C.a.createElement(O.a,{title:"删除"},C.a.createElement("i",{className:"".concat(R.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s(o.filter((function(t,n){return n!==e})))}})),e<7&&e===o.length-1&&C.a.createElement(O.a,{title:"新增参考答案"},C.a.createElement("i",{className:"".concat(R.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return s([].concat(Object(h.a)(o),[""]))}})))})),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:I,onChange:function(t){return N(t)}}))},N=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)(I)),M=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],P=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),i=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","onRef","isEdit"]),Object(S.useState)([])),a=Object(g.a)(i,2),o=a[0],s=a[1],l=Object(S.useState)(),c=Object(g.a)(l,2),u=c[0],d=c[1],p=Object(S.useState)([]),v=Object(g.a)(p,2),y=v[0],b=v[1],x=Object(S.useState)(""),E=Object(g.a)(x,2),k=E[0],w=E[1],T=Object(S.useState)(""),D=Object(g.a)(T,2),_=D[0],I=D[1];Object(S.useEffect)((function(){s(["","","",""])}),[]),Object(S.useEffect)((function(){var t,e,i,a;if(n.editData&&r){w(null===(t=n.editData)||void 0===t?void 0:t.name),I(null===(e=n.editData)||void 0===e?void 0:e.analysis),s(null===(i=n.editData)||void 0===i?void 0:i.choices.map((function(t){return t.choice_text})));var o=[];null===(a=n.editData)||void 0===a||a.choices.map((function(t,e){t.is_answer&&o.push(e)})),b(o)}}),[n.editData]),Object(S.useImperativeHandle)(e,(function(){return{onSave:N,Clear:P}}));var N=function(){if(!k)return f.b.info("请您输入题干"),!1;var t=o.findIndex((function(t){return!t}));if(t>-1)return f.b.info("请先输入 ".concat(M[t]," 选项的内容")),!1;if(!y.length)return f.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;if(y.length<2)return f.b.info("多选题最小正确选项为2个"),!1;var e=o.map((function(t,e){return{choice_text:t,is_answer:y.includes(e)?1:0}}));return{name:k,choices:e,analysis:_}},P=function(){s(["","","",""]),w(""),I(""),b("")};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement(L.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:k,onChange:function(t){return w(t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"答案选项:",C.a.createElement("span",{className:R.a.colorGray},"点击选项可设置正确答案"))),o.map((function(t,e){return C.a.createElement("div",{className:R.a.choiceWrap,key:e},C.a.createElement(O.a,{title:"点击设置为标准答案",placement:"left"},C.a.createElement("div",{className:"".concat(R.a.answer," ").concat(y.includes(e)?R.a.activeAnswer:""),onClick:function(){y.includes(e)?b(y.filter((function(t){return t!==e}))):b([].concat(Object(h.a)(y),[e]))}},M[e])),C.a.createElement("div",{className:R.a.editorWrap},u===e?C.a.createElement(L.a,{id:"single-question-option-".concat(e),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:t,onChange:function(t){o[e]=t,s(o)}}):C.a.createElement("div",{className:R.a.htmlWrap,onClick:function(){return d(e)}},C.a.createElement(A.a,{value:t}))),e>1&&C.a.createElement(O.a,{title:"删除"},C.a.createElement("i",{className:"".concat(R.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s(o.filter((function(t,n){return n!==e})))}})),e<7&&e===o.length-1&&C.a.createElement(O.a,{title:"新增参考答案"},C.a.createElement("i",{className:"".concat(R.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return s([].concat(Object(h.a)(o),[""]))}})))})),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:_,onChange:function(t){return I(t)}}))},F=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)(P)),j=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),i=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","onRef","isEdit"]),Object(S.useState)()),a=Object(g.a)(i,2),o=a[0],l=a[1],c=Object(S.useState)(""),u=Object(g.a)(c,2),h=u[0],d=u[1],p=Object(S.useState)(""),v=Object(g.a)(p,2),y=v[0],b=v[1];Object(S.useEffect)((function(){var t,e,i;if(n.editData&&r){d(null===(t=n.editData)||void 0===t?void 0:t.name),b(null===(e=n.editData)||void 0===e?void 0:e.analysis);var a=null===(i=n.editData)||void 0===i?void 0:i.choices.find((function(t){return t.is_answer}));l("正确"===a.choice_text?"0":"1")}}),[n.editData]),Object(S.useImperativeHandle)(e,(function(){return{onSave:x,Clear:E}}));var x=function(){return h?o?{name:h,choices:[{choice_text:"正确",is_answer:"0"===o?1:0},{choice_text:"错误",is_answer:"1"===o?1:0}],analysis:y}:(f.b.info("请先点击选择本选择题的正确选项"),!1):(f.b.info("请您输入题干"),!1)},E=function(){d(""),b(""),l("")};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement(L.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:h,onChange:function(t){return d(t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"答案选项:",C.a.createElement("span",{className:R.a.colorGray},"点击选项可设置正确答案"))),C.a.createElement(s.a.Group,{buttonStyle:"solid",value:o,onChange:function(t){return l(t.target.value)}},C.a.createElement(s.a.Button,{value:"0",className:"".concat(R.a.radio," mr40")},"正确"),C.a.createElement(s.a.Button,{value:"1",className:R.a.radio},"错误")),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:y,onChange:function(t){return b(t)}}))},B=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)(j)),U=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),i=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","onRef","isEdit"]),Object(S.useState)("")),a=Object(g.a)(i,2),o=a[0],s=a[1],l=Object(S.useState)(""),c=Object(g.a)(l,2),u=c[0],h=c[1],d=Object(S.useState)(""),p=Object(g.a)(d,2),v=p[0],y=p[1];Object(S.useEffect)((function(){var t,e,i,a;n.editData&&r&&(s(null===(t=n.editData)||void 0===t?void 0:t.name),h(null===(e=n.editData)||void 0===e?void 0:e.analysis),y(null===(i=n.editData)||void 0===i||null===(a=i.answer_texts)||void 0===a?void 0:a[0]))}),[n.editData]),Object(S.useImperativeHandle)(e,(function(){return{onSave:b,Clear:x}}));var b=function(){return o?{name:o,answer_texts:[v],analysis:u}:(f.b.info("请您输入题干"),!1)},x=function(){s(""),h(""),y("")};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement(L.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:o,onChange:function(t){return s(t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"参考答案:")),C.a.createElement(L.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:v,onChange:function(t){return y(t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:u,onChange:function(t){return h(t)}}))},H=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)(U)),G=(n("sRBo"),n("kaz8")),V=n("kqOp"),z=n("7qnI"),W=n("1vsH"),K=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.isEdit),i=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","isEdit"]),Object(S.useState)("")),a=Object(g.a)(i,2),o=a[0],s=a[1],l=Object(S.useState)(""),u=Object(g.a)(l,2),d=u[0],p=u[1],v=Object(S.useState)([]),y=Object(g.a)(v,2),b=y[0],x=y[1],E=Object(S.useState)(""),k=Object(g.a)(E,2),w=k[0],T=k[1],O=Object(S.useState)(),A=Object(g.a)(O,2),D=A[0],_=A[1],I=Object(S.useState)(!1),N=Object(g.a)(I,2),M=N[0],P=N[1];Object(S.useEffect)((function(){var t,e,i;n.editData&&r&&(s(null===(t=n.editData)||void 0===t?void 0:t.name),p(null===(e=n.editData)||void 0===e?void 0:e.analysis),_(null===(i=n.editData)||void 0===i?void 0:i.is_ordered),P(!0))}),[n.editData]),Object(S.useEffect)((function(){var t;if(M){var e=null===(t=n.editData)||void 0===t?void 0:t.standard_answer.map((function(t){return t.answer_text}));x(e),P(!1)}}),[M]),Object(S.useImperativeHandle)(e,(function(){return{onSave:F,Clear:j}}));var F=function(){var t=[],e=!1;return b.forEach((function(n,r){t.push({position:r+1,answer_text:[]}),n.forEach((function(n,i){t[r].answer_text.push(n),n&&Object(W.Z)(n,1e4)||(T("".concat(r,"-").concat(i)),f.b.info(n?"答案不能超过10000字符":"答案:不能为空"),e=!0)}))})),!e&&((null==t?void 0:t.length)>20?(f.b.warn("填空题标准答案不能为空/不能超过20个!"),!1):{name:o,analysis:d,standard_answers:t,is_ordered:D})},j=function(){s(""),p(""),x([]),_(!1)},B=function(t,e,n){T("");var r=b.slice();r[t][e]=n,x(r)},U=function(t){var e=b.slice();e[t]=[].concat(Object(h.a)(e[t]),[""]),x(e)},H=function(t,e){var n=b.slice();if(!n[t][e])return n[t]=n[t].filter((function(t,n){return n!==e})),void x(n);c.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:R.a.modal,onOk:function(){n[t]=n[t].filter((function(t,n){return n!==e})),x(n)}})},K=function(t){c.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:R.a.modal,onOk:function(){var e=b.slice();e=b.filter((function(e,n){return t!==n})),x(e)}})};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement("div",null,C.a.createElement(V.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:o,onChange:function(t){return s(t)},showNullButton:!0,onPlaceholderChange:function(t,e,n){var r=b.slice();if(e&&r.splice(t,e),n)for(var i=0;i1&&C.a.createElement("span",null,C.a.createElement(G.a,{checked:D,onChange:function(t){return _(t.target.checked)},className:"".concat(R.a.color333," font14")},"多个填空的答案有顺序要求"),C.a.createElement("span",{className:"".concat(R.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(t){return p(t)}}))},q=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)(K)),Y=n("LvDl"),X=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],$=function(t,e){var n=t.problemset,r=(t.globalSetting,t.loading,t.dispatch,t.onRef,t.isEdit),a=(Object(m.a)(t,["problemset","globalSetting","loading","dispatch","onRef","isEdit"]),Object(S.useState)("")),o=Object(g.a)(a,2),s=o[0],l=o[1],c=Object(S.useState)([]),u=Object(g.a)(c,2),h=u[0],p=u[1];Object(S.useEffect)((function(){var t,e,i;if(n.editData&&r){l(null===(t=n.editData)||void 0===t?void 0:t.name);var a=null==n||null===(e=n.editData)||void 0===e||null===(i=e.sub_item_banks)||void 0===i?void 0:i.map((function(t){var e,n,r;return Object(d.a)(Object(d.a)({},t),{},{id:t.id,open:!1,qusList:null==t||null===(e=t.choices)||void 0===e?void 0:e.map((function(t){return t.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==t||null===(r=t.choices)||void 0===r?void 0:r.findIndex((function(t){return t.is_answer}))])||void 0===n?void 0:n.filter((function(t){return-1!==t}))})}));p(a)}}),[n.editData]),Object(S.useImperativeHandle)(e,(function(){return{onSave:v,Clear:y}}));var v=function(){if(!s)return f.b.info("请您输入题干"),!1;if(0===h.length)return f.b.info("请您添加小题"),!1;for(var t=0;t-1)return f.b.info("请先输入第".concat(t+1,"小题").concat(X[r],"选项的内容")),!1;if(null==n||!n.qusAnswer.length)return f.b.info("请设置第".concat(t+1,"小题的正确答案,点击选项A/B...即可完成设置")),!1}var i=h.map((function(t){return{id:t.id>1?t.id:null,name:t.name,item_type:t.item_type,analysis:t.analysis,choices:t.qusList.map((function(e,n){return{choice_text:e,is_answer:t.qusAnswer[0]===n?1:0}}))}}));return{name:s,sub_item_banks:i}},y=function(){l(""),p([])},b=function(t,e,n){var r,i=Object(Y.cloneDeep)(h);("open"===t&&(i[e].open=!i[e].open),"delete"===t&&i.splice(e,1),"value"===t&&(i[e].name=n),"answer"===t&&(i[e].qusAnswer=[n]),"edit"===t&&(i[e].activeQusEditor=n),"details"===t&&(i[e].qusList[i[e].activeQusEditor]=n),"addQus"===t&&(i[e].qusList=i[e].qusList.concat("")),"deleteQus"===t)&&(i[e].qusList=i[e].qusList.filter((function(t,e){return e!==n})),i[e].qusAnswer=null===(r=i[e].qusAnswer)||void 0===r?void 0:r.filter((function(t){return t!==n})));"analysis"===t&&(i[e].analysis=n),p(i)};return C.a.createElement("section",{className:R.a.wrap},C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"题干:")),C.a.createElement(L.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:s,onChange:function(t){return l(t)}}),null==h?void 0:h.map((function(t,e){var n;return C.a.createElement("div",{className:R.a.fold,key:t.id},C.a.createElement("div",{onClick:function(){return b("open",e)},className:R.a.head},C.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:t.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),C.a.createElement("span",null,"第",e+1,"小题(单选题)"),C.a.createElement("b",{onClick:function(t){t.stopPropagation(),b("delete",e)},className:"iconfont icon-shanchu8"})),C.a.createElement("div",{className:"mb10",style:{display:t.open?"block":"none"}},C.a.createElement(L.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==t?void 0:t.name,onChange:function(t){return b("value",e,t)}}),C.a.createElement("p",{className:R.a.titleWrap},C.a.createElement("span",{className:R.a.required},"*"),C.a.createElement("span",{className:R.a.title},"答案选项:",C.a.createElement("span",{className:R.a.colorGray},"点击选项可设置正确答案"))),null==t||null===(n=t.qusList)||void 0===n?void 0:n.map((function(n,r){var i,a;return C.a.createElement("div",{className:R.a.choiceWrap,key:r},C.a.createElement(O.a,{title:"点击设置为标准答案",placement:"left"},C.a.createElement("div",{className:"".concat(R.a.answer," ").concat(null!=t&&null!==(i=t.qusAnswer)&&void 0!==i&&i.includes(r)?R.a.activeAnswer:""),onClick:function(){return b("answer",e,r)}},X[r])),C.a.createElement("div",{className:R.a.editorWrap},(null==t?void 0:t.activeQusEditor)===r?C.a.createElement(L.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(t){return b("details",e,t)}}):C.a.createElement("div",{className:R.a.htmlWrap,onClick:function(){return b("edit",e,r)}},C.a.createElement(A.a,{value:n}))),r>1&&C.a.createElement(O.a,{title:"删除"},C.a.createElement("i",{className:"".concat(R.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return b("deleteQus",e,r)}})),r<7&&r===(null==t||null===(a=t.qusList)||void 0===a?void 0:a.length)-1&&C.a.createElement(O.a,{title:"新增参考答案"},C.a.createElement("i",{className:"".concat(R.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return b("addQus",e)}})))})),C.a.createElement("p",{className:"mb10 mt10"},C.a.createElement("span",{className:R.a.title},"题目解析:")),C.a.createElement(L.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:t.analysis,onChange:function(t){return b("analysis",e,t)}})))})),h.length<20&&C.a.createElement(i.a,{type:"primary",onClick:function(){var t={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};p(h.concat(t))}},C.a.createElement("i",{className:"iconfont icon-tianjiatimu mr5 font14"}),"添加小题"))},Z=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}),null,null,{forwardRef:!0})(Object(S.forwardRef)($)),J=n("ErOA"),Q=n("u2Z1"),tt=n("xvlK"),et=n("P/tu"),nt=n("WCUW"),rt=(y.a.Dragger,v.a.Option);e.default=Object(E.a)((function(t){var e=t.problemset,n=t.loading;return{problemset:e,globalSetting:t.globalSetting,loading:n.effects}}))((function(t){var e,n,b,w=t.problemset,O=(t.globalSetting,t.loading),L=t.dispatch,A=Object(m.a)(t,["problemset","globalSetting","loading","dispatch"]),D=p.a.useForm(),R=Object(g.a)(D,1)[0],_=Object(S.useState)({}),I=Object(g.a)(_,2),M=I[0],P=I[1],j=Object(S.useState)(),U=Object(g.a)(j,2),G=U[0],V=U[1],z=Object(S.useState)(!1),K=Object(g.a)(z,2),Y=K[0],X=K[1],$=Object(S.useState)([]),it=Object(g.a)($,2),at=it[0],ot=it[1],st=Object(S.useRef)(),lt=Object(S.useRef)(),ct=Object(S.useState)([]),ut=Object(g.a)(ct,2),ht=(ut[0],ut[1]),dt=Object(S.useState)(1),ft=Object(g.a)(dt,2),pt=ft[0],gt=ft[1],mt=Object(S.useState)([]),vt=Object(g.a)(mt,2),yt=vt[0],bt=vt[1],xt=Object(S.useState)(),St=Object(g.a)(xt,2),Ct=St[0],Et=St[1],kt=Object(S.useState)(!1),wt=Object(g.a)(kt,2),Tt=wt[0],Ot=wt[1],Lt=Object(S.useState)(),At=Object(g.a)(Lt,2),Dt=At[0],Rt=At[1];Object(S.useEffect)((function(){return L({type:"globalSetting/footerToggle",payload:!1}),function(){L({type:"globalSetting/footerToggle",payload:!0})}}),[]),Object(S.useEffect)((function(){var t;null!=w&&w.editData&&Rt(!(null!=w&&null!==(t=w.editData)&&void 0!==t&&t.repeat_answer))}),[null==w?void 0:w.editData]);var _t={onRemove:function(){bt([])},beforeUpload:function(t){if(console.log(t),(null==t?void 0:t.size)>52428800)return f.b.info("文件超过50M,不符合上传要求"),!1;var e=[];return e.push(t),bt([].concat(e)),!1},fileList:yt,accept:".xls,.xlsx"};Object(S.useEffect)((function(){return window.addEventListener("beforeunload",It),function(){window.removeEventListener("beforeunload",It)}}),[]),Object(S.useEffect)((function(){var t,e,n=null===(t=A.location.query)||void 0===t?void 0:t.pages;V(n);var r=null===(e=A.match.params)||void 0===e?void 0:e.id;X(!!r),st.current=r}),[]),Object(S.useEffect)((function(){L({type:"problemset/getEditDisciplines",payload:{source:"question"}}),st.current&&L({type:"problemset/getEditData",payload:{id:st.current}})}),[]),Object(S.useEffect)((function(){var t;R.setFieldsValue({itemType:"SINGLE"}),R.setFieldsValue({difficulty:1});var e=(null===(t=A.location.query)||void 0===t?void 0:t.group_id)||0;if(R.setFieldsValue({item_banks_group_id:[Number(e)]}),w.editData&&st.current){var n=(null==w?void 0:w.editData)||{},r=n.discipline,i=n.sub_discipline,a=n.tag_disciplines,o=n.item_type,s=n.difficulty,l=n.item_banks_group_id;R.setFieldsValue({course:[null==r?void 0:r.id,null==i?void 0:i.id]}),R.setFieldsValue({itemType:o}),R.setFieldsValue({difficulty:s}),R.setFieldsValue({item_banks_group_id:l}),R.setFieldsValue({knowledge:null==a?void 0:a.map((function(t){return t.id}))}),P({course:[null==r?void 0:r.id,null==i?void 0:i.id],itemType:o,difficulty:s,item_banks_group_id:l,knowledge:null==a?void 0:a.map((function(t){return t.id}))}),Nt(null==r?void 0:r.id,null==i?void 0:i.id)}}),[w.editData,w.disciplinesData]);var It=function(t){t.preventDefault(),t.returnValue=""},Nt=function(t,e){var n,r,i,a,o;null===(n=w.disciplinesData)||void 0===n||null===(r=n.disciplines)||void 0===r||null===(i=r.find((function(e){return e.id===t})))||void 0===i||null===(a=i.sub_disciplines)||void 0===a||null===(o=a.find((function(t){return t.id===e})))||void 0===o||o.tag_disciplines;Bt(e)},Mt=function(t){if(null!=t&&t.course){var e,n,r,i,a=Object(g.a)(t.course,2),o=a[0],s=a[1];null===(e=w.disciplinesData.disciplines)||void 0===e||null===(n=e.find((function(t){return t.id===o})))||void 0===n||null===(r=n.sub_disciplines)||void 0===r||null===(i=r.find((function(t){return t.id===s})))||void 0===i||i.tag_disciplines;Bt(s),R.setFieldsValue({knowledge:[]}),P(Object(d.a)(Object(d.a)({},R.getFieldsValue()),{},{knowledge:[]}))}else P(Object(d.a)({},R.getFieldsValue()))},Pt=function(){var t=Object(u.a)(x.a.mark((function t(){var e,n,r,i,a,o,s,l,u,h,p,m,v,y,b,S,C,k,w;return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(e=M||{}).course,r=e.itemType,i=e.difficulty,a=e.item_banks_group_id,o=e.knowledge,s=void 0===o?[]:o,l=Object(g.a)(n,2),u=l[0],h=l[1],1!==pt){t.next=24;break}if("PROGRAM"!==r){t.next=7;break}return m=null==s?void 0:s.join(","),Object(W.O)("/problems/new?difficult=".concat(i,"&sub_discipline_id=").concat(h,"&newoj=1&pages=").concat(G,"&tagIds=").concat(m,"&banksIds=").concat(null!=a&&a[0]?null==a?void 0:a[0]:0)),t.abrupt("return");case 7:if(v=null===(p=lt.current)||void 0===p?void 0:p.onSave()){t.next=10;break}return t.abrupt("return");case 10:if(y=Object(d.a)({discipline_id:u,sub_discipline_id:h,item_banks_group_ids:a,tag_discipline_ids:s,item_type:r,difficulty:i},v||{}),console.log(y,"postData"),!Y){t.next=18;break}return t.next=15,L({type:"problemset/editProblemset",payload:Object(d.a)(Object(d.a)({},y),{},{repeat_answer:!Dt,id:st.current})});case 15:b=t.sent,t.next=21;break;case 18:return t.next=20,L({type:"problemset/addProblemset",payload:y});case 20:b=t.sent;case 21:0===b.status&&(Y?E.d.replace("/problemset?group_id=".concat(a)):(A.location.query.activeTabsKey&&"3"===A.location.query.activeTabsKey&&Object(nt.j)({ids:[b.id],clazz:"ItemBank",group_ids:A.location.query.item_banks_group_id.split(",").map((function(t){return Number(t)}))}),c.a.confirm({title:null,icon:null,content:"创建成功",okText:"继续新增",cancelText:"返回列表",onOk:function(){var t;null===(t=lt.current)||void 0===t||t.Clear()},onCancel:function(){E.d.replace("/problemset?group_id=".concat(a))}}))),t.next=44;break;case 24:if(!((null==yt?void 0:yt.length)<=0)){t.next=27;break}return f.b.info("请上传试题文件"),t.abrupt("return");case 27:return Ot(!0),(S=new FormData).append("file",yt[0]),S.append("sub_discipline_id",h),t.next=33,Object(J.a)("/api/item_banks/file_import.json",{method:"post",body:S},!0);case 33:if(C=t.sent,Ot(!1),0!==(null==C?void 0:C.status)){t.next=44;break}if(!((null==C||null===(k=C.fail)||void 0===k?void 0:k.length)>0)){t.next=40;break}return Et(null==C?void 0:C.fail),f.b.error("上传失败题数为"+(null==C||null===(w=C.fail)||void 0===w?void 0:w.length)+",可在底部试题列表查看错误原因。"),t.abrupt("return");case 40:R.setFieldsValue({course:[]}),bt([]),Et([]),f.b.info("上传成功");case 44:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(S.useEffect)((function(){function t(){return(t=Object(u.a)(x.a.mark((function t(){var e;return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(J.c)("item_banks_groups/mine.json");case 2:e=t.sent,ht(e);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[]);var Ft,jt=function(t){var e=Object(g.a)(t,2);e[0],e[1]},Bt=function(){var t=Object(u.a)(x.a.mark((function t(e){var n;return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,L({type:"exercise/getTagDiscipline",payload:{sub_discipline_id:e}});case 2:n=t.sent,ot(n.tag_disciplines);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return C.a.createElement("section",{className:T.a.bg},C.a.createElement(l.a,{className:"mb20 mt30",separator:">"},C.a.createElement(l.a.Item,{href:"/problemset"},"试题库"),C.a.createElement(l.a.Item,null,Y?"编辑":"新增","试题")),C.a.createElement("div",{className:T.a.main},C.a.createElement("span",{style:{fontSize:"18px"}},"添加类型"),C.a.createElement("br",null),C.a.createElement(s.a.Group,{style:{marginTop:"5px"},onChange:function(t){gt(t.target.value),R.setFieldsValue({course:[]}),bt([]),Et([])},value:pt},C.a.createElement(s.a,{value:1},"单个添加"),C.a.createElement(s.a,{value:2},"批量导入")),1===pt&&C.a.createElement(p.a,{form:R,style:{marginTop:"10px"},className:T.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:Mt,onFinish:Pt},C.a.createElement(p.a.Item,{label:"方向&课程:",name:"course",labelCol:{span:5},wrapperCol:{span:5},rules:[{required:!0,message:"请选择课程"}]},C.a.createElement(o.a,{placeholder:"请选择...",allowClear:!1,options:w.courseOptions,onChange:jt})),C.a.createElement(p.a.Item,{label:C.a.createElement("span",null,"知识点:",C.a.createElement("span",{className:"c-grey-999"},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),name:"knowledge"},C.a.createElement(Q.a,{selectvalues:null==M?void 0:M.knowledge,subId:null===(e=M.course)||void 0===e?void 0:e[1],knowledgeOptions:at,onAddKnowledgeFinish:function(t){ot([].concat(Object(h.a)(at),[Object(d.a)({},t)]))}})),C.a.createElement(p.a.Item,{label:"加入文件夹目录",rules:[{required:!0,message:"请选择文件夹"}],initialValue:[0],name:"item_banks_group_id",labelCol:{span:24},wrapperCol:{span:24}},C.a.createElement(et.a,null)),C.a.createElement(p.a.Item,{label:"题型:",name:"itemType",wrapperCol:{span:5},rules:[{required:!0,message:"请选择题型"}]},C.a.createElement(v.a,{placeholder:"请选择...",disabled:Y},C.a.createElement(rt,{value:"PROGRAM"},"编程题"),C.a.createElement(rt,{value:"SINGLE"},"单选题"),C.a.createElement(rt,{value:"MULTIPLE"},"多选题"),C.a.createElement(rt,{value:"JUDGMENT"},"判断题"),C.a.createElement(rt,{value:"COMPLETION"},"填空题"),C.a.createElement(rt,{value:"SUBJECTIVE"},"简答题"),C.a.createElement(rt,{value:"COMBINATION"},"组合题"))),C.a.createElement(p.a.Item,{label:"难度:",name:"difficulty",rules:[{required:!0,message:"请选择难度"}]},C.a.createElement(s.a.Group,null,C.a.createElement(s.a.Button,{value:1},"简单"),C.a.createElement(s.a.Button,{value:2},"适中"),C.a.createElement(s.a.Button,{value:3},"困难"))),Y&&"PROGRAM"!=(null==w||null===(n=w.editData)||void 0===n?void 0:n.item_type)&&"COMBINATION"!=(null==w||null===(b=w.editData)||void 0===b?void 0:b.item_type)&&C.a.createElement("div",null,C.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),C.a.createElement(a.a,{checked:Dt,onChange:function(t){Rt(t)}}))),2===pt&&C.a.createElement("div",null,C.a.createElement(p.a,{form:R,style:{marginTop:"20px"},className:T.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:Mt,onFinish:Pt},C.a.createElement(p.a.Item,{label:"方向&课程:",name:"course",labelCol:{span:5},wrapperCol:{span:5},rules:[{required:!0,message:"请选择课程"}]},C.a.createElement(o.a,{placeholder:"请选择...",allowClear:!1,options:w.courseOptions,onChange:jt})),C.a.createElement("span",null,"下载Excel格式 ",C.a.createElement("a",{onClick:Object(u.a)(x.a.mark((function t(){return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(W.t)("",Object(W.U)({url:k.a.API_SERVER+"/api/item_banks/down_template",query:{}}));case 1:case"end":return t.stop()}}),t)})))},"试题模板"),", 每次最多导入300题。"),C.a.createElement("br",null),C.a.createElement(y.a,_t,C.a.createElement(i.a,{className:T.a.upload,style:{marginTop:"20px"},type:"primary",icon:C.a.createElement(tt.a,null)},"选择文件"))),C.a.createElement("br",null),(null==Ct?void 0:Ct.length)>0&&C.a.createElement("span",{style:{fontSize:"18px",display:"flex",width:"100%",justifyContent:"center"}},"错误列表"),(null==Ct?void 0:Ct.length)>0&&C.a.createElement(r.a,{style:{marginTop:"10px"},dataSource:Ct,columns:[{title:"题目名称",dataIndex:"name",key:"name"},{title:"错误原因",dataIndex:"message",key:"message"}]}))),1===pt&&C.a.createElement("div",{className:T.a.topicWrap},(Ft=(M||{itemType:"SINGLE"}).itemType,{SINGLE:C.a.createElement(N,{ref:lt,isEdit:Y}),MULTIPLE:C.a.createElement(F,{ref:lt,isEdit:Y}),JUDGMENT:C.a.createElement(B,{ref:lt,isEdit:Y}),COMPLETION:C.a.createElement(q,{ref:lt,isEdit:Y}),SUBJECTIVE:C.a.createElement(H,{ref:lt,isEdit:Y}),COMBINATION:C.a.createElement(Z,{ref:lt,isEdit:Y})}[Ft||"SINGLE"])),C.a.createElement("div",{className:T.a.buttonFixed},C.a.createElement("div",{className:T.a.buttonWrap},C.a.createElement(i.a,{size:"large",className:"".concat(T.a.button," mr20"),onClick:function(){return E.d.push("/problemset")}},"取消"),C.a.createElement(i.a,{size:"large",type:"primary",className:"".concat(T.a.button," mr20"),onClick:function(){return R.submit()},loading:O["problemset/editProblemset"]||O["problemset/addProblemset"]||Tt},"PROGRAM"===M.itemType?"创建":"保存"))))}))},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=t.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=t.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function r(t){a(t)&&n(t)}function i(t){var r=t.getWrapperElement(),i=a(t);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(t):e(t)}function a(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=t.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),t.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(t){setTimeout((function(){var r=!1,i=t.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==t.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(t):e(t)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),t.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),e(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1eCo": +/*!*************************************************!*\ + !*** ./node_modules/codemirror/mode/xml/xml.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=h,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=h;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,n){return"word"==t?(n.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,n)):(o="error",y)}function b(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,n)):(o="error",S)}function x(t,e,n){return"endTag"!=t?(o="error",x):(g(n),v)}function S(t,e,n){return o="error",x(t,0,n)}function C(t,e,n){if("word"==t)return o="attribute",E;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?m(n,r):(m(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",C}function E(t,e,n){return"equals"==t?k:(l.allowMissing||(o="error"),C(t,0,n))}function k(t,e,n){return"string"==t?w:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,n))}function w(t,e,n){return"string"==t?w:C(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;a=null;var n=e.tokenize(t,e);return(n||a)&&"comment"!=n&&(o=null,e.state=e.state(a||n,t,e),o&&(n="error"==o?n+" error":o)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"6+eU": +/*!************************************************************!*\ + !*** ./node_modules/rc-pagination/es/index.js + 4 modules ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n("wx14"),i=n("rePB"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(t){var e,n="".concat(t.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(t.page),(e={},Object(i.a)(e,"".concat(n,"-active"),t.active),Object(i.a)(e,t.className,!!t.className),Object(i.a)(e,"".concat(n,"-disabled"),!t.page),e));return h.a.createElement("li",{title:t.showTitle?t.page:null,className:r,onClick:function(){t.onClick(t.page)},onKeyPress:function(e){t.onKeyPress(e,t.onClick,t.page)},tabIndex:"0"},t.itemRender(t.page,"page",h.a.createElement("a",{rel:"nofollow"},t.page)))},g=13,m=38,v=40,y=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(){var t;Object(o.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a=0||e.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(t.setState({goInputText:""}),i(t.getValidValue()))},t.go=function(e){""!==t.state.goInputText&&(e.keyCode!==g&&"click"!==e.type||(t.setState({goInputText:""}),t.props.quickGo(t.getValidValue())))},t}return Object(s.a)(n,[{key:"getValidValue",value:function(){var t=this.state,e=t.goInputText,n=t.current;return!e||isNaN(e)?n:Number(e)}},{key:"getPageSizeOptions",value:function(){var t=this.props,e=t.pageSize,n=t.pageSizeOptions;return n.some((function(t){return t.toString()===e.toString()}))?n:n.concat([e.toString()]).sort((function(t,e){return(isNaN(Number(t))?0:Number(t))-(isNaN(Number(e))?0:Number(e))}))}},{key:"render",value:function(){var t=this,e=this.props,n=e.pageSize,r=e.locale,i=e.rootPrefixCls,a=e.changeSize,o=e.quickGo,s=e.goButton,l=e.selectComponentClass,c=e.buildOptionText,u=e.selectPrefixCls,d=e.disabled,f=this.state.goInputText,p="".concat(i,"-options"),g=l,m=null,v=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&g){var x=b.map((function(e,n){return h.a.createElement(g.Option,{key:n,value:e.toString()},(c||t.buildOptionText)(e))}));m=h.a.createElement(g,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(t){return t.parentNode}},x)}return o&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},m,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function S(){}function C(t,e,n){var r=void 0===t?e.pageSize:t;return Math.floor((n.total-1)/r)+1}var E=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(t){var r;Object(o.a)(this,n),(r=e.call(this,t)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(C(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(t,e){var n=r.props.prefixCls,i=t||h.a.createElement("button",{type:"button","aria-label":e,className:"".concat(n,"-item-link")});return"function"==typeof t&&(i=h.a.createElement(t,Object(a.a)({},r.props))),i},r.savePaginationNode=function(t){r.paginationNode=t},r.isValid=function(t){return"number"==typeof(e=t)&&isFinite(e)&&Math.floor(e)===e&&t!==r.state.current;var e},r.shouldDisplayQuickJumper=function(){var t=r.props,e=t.showQuickJumper,n=t.pageSize;return!(t.total<=n)&&e},r.handleKeyDown=function(t){t.keyCode!==m&&t.keyCode!==v||t.preventDefault()},r.handleKeyUp=function(t){var e=r.getValidValue(t);e!==r.state.currentInputValue&&r.setState({currentInputValue:e}),t.keyCode===g?r.handleChange(e):t.keyCode===m?r.handleChange(e-1):t.keyCode===v&&r.handleChange(e+1)},r.changePageSize=function(t){var e=r.state.current,n=C(t,r.state,r.props);e=e>n?n:e,0===n&&(e=r.state.current),"number"==typeof t&&("pageSize"in r.props||r.setState({pageSize:t}),"current"in r.props||r.setState({current:e,currentInputValue:e})),r.props.onShowSizeChange(e,t),"onChange"in r.props&&r.props.onChange&&r.props.onChange(e,t)},r.handleChange=function(t){var e=r.props.disabled,n=t;if(r.isValid(n)&&!e){var i=C(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(e)}},{key:"getShowSizeChanger",value:function(){var t=this.props,e=t.showSizeChanger,n=t.total,r=t.totalBoundaryShowSizeChanger;return void 0!==e?e:n>r}},{key:"renderPrev",value:function(t){var e=this.props,n=e.prevIcon,r=(0,e.itemRender)(t,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(t){var e=this.props,n=e.nextIcon,r=(0,e.itemRender)(t,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var t=this,e=this.props,n=e.prefixCls,a=e.className,o=e.style,s=e.disabled,l=e.hideOnSinglePage,c=e.total,d=e.locale,g=e.showQuickJumper,m=e.showLessItems,v=e.showTitle,y=e.showTotal,x=e.simple,S=e.itemRender,E=e.showPrevNextJumpers,k=e.jumpPrevIcon,w=e.jumpNextIcon,T=e.selectComponentClass,O=e.selectPrefixCls,L=e.pageSizeOptions,A=this.state,D=A.current,R=A.pageSize,_=A.currentInputValue;if(!0===l&&c<=R)return null;var I=C(void 0,this.state,this.props),N=[],M=null,P=null,F=null,j=null,B=null,U=g&&g.goButton,H=m?1:2,G=D-1>0?D-1:0,V=D+1=2*H&&3!==D&&(N[0]=Object(u.cloneElement)(N[0],{className:"".concat(n,"-item-after-jump-prev")}),N.unshift(M)),I-D>=2*H&&D!==I-2&&(N[N.length-1]=Object(u.cloneElement)(N[N.length-1],{className:"".concat(n,"-item-before-jump-next")}),N.push(P)),1!==$&&N.unshift(F),Z!==I&&N.push(j)}var tt=null;y&&(tt=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(D-1)*R+1,D*R>c?c:D*R])));var et=!this.hasPrev()||!I,nt=!this.hasNext()||!I;return h.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},z),tt,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:et?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),et)),"aria-disabled":et},this.renderPrev(G)),N,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:nt?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),nt)),"aria-disabled":nt},this.renderNext(V)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:T,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:D,pageSize:R,pageSizeOptions:L,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n={};if("current"in t&&(n.current=t.current,t.current!==e.current&&(n.currentInputValue=n.current)),"pageSize"in t&&t.pageSize!==e.pageSize){var r=e.current,i=C(t.pageSize,e,t);r=r>i?i:r,"current"in t||(n.current=r,n.currentInputValue=r),n.pageSize=t.pageSize}return n}}]),n}(h.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:S,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:S,locale:x.a,style:{},itemRender:function(t,e,n){return n},totalBoundaryShowSizeChanger:50};var k=E},"6RRn": +/*!*******************************************!*\ + !*** ./node_modules/rc-table/es/index.js ***! + \*******************************************/ +/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ +/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(t,e,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(e,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(e,"a",(function(){return a.a})),e.c=r.b},"6eGT": +/*!*******************************************************!*\ + !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";e.a=function(t){return null}},"7Cbv": +/*!**************************************************************!*\ + !*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&o.test(t)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return u(r)}},"7ahc": +/*!*************************************************************!*\ + !*** ./src/components/markdown-editor/code-block/index.tsx ***! + \*************************************************************/ +/*! exports provided: default, MyCodeMirror */ +/*! exports used: MyCodeMirror, default */function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,n=t.onChange,i=t.mode,a=t.options,o=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();n&&n(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,n=t.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7qnI": +/*!********************************************************!*\ + !*** ./src/components/Editor/NullChildEditor/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/tooltip/style */"5Dmo");var r=n(/*! antd/es/tooltip */"3S7+"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! ./index.less?modules */"O2Wb"),d=n.n(h),f=l.a.TextArea,p=function(t){Object(o.a)(n,t);var e=Object(s.a)(n);function n(){return Object(i.a)(this,n),e.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var t=this,e=this.props,n=e.index,i=e.onAnswerChange,a=e.addChildAnswer,o=e.exerciseIsPublish,s=e.answers,l=e.activeOptionErrorIndex,c=e.flex,h=void 0===c?"0 0 1000px":c;return u.a.createElement("div",{className:d.a.flex},u.a.createElement("div",{className:"".concat(d.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"答案(填空",n+1,"):"),u.a.createElement("div",{className:"".concat(d.a.flex," ").concat(d.a.flex1),style:{flexDirection:"column"}},s.map((function(e,c){var p="".concat(n,"-").concat(c);return u.a.createElement("div",{className:"".concat(d.a.flex," ").concat(d.a.flex1),key:c},u.a.createElement("div",{className:d.a.flex1,style:{flex:h}},u.a.createElement("div",null,u.a.createElement(f,{className:p===l?d.a.error:"",spellCheck:!1,rows:4,value:e||"",defaultValue:"请输入参考答案".concat(0==c?"":"(可选)"),onChange:function(t){return i(n,c,t.target.value)},style:{minHeight:95}}))),!o&&u.a.createElement(u.a.Fragment,null,0!=c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(d.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return t.props.deleteChildAnswer(n,c)},style:{float:"right"}})),0===c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(d.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return t.props.deleteChildAnswermain(n,c)},style:{float:"right"}})),u.a.createElement(r.a,{title:"新增参考答案"},u.a.createElement("i",{className:"".concat(d.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return a(n)},style:{float:"right",visibility:c==s.length-1?"":"hidden"}}))))}))))}}]),n}(c.Component);e.a=p},"815F": +/*!***************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! + \***************************************************/ +/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ +/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(t,e,n){"use strict";n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"b",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(t,e){return null!=t?t:e}function u(t){return function t(e){return Object(o.a)(e).map((function(e){if(!Object(l.i)(e))return Object(s.a)(!e,"Tree/TreeNode can only accept TreeNode as children."),null;var n=e.key,r=e.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),h=t(o);return h.length&&(u.children=h),u})).filter((function(t){return t}))}(t)}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===e?[]:e),a=[];function o(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===t.length-1])});return a.push(p),!0===e||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(t),a}function d(t,e,n){var r;n?"string"==typeof n?r=function(t){return t[n]}:"function"==typeof n&&(r=function(t){return n(t)}):r=function(t,e){return c(t.key,e)},function n(i,a,o){var s=i?i.children:t,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),h={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};e(h)}s&&s.forEach((function(t,e){n(t,e,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.initWrapper,r=e.processEntity,i=e.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),d(t,(function(t){var e=t.node,n=t.index,i=t.pos,a=t.key,u=t.parentPos,h={node:e,index:n,key:a,pos:i,level:t.level},d=c(a,i);o[i]=h,s[d]=h,h.parent=o[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),a),i&&i(l),l}function p(t,e){var n=e.expandedKeys,r=e.selectedKeys,i=e.loadedKeys,a=e.loadingKeys,o=e.checkedKeys,s=e.halfCheckedKeys,l=e.dragOverNodeKey,c=e.dropPosition,u=e.keyEntities[t];return{eventKey:t,expanded:-1!==n.indexOf(t),selected:-1!==r.indexOf(t),loaded:-1!==i.indexOf(t),loading:-1!==a.indexOf(t),checked:-1!==o.indexOf(t),halfChecked:-1!==s.indexOf(t),pos:String(u?u.pos:""),dragOver:l===t&&0===c,dragOverGapTop:l===t&&-1===c,dragOverGapBottom:l===t&&1===c}}function g(t){var e=t.data,n=t.expanded,r=t.selected,a=t.checked,o=t.loaded,l=t.loading,c=t.halfChecked,u=t.dragOver,h=t.dragOverGapTop,d=t.dragOverGapBottom,f=t.pos,p=t.active,g=Object(i.a)(Object(i.a)({},e),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),g}},"8EBN": +/*!**********************************************!*\ + !*** ./node_modules/codemirror/mode/meta.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e-1&&e.substring(i+1,e.length);if(a)return t.findModeByExtension(a)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
      "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,n,r,i){if(n>=e.length||e[n].level<=r)return n;var a=e[n];i.push("
    • "+a.text+"");var o=[];return n=t(e,++n,a.level,o),o.length>0&&(i.push("
        "),o.forEach((function(t){i.push(t)})),i.push("
      ")),i.push("
    • "),n=t(e,n,r,i)}(g,0,0,m),m.push("
    "),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(s.a)(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||""),i=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(i)>=0){var a=w(),o=r;r=a,T[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,w=function(){return"__special_katext_id_".concat(k++,"__")},T={};function O(){k=0,T={}}function L(t){return t=t.replace(E,(function(t,e){var n=w();return T[n]={type:"inline",expression:e},n}))}var A=v.listitem;v.listitem=function(t){return A(L(t))};var D=v.paragraph;v.paragraph=function(t){return D(L(t))};var R=v.tablecell;v.tablecell=function(t,e){return R(L(t),e)},v.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

    ".concat(t,"

    "):'
    ').concat(n?t:Object(p.escape)(t,!0),"
    \n"):'
    '+(n?t:Object(p.escape)(t,!0))+"
    "},v.heading=function(t,e,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:r,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var _=f.a,I=(n("SJMd"),n("ulZh")),N=n.n(I),M=n("m3rI"),P=n("Oy/b"),F=n("p5ED"),j=n("ErOA"),B=function(t,e){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function U(t,e){function n(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function H(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{l(r.next(t))}catch(t){a(t)}}function s(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((r=r.apply(t,e||[])).next())}))}function G(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var n=document.createElement("div");n.className=""+e.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",t.typeName),n.innerHTML=t.icon,n.addEventListener("click",(function(){e.markerToolbarButtonClicked(n,t)})),e.buttons.push(n),e.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),J=function(){function t(t,e,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,n,r=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(e=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:r.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){r.panelButtonClick(t)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,n=-1;if(t!==this.activePanel){n=this.panels.indexOf(t),this.panelRow.innerHTML="";var r=t.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,r){var i,a;t.className=e.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:e.toolboxButtonStyleColorsClass.name))}))},t}(),Q=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=t.getColorBox(n);e.appendChild(r),t.colorBoxes.push(r)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentColor(t,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=t,a.style.borderRadius=r/2+"px","transparent"===t&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},e.prototype.setCurrentColor=function(t,e){var n=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(Q),et=function(){function t(t,e,n){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),nt=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),rt=function(){function t(){this.GRIP_SIZE=10,this.visual=z.createGroup(),this.visual.appendChild(z.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(z.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),it=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),at=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(z.createTransform()),i.setupControlBox(),i}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=z.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(e);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+t.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),n=z.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var n=z.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=z.createGroup();var t=z.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=z.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=z.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new nt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(z.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,r=(this.width+this.CB_DISTANCE)/2-t/2,i=(this.height+this.CB_DISTANCE)/2-t/2,a=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,e,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*e,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(et),ot=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=z.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&z.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&z.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&z.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&z.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.title="Rectangle marker",e}(at),st=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentWidth(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),t.widthBoxes.push(r)})),e},e.prototype.setCurrentWidth=function(t,e){var n=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(Q),lt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.styles.length-5+"%",r.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentStyle(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),t.styleBoxes.push(r)})),e},e.prototype.setCurrentStyle=function(t,e){var n=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(Q),ct=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ht=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=z.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(z.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.x1=this.x1*e,this.y1=this.y1*n,this.x2=this.x2*e,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=z.createGroup(),this.selectorLine=z.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=z.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),z.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),z.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),z.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.fonts.length-5+"%",r.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentFont(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),t.fontBoxes.push(r)})),e},e.prototype.setCurrentFont=function(t,e){var n=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(Q),pt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(n=!0)})),n},e.prototype.createVisual=function(){this.visual=z.createGroup(),this.bgRectangle=z.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=z.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(z.createTransform()),this.textElement.transform.baseVal.appendItem(z.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(z.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,r=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,r)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,r=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,r=this.height/2-e.height*t/2),{x:n,y:r}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),n=this.getTextPosition(e);n.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),z.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*t,y:n.height*t};e.x-=r.x/2,e.y-=r.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&z.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&z.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(at),gt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=z.createGroup(),this.drawingImage=z.createImage(),this.visual.appendChild(this.drawingImage);var t=z.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),z.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=e[0],r=e[1],i=e[2],a=e[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){z.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),z.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(at),mt=function(t){function e(e,n,r){var i=t.call(this,e,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){t.setCurrentType(i,a)})),e.appendChild(a),"both"===i||"start"===i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return e},e.prototype.setCurrentType=function(t,e){var n=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(Q),vt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new mt("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+r/2)+" "+t+","+(e-r/2)+" "+(t+n/2)+","+(e+r/2)},e.prototype.createTips=function(){this.arrow1=z.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(z.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=z.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(z.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",z.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),z.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new tt("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,n,r,i){var a=t.call(this,e,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentOpacity(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),t.opacityBoxes.push(r)})),e},e.prototype.setCurrentOpacity=function(t,e){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(Q),xt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new tt("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&z.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new tt("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new tt("Fill color",r.defaultColorSet,i.bgColor,St),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new rt,i.tipGrip.visual.transform.baseVal.appendItem(z.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){z.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=z.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,n){"new"===this.state&&t.prototype.pointerDown.call(this,e,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var n="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(n),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var n=this.unrotatePoint(e);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(z.setAttributes(this.bgRectangle,[["fill",t]]),z.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:e+n/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?r.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),wt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(Et),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=z.createGroup(),this.selectorCurve=z.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=z.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),z.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),z.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),z.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=z.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=z.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,n){this.curveX=this.curveX*e,this.curveY=this.curveY*n,t.prototype.scale.call(this,e,n)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),Lt=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),At=function(t){function e(e,n,r){var i=t.call(this,e,!1)||this;return i.dataUrl=n,i.state=r,i}return U(e,t),e}(Lt),Dt=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,r)||this;return i.marker=n,i}return U(e,t),e}(Lt),Rt=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var n=this[t].indexOf(e);n>-1&&this[t].splice(n,1)},t}(),_t=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,wt,Et,xt,Ct,kt,yt,dt,Ot]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var n=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==n&&e._availableMarkerTypes.push(n)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new Lt(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var n=!1;t||this.eventListeners.beforeclose.forEach((function(t){var r=new Lt(e,!0);t(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new Lt(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Dt(t,t._currentMarker,!0);n(r),r.defaultPrevented&&(e=!0)})),!e){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new Dt(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Dt(t,void 0,!0);n(r),r.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=r.markers[e];r.setCurrentMarker(r.markers[e]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(e){return e(new Dt(t,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===e.width&&n.height===e.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),r1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.markerImage.getBoundingClientRect();return{x:(t-n.left)/this.zoomLevel,y:(e-n.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){W.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new Lt(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new Lt(t))})))},t.instanceCounter=0,t}(),It=function(t,e){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Nt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}It(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Mt(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{l(r.next(t))}catch(t){a(t)}}function s(t){try{l(r.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((r=r.apply(t,e||[])).next())}))}function Pt(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&e>0){var n=new qt(t,e),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=jt.createDefs();a.appendChild(o);var s=jt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=jt.createPath(jt.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=jt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(jt.createTSpan(t+":"+e)),a.appendChild(c);var u=c.getBBox();jt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=jt.createPath(jt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),jt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},t}(),Xt=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Nt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Wt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=jt.createGroup(),this.visual.appendChild(jt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(jt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(n){return jt.setAttributes(n,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=n,this.container=r,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&jt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=jt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=jt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),jt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var n=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,r){var i=e.y+n*(r+1);jt.setAttributes(t,[["x1",""+e.x],["y1",""+i],["x2",""+(e.x+e.width)],["y2",""+i]])}));var r=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,n){var i=e.x+r*(n+1);jt.setAttributes(t,[["x1",""+i],["y1",""+e.y],["x2",""+i],["y2",""+(e.y+e.height)]])})),jt.setAttributes(this.cropShadeElement,[["d",jt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,e.x,e.y,e.width,e.height)]]),this.topLeftGrip.setCenter(e.x,e.y),this.topRightGrip.setCenter(e.x+e.width,e.y),this.bottomLeftGrip.setCenter(e.x,e.y+e.height),this.bottomRightGrip.setCenter(e.x+e.width,e.y+e.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},t.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.container.getBoundingClientRect();return{x:t-n.left+this.margin,y:e-n.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,n=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+e),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),n=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-e.width),e.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(e.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=r,e.height=this.cropRect.y+this.cropRect.height-e.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?e.height=this.aspectRatio.getVerticalLength(e.width):e.height+=r}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,e.x>=this.margin&&e.y>=this.margin&&e.x-this.margin+e.width<=this.canvasWidth&&e.y-this.margin+e.height<=this.canvasHeight&&(this.cropRect=e,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=t-this.cropRect.width/2,this.cropRect.y=e-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},t.prototype.getRescaledRect=function(t,e,n,r,i,a){var o=n/t,s=r/e;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},t.prototype.scaleCanvas=function(t,e){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},t}(),Jt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();jt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;e+="h4v"+-r+"h1v"+r}e+="v1H0Z",this.scaleShape=jt.createPath(e);var i=jt.createTransform();this.scaleShape.transform.baseVal.appendItem(i),t.appendChild(this.scaleShape),this.angleLabelElement=jt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=jt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=jt.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Qt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*r,c.height=t.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/a,h=e.naturalHeight/(t.height.baseVal.value-2*r)/o,c.width=e.naturalWidth/a,c.height=e.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(a,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},t}(),te=function(){function t(e){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=t.instanceCounter++,this.styles=new Bt(this.instanceNo),this.target=e,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+this.CANVAS_MARGIN):0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.displayMode?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,"popup"===this.displayMode&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var e=new zt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var n=[];this.aspectRatios.forEach((function(e){var r=new Wt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);r.onClick=function(){return t.ratioButtonClicked(e)},n.push(r)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,e.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Wt('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var i=new Wt('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,i.isActive=t.zoomToCropEnabled},e.addButton(i),!Ft.isLicensed){var a=new Kt;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new zt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Wt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Wt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var e=new zt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var n=new Wt('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,e.addButton(n);var r=new Wt('',"Rotate right");r.onClick=this.rotateRightButtonClicked,e.addButton(r);var i=new Kt;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Jt("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},i.addElement(this.straightener.getUI());var a=new zt;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new Wt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new Wt('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.cropImage.getBoundingClientRect();return{x:t-n.left,y:e-n.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var e=this.editingTargetRotationContainer.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(e,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Mt(this,void 0,void 0,(function(){var t,e;return Pt(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return t=n.sent(),e=this.getState(),this.renderEventListeners.forEach((function(n){return n(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Mt(this,void 0,void 0,(function(){var t;return Pt(this,(function(e){switch(e.label){case 0:return(t=new Qt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),jt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return e.sent(),[4,t.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,e.sent()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=n("8hTe"),ne=n.n(ee),re=/]*>/g;e.a=function(t){var e=t.value,n=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,E=void 0===C?{}:C,k=t.stylesPrev,w=void 0===k?{}:k,L=String(n),A=Object(u.useRef)(),D=Object(u.useRef)(),R=Object(u.useState)(""),I=Object(s.a)(R,2),B=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(s.a)(H,2),V=G[0],z=G[1],W=Object(u.useMemo)((function(){try{L=(L=L.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+M.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+M.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+M.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?[TOC]

    ",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,n){var r=e[n],i=r.type,a=r.expression;return Object(P.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),O(),p){var n=document.createElement("div");return n.innerHTML=t,n.innerText}return setTimeout((function(){return Y()}),500),t}),[L]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var n=e.getAttribute("src");U(n),z("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),z("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),z("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),z("html");else if(r.startsWith("#")){t.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(E=Object(a.a)(Object(a.a)({},E),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(N.a.isSupported()){var e=new N.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),O(),b()}}),[W,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(a.a)({},E),className:"".concat(f||""," markdown-body ").concat(ne.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(A.current.style.display="flex",A.current.style.width=t.target.clientWidth+"px",A.current.style.height=t.target.clientHeight+"px",A.current.style.top=t.target.offsetTop+"px",A.current.style.left=t.target.offsetLeft+"px",D.current.src=t.target.getAttribute("src")):A.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:A,className:ne.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(t=new te(D.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A.current.style.display="none",t.next=3,Object(j.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(n=t.sent)&&n.id&&m(D.current.getAttribute("src").replace(M.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(t=new _t(D.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.current.style.display="none",!D.current){t.next=6;break}return t.next=4,Object(j.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(n=t.sent)&&n.id&&m(D.current.getAttribute("src").replace(M.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:D,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(F.a,{close:!0,data:B,hasMask:y,type:null!=B&&B.length?V:"",style:Object(a.a)({},w),onClose:function(){return U("")}}))}},"9VGf": +/*!****************************************!*\ + !*** ./src/components/useInterval.tsx ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(t,e){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=t})),Object(r.useEffect)((function(){if(null!==e){var t=setInterval((function(){n.current()}),e);return function(){return clearInterval(t)}}}),[e])}},BU3w: +/*!***************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! + \***************************************************/ +/*! exports provided: injectCSS, updateCSS */ +/*! exports used: updateCSS */function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(e=n.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=t;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=a(t,n);return f["rc-util-key"]=e,f}},Bd2K: +/*!********************************************************!*\ + !*** ./node_modules/codemirror/addon/edit/closetag.js ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){t.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=t.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:r(e,!0)}(e)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||a(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,g)>-1)s[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&i(y,b)>-1;s[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var E=s[c];r.replaceRange(E.text,o[c].head,o[c].anchor,"+insert");var k=r.listSelections().slice(0);k[c]={head:E.newPos,anchor:E.newPos},r.setSelections(k),!C&&E.indent&&(r.indentLine(E.newPos.line,null,!0),r.indentLine(E.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(e,n){for(var r=e.listSelections(),i=[],o=n?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(e.replaceSelections(i),r=e.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}var r=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var n=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(y,"$1")+e:t+e}function x(t,e,n){var r=t.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>e)n.splice(e);else for(;n.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var n=this.rules.block.code.exec(t);if(n){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:_(i,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var n,r,i,a,o,s,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(n),v!==m-1&&(g="\n"===n.charAt(n.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):N(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=M(e[2],"()");if(n>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,r).trim(),e[3]=""}var i=e[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=e[3]?e[3].slice(1,-1):"";return P(e,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},e[0])}},e.reflink=function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return P(n,r,n[0])}},e.strong=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}},e.em=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:e[0],text:n}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?e(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},e.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?e(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.inlineText=function(t,e,n){var r,i=this.rules.inline.text.exec(t);if(i)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},t}(),j=w,B=E,U=T,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:j,table:j,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=B(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=B(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=B(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=//,H.html=B(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=B(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=B(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=B(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=B(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:j,paragraph:B(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:j,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:j,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=B(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=B(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=B(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=B(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=B(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=B(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=B(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=B(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=B(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=B(G._blockSkip,"g").getRegex(),G.overlapSkip=B(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=B(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=B(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=B(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=B(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=B(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:B(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||z,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:W.normal,inline:K.normal};this.options.pedantic?(e.block=W.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=W.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,n){return new e(n).lex(t)};var n,r,i,a=e.prototype;return a.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(t,e,n){var r,i,a,o;for(void 0===e&&(e=[]),void 0===n&&(n=!0),t=t.replace(/^ +$/gm,"");t;)if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),r.type&&e.push(r);else if(r=this.tokenizer.code(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((o=e[e.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.nptable(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),e.push(r);else if(r=this.tokenizer.list(t)){for(t=t.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a=this.tokenizer.escape(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.tag(t,n,r))t=t.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,e.push(a);else if(a=this.tokenizer.link(t))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.strong(t,s,i))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.em(t,s,i))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.codespan(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.br(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.del(t))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),e.push(a);else if(a=this.tokenizer.autolink(t,Y))t=t.substring(a.raw.length),e.push(a);else if(n||!(a=this.tokenizer.url(t,Y))){if(a=this.tokenizer.inlineText(t,r,q))t=t.substring(a.raw.length),i=a.raw.slice(-1),e.push(a);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(a.raw.length),e.push(a);return e},n=e,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&t(n.prototype,r),i&&t(n,i),e}(),$=r.defaults,Z=k,J=S,Q=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return r?'
    '+(n?t:J(t,!0))+"
    \n":"
    "+(n?t:J(t,!0))+"
    \n"},e.blockquote=function(t){return"
    \n"+t+"
    \n"},e.html=function(t){return t},e.heading=function(t,e,n,r){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},e.list=function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
  • "+t+"
  • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

    "+t+"

    \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
    ":"
    "},e.del=function(t){return""+t+""},e.link=function(t,e,n){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return n;var r='"},e.image=function(t,e,n){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return n;var r=''+n+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,n){return""+n},e.image=function(t,e,n){return""+n},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var n=e;do{this.seen[n]++,e=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),nt=r.defaults,rt=C,it=function(){function t(t){this.options=t||nt,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,n){return new t(n).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var n,r,i,a,o,s,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+st(t.message+"",!0)+"
    ";throw t}}return ht.options=ht.setOptions=function(t){return at(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=at({},t);if(t.renderer&&function(){var n=ht.defaults.renderer||new Q,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o",triples:"",explode:"[]{}"},n=t.Pos;function r(t,n){return"pairs"==n&&"string"==typeof t?t:"object"==typeof t&&null!=t[n]?t[n]:e[n]}t.defineOption("autoCloseBrackets",!1,(function(e,n,o){o&&o!=t.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),n&&(a(r(n,"pairs")),e.state.closeBrackets=n,e.addKeyMap(i))}));var i={Backspace:function(e){var i=s(e);if(!i||e.getOption("disableInput"))return t.Pass;for(var a=r(i,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(e){var n=s(e),i=n&&r(n,"explode");if(!i||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o1&&d.indexOf(i)>=0&&e.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(n(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(n(b.line,b.ch-1),b);if(t.isWordChar(x)||S==i||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(i)>=0&&e.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):i,E=l%2?i:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)e.execCommand("goCharRight");else if("surround"==u){var i=e.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});e.setSelections(i)}else"both"==u?(e.replaceSelection(C+E,null),e.triggerElectric(C+E),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var a,o}))}(i,e)}}function s(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var r=t.getRange(n(e.line,e.ch-1),n(e.line,e.ch+1));return 2==r.length?r:null}function c(t,e){var r=t.getTokenAt(n(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}a(e.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},EgHG: +/*!*********************************************************************!*\ + !*** ./src/pages/Problemset/NewItem/components/editor.less?modules ***! + \*********************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrap:"wrap___2vVqS",modal:"modal___AcHKf",titleWrap:"titleWrap___YV24j",required:"required___3XHD4",title:"title___3yV4s",colorGray:"colorGray___2oRqv",choiceWrap:"choiceWrap___2ypJV",answer:"answer___1tmCF",activeAnswer:"activeAnswer___7NV4I",deleteIcon:"deleteIcon___3LBHf",addIcon:"addIcon___2MzTA",editorWrap:"editorWrap___1Xe94",htmlWrap:"htmlWrap___14WFO",radio:"radio___1kFzU",color333:"color333___1Kwa2",color999:"color999___4cmSp",fold:"fold___1JSf-",head:"head___-ebd0"}},GfqC: +/*!********************************************************!*\ + !*** ./node_modules/rc-upload/es/index.js + 6 modules ***! + \********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a);function s(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function l(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){n.append(e+"[]",t)})):n.append(e,t.data[e])})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot "+t.method+" "+t.action+" "+e.status+"'",r=new Error(n);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),s(e)):t.onSuccess(s(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(n),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=t.type||"",a=i.replace(/\/.*$/,"");return n.some((function(t){var e,n,o=t.trim();return"."===o.charAt(0)?(e=r.toLowerCase(),n=o.toLowerCase(),-1!==e.indexOf(n,e.length-n.length)):/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o}))}return!0};var f=function(t,e,n){var r=function t(r,i){i=i||"",r.isFile?r.file((function(t){n(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var n=t.createReader(),r=[];!function t(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?e(r):t()}))}()}(r,(function(e){e.forEach((function(e){t(e,""+i+r.name+"/")}))}))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),S=o()((v(t={},a,!0),v(t,a+"-disabled",l),v(t,s,s),t)),C=l?{}:{onClick:m?this.onClick:function(){},onKeyDown:m?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},C,{className:S,role:"button",style:u}),i.a.createElement("input",p({},(e=x,Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(r.Component),S=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:1,n=_.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(w.a)(t).map((function(t,n){if(!s.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,i=t.key,a=t.props,o=a.children,l=Object(c.a)(a,["children"]);return e||!r?T(t):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:O(o)})})).filter((function(t){return t}))}var L=n("2Qr1"),A=n("qNPg"),D=n("U8pU"),R=n("Kwbf"),_=n("WKfj");var I=function(t){var e=t.mode,n=t.options,r=t.children,i=t.backfill,a=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=n||O(r);if(Object(R.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(R.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(R.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(R.a)("combobox"===e||!i,"`backfill` only works with `combobox` mode."),Object(R.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(R.b)("combobox"!==e||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(R.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(R.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(_.d)(p);Object(R.a)(!f||S.every((function(t){return"object"===Object(D.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(R.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(w.a)(r).some((function(t){if(!s.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(w.a)(t.props.children).every((function(e){return!(s.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(R.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(R.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},N=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:O,flattenOptions:L.d,getLabeledValue:L.e,filterOptions:L.b,isValueDisabled:L.g,findValueOption:L.c,warningProps:I,fillOptionsWithMissingValue:L.a}),M=function(t){Object(a.a)(n,t);var e=Object(o.a)(n);function n(){var t;return Object(r.a)(this,n),(t=e.apply(this,arguments)).selectRef=s.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);M.Option=S,M.OptGroup=E;var P=M;e.c=P},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(t){Object(a.a)(n,t);var e=Object(o.a)(n);function n(t){var i;Object(r.a)(this,n),i=e.call(this,t);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},NvD2: +/*!******************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/conductUtil.js ***! + \******************************************************/ +/*! exports provided: isCheckDisabled, conductCheck */ +/*! exports used: conductCheck */function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(t,e){var n=new Set;return t.forEach((function(t){e.has(t)||n.add(t)})),n}function a(t){var e=t||{},n=e.disabled,r=e.disableCheckbox,i=e.checkable;return!(!n&&!r)||!1===i}function o(t,e,n,o){var s,l=[];s=o||a;var c=new Set(t.filter((function(t){var e=!!n[t];return e||l.push(t),e}))),u=new Map,h=0;return Object.keys(n).forEach((function(t){var e=n[t],r=e.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(e),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(t){return"'".concat(t,"'")})).join(", "))),!0===e?function(t,e,n,r){for(var a=new Set(t),o=new Set,s=0;s<=n;s+=1){(e.get(s)||new Set).forEach((function(t){var e=t.key,n=t.node,i=t.children,o=void 0===i?[]:i;a.has(e)&&!r(n)&&o.filter((function(t){return!r(t.node)})).forEach((function(t){a.add(t.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(e.get(c)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!r(n)&&t.parent&&!l.has(t.parent.key))if(r(t.parent.node))l.add(e.key);else{var i=!0,s=!1;(e.children||[]).filter((function(t){return!r(t.node)})).forEach((function(t){var e=t.key,n=a.has(e);i&&!n&&(i=!1),s||!n&&!o.has(e)||(s=!0)})),i&&a.add(e.key),s&&o.add(e.key),l.add(e.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,h,s):function(t,e,n,r,a){for(var o=new Set(t),s=new Set(e),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(t){var e=t.key,n=t.node,r=t.children,i=void 0===r?[]:r;o.has(e)||s.has(e)||a(n)||i.filter((function(t){return!a(t.node)})).forEach((function(t){o.delete(t.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!a(n)&&t.parent&&!c.has(t.parent.key))if(a(t.parent.node))c.add(e.key);else{var r=!0,i=!1;(e.children||[]).filter((function(t){return!a(t.node)})).forEach((function(t){var e=t.key,n=o.has(e);r&&!n&&(r=!1),i||!n&&!s.has(e)||(i=!0)})),r||o.delete(e.key),i&&s.add(e.key),c.add(e.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,e.halfCheckedKeys,u,h,s)}},O2Wb: +/*!******************************************************************!*\ + !*** ./src/components/Editor/NullChildEditor/index.less?modules ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OZM5: +/*!*****************************************!*\ + !*** ./node_modules/rc-tree/es/util.js ***! + \*****************************************/ +/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ +/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"g",(function(){return h})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"e",(function(){return g})),n.d(e,"f",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(t,e){var n=t.slice(),r=n.indexOf(e);return r>=0&&n.splice(r,1),n}function s(t,e){var n=t.slice();return-1===n.indexOf(e)&&n.push(e),n}function l(t){return t.split("-")}function c(t,e){return"".concat(t,"-").concat(e)}function u(t){return t&&t.type&&t.type.isTreeNode}function h(t,e){var n=[t];return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){var r=e.key,i=e.children;n.push(r),t(i)}))}(e[t].children),n}function d(t,e){var n=t.clientY,r=e.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(t,e){if(t)return e.multiple?t.slice():t.length?[t[0]]:t}function p(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(t))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0}}return e}function g(t,e){var n=new Set;return(t||[]).forEach((function(t){!function t(r){if(!n.has(r)){var i=e[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&t(a.key)}}}(t)})),Object(r.a)(n)}function m(t){var e={};return Object.keys(t).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(e[n]=t[n])})),e}},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),g=n("bdgK"),m=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(t){var e=t.value,n=void 0===e?"":e,r=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),S=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(t){var e=t.onActionCallback,n=t.title,r=t.icon,i=t.actionName,a=t.className,o=void 0===a?"":a,s=t.children;return d.a.createElement("a",{title:n,className:o,onClick:function(){e(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var E=function(t){var e=t.watch,n=t.showNullButton,r=t.onActionCallback,i=t.fullScreen,a=t.insertTemp,o=t.hidetoolBar,s=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(S,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(C,Object(y.a)({},t,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},k=n("M8RZ"),w=(n("+L6B"),n("2/Rp")),T=(n("y8nQ"),n("Vl3Y")),O=(n("5NDa"),n("5rEg")),L={labelCol:{span:4},wrapperCol:{span:20}},A=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(T.a,Object(y.a)({},L,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(O.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(O.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(w.a,{type:"ghost",onClick:n},"取消")))},D=n("7ahc"),R=n("k1fw"),_=(n("HmJG"),n("BjJ7")),I=T.a.useForm,N={width:280,marginRight:10},M={labelCol:{span:5},wrapperCol:{span:19}},P=function(t){var e=t.callback,n=t.onCancel,r=I(),i=Object(s.a)(r,1)[0],a=Object(h.useRef)();function o(t,e){i.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(T.a,Object(y.a)({form:i},M,{className:"upload-image-panel",onFinish:function(t){e(Object(R.a)(Object(R.a)({},t),{},{name:a.current}))}}),d.a.createElement(T.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(O.a,{style:N})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];a.current=e.name,j(e,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(O.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(w.a,{type:"ghost",onClick:n},"取消")))};function F(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function j(t,e){if(!t)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",t),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){e(JSON.parse(n.target.responseText),t)}),!1),r.addEventListener("error",(function(t){console.error(t)}),!1),r.open("POST","".concat(_.a,"/api/attachments.json")),r.send(n)}n("giR+");var B,U,H=n("fyUT"),G=(n("7Kak"),n("9yH6")),V=G.a.Group,z={margin:"0 8px"},W=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:z},"单元格数:"),d.a.createElement("span",{style:z},"行数"),d.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:z},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:z},"对齐方式:"),d.a.createElement(T.a.Item,{name:"align"},d.a.createElement(V,null,d.a.createElement(G.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(G.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(G.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(G.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(w.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),q=n("7Cbv"),Y="------------",X={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},$=n("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var J=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Q=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(B={},Object(l.a)(B,J+"-B","bold"),Object(l.a)(B,J+"-I","italic"),B),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,n=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,S=void 0===b?400:b,C=t.miniToolbar,w=void 0!==C&&C,T=t.isFocus,O=void 0!==T&&T,L=t.watch,R=t.insertTemp,_=t.mode,I=void 0===_?"markdown":_,N=t.id,M=void 0===N?"markdown-editor-id":N,F=t.showResizeBar,B=void 0!==F&&F,U=t.noStorage,H=void 0!==U&&U,G=t.showNullButton,V=void 0!==G&&G,z=t.hidetoolBar,Y=void 0!==z&&z,J=t.fullScreen,nt=void 0!==J&&J,rt=t.onBlur,it=t.onCMBeforeChange,at=t.onFullScreen,ot=t.className,st=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(s.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(n),bt=Object(s.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(L),Et=Object(s.a)(Ct,2),kt=Et[0],wt=Et[1],Tt=Object(h.useState)(nt),Ot=Object(s.a)(Tt,2),Lt=Ot[0],At=Ot[1],Dt=Object(h.useState)(""),Rt=Object(s.a)(Dt,2),_t=Rt[0],It=Rt[1],Nt=Object(h.useState)(0),Mt=Object(s.a)(Nt,2),Pt=Mt[0],Ft=Mt[1],jt=Object(h.useState)(S),Bt=Object(s.a)(jt,2),Ut=Bt[0],Ht=Bt[1],Gt=Object(h.useState)(!1),Vt=Object(s.a)(Gt,2),zt=(Vt[0],Vt[1]),Wt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Zt=Object(h.useRef)(),Jt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Wt.current}});case 2:null!=(n=t.sent)&&null!==(e=n.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),n.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('
    ').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==at||at(Lt)}),[Lt]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:I,lineNumbers:!w,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,n){if(!ct){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==I)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();j(c,(function(e){var n,r,i;e.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):Q.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return O&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,n){var r;if(Xt.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(e){var n=r[e],i=n.name.split(".").pop();j(n,(function(e){var r,a,o;e.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(n.name,"")):Q.includes(i)?t.replaceSelection('').concat(n.name,"")):t.replaceSelection("[".concat(n.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&(Qt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Qt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=r[n],i=(a=Object(s.a)(e,2))[0],o=a[1],c=Object(l.a)({},i,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},n=0,r=Object.entries(tt);n0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(M);t>=Pt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(M,xt),zt(!0))}}),1e4),Object(h.useEffect)((function(){wt(L)}),[mt,L]),Object(h.useEffect)((function(){mt&&O&&mt.focus()}),[mt,O]),Object(h.useEffect)((function(){if(kt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var n=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*n}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,kt]),Object(h.useEffect)((function(){if(mt&&it){function t(t,e){it(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,it]),Object(h.useEffect)((function(){if(mt&&rt){function t(){rt(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,rt]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==n?(mt.setValue(""),St("")):n!==mt.getValue()&&(mt.setValue(n),St(n),mt.setCursor(mt.lineCount(),0)))}),[mt,n]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),n=mt.getSelection(),r=n.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+n+"**"),""===n&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+n+"*"),""===n&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+n+"`"),""===n&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+n+"$$`"),""===n&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+n+"\n```"),mt.setCursor(e.line+1,n.length+1),mt.focus();case"line-break":return mt.replaceSelection("
    \n"),mt.focus();case"list-ul":return""===n?mt.replaceSelection("- "+n):mt.replaceSelection(r.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===n?mt.replaceSelection("1. "+n):mt.replaceSelection(r.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===n&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===n&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return wt(!kt),mt.focus();case"trigger-full-screen":return At(!Lt),mt.focus();case"link":return void It("link");case"code-block":return void It("code-block");case"upload-image":return void It("upload-image");case"add-table":return void It("add-table");default:throw new Error}}),[mt,kt,Lt]),ee=Object(h.useCallback)((function(t){switch(It(""),_t){case"link":var e=t.title,n=t.link;return mt.replaceSelection("[".concat(e,"](").concat(n,")")),mt.focus();case"code-block":var r=t.language,i=t.content;return mt.replaceSelection(["```"+r,i,"```"].join("\n")),mt.focus();case"upload-image":var a=t.src,o=t.alt,s=t.name;return a.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(s,"")):mt.replaceSelection('').concat(s,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(r=300),Ht(S+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(S)}),[S]);var ie={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Pt){var t=new Date(Pt),e=t.getHours(),n=t.getMinutes(),r=t.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(r)}return 0}),[Pt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(st," ").concat(kt?"on-preview":""," ").concat(w?"mini":""," ").concat(Lt?"full-screen":""),style:ie},d.a.createElement(E,{insertTemp:R,watch:kt,fullScreen:Lt,showNullButton:V,onActionCallback:te,hidetoolBar:Y,uuid:Wt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),kt?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===I&&d.a.createElement(v,{value:xt}),"stex"!==I&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var n=mt.getValue();n=n.replace(t,e),St(n),null==mt||mt.setValue(n)}})):null))),B?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(k.a,null,et[_t]?d.a.createElement(r.a,{centered:!0,title:et[_t],visible:!0,onCancel:re,footer:null},ne):null))}},"P/tu": +/*!*********************************************!*\ + !*** ./src/components/CustomTree/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/tree/style */"ozfa");var r=n(/*! antd/es/tree */"MJZm"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! @/service/problemset */"WCUW"),f=n(/*! ./index.less?modules */"spXi"),p=n.n(f);e.a=function(t){var e=t.value,n=t.onChange,l=t.defaultValue,f=t.disabled,g=Object(s.a)(t,["value","onChange","defaultValue","disabled"]),m=Object(u.useState)([]),v=Object(o.a)(m,2),y=v[0],b=v[1],x=Object(u.useState)("1"),S=Object(o.a)(x,2),C=S[0],E=S[1];Object(u.useEffect)((function(){k()}),[]);var k=function(){var t=Object(a.a)(c.a.mark((function t(){var e,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(d.y)({});case 2:null!=(e=t.sent)&&e.data&&(n=[{title:h.a.createElement("div",{title:"根目录",className:p.a.name},"根目录"),value:0,key:0,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:w(e.data||[])}],b(n),E("2"));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),w=function(t){return null==t?void 0:t.map((function(t){return function t(e){var n=e.children,r=Array.isArray(n)&&n.length>0,i=null==e?void 0:e.group_id;return{title:h.a.createElement("div",{title:null==e?void 0:e.name,className:p.a.name},null==e?void 0:e.name),value:i,key:i,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:r?null==n?void 0:n.map((function(e){return t(e)})):[]}}(t)}))},T=l?{defaultExpandedKeys:[0]}:{selectedKeys:e,defaultExpandedKeys:e};return h.a.createElement("div",{className:p.a.customTree},h.a.createElement(r.a,Object(i.a)({key:C},T,{showIcon:!0,treeData:y,onSelect:n,disabled:f},g)))}},RxwV: +/*!**********************************************************!*\ + !*** ./node_modules/rc-cascader/es/index.js + 4 modules ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/array-tree-filter/lib/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("q1tI"),i=n("uciX"),a=n("2W6z"),o=n.n(a),s=n("4IlW"),l=n("uK0f"),c=n.n(l);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n0;(d||!1===t.isLeaf)&&(u+=" ".concat(i,"-menu-item-expand"),t.loading||(h=r.createElement("span",{className:"".concat(i,"-menu-item-expand-icon")},o))),"hover"!==a||!d&&!1!==t.isLeaf||(c={onMouseEnter:this.delayOnSelect.bind(this,l),onMouseLeave:this.delayOnSelect.bind(this),onClick:l}),this.isActiveOption(t,e)&&(u+=" ".concat(i,"-menu-item-active"),c.ref=this.saveMenuItem(e)),t.disabled&&(u+=" ".concat(i,"-menu-item-disabled"));var f=null;t.loading&&(u+=" ".concat(i,"-menu-item-loading"),f=s||null);var p="";return"title"in t?p=t.title:"string"==typeof t[this.getFieldName("label")]&&(p=t[this.getFieldName("label")]),r.createElement("li",Object.assign({key:t[this.getFieldName("value")],className:u,title:p},c,{role:"menuitem",onMouseDown:function(t){return t.preventDefault()}}),t[this.getFieldName("label")],h,f)}},{key:"getActiveOptions",value:function(t){var e=this,n=this.props.options,r=t||this.props.activeValue;return c()(n,(function(t,n){return t[e.getFieldName("value")]===r[n]}),{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var t=this,e=this.props.options,n=this.getActiveOptions().map((function(e){return e[t.getFieldName("children")]})).filter((function(t){return!!t}));return n.unshift(e),n}},{key:"delayOnSelect",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function C(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=a.length?0:l:(l-=1)<0?a.length-1:l:0,r[i]=a[l][e.getFieldName("value")]}else if(t.keyCode===s.a.LEFT||t.keyCode===s.a.BACKSPACE)t.preventDefault(),r.splice(r.length-1,1);else if(t.keyCode===s.a.RIGHT)t.preventDefault(),a[o]&&a[o][e.getFieldName("children")]&&r.push(a[o][e.getFieldName("children")][0][e.getFieldName("value")]);else if(t.keyCode===s.a.ESC||t.keyCode===s.a.TAB)return void e.setPopupVisible(!1);r&&0!==r.length||e.setPopupVisible(!1);var c=e.getActiveOptions(r),u=c[c.length-1];e.handleMenuSelect(u,c.length-1,t),e.props.onKeyDown&&e.props.onKeyDown(t)}else e.setPopupVisible(!0)}},e.saveTrigger=function(t){e.trigger=t};var n=[];return"value"in t?n=t.value||[]:"defaultValue"in t&&(n=t.defaultValue||[]),o()(!("filedNames"in t),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),e.state={popupVisible:t.popupVisible,activeValue:n,value:n,prevProps:t},e.defaultFieldNames={label:"label",value:"value",children:"children"},e}return e=u,a=[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.prevProps,r={prevProps:t};return"value"in t&&!function(t,e){if(t===e)return!0;if(!t||!e)return!1;var n=t.length;if(e.length!==n)return!1;for(var r=0;r0?p=r.createElement(y,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):g=" ".concat(e,"-menus-empty");var m=p;return d&&(m=d(p)),r.createElement(i.a,Object.assign({ref:this.saveTrigger},f,{popupPlacement:u,builtinPlacements:c,popupTransitionName:n,action:l?[]:["click"],popupVisible:!l&&this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(e,"-menus"),popupClassName:a+g,popup:m}),r.cloneElement(h,{onKeyDown:this.handleKeyDown,tabIndex:l?void 0:0}))}}])&&k(e.prototype,n),a&&k(e,a),u}(r.Component)).defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:b,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},A);e.a=D},"SA+Z": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");t.exports=function(t){return r(t)||i(t)||a(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},SJMd: +/*!****************************************************!*\ + !*** ./node_modules/code-prettify/src/prettify.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],n=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,n,r,i){if(n){var a={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:e,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(t){for(var e=void 0,n=t.firstChild;n;n=n.nextSibling){var r=n.nodeType;e=1===r?e?t:n:3===r&&f.test(n.nodeValue)?t:e}return e===t?void 0:e}function g(t,e){var n,r={};!function(){for(var i=t.concat(e),a=[],o={},s=0,l=i.length;s=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(a.push(d),o[f]=null)}a.push(/[\0-\uffff]/),n=function(t){for(var e=0,n=!1,r=!1,i=0,a=t.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(a=0;ap[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(t){for(var r=t.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,a=[],o=0,s=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return r.join("")}var h=[];for(i=0,a=t.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var E=u;if(u+=v.length,m){var k=b[1],w=v.indexOf(k),T=w+k.length;b[2]&&(w=(T=v.length-b[2].length)-k.length);var O=y.substring(5);d(l,s+E,v.substring(0,w),a,c),d(l,s+E+w,k,S(O,k),c),d(l,s+E+T,v.substring(T),a,c)}else c.push(s+E,y)}t.decorations=c};return a}function m(t){var e=[],n=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=t.hashComments;r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=t.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=t.types;l&&n.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),g(e,n)}var v=m({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=t.ownerDocument,o=a.createElement("li");t.firstChild;)o.appendChild(t.firstChild);var s=[o];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&n){var o=t.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);t.nodeValue=u;var h=o.substring(s.index+s[0].length);if(h)t.parentNode.insertBefore(a.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,n=function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var a=t(i,1),o=e.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(t.nextSibling,0);(e=n.parentNode)&&1===e.nodeType;)n=e;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?t.console&&console.warn("cannot override language handler %s",i):b[i]=e}}function S(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=x&&(u+=2),s>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function E(t,e,n){var r=n||!1,i=e||null,a=document.createElement("div");return a.innerHTML="
    "+t+"
    ",a=a.firstChild,r&&y(a,r,!0),C({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function k(e,n){var r=n||document.body,i=r.ownerDocument||document;function a(t){return r.getElementsByTagName(t)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(g([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),x(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(m({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(m({keywords:"null,true,false"}),["json"]),x(m({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(m({keywords:i,cStyleComments:!0}),["java"]),x(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(m({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(m({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(g([],[["str",/^[\s\S]+/]]),["regex"]);var w=t.PR={createSimpleLexer:g,registerLangHandler:x,sourceDecorator:m,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:E,prettyPrint:k},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return w}))}()},T1X5: +/*!*******************************************!*\ + !*** ./src/components/Knowledge/icon.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},"VrN/": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!a&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),S=h&&t.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==S||S<12.11)),E=n||o&&s>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var w,T=function(t,e){var n=t.className,r=k(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function O(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return O(t).appendChild(e)}function A(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=n-o%n,a=s+1}}g?M=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(M=function(t){try{t.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function U(t,e){for(var n=0;n=e)return r+Math.min(o,e-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=e)return r}}var K=[""];function q(t){for(;K.length<=t;)K.push(Y(K)+" ");return K[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==e)return t(a)?e:n;t(a)?n=a:e=a+r}}var ot=null;function st(t,e,n){var r;ot=null;for(var i=0;ie)return i;a.to==e&&(a.from!=a.to&&"before"==n?r=i:ot=i),a.from==e&&(a.from!=a.to&&"before"!=n?r=i:ot=i)}return null!=r?r:ot}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(t,e,n){this.level=t,this.from=e,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!t.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[e]=i.slice(0,a).concat(i.slice(a+1)))}}}function pt(t,e){var n=dt(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),xt(t)}function Et(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var wt,Tt,Ot=function(){if(o&&s<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}();function Lt(t){if(null==wt){var e=A("span","​");L(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(wt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var n=wt?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function At(t){if(null!=Tt)return Tt;var e=L(t,document.createTextNode("AخA")),n=w(e,0,1).getBoundingClientRect(),r=w(e,1,2).getBoundingClientRect();return O(t),!(!n||n.left==n.right)&&(Tt=r.right-n.right<3)}var Dt,Rt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var a=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),e+=o+1):(n.push(a),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},_t=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Dt=A("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Nt=null,Mt={},Pt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Mt[t]=e}function jt(t){if("string"==typeof t&&Pt.hasOwnProperty(t))t=Pt[t];else if(t&&"string"==typeof t.name&&Pt.hasOwnProperty(t.name)){var e=Pt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return jt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return jt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Bt(t,e){e=jt(e);var n=Mt[e.name];if(!n)return Bt(t,"text/plain");var r=n(t,e);if(Ut.hasOwnProperty(e.name)){var i=Ut[e.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var Ut={};function Ht(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Vt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function zt(t,e,n){return!t.startState||t.startState(e,n)}var Wt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(e=t.first&&en?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r=this.string.length},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.pose},Wt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Wt.prototype.backUp=function(t){this.pos-=t},Wt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Wt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Wt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],a={};xe(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,xe(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Gt(t.doc.mode,r.state),a=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var a=function(t,e,n){for(var r,i,a=t.doc,o=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>o;--s){if(s<=a.first)return a.first;var l=Kt(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=a.modeFrontier))return s;var u=j(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),o=a>r.first&&Kt(r,a-1).stateAfter,s=o?ue.fromSaved(r,o,a):new ue(r,zt(r.mode),a);return r.iter(a,e,(function(n){pe(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,Gt(t.mode,e.state),n,e.lookAhead):new ue(t,Gt(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,a,o=t.doc,s=o.mode,l=Kt(o,(e=se(o,e)).line),c=fe(t,e.line,n),u=new Wt(l.text,t.options.tabSize,c);for(r&&(a=[]);(r||u.post.options.maxHighlightLength?(s=!1,o&&pe(t,e,r,h.pos),h.pos=e.length,l=null):l=be(me(n,h,r.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=e:a.to>e);(r||(r=[])).push(new Ee(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(t,e,n){var r;if(t)for(var i=0;i=e:a.to>e)||a.from==e&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var b=0;be)&&(!n||_e(n,a.marker)<0)&&(n=a.marker)}return n}function Fe(t,e,n,r,i){var a=Kt(t,e),o=Ce&&a.markedSpans;if(o)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function je(t){for(var e;e=Ne(t);)t=e.find(-1,!0).line;return t}function Be(t,e){var n=Kt(t,e),r=je(n);return n==r?e:$t(r)}function Ue(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!He(t,r))return e;for(;n=Me(r);)r=n.find(1,!0).line;return $t(r)+1}function He(t,e){var n=Ce&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Ae(this,e),this.height=n?n(this):1};function qe(t){t.parent=null,Le(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Ye={},Xe={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ye;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var a=i?e.rest[i-1]:e.line,o=void 0;r.pos=0,r.addToken=Qe,At(t.display.measure)&&(o=ct(a,t.doc.direction))&&(r.addToken=tn(r.addToken,o)),r.map=[],nn(a,r,de(t,a,e!=t.display.externalMeasured&&$t(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Lt(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Je(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,a,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return t(n,r,i,a,o,s,l);t(n,r.slice(0,h.to-c),i,a,null,s,l),a=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,a=0;if(r)for(var o,s,l,c,u,h,d,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var E in C.attributes)(d||(d={}))[E]=C.attributes[E];C.collapsed&&(!h||_e(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var O=p+m.length;if(!h){var L=O>T?m.slice(0,T-p):m;e.addToken(e,L,o?o+l:l,u,p+L.length==v?c:"",s,d)}if(O>=T){m=m.slice(T-p),p=T;break}p=O,u=""}m=i.slice(a,a=n[g++]),o=$e(n[g++],e.cm.options)}}else for(var A=1;An)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Dn(t,e,n,r){return In(t,_n(t,e),n,r)}function Rn(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&e2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(a=function(t,e,n,r){var i,a=Pn(e.map,n,r),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(h=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(t.display),top:p.top,bottom:p.bottom}:Mn}for(var g=i.top-e.rect.top,m=i.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;be)&&(i=(a=l-s)-1,e>=l&&(o="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c=0&&(n=t[i]).left==n.right;i--);return n}function jn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(t,e,n){return o(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),d=ot,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Yn(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ve(r)+En(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var a=te(t,e,n);return a.xRel=i,r&&(a.outside=r),a}function $n(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),a=r.first+r.size-1;if(i>a)return Xn(r.first+r.size-1,Kt(r,a).text.length,null,1,1);e<0&&(e=0);for(var o=Kt(r,i);;){var s=tr(t,o,i,e,n),l=Pe(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Kt(r,i=c.line)}}function Zn(t,e,n,r){r-=Vn(e);var i=e.text.length,a=at((function(e){return In(t,n,e-1).bottom<=r}),i,0);return{begin:a,end:i=at((function(e){return In(t,n,e).top>r}),a,i)}}function Jn(t,e,n,r){return n||(n=_n(t,e)),Zn(t,e,n,zn(t,e,In(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ve(e);var a=_n(t,e),o=Vn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,a,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=at((function(e){var n=In(t,a,e);return n.top+=o,n.bottom+=o,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,g=n),!0)}),s,l),v=!1;if(g){var y=r-g.left=x.bottom?1:0}return Xn(n,m=it(e.text,m,1),f,v,r-d)}function er(t,e,n,r,i,a,o){var s=at((function(s){var l=i[s],c=1!=l.level;return Qn(qn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(t,e,n,r,i,a,o){var s=Zn(t,e,r,o),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=In(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(A("br"));Nn.appendChild(document.createTextNode("x"))}L(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),O(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");L(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function ar(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function or(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(He(t.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=j(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((a-wn(t.display).left)/ir(t.display))-u))}return c}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Ce&&Be(t.doc,e)i.viewFrom?fr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)fr(t);else if(e<=i.viewFrom){var a=pr(t,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(t)}else if(n>=i.viewTo){var o=pr(t,e,e,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(t)}else{var s=pr(t,e,e,-1),l=pr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(t)}var c=i.externalMeasured;c&&(n=i.lineN&&e=r.viewTo)){var a=r.view[ur(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==U(o,n)&&o.push(n)}}}function fr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function pr(t,e,n,r){var i,a=ur(t,e),o=t.display.view;if(!Ce||n==t.doc.first+t.doc.size)return{index:a,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-e,a++}else i=s-e;e+=i,n+=i}for(;Be(t.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function gr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().linee||e==n&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(e,n,"ltr")}(g,n||0,null==r?d:r,(function(t,e,i,h){var m="ltr"==i,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==n&&0==t,x=null==r&&e==d,S=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var E=(c?x:b)&&C,k=(c?b:x)&&S?s:(m?v:y).left,w=E?l:(m?y:v).right;u(k,v.top,w-k,v.bottom)}else{var T,O,L,A;m?(T=c&&b&&S?s:v.left,O=c?l:p(t,i,"before"),L=c?s:p(e,i,"after"),A=c&&x&&C?l:y.right):(T=c?p(t,i,"before"):s,O=!c&&b&&S?l:v.right,L=!c&&x&&C?s:y.left,A=c?p(e,i,"after"):l),u(T,v.top,O-T,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||wr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Cr(t){t.state.focused||(t.display.input.focus(),kr(t))}function Er(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,wr(t))}),100)}function kr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Sr(t))}function wr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Tr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xt(i.line,l),Or(i.line),i.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/ir(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Or(t){if(t.widgets)for(var e=0;e=o&&(a=Zt(e,Ve(Kt(e,l))-t.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Ar(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,a=Ln(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+kn(n),l=e.tops-r;if(e.topi+a){var u=Math.min(e.top,(c?s:e.bottom)-a);u!=i&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,f=On(t)-n.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?o.scrollLeft=0:e.leftf+d-3&&(o.scrollLeft=e.right+(p?0:10)-f),o}function Dr(t,e){null!=e&&(Ir(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Rr(t){Ir(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function _r(t,e,n){null==e&&null==n||Ir(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Ir(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Nr(t,Yn(t,e.from),Yn(t,e.to),e.margin))}function Nr(t,e,n,r){var i=Ar(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});_r(t,i.scrollLeft,i.scrollTop)}function Mr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),Pr(t,e,!0),n&&li(t),ri(t,100))}function Pr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Fr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function jr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+kn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Br=function(t,e,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Br.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Br.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ur=function(){};function Hr(t,e){e||(e=jr(t));var n=t.display.barWidth,r=t.display.barHeight;Gr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Tr(t),Gr(t,jr(t)),n=t.display.barWidth,r=t.display.barHeight}function Gr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Vr={native:Br,null:Ur};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Vr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Fr(t,e):Mr(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},e=t.curOp,on?on.ops.push(e):e.ownsGroup=on={ops:[e],delayedCallbacks:[]}}function qr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ai(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&oi(t.cm,t.update)}function $r(t){var e=t.cm,n=e.display;t.updatedDisplay&&Tr(e),t.barMeasure=jr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-On(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-En(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(a),a.scrollIntoView(i),t.display.lineSpace.removeChild(a)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var a=0;a<5;a++){var o=!1,s=qn(t,e),l=n&&n!=e?qn(t,n):s,c=Ar(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Fr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(i)for(var o=0;o=t.display.viewTo)){var n=+new Date+t.options.workTime,r=fe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(a){if(r.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Gt(e.mode,r.state):null,l=he(t,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==gr(t))return!1;di(t)&&(fr(t),e.dims=ar(t));var i=r.first+r.size,a=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Ce&&(a=Be(t.doc,a),o=Ue(t.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=an(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=an(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,a,o),n.viewOffset=Ve(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=gr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=_();if(!e||!R(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&R(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),un(t,d,u,n)),f&&(O(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),o=d.node.nextSibling}else{var p=vn(t,d,u,n);a.insertBefore(p,o)}u+=d.size}for(;o;)o=s(o)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=_()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&R(document.body,t.anchorNode)&&R(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=On(t))r&&(e.visible=Lr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-Ln(t),n.top)}),e.visible=Lr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!oi(t,e))break;Tr(t);var i=jr(t);mr(t),Hr(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new ai(t,e);if(oi(t,n)){Tr(t),si(t,n);var r=jr(t);mr(t),Hr(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Tn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=or(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)t:for(var d=e.target,f=o.view;d!=s;d=d.parentNode)for(var p=0;p=0&&ee(t,r.to())<=0)return n}return-1};var Ei=function(t,e){this.anchor=t,this.head=e};function ki(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=U(e,i);for(var a=1;a0:l>=0){var c=ae(s.from(),o.from()),u=ie(s.to(),o.to()),h=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,e.splice(--a,2,new Ei(h?u:c,h?c:u))}}return new Ci(e,n)}function wi(t,e){return new Ci([new Ei(t,e||t)],0)}function Ti(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Oi(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Ti(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Ti(e).ch-e.to.ch),te(n,r)}function Li(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,p-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function Ni(t,e,n){!function t(r,i,a){if(r.linked)for(var o=0;os-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=function(t,e){return e?(Bi(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i,i.lastOp==r)))o=Y(a.changes),0==ee(e.from,e.to)&&0==ee(e.from,o.to)?o.to=Ti(e):a.changes.push(ji(t,e));else{var l=Y(i.done);for(l&&l.ranges||Gi(t.sel,i.done),a={changes:[ji(t,e)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,o||pt(t,"historyAdded")}function Hi(t,e,n,r){var i=t.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,a,Y(i.done),e))?i.done[i.done.length-1]=e:Gi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Gi(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Vi(t,e,n,r){var i=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[a]=n.markedSpans),++a}))}function zi(t){if(!t)return null;for(var e,n=0;n-1&&(Y(s)[h]=c[h],delete c[h])}}}return r}function qi(t,e,n,r){if(r){var i=t.anchor;if(n){var a=ee(e,i)<0;a!=ee(n,i)<0?(i=e,e=n):a!=ee(e,n)<0&&(e=n)}return new Ei(i,e)}return new Ei(n||e,e)}function Yi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Ci([qi(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(i&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=oa(t,h,-r,h&&h.line==e.line?a:null)),h&&h.line==e.line&&(d=ee(h,n))&&(r<0?d<0:d>0))return ia(t,h,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(t,f,r,f.line==e.line?a:null)),f?ia(t,f,e,r,i):null}}return e}function aa(t,e,n,r,i){var a=r||1,o=ia(t,e,n,a,i)||!i&&ia(t,e,n,a,!0)||ia(t,e,n,-a,i)||!i&&ia(t,e,n,-a,!0);return o||(t.cantEdit=!0,te(t.first,0))}function oa(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,s.from),d=ee(c.to,s.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)ua(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else ua(t,e)}}function ua(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=Li(t,e);Ui(t,e,n,t.cm?t.cm.curOp.id:NaN),fa(t,e,n,Te(t,e));var r=[];Ni(t,(function(t,n){n||-1!=U(r,t.history)||(va(t.history,e),r.push(t.history)),fa(t,e,null,Te(t,e))}))}}function ha(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(t,e){if(0!=e&&(t.first+=e,t.sel=new Ci(X(t.sel.ranges,(function(t){return new Ei(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.linea&&(e={from:e.from,to:te(a,Kt(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),n||(n=Li(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,a=e.from,o=e.to,s=!1,l=a.line;t.options.lineWrapping||(l=$t(je(Kt(r,a.line))),r.iter(l,o.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),Ii(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(l,a.line+e.text.length,(function(t){var e=ze(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=i.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Fe(t,e.line,e,n,a)||e.line!=n.line&&Fe(t,n.line,e,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}a.addToHistory&&Ui(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&a.collapsed&&!c.options.lineWrapping&&je(t)==c.display.maxLine&&(s=!0),a.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Ee(a,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&t.iter(e.line,n.line+1,(function(e){He(t,e)&&Xt(e,0)})),a.clearOnEnter&&ht(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++Ea,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)hr(c,e.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=n.line;u++)dr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}ka.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;at.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&na(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&qr(t),this.parent&&this.parent.clear()}},ka.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;l--)ca(this,r[l]);s?Ji(this,s):this.cm&&Rr(this.cm)})),undo:ni((function(){ha(this,"undo")})),redo:ni((function(){ha(this,"redo")})),undoSelection:ni((function(){ha(this,"undo",!0)})),redoSelection:ni((function(){ha(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=a,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),ta(e.doc,wi(n,n)),d)for(var f=0;f=0;e--)pa(t.doc,"",r[e].from,r[e].to,"+delete");Rr(t)}))}function Za(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Ja(t,e,n){var r=Za(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function Qa(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var a=ct(n,e.doc.direction);if(a){var o,s=i<0?Y(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=_n(e,n);o=i<0?n.text.length-1:0;var u=In(e,c,o).top;o=at((function(t){return In(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Za(n,o,1))}else o=i<0?s.to:s.from;return new te(r,o,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Ga.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ga.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ga.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ga.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ga.default=y?Ga.macDefault:Ga.pcDefault;var to={selectAll:sa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $a(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new te(i.line,i.ch+1),t.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var o=Kt(t.doc,i.line-1).text;o&&(i=new te(i.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),te(i.line-1,o.length-1),i,"+transpose"))}n.push(new Ei(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,a=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,ft(i.wrapper.ownerDocument,"mouseup",c),ft(i.wrapper.ownerDocument,"mousemove",u),ft(i.scroller,"dragstart",h),ft(i.scroller,"drop",c),a||(bt(e),r.addNew||Yi(t.doc,n,null,null,r.extend),l&&!d||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return a=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",c),Er(t),setTimeout((function(){return i.input.focus()}),20)}(t,r,e,a):function(t,e,n,r){var i=t.display,a=t.doc;bt(e);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new Ei(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ei(n,n)),n=cr(t,e,!0,!0),s=-1;else{var u=vo(t,n,r.unit);o=r.extend?qi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(a,ki(t,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(a,ki(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$i(a,s,o,V):(s=0,Qi(a,new Ci([o],0),V),l=a.sel);var h=n;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],c=t.options.tabSize,u=j(Kt(a,n.line).text,n.ch,c),d=j(Kt(a,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),m=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=m;g++){var v=Kt(a,g).text,y=W(v,f,c);f==p?i.push(new Ei(te(g,y),te(g,y))):v.length>y&&i.push(new Ei(te(g,y),te(g,W(v,p,c))))}i.length||i.push(new Ei(n,n)),Qi(a,ki(t,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=o,S=vo(t,e,r.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=ae(x.from(),S.anchor)):(b=S.anchor,C=ie(x.to(),S.head));var E=l.ranges.slice(0);E[s]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var a=ct(i);if(!a)return e;var o=st(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(a,r.ch,r.sticky),h=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Ei(new te(n.line,p,g),r)}(t,new Ei(se(a,C),b)),Qi(a,ki(t,E,s),V)}}var f=i.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),i.input.focus()),ft(i.wrapper.ownerDocument,"mousemove",m),ft(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var m=ti(t,(function(e){0!==e.buttons&&kt(e)?function e(n){var o=++p,s=cr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,h)){t.curOp.focus=_(),d(s);var l=Lr(i,a);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ti(t,(function(){p==o&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):g(e)})),v=ti(t,g);t.state.selectingText=v,ht(i.wrapper.ownerDocument,"mousemove",m),ht(i.wrapper.ownerDocument,"mouseup",v)}(t,r,e,a)}(e,r,a,t):Et(t)==n.scroller&&bt(t):2==i?(r&&Yi(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(E?e.display.input.onContextMenu(t):Er(e)))}}function vo(t,e,n){if("char"==n)return new Ei(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ei(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new Ei(r.from,r.to)}function yo(t,e,n,r){var i,a;if(e.touches)i=e.touches[0].clientX,a=e.touches[0].clientY;else try{i=e.clientX,a=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!vt(t,n))return St(e);a-=s.top-o.viewOffset;for(var l=0;l=i)return pt(t,n,t,Zt(t.doc,a),t.display.gutterSpecs[l].className,e),St(e)}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function xo(t,e){Cn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||E||t.display.input.onContextMenu(e)}function So(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(t)}go.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Co={toString:function(){return"CodeMirror.Init"}},Eo={},ko={};function wo(t,e,n){if(!e!=!(n&&n!=Co)){var r=t.display.dragFunctions,i=e?ht:ft;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function To(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),We(t)),lr(t),hr(t),Un(t),setTimeout((function(){return Hr(t)}),100)}function Oo(t,e){var n=this;if(!(this instanceof Oo))return new Oo(t,e);this.options=e=e?F(e):{},F(Eo,e,!1);var r=e.value;"string"==typeof r?r=new Da(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Oo.inputStyles[e.inputStyle](this),a=this.display=new mi(t,r,i,e);for(var c in a.wrapper.CodeMirror=this,So(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},e.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,mo)),ht(e.scroller,"dblclick",o&&s<11?ti(t,(function(e){if(!gt(t,e)){var n=cr(t,e);if(n&&!bo(t,e)&&!Cn(t.display,e)){bt(e);var r=t.findWordAt(n);Yi(t.doc,r.anchor,r.head)}}})):function(e){return gt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xo(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||xo(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function a(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!gt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!bo(t,i)){e.input.ensurePolled(),clearTimeout(n);var a=+new Date;e.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Cn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=t.coordsChar(e.activeTouch,"page");o=!r.prev||a(r,r.prev)?new Ei(s,s):!r.prev.prev||a(r,r.prev.prev)?t.findWordAt(s):new Ei(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Mr(t,e.scroller.scrollTop),Fr(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Si(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Si(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||Ct(e)},over:function(e){gt(t,e)||(function(t,e){var n=cr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(o&&(!t.state.draggingText||+new Date-Ra<100))Ct(e);else if(!gt(t,e)&&!Cn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,_a),leave:function(e){gt(t,e)||Ia(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return uo.call(t,e)})),ht(l,"keydown",ti(t,co)),ht(l,"keypress",ti(t,ho)),ht(l,"focus",(function(e){return kr(t,e)})),ht(l,"blur",(function(e){return wr(t,e)}))}(this),Pa(),Kr(this),this.curOp.forceUpdate=!0,Mi(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):wr(this),ko)ko.hasOwnProperty(c)&&ko[c](this,e[c],Co);di(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>a.first?j(Kt(a,e-1).text,null,o):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=Rt(e),c=null;if(s&&r.ranges.length>1)if(Do&&Do.text.join("\n")==e){if(r.ranges.length%Do.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=te(p.line,p.ch-n):t.state.overwrite&&!s?g=te(g.line,Math.min(Kt(a,g.line).text.length,g.ch+Y(l).length)):s&&Do&&Do.lineWise&&Do.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};ca(t.doc,m),ln(t,"inputRead",t,m)}e&&!s&&No(t,e),Rr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Io(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return _o(e,n,0,null,"paste")})),!0}function No(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=t.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ao(t,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ao(t,i.head.line,"smart"));o&&ln(t,"electricInput",t,i.head.line)}}}function Mo(t){for(var e=[],n=[],r=0;r0?0:-1));o=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(t,e,n,r){var i=ct(e,t.doc.direction);if(!i)return Ja(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=st(i,n.ch,n.sticky),o=i[a];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new te(n.line,d,f)}}var p=function(t,e,r){for(var a=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==m||r>0&&m==e.text.length||!(g=p(r>0?0:i.length-1,r,c(m)))?null:g}(t.cm,s,e,n):Ja(s,e,n);if(null==o){if(a||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=Qa(i,t.cm,s,e.line,l)}else e=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(e.ch)||"\n",g=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var m=aa(t,e,a,o,!0);return ne(a,m)&&(m.hitSide=!0),m}function Bo(t,e,n,r){var i,a,o=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(a=$n(t,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Uo=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(t,e){var n=Rn(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=An(n,r,e.line),a=ct(r,t.doc.direction),o="left";a&&(o=st(a,e.ch)%2?"right":"left");var s=Pn(i.map,e.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function Go(t,e){return e&&(t.bad=!0),t}function Vo(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Go(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||a.line=e.display.viewFrom&&Ho(e,i)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=te(o.line-1,Kt(r.doc,o.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(t=ur(r,o.line))?(e=$t(i.view[0].line),n=i.view[0].node):(e=$t(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$t(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var a="",o=!1,s=t.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(t){t&&(c(),a+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var a,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(r,0),te(i+1,0),(m=+d,function(t){return t.id==m}));return void(f.length&&(a=f[0].find(0))&&u(qt(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var S=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(S,C)?(pa(r.doc,h,S,C,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(t.cm)}))},Uo.prototype.setUneditable=function(t){t.contentEditable="false"},Uo.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,_o)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Uo.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Wo=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Wo.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function a(t){if(!gt(r,t)){if(r.somethingSelected())Ro({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Mo(r);Ro({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,G):(n.prevInput="",i.value=e.text.join("\n"),M(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),ht(i,"input",(function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){gt(r,t)||Io(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",a),ht(i,"copy",a),ht(t.scroller,"paste",(function(e){if(!Cn(t,e)&&!gt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,i.dispatchEvent(a)}})),ht(t.lineSpace,"selectstart",(function(e){Cn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wo.prototype.createField=function(t){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Wo.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Wo.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=qn(t,n.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Wo.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Wo.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&M(this.textarea),o&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Wo.prototype.getField=function(){return this.textarea},Wo.prototype.supportsTouch=function(){return!1},Wo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(t){}},Wo.prototype.blur=function(){this.textarea.blur()},Wo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wo.prototype.receivedFocus=function(){this.slowPoll()},Wo.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Wo.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Wo.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||_t(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wo.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=cr(n,t),c=r.scroller.scrollTop;if(a&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ti(n,Qi)(n.doc,wi(a),G);var u,d=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&m(),E){Ct(t);var g=function(){ft(window,"mouseup",g),setTimeout(v,20)};ht(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var t=n.somethingSelected(),a="​"+(t?i.value:"");i.value="⇚",i.value=a,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&m();var t=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?ti(n,sa)(n):t++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Wo.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Wo.prototype.setUneditable=function(){},Wo.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,a){t.defaults[n]=r,i&&(e[n]=a?function(t,e,n){n!=Co&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Co,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Di(t)}),!0),n("indentUnit",2,Di,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ri(t),Un(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var a=t.text.indexOf(e,i);if(-1==a)break;i=a+e.length,n.push(te(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Co&&t.refresh()})),n("specialCharPlaceholder",Je,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){So(t),gi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=Xa(e),i=n!=Co&&Xa(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,To,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=fi(e,t.options.lineNumbers),gi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?or(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Hr(t)}),!0),n("scrollbarStyle","native",(function(t){zr(t),Hr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fi(t.options.gutters,e),gi(t)}),!0),n("firstLineNumber",1,gi,!0),n("lineNumberFormatter",(function(t){return t}),gi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(wr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,wo),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ri,!0),n("addModeClass",!1,Ri,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ri,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Oo),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xa(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;nn&&(Ao(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$i(this.doc,r,new Ei(a,c[r].to()),G)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=de(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,a=t.ch;if(0==a)e=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(t=a,i=!0),r=Kt(this.doc,t)}else r=t;return zn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ve(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var a,o,s,l=this.display,c=(t=qn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Ar(a,o)).scrollTop&&Mr(a,s.scrollTop),null!=s.scrollLeft&&Fr(a,s.scrollLeft))},triggerOnKeyDown:ei(co),triggerOnKeyPress:ei(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ei(mo),execCommand:function(t){if(to.hasOwnProperty(t))return to[t].call(null,this)},triggerElectric:ei((function(t){No(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var a=se(this.doc,t),o=0;o0&&o(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Mi(this,t),Un(this),this.display.input.reset(),_r(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,a){t.registerHelper(e,r,a),n[e]._global.push({pred:i,val:a})}}(Oo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Da.prototype)Da.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Oo.prototype[qo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Da.prototype[qo]));return yt(Da),Oo.inputStyles={textarea:Wo,contenteditable:Uo},Oo.defineMode=function(t){Oo.defaults.mode||"null"==t||(Oo.defaults.mode=t),Ft.apply(this,arguments)},Oo.defineMIME=function(t,e){Pt[t]=e},Oo.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Oo.defineMIME("text/plain","null"),Oo.defineExtension=function(t,e){Oo.prototype[t]=e},Oo.defineDocExtension=function(t,e){Da.prototype[t]=e},Oo.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=_();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var a=t.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Oo((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xi,t.Doc=Da,t.splitLines=Rt,t.countColumn=j,t.findColumn=W,t.isWordChar=Q,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=Ti,t.scrollbarModel=Vr,t.Pos=te,t.cmpPos=ee,t.modes=Mt,t.mimeModes=Pt,t.resolveMode=jt,t.getMode=Bt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=Gt,t.startState=zt,t.innerMode=Vt,t.commands=to,t.keyMap=Ga,t.keyName=Ya,t.isModifierKey=Ka,t.lookupKey=Wa,t.normalizeKeyMap=za,t.StringStream=Wt,t.SharedTextMarker=Ta,t.TextMarker=ka,t.LineWidget=Sa,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=R,t.rmClass=T,t.keyNames=ja}(Oo),Oo.version="5.58.2",Oo}()},WaYH: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! + \*********************************************************/ +/*! exports provided: InternalTreeNode, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("rePB"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),g=n("OZM5"),m=function(t){var e=t.prefixCls,n=t.level,i=t.isStart,a=t.isEnd;if(!n)return null;for(var o="".concat(e,"-indent-unit"),s=[],l=0;l1&&void 0!==arguments[1]&&arguments[1],n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&L[n])return L[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=O.map((function(t){return"".concat(t,":").concat(r.getPropertyValue(t))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return e&&n&&(L[n]=l),l}var D,R=n("Gytx"),_=n.n(R);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(D||(D={}));var I=function(t){Object(o.a)(n,t);var e=Object(s.a)(n);function n(t){var a;return Object(i.a)(this,n),(a=e.call(this,t)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(t){a.textArea=t},a.handleResize=function(t){var e=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;e===D.NONE&&("function"==typeof i&&i(t),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var t=a.props.autoSize;if(t&&a.textArea){var e=t.minRows,n=t.maxRows,r=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;S||((S=document.createElement("textarea")).setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),document.body.appendChild(S)),t.getAttribute("wrap")?S.setAttribute("wrap",t.getAttribute("wrap")):S.removeAttribute("wrap");var i=A(t,e),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;S.setAttribute("style","".concat(l,";").concat(T)),S.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=S.scrollHeight;if("border-box"===s?d+=o:"content-box"===s&&(d-=a),null!==n||null!==r){S.value=" ";var f=S.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+a+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,e,n);a.setState({textareaStyles:r,resizeStatus:D.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:D.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:D.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var t=a.props,e=t.prefixCls,n=void 0===e?"rc-textarea":e,i=t.autoSize,o=t.onResize,s=t.className,h=t.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(E.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=w()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in g&&(g.value=g.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===D.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},g,{className:m,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:D.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&_()(t.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),N=function(t){Object(o.a)(n,t);var e=Object(s.a)(n);function n(t){var r;Object(i.a)(this,n),(r=e.call(this,t)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(t){r.resizableTextArea=t},r.handleChange=function(t){var e=r.props.onChange;r.setValue(t.target.value,(function(){r.resizableTextArea.resizeTextarea()})),e&&e(t)},r.handleKeyDown=function(t){var e=r.props,n=e.onPressEnter,i=e.onKeyDown;13===t.keyCode&&n&&n(t),i&&i(t)};var a=void 0===t.value||null===t.value?t.defaultValue:t.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(I,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),n}(l.Component);e.default=N},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(t,e,n,i,a){var o=e.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(t){l.push(Object(r.a)(Object(r.a)({},t),{},{range:s}))})),l}n("LvDl");function d(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function f(){}var p={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var n=0;n0||r.target.offsetWidth>0)&&W.current.instance.layout()}}catch(t){n.e(t)}finally{n.f()}}))).observe(z.current),t}();return J(!0),function(){var t=W.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),W.current.subscription&&W.current.subscription.dispose(),M&&window.removeEventListener("paste",tt),n.unobserve(z.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[R,Z]),Object(l.useEffect)((function(){var t=W.current.instance;if(t&&Z){var e=g(S);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",S,t.getModel(),e)}}),[S,Z]),Object(l.useEffect)((function(){W.current.instance&&Z&&m.editor.setTheme(A)}),[A,Z]),Object(l.useEffect)((function(){var t=W.current.instance;t&&Z&&(t.updateOptions(Object(r.a)({},w)),setTimeout((function(){t.getModel().updateOptions(Object(r.a)({},w))}),200))}),[JSON.stringify(w),Z]),Object(l.useEffect)((function(){var t=W.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var it=Object(l.useState)(d(p)),at=Object(o.a)(it,2),ot=at[0],st=(at[1],Object(l.useState)(d(y))),lt=Object(o.a)(st,2),ct=lt[0],ut=lt[1],ht=Object(r.a)(Object(r.a)({},E),{},{width:ot,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:z,style:ht})};function v(t){var e=t.width,i=void 0===e?"100%":e,s=t.height,h=void 0===s?"100%":s,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),S=Object(o.a)(x,2),C=S[0],E=S[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(m=t).editor.createDiffEditor(b.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},y),{},{wordWrap:!0}));E(e);var n=function(t){var e;return b.current&&(e=new u.default((function(e){var n,r=Object(a.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&t.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(b.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:m.editor.createModel(f,g),modified:m.editor.createModel(p,g)})}),[f,p,g,C]);var k={width:d(i),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:k})}},ZpRC: +/*!*************************************************************************!*\ + !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! + \*************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";function r(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function i(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function a(t,e){if(t.clientHeighte||a>t&&o=e&&s>=n?a-t-r:o>e&&sn?o-e+i:0}var s=function(t,e){var n=window,i=e.scrollMode,s=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!r(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,S=b.width,C=b.top,E=b.right,k=b.bottom,w=b.left,T="start"===s||"nearest"===s?C:"end"===s?k:C+x/2,O="center"===l?w+S/2:"end"===l?E:w,L=[],A=0;A=0&&w>=0&&k<=m&&E<=g&&C>=N&&k<=P&&w>=F&&E<=M)return L;var j=getComputedStyle(D),B=parseInt(j.borderLeftWidth,10),U=parseInt(j.borderTopWidth,10),H=parseInt(j.borderRightWidth,10),G=parseInt(j.borderBottomWidth,10),V=0,z=0,W="offsetWidth"in D?D.offsetWidth-D.clientWidth-B-H:0,K="offsetHeight"in D?D.offsetHeight-D.clientHeight-U-G:0;if(d===D)V="start"===s?T:"end"===s?T-m:"nearest"===s?o(y,y+m,m,U,G,y+T,y+T+x,x):T-m/2,z="start"===l?O:"center"===l?O-g/2:"end"===l?O-g:o(v,v+g,g,B,H,v+O,v+O+S,S),V=Math.max(0,V+y),z=Math.max(0,z+v);else{V="start"===s?T-N-U:"end"===s?T-P+G+K:"nearest"===s?o(N,P,_,U,G+K,T,T+x,x):T-(N+_/2)+K/2,z="start"===l?O-F-B:"center"===l?O-(F+I/2)+W/2:"end"===l?O-M+H+W:o(F,M,I,B,H+W,O,O+S,S);var q=D.scrollLeft,Y=D.scrollTop;T+=Y-(V=Math.max(0,Math.min(Y+V,D.scrollHeight-_+K))),O+=q-(z=Math.max(0,Math.min(q+z,D.scrollWidth-I+W)))}L.push({el:D,top:V,left:z})}return L};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var n=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(n?[]:s(t,e));if(!n){var r=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach((function(t){var r=t.el,i=t.top,a=t.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:e}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(t,r),r.behavior)}}},Zss7: +/*!**********************************************!*\ + !*** ./node_modules/tinycolor2/tinycolor.js ***! + \**********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(o,"").toLowerCase();var e,n=!1;if(D[t])t=D[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=V.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=V.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=V.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=V.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=V.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=V.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=V.hex8.exec(t))return{r:M(e[1]),g:M(e[2]),b:M(e[3]),a:B(e[4]),format:n?"name":"hex8"};if(e=V.hex6.exec(t))return{r:M(e[1]),g:M(e[2]),b:M(e[3]),format:n?"name":"hex"};if(e=V.hex4.exec(t))return{r:M(e[1]+""+e[1]),g:M(e[2]+""+e[2]),b:M(e[3]+""+e[3]),a:B(e[4]+""+e[4]),format:n?"name":"hex8"};if(e=V.hex3.exec(t))return{r:M(e[1]+""+e[1]),g:M(e[2]+""+e[2]),b:M(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==typeof t&&(z(t.r)&&z(t.g)&&z(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*I(f,255),g:255*I(p,255),b:255*I(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):z(t.h)&&z(t.s)&&z(t.v)?(r=F(t.s),s=F(t.v),e=function(t,e,n){t=6*I(t,360),e=I(e,100),n=I(n,100);var r=i.floor(t),a=t-r,o=n*(1-e),s=n*(1-a*e),l=n*(1-(1-a)*e),c=r%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(t.h,r,s),h=!0,d="hsv"):z(t.h)&&z(t.s)&&z(t.l)&&(r=F(t.s),l=F(t.l),e=function(t,e,n){var r,i,a;function o(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=I(t,360),e=I(e,100),n=I(n,100),0===e)r=i=a=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*a}}(t.h,r,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(n=t.a));var f,p,g;return n=_(n),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(t,e,n){t=I(t,255),e=I(e,255),n=I(n,255);var r,i,a=u(t,e,n),o=c(t,e,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:r=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(d(r));return a}function A(t,e){e=e||6;for(var n=d(t).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/e;e--;)o.push(d({h:r,s:i,v:a})),a=(a+s)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,r=this.toRgb();return t=r.r/255,e=r.g/255,n=r.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),r=l(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),r=l(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,i){var a=[P(l(t).toString(16)),P(l(e).toString(16)),P(l(n).toString(16)),P(j(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=d(t);n="#"+m(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:F(t[r]));t=n}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,n){n=0===n?0:n||50;var r=d(t).toRgb(),i=d(e).toRgb(),a=n/100;return d({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},d.readability=function(t,e){var n=d(t),r=d(e);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(t,e,n){var r,i,a=d.readability(t,e);switch(i=!1,(r=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},d.mostReadable=function(t,e,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=d(e[c]));return d.isReadable(t,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],n))};var D=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=d.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(D);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function N(t){return c(1,u(0,t))}function M(t){return parseInt(t,16)}function P(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function j(t){return i.round(255*parseFloat(t)).toString(16)}function B(t){return M(t)/255}var U,H,G,V=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",G="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function z(t){return!!V.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(r=function(){return d}.call(e,n,e,t))||(t.exports=r)}(Math)},bT9E: +/*!*****************************************!*\ + !*** ./node_modules/rc-util/es/omit.js ***! + \*****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(t,e){var n=Object(r.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete n[t]})),n}},biw7: +/*!**********************************************************!*\ + !*** ./node_modules/rc-table/es/context/TableContext.js ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);e.a=i},c5Ni: +/*!******************************************************!*\ + !*** ./node_modules/codemirror/theme/blackboard.css ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},dejd: +/*!***********************************************************!*\ + !*** ./src/components/markdown-editor/toolbar/index.less ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},dmUQ: +/*!**************************************************************!*\ + !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("Ff2n"),i=n("rePB"),a=n("1OyB"),o=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=n("4IlW");function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e1?s-1:0),c=1;c1?n-1:0),a=1;a=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var n=0;return e.indexOf(".")>=0&&(n=e.length-e.indexOf(".")-1),n},r.getInputDisplayValue=function(t){var e,n=t||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(e=i?a:r.toPrecisionAsStep(o))&&(e="");var s=r.formatWrapper(e);return S(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(t){}},r.restoreByAfter=function(t){if(void 0===t)return!1;var e=r.input.value,n=e.lastIndexOf(t);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===t[0]?(r.fixCaret(i,i),!0):n+t.length===e.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,n){var i=t.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(t,e,n){r.pressingUpOrDown=!0,r.step("down",t,e,n)},r.up=function(t,e,n){r.pressingUpOrDown=!0,r.step("up",t,e,n)},r.saveInput=function(t){r.input=t};var i=t.value;void 0===i&&(i=t.defaultValue),r.state={focused:t.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=m(m({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.value,r=e.onChange,i=e.max,a=e.min,o=this.state.focused;if(t){if(!C(t.value,n)||!C(t.max,i)||!C(t.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&t.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&t.min!==a&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(t);return isNaN(r)?t:(rn&&(r=n),r)}},{key:"setValue",value:function(t,e){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},e)):this.setState({value:r,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(S(r))return r;var a=this.getPrecision(e),o=this.getPrecision(i),s=this.getPrecision(t);return t?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(t,e);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,n=this.state.focused,r=t&&t.length>16&&n;return this.isNotCompleteNumber(t)||r?t:S(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var n=this.props.step,r=this.getPrecisionFactor(t,e),i=Math.abs(this.getMaxPrecision(t,e)),a=((r*t+r*n*e)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(t,e){var n=this.props.step,r=this.getPrecisionFactor(t,e),i=Math.abs(this.getMaxPrecision(t,e)),a=((r*t-r*n*e)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(t,"Step")](o,r),l=s>a.max||sa.max?s=a.max:s=p)||a||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||a||o,Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),X=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:G,style:m,title:v,onMouseEnter:x,onMouseLeave:S,onMouseOver:C,onMouseOut:E,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":U,required:k,type:O,placeholder:L,onPaste:P,onClick:w,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:z?this.onKeyDown:y,onKeyUp:z?this.onKeyUp:y,autoFocus:N,maxLength:I,readOnly:o,disabled:a,max:p,min:g,step:_,name:M,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:R,inputMode:D,onInput:F},V))))}}]),n}(h.a.Component);E.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=E;e.a=k},fAei: +/*!******************************************************!*\ + !*** ./node_modules/rc-tree/es/index.js + 4 modules ***! + \******************************************************/ +/*! exports provided: TreeNode, default */ +/*! exports used: TreeNode, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/TreeNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/conductUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return C.a}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n("4IlW"),d=n("Kwbf"),f=n("TSYQ"),p=n.n(f),g=n("sboe"),m=n("OZM5"),v=n("815F"),y=n("ODXe"),b=n("Ff2n"),x=n("+nKL"),S=n("8XRh"),C=n("WaYH"),E=function(t,e){var n=t.className,r=t.style,i=t.motion,a=t.motionNodes,o=t.motionType,s=t.onMotionStart,l=t.onMotionEnd,c=t.active,h=t.treeNodeRequiredProps,d=Object(b.a)(t,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),f=u.useState(!0),m=Object(y.a)(f,2),x=m[0],E=m[1],k=u.useContext(g.a).prefixCls,w=u.useRef(!1),T=function(){w.current||l(),w.current=!0};return Object(u.useEffect)((function(){a&&"hide"===o&&x&&E(!1)}),[a]),Object(u.useEffect)((function(){return a&&s(),function(){a&&T()}}),[]),a?u.createElement(S.default,Object.assign({ref:e,visible:x},i,{motionAppear:"show"===o,onAppearEnd:T,onLeaveEnd:T}),(function(t,e){var n=t.className,r=t.style;return u.createElement("div",{ref:e,className:p()("".concat(k,"-treenode-motion"),n),style:r},a.map((function(t){var e=t.data,n=e.key,r=Object(b.a)(e,["key"]),i=t.isStart,a=t.isEnd;delete r.children;var o=Object(v.f)(n,h);return u.createElement(C.a,Object.assign({},r,o,{active:c,data:t.data,key:n,isStart:i,isEnd:a}))})))})):u.createElement(C.a,Object.assign({domRef:e,className:n,style:r},d,{active:c}))};E.displayName="MotionTreeNode";var k=u.forwardRef(E);function w(t,e,n){var r=t.findIndex((function(t){return t.data.key===n})),i=t[r+1],a=e.findIndex((function(t){return t.data.key===n}));if(i){var o=e.findIndex((function(t){return t.data.key===i.data.key}));return e.slice(a+1,o)}return e.slice(a+1)}var T={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},O=function(){},L="RC_TREE_MOTION_".concat(Math.random()),A={key:L},D={key:L,level:0,index:0,pos:"0",node:A},R={parent:null,children:[],pos:D.pos,data:A,isStart:[],isEnd:[]};function _(t,e,n,r){return!1!==e&&n?t.slice(0,Math.ceil(n/r)+1):t}function I(t){var e=t.data.key,n=t.pos;return Object(v.e)(e,n)}var N=u.forwardRef((function(t,e){var n=t.prefixCls,r=t.data,i=(t.selectable,t.checkable,t.expandedKeys),a=t.selectedKeys,o=t.checkedKeys,s=t.loadedKeys,l=t.loadingKeys,c=t.halfCheckedKeys,h=t.keyEntities,d=t.disabled,f=t.dragging,p=t.dragOverNodeKey,g=t.dropPosition,m=t.motion,S=t.height,C=t.itemHeight,E=t.virtual,A=t.focusable,D=t.activeItem,N=t.focused,M=t.tabIndex,P=t.onKeyDown,F=t.onFocus,j=t.onBlur,B=t.onActiveChange,U=t.onListChangeStart,H=t.onListChangeEnd,G=Object(b.a)(t,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),V=u.useRef(null);u.useImperativeHandle(e,(function(){return{scrollTo:function(t){V.current.scrollTo(t)}}}));var z=u.useState(i),W=Object(y.a)(z,2),K=W[0],q=W[1],Y=u.useState(r),X=Object(y.a)(Y,2),$=X[0],Z=X[1],J=u.useState(r),Q=Object(y.a)(J,2),tt=Q[0],et=Q[1],nt=u.useState([]),rt=Object(y.a)(nt,2),it=rt[0],at=rt[1],ot=u.useState(null),st=Object(y.a)(ot,2),lt=st[0],ct=st[1];function ut(){Z(r),et(r),at([]),ct(null),H()}u.useEffect((function(){q(i);var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length,r=e.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function i(t,e){var n=new Map;t.forEach((function(t){n.set(t,!0)}));var r=e.filter((function(t){return!n.has(t)}));return 1===r.length?r[0]:null}return n ").concat(e);return e}(D)),u.createElement("div",{role:"tree"},u.createElement("input",{style:T,disabled:!1===A||d,tabIndex:!1!==A?M:null,onKeyDown:P,onFocus:F,onBlur:j,value:"",onChange:O})),u.createElement(x.a,Object.assign({},G,{data:ht,itemKey:I,height:S,fullHeight:!1,virtual:E,itemHeight:C,prefixCls:"".concat(n,"-list"),ref:V}),(function(t){var e=t.pos,n=t.data,r=n.key,i=Object(b.a)(n,["key"]),a=t.isStart,o=t.isEnd,s=Object(v.e)(r,e);delete i.children;var l=Object(v.f)(s,dt);return u.createElement(k,Object.assign({},i,l,{active:D&&r===D.data.key,pos:e,data:t.data,isStart:a,isEnd:o,motion:m,motionNodes:r===L?it:null,motionType:lt,onMotionStart:U,onMotionEnd:ut,treeNodeRequiredProps:dt,onMouseMove:function(){B(null)}}))})))}));N.displayName="NodeList";var M=N,P=n("NvD2"),F=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(){var t;return Object(o.a)(this,n),(t=e.apply(this,arguments)).destroyed=!1,t.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},t.listRef=u.createRef(),t.onNodeDragStart=function(e,n){var r=t.state,i=r.expandedKeys,a=r.keyEntities,o=t.props.onDragStart,s=n.props.eventKey;t.dragNode=n;var l=Object(m.b)(i,s);t.setState({dragging:!0,dragNodesKeys:Object(m.g)(s,a)}),t.setExpandedKeys(l),o&&o({event:e,node:Object(v.b)(n.props)})},t.onNodeDragEnter=function(e,n){var r=t.state,i=r.expandedKeys,o=r.keyEntities,s=r.dragNodesKeys,l=t.props.onDragEnter,c=n.props,u=c.pos,h=c.eventKey;if(t.dragNode&&-1===s.indexOf(h)){var d=Object(m.c)(e,n);t.dragNode.props.eventKey!==h||0!==d?setTimeout((function(){t.setState({dragOverNodeKey:h,dropPosition:d}),t.delayedDragEnterLogic||(t.delayedDragEnterLogic={}),Object.keys(t.delayedDragEnterLogic).forEach((function(e){clearTimeout(t.delayedDragEnterLogic[e])})),t.delayedDragEnterLogic[u]=window.setTimeout((function(){if(t.state.dragging){var r=Object(a.a)(i),s=o[h];s&&(s.children||[]).length&&(r=Object(m.a)(i,h)),"expandedKeys"in t.props||t.setExpandedKeys(r),l&&l({event:e,node:Object(v.b)(n.props),expandedKeys:r})}}),400)}),0):t.setState({dragOverNodeKey:"",dropPosition:null})}},t.onNodeDragOver=function(e,n){var r=t.state.dragNodesKeys,i=t.props.onDragOver,a=n.props.eventKey;if(-1===r.indexOf(a)){if(t.dragNode&&a===t.state.dragOverNodeKey){var o=Object(m.c)(e,n);if(o===t.state.dropPosition)return;t.setState({dropPosition:o})}i&&i({event:e,node:Object(v.b)(n.props)})}},t.onNodeDragLeave=function(e,n){var r=t.props.onDragLeave;t.setState({dragOverNodeKey:""}),r&&r({event:e,node:Object(v.b)(n.props)})},t.onNodeDragEnd=function(e,n){var r=t.props.onDragEnd;t.setState({dragOverNodeKey:""}),t.cleanDragState(),r&&r({event:e,node:Object(v.b)(n.props)}),t.dragNode=null},t.onNodeDrop=function(e,n){var r=t.state,i=r.dragNodesKeys,a=void 0===i?[]:i,o=r.dropPosition,s=t.props.onDrop,l=n.props,c=l.eventKey,u=l.pos;if(t.setState({dragOverNodeKey:""}),t.cleanDragState(),-1===a.indexOf(c)){var h=Object(m.k)(u),f={event:e,node:Object(v.b)(n.props),dragNode:t.dragNode?Object(v.b)(t.dragNode.props):null,dragNodesKeys:a.slice(),dropPosition:o+Number(h[h.length-1]),dropToGap:!1};0!==o&&(f.dropToGap=!0),s&&s(f),t.dragNode=null}else Object(d.a)(!1,"Can not drop to dragNode(include it's children node)")},t.cleanDragState=function(){t.state.dragging&&t.setState({dragging:!1})},t.onNodeClick=function(e,n){var r=t.props.onClick;r&&r(e,n)},t.onNodeDoubleClick=function(e,n){var r=t.props.onDoubleClick;r&&r(e,n)},t.onNodeSelect=function(e,n){var r=t.state.selectedKeys,i=t.state.keyEntities,a=t.props,o=a.onSelect,s=a.multiple,l=n.selected,c=n.key,u=!l,h=(r=u?s?Object(m.a)(r,c):[c]:Object(m.b)(r,c)).map((function(t){var e=i[t];return e?e.node:null})).filter((function(t){return t}));t.setUncontrolledState({selectedKeys:r}),o&&o(r,{event:"select",selected:u,node:n,selectedNodes:h,nativeEvent:e.nativeEvent})},t.onNodeCheck=function(e,n,r){var i,o=t.state,s=o.keyEntities,l=o.checkedKeys,c=o.halfCheckedKeys,u=t.props,h=u.checkStrictly,d=u.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:e.nativeEvent};if(h){var g=r?Object(m.a)(l,f):Object(m.b)(l,f);i={checked:g,halfChecked:Object(m.b)(c,f)},p.checkedNodes=g.map((function(t){return s[t]})).filter((function(t){return t})).map((function(t){return t.node})),t.setUncontrolledState({checkedKeys:g})}else{var v=Object(P.a)([].concat(Object(a.a)(l),[f]),!0,s),y=v.checkedKeys,b=v.halfCheckedKeys;if(!r){var x=new Set(y);x.delete(f);var S=Object(P.a)(Array.from(x),{checked:!1,halfCheckedKeys:b},s);y=S.checkedKeys,b=S.halfCheckedKeys}i=y,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=b,y.forEach((function(t){var e=s[t];if(e){var n=e.node,r=e.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),t.setUncontrolledState({checkedKeys:y},!1,{halfCheckedKeys:b})}d&&d(i,p)},t.onNodeLoad=function(e){return new Promise((function(n){t.setState((function(r){var i=r.loadedKeys,a=void 0===i?[]:i,o=r.loadingKeys,s=void 0===o?[]:o,l=t.props,c=l.loadData,u=l.onLoad,h=e.key;return c&&-1===a.indexOf(h)&&-1===s.indexOf(h)?(c(e).then((function(){var r=t.state,i=r.loadedKeys,a=r.loadingKeys,o=Object(m.a)(i,h),s=Object(m.b)(a,h);u&&u(o,{event:"load",node:e}),t.setUncontrolledState({loadedKeys:o}),t.setState({loadingKeys:s}),n()})),{loadingKeys:Object(m.a)(s,h)}):{}}))}))},t.onNodeMouseEnter=function(e,n){var r=t.props.onMouseEnter;r&&r({event:e,node:n})},t.onNodeMouseLeave=function(e,n){var r=t.props.onMouseLeave;r&&r({event:e,node:n})},t.onNodeContextMenu=function(e,n){var r=t.props.onRightClick;r&&(e.preventDefault(),r({event:e,node:n}))},t.onFocus=function(){var e=t.props.onFocus;t.setState({focused:!0}),e&&e.apply(void 0,arguments)},t.onBlur=function(){var e=t.props.onBlur;t.setState({focused:!1}),t.onActiveChange(null),e&&e.apply(void 0,arguments)},t.getTreeNodeRequiredProps=function(){var e=t.state;return{expandedKeys:e.expandedKeys||[],selectedKeys:e.selectedKeys||[],loadedKeys:e.loadedKeys||[],loadingKeys:e.loadingKeys||[],checkedKeys:e.checkedKeys||[],halfCheckedKeys:e.halfCheckedKeys||[],dragOverNodeKey:e.dragOverNodeKey,dropPosition:e.dropPosition,keyEntities:e.keyEntities}},t.setExpandedKeys=function(e){var n=t.state.treeData,r=Object(v.d)(n,e);t.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)},t.onNodeExpand=function(e,n){var r=t.state.expandedKeys,i=t.state.listChanging,a=t.props,o=a.onExpand,s=a.loadData,l=n.key,c=n.expanded;if(!i){var u=r.indexOf(l),h=!c;if(Object(d.a)(c&&-1!==u||!c&&-1===u,"Expand state not sync with index check"),r=h?Object(m.a)(r,l):Object(m.b)(r,l),t.setExpandedKeys(r),o&&o(r,{node:n,expanded:h,nativeEvent:e.nativeEvent}),h&&s){var f=t.onNodeLoad(n);f&&f.then((function(){var e=Object(v.d)(t.state.treeData,r);t.setUncontrolledState({flattenNodes:e})}))}}},t.onListChangeStart=function(){t.setUncontrolledState({listChanging:!0})},t.onListChangeEnd=function(){setTimeout((function(){t.setUncontrolledState({listChanging:!1})}))},t.onActiveChange=function(e){var n=t.state.activeKey,r=t.props.onActiveChange;n!==e&&(t.setState({activeKey:e}),null!==e&&t.scrollTo({key:e}),r&&r(e))},t.getActiveItem=function(){var e=t.state,n=e.activeKey,r=e.flattenNodes;return null===n?null:r.find((function(t){return t.data.key===n}))||null},t.offsetActiveKey=function(e){var n=t.state,r=n.flattenNodes,i=n.activeKey,a=r.findIndex((function(t){return t.data.key===i}));-1===a&&e<0&&(a=r.length);var o=r[a=(a+e+r.length)%r.length];if(o){var s=o.data.key;t.onActiveChange(s)}else t.onActiveChange(null)},t.onKeyDown=function(e){var n=t.state,r=n.activeKey,a=n.expandedKeys,o=n.checkedKeys,s=t.props,l=s.onKeyDown,c=s.checkable,u=s.selectable;switch(e.which){case h.a.UP:t.offsetActiveKey(-1),e.preventDefault();break;case h.a.DOWN:t.offsetActiveKey(1),e.preventDefault()}var d=t.getActiveItem();if(d&&d.data){var f=t.getTreeNodeRequiredProps(),p=!1===d.data.isLeaf||!!(d.data.children||[]).length,g=Object(v.b)(Object(i.a)(Object(i.a)({},Object(v.f)(r,f)),{},{data:d.data,active:!0}));switch(e.which){case h.a.LEFT:p&&a.includes(r)?t.onNodeExpand({},g):d.parent&&t.onActiveChange(d.parent.data.key),e.preventDefault();break;case h.a.RIGHT:p&&!a.includes(r)?t.onNodeExpand({},g):d.children&&d.children.length&&t.onActiveChange(d.children[0].data.key),e.preventDefault();break;case h.a.ENTER:case h.a.SPACE:!c||g.disabled||!1===g.checkable||g.disableCheckbox?c||!u||g.disabled||!1===g.selectable||t.onNodeSelect({},g):t.onNodeCheck({},g,!o.includes(r))}}l&&l(e)},t.setUncontrolledState=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t.destroyed){var a=!1,o=!0,s={};Object.keys(e).forEach((function(n){n in t.props?o=!1:(a=!0,s[n]=e[n])})),!a||n&&!o||t.setState(Object(i.a)(Object(i.a)({},s),r))}},t.scrollTo=function(e){t.listRef.current.scrollTo(e)},t}return Object(s.a)(n,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var t,e=this.state,n=e.focused,i=e.flattenNodes,a=e.keyEntities,o=e.dragging,s=e.activeKey,l=this.props,c=l.prefixCls,h=l.className,d=l.style,f=l.showLine,v=l.focusable,y=l.tabIndex,b=void 0===y?0:y,x=l.selectable,S=l.showIcon,C=l.icon,E=l.switcherIcon,k=l.draggable,w=l.checkable,T=l.checkStrictly,O=l.disabled,L=l.motion,A=l.loadData,D=l.filterTreeNode,R=l.height,_=l.itemHeight,I=l.virtual,N=l.titleRender,P=l.onContextMenu,F=Object(m.f)(this.props);return u.createElement(g.a.Provider,{value:{prefixCls:c,selectable:x,showIcon:S,icon:C,switcherIcon:E,draggable:k,checkable:w,checkStrictly:T,disabled:O,keyEntities:a,loadData:A,filterTreeNode:D,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},u.createElement("div",{className:p()(c,h,(t={},Object(r.a)(t,"".concat(c,"-show-line"),f),Object(r.a)(t,"".concat(c,"-focused"),n),Object(r.a)(t,"".concat(c,"-active-focused"),null!==s),t))},u.createElement(M,Object.assign({ref:this.listRef,prefixCls:c,style:d,data:i,disabled:O,selectable:x,checkable:!!w,motion:L,dragging:o,height:R,itemHeight:_,virtual:I,focusable:v,focused:n,tabIndex:b,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:P},this.getTreeNodeRequiredProps(),F))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n,a=e.prevProps,o={prevProps:t};function s(e){return!a&&e in t||a&&a[e]!==t[e]}if(s("treeData")?n=t.treeData:s("children")&&(Object(d.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=Object(v.c)(t.children)),n){o.treeData=n;var l=Object(v.a)(n);o.keyEntities=Object(i.a)(Object(r.a)({},L,D),l.keyEntities)}var c,u=o.keyEntities||e.keyEntities;if(s("expandedKeys")||a&&s("autoExpandParent"))o.expandedKeys=t.autoExpandParent||!a&&t.defaultExpandParent?Object(m.e)(t.expandedKeys,u):t.expandedKeys;else if(!a&&t.defaultExpandAll){var h=Object(i.a)({},u);delete h[L],o.expandedKeys=Object.keys(h).map((function(t){return h[t].key}))}else!a&&t.defaultExpandedKeys&&(o.expandedKeys=t.autoExpandParent||t.defaultExpandParent?Object(m.e)(t.defaultExpandedKeys,u):t.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,n||o.expandedKeys){var f=Object(v.d)(n||e.treeData,o.expandedKeys||e.expandedKeys);o.flattenNodes=f}if((t.selectable&&(s("selectedKeys")?o.selectedKeys=Object(m.d)(t.selectedKeys,t):!a&&t.defaultSelectedKeys&&(o.selectedKeys=Object(m.d)(t.defaultSelectedKeys,t))),t.checkable)&&(s("checkedKeys")?c=Object(m.j)(t.checkedKeys)||{}:!a&&t.defaultCheckedKeys?c=Object(m.j)(t.defaultCheckedKeys)||{}:n&&(c=Object(m.j)(t.checkedKeys)||{checkedKeys:e.checkedKeys,halfCheckedKeys:e.halfCheckedKeys}),c)){var p=c,g=p.checkedKeys,y=void 0===g?[]:g,b=p.halfCheckedKeys,x=void 0===b?[]:b;if(!t.checkStrictly){var S=Object(P.a)(y,!0,u);y=S.checkedKeys,x=S.halfCheckedKeys}o.checkedKeys=y,o.halfCheckedKeys=x}return s("loadedKeys")&&(o.loadedKeys=t.loadedKeys),o}}]),n}(u.Component);F.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},F.TreeNode=C.a;var j=F;e.b=j},fyJ8: +/*!************************************************!*\ + !*** ./node_modules/rc-table/es/Cell/index.js ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(t,e){var n,l,d,f=t.prefixCls,p=t.className,g=t.record,m=t.index,v=t.dataIndex,y=t.render,b=t.children,x=t.component,S=void 0===x?"td":x,C=t.colSpan,E=t.rowSpan,k=t.fixLeft,w=t.fixRight,T=t.firstFixLeft,O=t.lastFixLeft,L=t.firstFixRight,A=t.lastFixRight,D=t.appendNode,R=t.additionalProps,_=void 0===R?{}:R,I=t.ellipsis,N=t.align,M=t.rowType,P=t.isSticky,F="".concat(f,"-cell");if(b)d=b;else{var j=Object(h.b)(g,v);if(d=j,y){var B=y(j,g,m);!function(t){return t&&"object"===Object(o.a)(t)&&!Array.isArray(t)&&!s.isValidElement(t)}(B)?d=B:(d=B.children,l=B.props)}}"object"!==Object(o.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),I&&(O||L)&&(d=s.createElement("span",{className:"".concat(F,"-content")},d));var U=l||{},H=U.colSpan,G=U.rowSpan,V=U.style,z=U.className,W=Object(a.a)(U,["colSpan","rowSpan","style","className"]),K=void 0!==H?H:C,q=void 0!==G?G:E;if(0===K||0===q)return null;var Y={},X="number"==typeof k,$="number"==typeof w;X&&(Y.position="sticky",Y.left=k),$&&(Y.position="sticky",Y.right=w);var Z,J={};N&&(J.textAlign=N);var Q=!0===I?{showTitle:!0}:I;Q&&(Q.showTitle||"header"===M)&&("string"==typeof d||"number"==typeof d?Z=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(Z=d.props.children));var tt,et=Object(i.a)(Object(i.a)(Object(i.a)({title:Z},W),_),{},{colSpan:K&&1!==K?K:null,rowSpan:q&&1!==q?q:null,className:c()(F,p,(n={},Object(r.a)(n,"".concat(F,"-fix-left"),X),Object(r.a)(n,"".concat(F,"-fix-left-first"),T),Object(r.a)(n,"".concat(F,"-fix-left-last"),O),Object(r.a)(n,"".concat(F,"-fix-right"),$),Object(r.a)(n,"".concat(F,"-fix-right-first"),L),Object(r.a)(n,"".concat(F,"-fix-right-last"),A),Object(r.a)(n,"".concat(F,"-ellipsis"),I),Object(r.a)(n,"".concat(F,"-with-append"),D),Object(r.a)(n,"".concat(F,"-fix-sticky"),(X||$)&&P),n),_.className,z),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},_.style),J),Y),V),ref:(tt=S,"string"==typeof tt||Object(u.c)(tt)?e:null)});return s.createElement(S,Object.assign({},et),D,d)}));d.displayName="Cell";var f=s.memo(d,(function(t,e){return!!e.shouldCellUpdate&&!e.shouldCellUpdate(e.record,t.record)}));e.a=f},h78n: +/*!**********************************************************!*\ + !*** ./node_modules/rc-progress/es/index.js + 3 modules ***! + \**********************************************************/ +/*! exports provided: Line, Circle, default */ +/*! exports used: Circle */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var t=Date.now(),r=!1;Object.keys(e).forEach((function(i){var a=e[i].current;if(a){r=!0;var o=a.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&t-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var f=function(t){var e=t.className,n=t.percent,r=t.prefixCls,a=t.strokeColor,s=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,g=t.trailWidth,m=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(a)?a:[a],x=u(l(y),1)[0],S=h/2,C=100-h/2,E="M ".concat("round"===s?S:0,",").concat(S,"\n L ").concat("round"===s?C:100,",").concat(S),k="0 0 100 ".concat(h),w=0;return i.a.createElement("svg",c({className:o()("".concat(r,"-line"),e),viewBox:k,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:E,strokeLinecap:s,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var n={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(w,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=b[e]||b[b.length-1];return w+=t,i.a.createElement("path",{key:e,className:"".concat(r,"-line-path"),d:E,strokeLinecap:s,stroke:a,strokeWidth:h,fillOpacity:"0",ref:x[e],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var y=0;function b(t){return+t.replace("%","")}function x(t){return Array.isArray(t)?t:[t]}function S(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=50-r/2,s=0,l=-o,c=0,u=-2*o;switch(a){case"left":s=-o,l=0,c=2*o,u=0;break;case"right":s=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*o,f={stroke:n,strokeDasharray:"".concat(e/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+t/100*(d-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var C=function(t){var e,n=t.prefixCls,a=t.strokeWidth,s=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,E=t.percent,k=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),w=Object(r.useMemo)((function(){return y+=1}),[]),T=S(0,100,h,a,c,u),O=T.pathString,L=T.pathStyle,A=x(E),D=x(C),R=D.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),_=g(l(A),1)[0];return i.a.createElement("svg",p({className:o()("".concat(n,"-circle"),m),viewBox:"0 0 100 100",style:f},k),R&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(w),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(R).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return i.a.createElement("stop",{key:e,offset:t,stopColor:R[t]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:O,stroke:h,strokeLinecap:d,strokeWidth:s||a,fillOpacity:"0",style:L}),(e=0,A.map((function(t,r){var o=D[r]||D[D.length-1],s="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(w,")"):"",l=S(e,t,o,a,c,u);return e+=t,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:a,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:_[r]})}))).reverse())};C.defaultProps=s;var E=C},hW8S: +/*!******************************************************!*\ + !*** ./node_modules/rc-table/es/utils/legacyUtil.js ***! + \******************************************************/ +/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */ +/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function o(t){var e=t.expandable,n=Object(i.a)(t,["expandable"]);return"expandable"in t?Object(r.a)(Object(r.a)({},n),e):n}function s(t){return Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(e[n]=t[n]),e}),{})}},i58Z: +/*!*****************************************************!*\ + !*** ./src/components/Knowledge/index.less?modules ***! + \*****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},kSUc: +/*!***************************************************!*\ + !*** ./src/components/markdown-editor/index.less ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},kqOp: +/*!***********************************************!*\ + !*** ./src/components/Editor/NullMDEditor.js ***! + \***********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=n(/*! react */"q1tI"),c=n.n(l),u=n(/*! ../markdown-editor */"Ot1p"),h=function(t){Object(o.a)(n,t);var e=Object(s.a)(n);function n(){var t;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function m(t,e,n){return e.f=e.inline=n,n(t,e)}function v(t,e,n){return e.f=e.block=n,n(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var n=i;if(!n){var a=t.innerMode(r,e.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(e.f=k,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(r,i){var o,d=r.column()===i.indentation,g=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var E=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;E=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||g))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(T=r.match(u))&&T[1].length<=6)return i.quote=0,i.header=T[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,C(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),C(i);if(!w&&!i.setext&&d&&i.indentation<=x&&(T=r.match(l))){var O=T[1]?"ol":"ul";return i.indentation=E+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+O]),C(i)}return d&&i.indentation<=x&&(T=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(T[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(t.findModeByName){var r=t.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=t.getMode(e,n);return"null"==i.name?null:i}(T[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=t.startState(i.localMode)),i.f=i.block=S,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,C(i)):i.setext||!(k&&b||i.quote||!1!==i.list||i.code||w||p.test(r.string))&&(T=r.lookAhead(1))&&(T=T.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==T[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,C(i)):w?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?m(r,i,L):m(r,i,i.inline)}function x(e,n){var a=r.token(e,n.htmlState);if(!i){var o=t.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&e.current().indexOf(">")>-1)&&(n.f=k,n.block=b,n.htmlState=null)}return a}function S(t,e){var r,i=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(a.formatting+"-"+t.formatting[r]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(a.linkHref,"url"):(t.strong&&e.push(a.strong),t.em&&e.push(a.em),t.strikethrough&&e.push(a.strikethrough),t.emoji&&e.push(a.emoji),t.linkText&&e.push(a.linkText),t.code&&e.push(a.code),t.image&&e.push(a.image),t.imageAltText&&e.push(a.imageAltText,"link"),t.imageMarker&&e.push(a.imageMarker)),t.header&&e.push(a.header,a.header+"-"+t.header),t.quote&&(e.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(a.quote+"-"+t.quote):e.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var i=(t.listStack.length-1)%3;i?1===i?e.push(a.list2):e.push(a.list3):e.push(a.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function E(t,e){if(t.match(d,!0))return C(e)}function k(e,i){var o=i.text(e,i);if(void 0!==o)return o;if(i.list)return i.list=null,C(i);if(i.taskList)return" "===e.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,C(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),C(i);var s=e.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=C(i);return i.code=0,f}return i.formatting=h,C(i)}return i.code=d,C(i)}if(i.code)return C(i);if("\\"===s&&(e.next(),n.highlightFormatting)){var p=C(i),m=a.formatting+"-escape";return p?p+" "+m:m}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("["===s&&i.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=C(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=T,p}if("["===s&&!i.image)return i.linkText&&e.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),C(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=C(i);return i.linkText=!1,i.inline=i.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:k,p}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=w,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=w,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=t.startState(r),v(e,i,x)}if(n.xml&&"<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var S=1,E=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(s);)S++;var O=e.peek()||" ",L=!/\s/.test(O)&&(!g.test(O)||/\s/.test(E)||g.test(E)),A=!/\s/.test(E)&&(!g.test(E)||/\s/.test(O)||g.test(O)),D=null,R=null;if(S%2&&(i.em||!L||"*"!==s&&A&&!g.test(E)?i.em!=s||!A||"*"!==s&&L&&!g.test(O)||(D=!1):D=!0),S>1&&(i.strong||!L||"*"!==s&&A&&!g.test(E)?i.strong!=s||!A||"*"!==s&&L&&!g.test(O)||(R=!1):R=!0),null!=R||null!=D)return n.highlightFormatting&&(i.formatting=null==D?"strong":null==R?"em":"strong em"),!0===D&&(i.em=s),!0===R&&(i.strong=s),f=C(i),!1===D&&(i.em=!1),!1===R&&(i.strong=!1),f}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(i);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=C(i),i.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),C(i)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return C(i);e.backUp(2)}if(n.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var _=C(i);return i.emoji=!1,_}return" "===s&&(e.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),C(i)}function w(t,e){if(">"===t.next()){e.f=e.inline=k,n.highlightFormatting&&(e.formatting="link");var r=C(e);return r?r+=" ":r="",r+a.linkInline}return t.match(/^[^>]+/,!0),a.linkInline}function T(t,e){if(t.eatSpace())return null;var r,i=t.next();return"("===i||"["===i?(e.f=e.inline=(r="("===i?")":"]",function(t,e){if(t.next()===r){e.f=e.inline=k,n.highlightFormatting&&(e.formatting="link-string");var i=C(e);return e.linkHref=!1,i}return t.match(O[r]),e.linkHref=!0,C(e)}),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=A,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,k)}function A(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=D,n.highlightFormatting&&(e.formatting="link");var r=C(e);return e.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function D(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=k,a.linkHref+" url")}var R={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(r,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var n=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=n,e.indentationDiff=null,n>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:R}},indent:function(e,n,i){return e.block==x&&r.indent?r.indent(e.htmlState,n,i):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return R}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},n6Qo: +/*!**************************************************************!*\ + !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! + \**************************************************************/ +/*! exports provided: default, FooterComponents */ +/*! exports used: FooterComponents, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");e.b=function(t){var e=t.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},e)};var o={Cell:function(t){var e=t.className,n=t.index,o=t.children,s=t.colSpan,l=t.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:e,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(t){return r.createElement("tr",Object.assign({},t))}}},osHv: +/*!********************************************************!*\ + !*** ./node_modules/codemirror/addon/fold/xml-fold.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";var e=t.Pos;function n(t,e){return t.line-e.line||t.ch-e.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(t,e,n,r){this.line=e,this.ch=n,this.cm=t,this.text=t.getLine(e),this.min=r?Math.max(r.from,t.firstLine()):t.firstLine(),this.max=r?Math.min(r.to-1,t.lastLine()):t.lastLine()}function o(t,n){var r=t.cm.getTokenTypeAt(e(t.line,n));return r&&/\btag\b/.test(r)}function s(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(s(t))continue;return}if(o(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){i.lastIndex=e,t.ch=e;var n=i.exec(t.text);if(n&&n.index==e)return n}else t.ch=e}}function h(t){for(;;){i.lastIndex=t.ch;var e=i.exec(t.text);if(!e){if(s(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e}}function f(t,n){for(var r=[];;){var i,a=h(t),o=t.line,s=t.ch-(a?a[0].length:0);if(!a||!(i=c(t)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:e(o,s),to:e(t.line,t.ch)}}else r.push(a[2])}}function p(t,n){for(var r=[];;){var i=d(t);if(!i)return;if("selfClose"!=i){var a=t.line,o=t.ch,s=u(t);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:e(t.line,t.ch),to:e(a,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var i=new a(t,r.line,0);;){var o=h(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=e(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,r,i){var o=new a(t,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&e(o.line,o.ch),h=s&&u(o);if(s&&h&&!(n(o,r)>0)){var d={from:e(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new a(t,l.line,l.ch,i),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,n,r){for(var i=new a(t,e.line,e.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(t,e.line,e.ch,n),o.tag);if(s)return{open:o,close:s}}},t.scanForClosingTag=function(t,e,n,r){return f(new a(t,e.line,e.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: PreviewAll, default */ +/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),f=n.n(d),p=n(/*! @ant-design/icons */"yEEn"),g=n(/*! @/components/monaco-editor */"ZW9T"),m=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");e.a=function(t){t.name;var e=t.data,n=(t.theme,t.type),l=t.filename,d=t.monacoEditor,b=t.className,x=t.style,S=t.close,C=t.onClose,E=t.hasMask,k=t.otherData,w=void 0===k?{}:k,T=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),O=Object(s.a)(T,2),L=(O[0],O[1],Object(u.useState)("")),A=Object(s.a)(L,2),D=(A[0],A[1]),R=Object(u.useState)(),_=Object(s.a)(R,2),I=_[0],N=_[1],M=Object(u.useRef)();"office"===n&&Object(m.P)(e).filesize>10485760&&(n="other"),l&&(d.filename=l),Object(u.useEffect)((function(){var t,e,n=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&D(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===n&&P()}),[n]);var P=function(){var t=Object(o.a)(c.a.mark((function t(){var n,r,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",e),n=e,e.startsWith("http")||(n=location.origin+n),r=new URL(n).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:r});case 6:i=t.sent,N(i);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){e.startsWith("http")||e.startsWith("blob:")?j():Object(m.x)(l||"educoder",e,l)},j=function(){Object(m.v)(l||"educoder",decodeURIComponent(e))};return h.a.createElement("div",{style:Object(a.a)({},x||{}),className:"".concat(E&&f.a.bgBlack," ").concat(n?f.a.wrp:"hide")},S&&h.a.createElement("div",{className:f.a.close,ref:M},h.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return M.current}},h.a.createElement("span",{onClick:j},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return M.current}},h.a.createElement("span",{className:"",onClick:function(){C(),N(null)}},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[b]," ").concat(b," ").concat(f.a.monaco," ").concat("txt"===n?"show":"hide")},"txt"===n&&h.a.createElement(g.b,d)),"audio"===n&&h.a.createElement("audio",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(e),autoPlay:!0}),"video"===n&&h.a.createElement(h.a.Fragment,null,(null==e?void 0:e.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(e),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(e),autoPlay:!0})),"office"===n&&I&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(I.key,"&url=").concat(y.a.API_SERVER+I.url,"&callbackUrl=").concat(y.a.API_SERVER+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=view")}),("xlsx"===n||"doc"===n||"pptx"===n||"docx"===n)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(w.key,"&url=").concat(y.a.API_SERVER+w.url,"&callbackUrl=").concat(y.a.API_SERVER+w.callbackUrl,"&fileType=").concat(w.fileType,"&title=").concat(w.title,"&model=").concat(w.model)}),"html"===n&&h.a.createElement("iframe",{src:e+"&disposition=inline"}),"pdf"===n&&h.a.createElement("embed",{className:f.a.embed,src:e,type:"application/pdf"}),"image"===n&&h.a.createElement("img",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(e)}),"other"===n&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载")),"download"===n&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载"))}},"p77/": +/*!****************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.css ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}},rUJ1: +/*!********************************************!*\ + !*** ./node_modules/marked/src/helpers.js ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: escape */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=t=>o[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const n=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(m,"$1")+e:t+e}function y(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(u,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n},cleanUrl:function(t,e,n){if(t){let t;try{t=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(n)&&(n=v(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,n,r=1;for(;r{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>e)n.splice(e);else for(;n.length1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===e.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=e[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;e[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===e.length?e[0]:e.map((function(t,e){return!l.isValidElement(t)||"key"in t&&null!==t.key?t:l.cloneElement(t,{key:"".concat("rc-observer-key","-").concat(e)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",e.a=p},u2Z1: +/*!********************************************!*\ + !*** ./src/components/Knowledge/index.tsx ***! + \********************************************/ +/*! exports provided: Knowledge */ +/*! exports used: Knowledge */function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),c=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),h=n.n(u),d=n(/*! react */"q1tI"),f=n.n(d),p=n(/*! @/utils/fetch */"ErOA"),g=n(/*! ./index.less?modules */"i58Z"),m=n.n(g),v=n(/*! ./icon.png */"T1X5"),y=n.n(v),b=c.a.Option,x=function(t){var e=t.subId,n=t.value,u=t.selectvalues,g=t.disabled,v=t.knowledgeOptions,x=void 0===v?[]:v,S=t.onChange,C=void 0===S?function(){}:S,E=t.onAddKnowledgeFinish,k=void 0===E?function(){}:E,w=Object(d.useRef)(),T=Object(d.useState)([]),O=Object(l.a)(T,2),L=O[0],A=O[1];n=n||[];Object(d.useEffect)((function(){(null==u?void 0:u.length)>0&&(A(Object(s.a)(u)),C(Object(s.a)(u)))}),[x]),Object(d.useEffect)((function(){var t;(null===(t=n)||void 0===t?void 0:t.length)>0&&C(Object(s.a)(n))}),[x]);return f.a.createElement("div",{className:m.a.wrap},f.a.createElement(c.a,{disabled:!e||g,className:"mr5",style:{width:"242px"},onChange:function(t,e){t?(A([e.key]),C([e.key])):(A([]),C([]))},showSearch:!0,allowClear:!0,value:null==x?void 0:x.filter((function(t){return(null==L?void 0:L.includes(null==t?void 0:t.id))||(null==L?void 0:L.includes((null==t?void 0:t.id)+""))})).map((function(t){return t.name}))},null==x?void 0:x.map((function(t){return f.a.createElement(b,{key:t.id,value:t.name},f.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},f.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},t.name),f.a.createElement("span",null,"personal"===t.type?"(自用)":"")))}))),f.a.createElement("button",{disabled:!e,className:"".concat(m.a.addKnowledge," ").concat(e?"":m.a.disabled),onClick:function(t){t.preventDefault(),w.current="",o.a.confirm({centered:!0,width:700,okText:"确定",cancelText:"取消",icon:null,title:"新建知识点",className:"custom-modal-divider",content:f.a.createElement("div",{className:"font14"},f.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},f.a.createElement("img",{src:y.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"您填写的知识点暂时仅对本人可见,平台审核通过后将列入公开知识点,对所有用户可见;",f.a.createElement("br",null),"平台审核过程中有权删除不合适的知识点(包括但不限于错误、非法、不雅、不匹配当前课程等情形),删除后可能影响您的试题的正常使用。",f.a.createElement("br",null),"请认真填写与教学内容相关的真实知识点 ",f.a.createElement("br",null)),f.a.createElement(a.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"请输入不超过20字的知识点名称",defaultValue:w.current,onChange:function(t){w.current=t.target.value}})),onOk:function(){return new Promise(function(){var t=Object(i.a)(h.a.mark((function t(n,i){var a,o;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w.current){t.next=3;break}return r.b.warn("请输入知识点名称"),t.abrupt("return",i());case 3:if(!(w.current.length>20)){t.next=6;break}return r.b.warn("请输入不超过20字的知识点名称"),t.abrupt("return",i());case 6:return t.next=8,Object(p.a)("/api/tag_disciplines.json",{method:"post",body:{name:w.current,sub_discipline_id:e}});case 8:return 0===(null==(a=t.sent)?void 0:a.status)&&(k({id:a.tag_discipline_id,name:w.current,type:"personal"}),(o=[]).push(a.tag_discipline_id),C([].concat(o)),A([a.tag_discipline_id]),C([].concat(o))),t.abrupt("return",n());case 11:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}})}},"新建知识点"))}},uK0f: +/*!*****************************************************!*\ + !*** ./node_modules/array-tree-filter/lib/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){(n=n||{}).childrenKeyName=n.childrenKeyName||"children";var r=t||[],i=[],a=0;do{var o=r.filter((function(t){return e(t,a)}))[0];if(!o)break;i.push(o),r=o[n.childrenKeyName]||[],a+=1}while(r.length>0);return i}}()},ulZh: +/*!*****************************************!*\ + !*** ./node_modules/hls.js/dist/hls.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;"undefined"!=typeof window&&(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||t,a),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],s]:t._events[l].push(s):(t._events[l]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new a:delete t._events[e]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r0}),!1)}t.exports=function(t,e){e=e||{};var i={main:n.m},s=e.all?{main:Object.keys(i.main)}:function(t,e){for(var n={main:[e]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l=2*h/f||b<=S)){var C,E=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((E=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+E.toFixed(3)+" s\n Time to underbuffer: "+S.toFixed(3)+" s"),n.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var n=e.frag,i=e.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var n=e.frag,r=e.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=e?e.duration:t?t.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,m=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(g=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),m=v=1)}return p=this.findBestLevel(d,a,r,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,n,r,i,a){for(var o,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(o=d.details)||void 0===o||!o.live),p=null==d?void 0:d.codecSet,g=l?l.duration:s?s.duration:0,m=n;m>=e;m--){var v=h[m];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,x=void 0;x=m<=u?i*t:a*t;var S=h[m].maxBitrate,C=S*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(x)+"/"+S+"/"+b+"/"+r+"/"+C),x>S&&(!C||f&&!this.bitrateTestDelay||C0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},S.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var e,n=this.levels,r=this.trackId,a=null==n||null===(e=n[r])||void 0===e?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,g=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var m={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(m),g&&t.prototype._handleFragmentLoadComplete.call(this,m)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},S.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},S.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},S.doTickIdle=function(){var t,e,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),g=this.audioSwitch;if(!(f>=p)||g){if(!g&&this._streamEnded(d,h))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var m=h.fragments[0].start,v=d.end;if(g){var y=this.getLoadPosition();v=y,h.PTSKnown&&ym||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=m+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},S.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?e:Math.max(e,n.len)},S.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(t,e){var n=e.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(t){return new l.Level(t)}))},S.onAudioTrackSwitching=function(t,e){var n=!!e.url;this.trackId=e.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(t,e){this.mainDetails=e.details},S.onAudioTrackLoaded=function(t,e){var n,r=this.levels,a=e.details,o=e.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,n=t.frag,r=t.part,a=t.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var g=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",m=this.transmuxer;m||(m=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(e=n.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var x=r?r.index:-1,S=-1!==x,C=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,x,S);m.push(a,b,g,"",n,r,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},S._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(t,e){var n=e.tracks.audio;n&&(this.mediaBuffer=n.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},S.onFragBuffered=function(t,e){var n=e.frag,r=e.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},S.onError=function(e,n){switch(n.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},S.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},S._handleTransmuxComplete=function(t){var e,n="audio",r=this.hls,o=t.remuxResult,s=t.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,g=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,x),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,C)}}},S._bufferInitSegment=function(t,e,n){if(this.state===i.State.PARSING){t.video&&delete t.video;var r=t.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,t);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:e,part:null,chunkMeta:n,parent:e.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},S.loadFragment=function(e,n,a){var o=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):n.live&&!Object(r.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,n,a)))},S.completeAudioSwitch=function(){var e=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);e.default=x},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-controller.ts ***! + \**************************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(t,e){for(var n=0;n=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=e[this.trackId];this.log("Now switching to audio-track index "+t);var i=e[t],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,n=this.findTrackId(e)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,n=0;ne.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,n){var r=this,i=e.details,o=e.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+t+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,g=d===f;-1!==p?(c=g?f+1:d,u=g?h?0:p:p+1):c=f+1;var m=i.age,v=m+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,e.deliveryDirectives,c,u),h||!g)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,e.deliveryDirectives,c,u);var x=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,n,r){var a=Object(i.getSkipValue)(t,n);return null!=e&&e.skip&&t.deltaUpdateFailed&&(n=e.msn,r=e.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},e.retryLoadingOrFail=function(t){var e,n=this,r=this.hls.config,i=this.retryCount-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return i},t}()},"./src/controller/base-stream-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/base-stream-controller.ts ***! + \**************************************************/ +/*! exports provided: State, default */function(t,e,n){"use strict";n.r(e),n.d(e,"State",(function(){return S})),n.d(e,"default",(function(){return C}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),g=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),m=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var n=0;ne.start+e.duration+c;(s0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(e){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:i}}),n.payload=e,n}))}return n})).then((function(n){var r=e.fragCurrent,i=e.hls,a=e.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[t.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:t.type}),e.tick()})).catch((function(n){e.warn(n),e.resetFragmentLoading(t)}))},w.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},w.fragBufferedComplete=function(t,e){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=S.IDLE,this.tick()},w._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var n=t.frag,r=t.part,i=t.partsLoaded,a=!i||0===i.length||i.some((function(t){return!t})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);e.flush(o)}},w._handleFragmentLoadProgress=function(t){},w._doFragLoad=function(t,e,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(t.start,n||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&i){n>t.end&&e.fragmentHint&&(t=e.fragmentHint);var s=this.getNextPart(o,t,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(t,o,s,i).catch((function(t){return a.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:n}),this.fragmentLoader.load(t,i).catch((function(t){return a.handleFragLoadError(t)}))},w.doFragPartsLoad=function(t,e,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=e[c];i.fragmentLoader.loadPart(t,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=e[c+1];if(!h||h.fragment!==t)return a({frag:t,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},w.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},w._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===S.PARSING){var n=e.frag,r=e.part,i=e.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,t.partial)}else this.fragCurrent||(this.state=S.IDLE)},w.getCurrentContext=function(t){var e=this.levels,n=t.level,r=t.sn,i=t.part;if(!e||!e[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=e[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},w.bufferFragmentData=function(t,e,n,r){if(t&&this.state===S.PARSING){var i=t.data1,a=t.data2,o=i;if(i&&a&&(o=Object(h.appendUint8Array)(i,a)),o&&o.length){var s={type:t.type,frag:e,part:n,chunkMeta:r,parent:e.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),t.dropped&&t.independent&&!n&&this.flushBufferGap(e)}}},w.flushBufferGap=function(t){var e=this.media;if(e)if(o.BufferHelper.isBuffered(e,e.currentTime)){var n=e.currentTime,r=o.BufferHelper.bufferInfo(e,n,0),i=t.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(t.start-a,r.end-a),n+a);t.start-s>a&&this.flushMainBuffer(s,t.start)}else this.flushMainBuffer(0,t.start)},w.getFwdBufferInfo=function(t,e){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(t,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,e);if(s&&a.nextStart=n&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},w.getNextFragment=function(t,e){var n,r,i=e.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(e.live){var c=s.initialLiveManifestSize;if(a-1&&nn.start&&n.loaded},w.getInitialLiveFragment=function(t,e){var n=this.fragPrevious,r=null;if(n){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(e,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=t.startSN&&i<=t.endSN){var a=e[i-t.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(e,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return r},w.getFragmentAtPosition=function(t,e,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),te-u?0:u;r=Object(f.findFragmentByPTS)(o,s,t,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,g=o&&r.level===o.level,m=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=m)}else o&&r.sn===o.sn&&!h&&g&&(r.sn=a-e.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i"+t.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),h}return l},w.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},w.setStartPosition=function(t,e){var n=this.startPosition;if(n"+t))}}])&&b(C.prototype,E),k&&b(C,k),i}(i.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.ts ***! + \*********************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,n=e.media,r=e.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(e.updateMediaElementDuration(),t.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(i.Events.BUFFER_RESET,this.onBufferReset,this),t.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(i.Events.BUFFER_EOS,this.onBufferEos,this),t.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(i.Events.FRAG_PARSED,this.onFragParsed,this),t.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(i.Events.BUFFER_RESET,this.onBufferReset,this),t.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(i.Events.BUFFER_EOS,this.onBufferEos,this),t.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(i.Events.FRAG_PARSED,this.onFragParsed,this),t.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var n=2;(e.audio&&!e.video||!e.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var n=this.media=e.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,n=this._objectUrl;if(e){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){a.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(n&&self.URL.revokeObjectURL(n),t.src===n?(t.removeAttribute("src"),t.load()):a.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(i.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var n=t.sourceBuffer[e];try{n&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(n),t.sourceBuffer[e]=void 0)}catch(t){a.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var n=this,r=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(r){var i=n.tracks[t];if(i&&"function"==typeof i.buffer.changeType){var a=e[t],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||o).replace(d,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(t,c)}}}else n.pendingTracks[t]=e[t]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[t];i&&(a.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),i.changeType(e)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){a.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};r.append(i,t)},e.onBufferAppending=function(t,e){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,g=p.buffering[h],m=self.performance.now();g.start=m;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=m),y&&0===y.start&&(y.start=m);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),S={execute:function(){if(g.executeStart=self.performance.now(),x){var t=n.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=n.sourceBuffer,r={};for(var a in e)r[a]=s.BufferHelper.getBuffered(e[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(t){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,e.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),r.trigger(i.Events.ERROR,e)}};l.append(S,h)},e.onBufferFlushing=function(t,e){var n=this,r=this.operationQueue,o=function(t){return{execute:n.removeExecutor.bind(n,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){a.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?r.append(o(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){r.append(o(t),t)}))},e.onFragParsed=function(t,e){var n=this,r=e.frag,o=e.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var t=self.performance.now();r.stats.buffering.end=t,o&&(o.stats.buffering.end=t);var e=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:e,id:r.type})}),s)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var n=this;this.getSourceBufferTypes().reduce((function(t,r){var i=n.sourceBuffer[r];return e.type&&e.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),t&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var t=n.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var n=e.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==e){var o=this.getSourceBufferTypes();if(o.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(t.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,n=this.media,i=this.mediaSource,o=t.fragments[0].start+t.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(t)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},e.updateSeekableRange=function(t){var e=this.mediaSource,n=t.fragments;if(n.length&&t.live&&null!=e&&e.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+t.totalduration);e.setLiveSeekableRange(r,i)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!t||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in t)if(!e[s]){var l=t[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(t){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){a.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(t);n&&n.onError(e)},e.removeExecutor=function(t,e,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[t];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(t);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,e),d=Math.min(n,c,u);d>h?(a.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var n=this.operationQueue,r=this.sourceBuffer[e];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(e);r.ended=!1,console.assert(!r.updating,e+" sourceBuffer must not be updating"),r.appendBuffer(t)},e.blockBuffers=function(t,e){var n=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var r=this.operationQueue,i=e.map((function(t){return r.appendBlocker(t)}));Promise.all(i).then((function(){t(),e.forEach((function(t){var e=n.sourceBuffer[t];e&&e.updating||r.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,n){var r=this.sourceBuffer[t];if(r){var i=n.bind(this,t);this.listeners[t].push({event:e,listener:i}),r.addEventListener(e,i)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts": +/*!**************************************************!*\ + !*** ./src/controller/buffer-operation-queue.ts ***! + \**************************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var n=this.queues[e];n.push(t),1===n.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,n=new Promise((function(t){e=t})),r={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,t),n},e.executeNext=function(t){var e=this.buffers,n=this.queues,i=e[t],a=n[t];if(a.length){var o=a[0];try{o.execute()}catch(e){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(e),i&&i.updating||(a.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts": +/*!************************************************!*\ + !*** ./src/controller/cap-level-controller.ts ***! + \************************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts");function i(t,e){for(var n=0;n0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(e){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return t.isLevelAllowed(i,n.restrictedLevels)&&i<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var n=t.getBoundingClientRect();e.width=n.width,e.height=n.height,e.width||e.height||(e.width=n.right-n.left||t.width||0,e.height=n.bottom-n.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,n){if(!t||!t.length)return-1;for(var r,i,a=t.length-1,o=0;o=e||s.height>=n)&&(r=s,!(i=t[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},e=t,a=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&i(e.prototype,n),a&&i(e,a),t}();e.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nn&&(n=a.bitrate)}return n>0?n:NaN},e.getBufferLength=function(t){var e=this.hls.media,n=t===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&e?1e3*a.BufferHelper.bufferInfo(n,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,n=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new n(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,n,r){e(t),this.loader.load(t,n,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,n=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new n(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,n,r){e(t),this.loader.load(t,n,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,n=[],r=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},i=function(t){return Math.round(t)},a=function(t){return 100*i(t/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(t){return encodeURIComponent(t)},rtp:a,tb:i},s=c(Object.keys(t||{}).sort());!(e=s()).done;){var l=e.value,u=t[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=o[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(f)}}return n.join(",")},t.toHeaders=function(e){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=0,s=Object.keys(e);o3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,t,e);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,t);s.send(l)}catch(t){a.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var n=e.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var n=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),r=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},e=t,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(e.prototype,n),l&&s(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/fps-controller.ts ***! + \******************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,n){var a=performance.now();if(e){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=n,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,n){"use strict";n.r(e),n.d(e,"findFragmentByPDT",(function(){return a})),n.d(e,"findFragmentByPTS",(function(){return o})),n.d(e,"fragmentWithinToleranceTest",(function(){return s})),n.d(e,"pdtWithinToleranceTest",(function(){return l})),n.d(e,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(t,e,n){if(null===e||!Array.isArray(t)||!t.length||!Object(r.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;it&&n.start?-1:0}function l(t,e,n){var r=1e3*Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>t}function c(t,e){return i.default.search(t,(function(t){return t.cce?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-tracker.ts ***! + \********************************************/ +/*! exports provided: FragmentState, FragmentTracker */function(t,e,n){"use strict";n.r(e),n.d(e,"FragmentState",(function(){return r})),n.d(e,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(r||(r={}));var o=function(){function t(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=t&&void 0!==s&&t<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=t&&void 0!==n.appendedPTS&&t<=n.appendedPTS)return n}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===e&&a.buffered){var o=a.body;if(o.start<=t&&t<=o.end)return o}}return null},e.detectEvictedFragments=function(t,e,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[t];o&&o.time.some((function(t){var n=!r.isTimeBuffered(t.startPTS,t.endPTS,e);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},e.detectPartialFragments=function(t){var e=this,n=this.timeRanges,r=t.frag,i=t.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(t){var a=r.elementaryStreams[t];if(a){var s=n[t],l=null!==i||!0===a.partial;o.range[t]=e.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},e.fragBuffered=function(t){var e=l(t),n=this.fragments[e];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},e.getBufferedTimes=function(t,e,n,r){for(var i={time:[],partial:n},a=e?e.start:t.start,o=e?e.end:t.end,s=t.minEndPTS||o,l=t.maxStartPTS||a,c=0;c=u&&s<=h){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(au)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},e.getPartialFragment=function(t){var e,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,t>=n&&t<=r&&(e=Math.min(t-n,r-t),a<=e&&(i=u.body,a=e)))})),i},e.getState=function(t){var e=l(t),n=this.fragments[e];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},e.backtrack=function(t,e){var n=l(t),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=e||r.loaded;return r.loaded=null,i},e.getBacktrackData=function(t){var e=l(t),n=this.fragments[e];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,n){for(var r,i,a=0;a=r&&e<=i)return!0;if(e<=r)return!1}return!1},e.onFragLoaded=function(t,e){var n=e.frag,r=e.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var n=this,r=e.frag,i=e.part,o=e.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(t){var e=o[t];if(n.detectEvictedFragments(t,e),!i)for(var a=0;at&&r.removeFragment(o)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function s(t){var e,n;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(n=t.range.audio)||void 0===n?void 0:n.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/gap-controller.ts ***! + \******************************************/ +/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(t,e,n){"use strict";n.r(e),n.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(e,"MAX_START_GAP_JUMP",(function(){return l})),n.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(e,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(e,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function t(t,e,n,r){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=n,this.hls=r}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===t){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var S=self.performance.now();if(null!==i){var C=S-i;!c&&C>=s&&this._reportStall(d.len);var E=r.BufferHelper.bufferInfo(n,a,e.maxBufferHole);this._tryFixBufferStall(E,C)}else this.stalled=S}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||t.len>n.maxBufferHole&&e>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,n=t.partHoldBack,r=t.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,n=this.levelDetails;if(null===t||null===e||null===n)return null;var r=n.edge,i=t-e-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var n=t.buffered.length;return n?t.buffered.end(n-1):e.edge-this.currentTime}}])&&o(e.prototype,n),s&&o(e,s),t}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.ts ***! + \********************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e0){n=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(t,e,n,r){var i=t.details,a=this._levels[e];if(a.loadError++,n){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError1){var r=(e.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(t){t.urlId=r})),this.level=t}},v.onFragLoaded=function(t,e){var n=e.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(t,e){var n,r,i=e.level,a=e.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,e,o.details)):null!==(n=e.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[e.id].groupId,a=0;a0){var r=n.urlId,a=n.url[r];if(t)try{a=t.addDirectives(a)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:e,id:r,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var n=function(t,n){return n!==e},r=this._levels.filter((function(r,i){return i!==t||r.url.length>1&&void 0!==e&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(t,e){var n=t.details;return null!=n&&n.fragments&&n.fragments.forEach((function(t){t.level=e})),t}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(g=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==t||null===(e=n[t])||void 0===e||!e.details)){if(t<0||t>=n.length){var r=t<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:r,reason:"invalid level idx"}),r)return;t=Math.min(t,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[t];this.log("switching to level "+t+" from "+o),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,g),m&&h(p,m),l}(l.default)},"./src/controller/level-helper.ts": +/*!****************************************!*\ + !*** ./src/controller/level-helper.ts ***! + \****************************************/ +/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(t,e,n){"use strict";n.r(e),n.d(e,"addGroupId",(function(){return a})),n.d(e,"assignTrackIdsByGroup",(function(){return o})),n.d(e,"updatePTS",(function(){return s})),n.d(e,"updateFragPTSDTS",(function(){return c})),n.d(e,"mergeDetails",(function(){return u})),n.d(e,"mapPartIntersection",(function(){return h})),n.d(e,"mapFragmentIntersection",(function(){return d})),n.d(e,"adjustSliding",(function(){return f})),n.d(e,"addSliding",(function(){return p})),n.d(e,"computeReloadInterval",(function(){return g})),n.d(e,"getFragmentWithSN",(function(){return m})),n.d(e,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(t,e,n){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(n);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(n)}}function o(t){var e={};t.forEach((function(t){var n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++}))}function s(t,e,n){l(t[e],t[n])}function l(t,e){var n=e.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;e.sn>t.sn?(a=n-t.start,i=t):(a=t.start-n,i=e),i.duration!==a&&(i.duration=a)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",e),a=n+e.duration,s=o+e.duration);var c=n,u=a,h=e.startPTS,d=e.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),o=Math.min(o,e.startDTS),u=Math.min(a,d),a=Math.max(a,d),s=Math.max(s,e.endDTS)}e.duration=a-n;var p=n-e.start;e.appendedPTS=a,e.start=e.startPTS=n,e.maxStartPTS=c,e.startDTS=o,e.endPTS=a,e.minEndPTS=u,e.endDTS=s;var g,m=e.sn;if(!t||mt.endSN)return 0;var v=m-t.startSN,y=t.fragments;for(y[v]=e,g=v;g>0;g--)l(y[g],y[g-1]);for(g=v;g=0;o--){var s=a[o].initSegment;if(s){n=s;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,i){t.relurl&&(u=t.cc-i.cc),Object(r.isFiniteNumber)(t.startPTS)&&Object(r.isFiniteNumber)(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.appendedPTS=t.appendedPTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(l=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,i.urlId=t.urlId,t.initSegment&&(i.initSegment=t.initSegment,n=t.initSegment)})),n&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=n)||void 0===e?void 0:e.relurl)||(t.initSegment=n)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var g=e.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m=r.length||p(e,r[n].start)}function p(t,e){if(e){for(var n=t.fragments,r=t.skippedSegments;r0&&a<3*r,s=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(o){var c=333*t.misses;n=Math.max(Math.min(i,2*s),c),t.availabilityDelay=(t.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),t.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function m(t,e,n){if(!t||!t.details)return null;var r=t.details,i=r.fragments[e-r.startSN];return i||((i=r.fragmentHint)&&i.sn===e?i:e0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var t,e=this.levels,n=this.level,r=null==e||null===(t=e[n])||void 0===t?void 0:t.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var t,e,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var g=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==g&&!(g.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(g,p)){var m={};return this.altAudio&&(m.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,m),void(this.state=i.State.ENDED)}var v=g.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(e,n,r){var i,a=this.fragmentTracker.getState(e);if(this.fragCurrent=e,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(e);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},C.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var n,r=this.getAppendedFrag(e.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!e.paused&&t){var i=t[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(e.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(e,n){t.prototype.flushMainBuffer.call(this,e,n,this.altAudio?"video":null)},C.onMediaAttached=function(e,n){t.prototype.onMediaAttached.call(this,e,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(r.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(t,e){var n,r=!1,i=!1;e.levels.forEach((function(t){(n=t.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},C.onLevelLoading=function(t,e){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[e.level];(!r.details||r.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},C.onLevelLoaded=function(t,e){var n,r=this.levels,a=e.level,s=e.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},C._handleFragmentLoadProgress=function(t){var e,n=t.frag,r=t.part,i=t.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(e=n.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(o),g=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=r?r.index:-1,v=-1!==m,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,m,v),b=this.initPTS[n.cc];g.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},C.onAudioTrackSwitching=function(t,e){var n=this.altAudio,r=!!e.url,i=e.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},C.onAudioTrackSwitched=function(t,e){var n=e.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},C.onBufferCreated=function(t,e){var n,r,i=e.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(t,e){var n=e.frag,r=e.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},C.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=i.State.ERROR):e.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var n=s.BufferHelper.getBuffered(t);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(t,e){var n=e.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(t,e){this.levels=e.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var t=this.media,e=t.currentTime,n=this.startPosition;if(n>=0&&e0&&(i1&&!1===t.seeking){var n=t.currentTime;if(s.BufferHelper.isBuffered(t,n)?e=this.getAppendedFrag(n):s.BufferHelper.isBuffered(t,n+.1)&&(e=this.getAppendedFrag(n+.1)),e){var r=this.fragPlaying,i=e.level;r&&e.sn===r.sn&&r.level===i&&e.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:e}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=e)}}},b=y,(x=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&m(b.prototype,x),S&&m(b,S),y}(i.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(t,e,n){"use strict";n.r(e),n.d(e,"SubtitleStreamController",(function(){return g}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(t,e){for(var n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(t,e){var n=e.startOffset,r=e.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;e.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||i!==a)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.live){var d=this.mainDetails;if(r.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(r,h.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&d.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,n=t.payload,i=e.decryptdata,a=this.hls;if(!this.fragContextChanged(e)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(t){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,n=this.levels;if(!n.length||!n[e]||!n[e].details)return;var s=n[e].details,l=s.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=s.fragments,v=m.length,y=s.edge,b=this.fragPrevious;if(p-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(i.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var n=e.id,r=e.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=e.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,e,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var n=e.textGroupIds[e.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(t){return!n||t.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,n=0;n=i.length)){this.clearTimer();var a=i[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,h=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),n=0;n=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],n),u=!0,f/(n-e)>.5))return}if(u||a.push([e,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,n,r)}else{var g=this.Cues.newCue(null,e,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:g,track:t})}},e.onInitPtsFound=function(t,e){var n=this,r=e.frag,a=e.id,o=e.initPTS,s=e.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){n.onFragLoaded(i.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var n=0;n>>8^255&m^99,t[f]=m,e[m]=f;var v=d[f],y=d[v],b=d[y],x=257*d[m]^16843008*m;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,a[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[m]=x<<24|x>>>8,c[m]=x<<16|x>>>16,u[m]=x<<8|x>>>24,h[m]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r>>6);var p=(60&e[n+2])>>>2;if(!(p>f.length-1))return c=(1&e[n+2])<<2,c|=(192&e[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!o&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:d};t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5=t.length)return!1;var r=c(t,e);if(r<=n)return!1;var i=e+r;return i===t.length||h(t,i)}return!1}function p(t,e,n,i,a){if(!t.samplerate){var s=o(e,n,i,a);if(!s)return;t.config=s.config,t.samplerate=s.samplerate,t.channelCount=s.channelCount,t.codec=s.codec,t.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+t.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function g(t){return 9216e4/t}function m(t,e,n,r,i){var a=l(t,e),o=c(t,e);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(t,e,n,r,i){var a=m(e,n,r,i,g(t.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,h=Math.max(0,n+u-e.length);h?(o=new Uint8Array(u-l)).set(e.subarray(n+l,e.length),0):o=e.subarray(n+l,n+u);var d={unit:o,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts": +/*!*****************************************!*\ + !*** ./src/demux/base-audio-demuxer.ts ***! + \*****************************************/ +/*! exports provided: initPTSFn, default */function(t,e,n){"use strict";n.r(e),n.d(e,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,n){},e.demux=function(t,e){this.cachedData&&(t=Object(o.appendUint8Array)(this.cachedData,t),this.cachedData=null);var n,r,l=i.getID3Data(t,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,e)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ut?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?n<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,n=8,r=0;r0)return t.subarray(n,n+r)},s=function(t,e){var n=0;return n=(127&t[e])<<21,n|=(127&t[e+1])<<14,n|=(127&t[e+2])<<7,n|=127&t[e+3]},l=function(t,e){return i(t,e)&&s(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=t[u++],s=t[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:g};function x(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/mp3demuxer.ts ***! + \*********************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var l=r.prototype;return l.resetInitSegment=function(e,n,r){t.prototype.resetInitSegment.call(this,e,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(t){if(!t)return!1;for(var e=(i.getID3Data(t,0)||[]).length,n=t.length;e0},e.demux=function(t){var e=t,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(r.appendUint8Array)(this.remainderData,t));var a=Object(r.segmentValidRange)(e);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=e;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.flush=function(){var t=Object(i.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:t,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.demuxSampleAes=function(t,e,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();a.minProbeByteLength=1024,e.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(t,e,n){"use strict";n.r(e),n.d(e,"appendFrame",(function(){return l})),n.d(e,"parseHeader",(function(){return c})),n.d(e,"isHeaderPattern",(function(){return u})),n.d(e,"isHeader",(function(){return h})),n.d(e,"canParse",(function(){return d})),n.d(e,"probe",(function(){return f}));var r=null,i=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],a=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],o=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function l(t,e,n,r,i){if(!(n+24>e.length)){var a=c(e,n);if(a&&n+a.frameLength<=e.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:e.subarray(n,n+a.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(t,e){var n=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],g=3===d?1:2,m=o[n][l],v=s[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===r){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=x?parseInt(x[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:g,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1=t.length)return void n();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,n,r),!r)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,n=new Int8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)n.set(t.subarray(i,i+16),r);return n},e.getAvcDecryptedUnit=function(t,e){for(var n=new Uint8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(n.subarray(r,r+16),i);return t},e.decryptAvcSample=function(t,e,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(t,e,n+1,r)}))},e.decryptAvcSamples=function(t,e,n,r){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,n=0){if(e>=t.length)return void r();for(var i=t[e].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,n,r,a,o),!o)return}}}},t}();e.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.ts ***! + \*******************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,n,l){var h=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=t,this.id=e,this.onTransmuxComplete=n,this.onFlush=l;var d=t.config,f=function(e,n){(n=n||{}).frag=h.frag,n.id=h.id,t.trigger(e,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var m;o.logger.log("demuxing in webworker");try{m=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(e){t.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},m.postMessage({cmd:"init",typeSupported:p,vendor:g,id:e,config:JSON.stringify(d)})}catch(t){o.logger.warn("Error in worker:",t),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new a.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,d,g,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},e.push=function(t,e,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=s?s.start:i.start,m=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,S=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===S),E=self.performance.now();(b||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=E),!s||!S&&C||(s.stats.parsing.start=E);var k=new a.TransmuxState(y,C,c,b,g);if(!C||y){o.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+C+"\n accurateTimeOffset: "+c+"\n timeOffset: "+g);var w=new a.TransmuxConfig(n,r,e,l,h);this.configureTransmuxer(w)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:k},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,k);Object(a.isPromise)(T)?T.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(T)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:t});else if(n){var i=n.flush(t);Object(a.isPromise)(i)?i.then((function(n){e.handleFlushResult(n,t)})):this.handleFlushResult(i,t)}},e.handleFlushResult=function(t,e){var n=this;t.forEach((function(t){n.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,n=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,n.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,n=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):n&&n.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(t){var e=new o.EventEmitter,n=function(e,n){t.postMessage({event:e,data:n})};e.on(i.Events.FRAG_DECRYPTED,n),e.on(i.Events.ERROR,n),t.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);t.transmuxer=new r.default(e,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":t.transmuxer.configure(o.config);break;case"demux":var c=t.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=o.chunkMeta,d=t.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((n=e.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=e.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),t.postMessage({event:"transmuxComplete",data:e},r)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,n){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/transmuxer.ts ***! + \*********************************/ +/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y})),n.d(e,"isPromise",(function(){return x})),n.d(e,"TransmuxConfig",(function(){return S})),n.d(e,"TransmuxState",(function(){return C}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),g=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(t){g.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var m=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;m.forEach((function(t){var e=t.demux;v=Math.max(v,e.minProbeByteLength)}));var y=function(){function t(t,e,n,r,i){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=t,this.typeSupported=e,this.config=n,this.vendor=r,this.id=i}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(t),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(t,e){var n=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(n=e),n}(s,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(t){var e=a.push(t,null,n);return a.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!g)return o.executeEnd=r(),b(n);s=new Uint8Array(g)}var m=i||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,E=h.audioCodec,k=h.videoCodec,w=h.defaultInitPts,T=h.duration,O=h.initSegmentData;if((y||x)&&this.resetInitSegment(O,E,k,T),y&&this.resetInitialTimestamp(w),v||this.resetContiguity(),this.needsProbing(s,y,x)){if(l.dataLength){var L=l.flush();s=Object(p.appendUint8Array)(L,s)}this.configureTransmuxer(s,h)}var A=this.transmux(s,d,C,S,n),D=this.currentTransmuxState;return D.contiguous=!0,D.discontinuity=!1,D.trackSwitch=!1,o.executeEnd=r(),A},e.flush=function(t){var e=this,n=t.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,t))}var f=s.dataLength;s.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(t)];var m=p.flush(h);return x(m)?m.then((function(n){return e.flushRemux(u,n,t),u})):(this.flushRemux(u,m,t),u)},e.flushRemux=function(t,e,n){var i=e.audioTrack,a=e.avcTrack,o=e.id3Track,s=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},e.resetInitialTimestamp=function(t){var e=this.demuxer,n=this.remuxer;e&&n&&(e.resetTimeStamp(t),n.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(e,n,r),a.resetInitSegment(t,e,n))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,n,r,i){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,n,r,i):this.transmuxUnencrypted(t,n,r,i)},e.transmuxUnencrypted=function(t,e,n,r){var i=this.demuxer.demux(t,e,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,e,n,!1,this.id),chunkMeta:r}},e.transmuxSampleAes=function(t,e,n,r,i){var a=this;return this.demuxer.demuxSampleAes(t,e,n).then((function(t){return{remuxResult:a.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,n,r,!1,a.id),chunkMeta:i}}))},e.configureTransmuxer=function(t,e){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p>4>1){if((D=O+5+e[O+4])===O+188)continue}else D=O+4;switch(A){case f:L&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(D,O+188)),p.size+=O+188-D);break;case y:L&&(x&&(a=v(x))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(e.subarray(D,O+188)),x.size+=O+188-D);break;case b:L&&(S&&(a=v(S))&&this.parseID3PES(a),S={data:[],size:0}),S&&(S.data.push(e.subarray(D,O+188)),S.size+=O+188-D);break;case 0:L&&(D+=e[D]+1),k=this._pmtId=g(e,D);break;case k:L&&(D+=e[D]+1);var R=m(e,D,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=R.avc)>0&&(o.pid=f),(y=R.audio)>0&&(s.pid=y,s.isAAC=R.isAAC),(b=R.id3)>0&&(d.pid=b),C&&!E&&(u.logger.log("reparse from beginning"),C=!1,O=T-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:C=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,s.pesData=x,d.pesData=S;var _={audioTrack:s,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(_),_},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,n=t.audioTrack,r=t.avcTrack,i=t.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(e=v(a))?(this.parseAVCPES(e,!0),r.pesData=null):r.pesData=a,o&&(e=v(o))?(n.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(e=v(s))?(this.parseID3PES(e),i.pesData=null):i.pesData=s},e.demuxSampleAes=function(t,e,n){var r=this.demux(t,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,e);return this.decrypt(r,i)},e.decrypt=function(t,e){return new Promise((function(n){var r=t.audioTrack,i=t.avcTrack;r.samples&&r.isAAC?e.decryptAacSamples(r.samples,0,(function(){i.samples?e.decryptAvcSamples(i.samples,0,0,(function(){n(t)})):n(t)})):i.samples&&e.decryptAvcSamples(i.samples,0,0,(function(){n(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,t.pts,t.dts,"")),s.forEach((function(e){switch(e.type){case 1:n=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var s=e.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new a.default(x(e.data));h.readUByte();for(var d=0,f=0,g=!1,m=0;!g&&h.bytesAvailable>1;){d=0;do{d+=m=h.readUByte()}while(255===m);f=0;do{f+=m=h.readUByte()}while(255===m);if(4===d&&0!==h.bytesAvailable){if(g=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),S=31&v,C=[v,h.readUByte()],E=0;E16){for(var k=[],w=0;w<16;w++)k.push(h.readUByte().toString(16)),3!==w&&5!==w&&7!==w&&9!==w||k.push("-");for(var T=f-16,O=new Uint8Array(T),L=0;L=0){var h={data:t.subarray(c,l-a-1),type:u};s.push(h)}else{var d=this.getLastNalUnit();if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(n=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(t.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l=0&&a>=0){var p={data:t.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var g=this.getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+t.byteLength);m.set(g.data,0),m.set(t,g.data.byteLength),g.data=m}}return i.naluState=a,s},e.parseAACPES=function(t){var e,n,i,a,o,s=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,g=Math.min(d.missing,p),m=p-g;d.sample.unit.set(f.subarray(0,g),m),c.samples.push(d.sample),s=d.missing}for(e=s,n=f.length;e1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((e=s[0])[0]<<16)+(e[1]<<8)+e[2]){if((n=(e[4]<<8)+e[5])&&n>t.size-6)return null;var c=e[7];192&c&&(i=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?i-(a=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var h=(r=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=s.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,o),o+=g}return n&&(n-=r+3),{data:d,pts:i,dts:a,len:n}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var n=e.samples,r=n.length;if(!r)return void e.dropped++;var i=n[r-1];t.pts=i.pts,t.dts=i.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var n=t.length;if(n>0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.ptse)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&v(e.prototype,n),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(t,e,n){"use strict";n.r(e),n.d(e,"isSupported",(function(){return a})),n.d(e,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var t=Object(r.getMediaSource)();if(!t)return!1;var e=i(),n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!n&&!!a}function o(){var t,e=i();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/fragment-loader.ts ***! + \***************************************/ +/*! exports provided: default, LoadError */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h})),n.d(e,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return o(t,arguments,c(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,t)})(t)}function o(t,e,n){return(o=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=Math.pow(2,17),h=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var n=this,r=t.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=t.loader=o?new o(a):new s(a),h=d(t),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,i,a,o){n.resetLoader(t,c),r({frag:t,part:null,payload:e.data,networkDetails:o})},onError:function(e,r,a){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:a}))},onAbort:function(e,r,a){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:a}))},onTimeout:function(e,r,a){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:a}))},onProgress:function(n,r,i,a){e&&e({frag:t,part:null,payload:i,networkDetails:a})}})}))},e.loadPart=function(t,e,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=t.loader=o?new o(a):new s(a),p=d(t,e),g={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,g,{onSuccess:function(i,a,o,s){r.resetLoader(t,h),r.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:n,networkDetails:o}))},onAbort:function(n,a,o){t.stats.aborted=e.stats.aborted,r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:o}))}})}))},e.updateStatsFromPart=function(t,e){var n=t.stats,r=e.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(t.duration/e.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function d(t,e){void 0===e&&(e=null);var n=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(t){var e,n;function r(e){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a>8*(15-n)&255;return e},n.setDecryptDataFromLevelKey=function(t,e){var n=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((n=s.LevelKey.fromURI(t.uri)).method=t.method,n.iv=this.createInitializationVector(e),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(t,e,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[t];s?(s.startPTS=Math.min(s.startPTS,e),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[t]={startPTS:e,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var t=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),g=function(t){function e(e,n,r,i,a){var o;(o=t.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=e.decimalFloatingPoint("DURATION"),o.gap=e.bool("GAP"),o.independent=e.bool("INDEPENDENT"),o.relurl=e.enumeratedString("URI"),o.fragment=n,o.index=i;var s=e.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts": +/*!**********************************!*\ + !*** ./src/loader/key-loader.ts ***! + \**********************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var n=e.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var n=e.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})},e.loadtimeout=function(t,e){var n=e.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},t}()},"./src/loader/level-details.ts": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(t,e,n){"use strict";n.r(e),n.d(e,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(t,e){for(var n=0;nt.endSN||e>0||0===e&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(e.prototype,n),a&&i(e,a),t}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(t,e,n){"use strict";n.r(e),n.d(e,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(t,e){for(var n=0;n2){var n=e.shift()+".";return n+=parseInt(e.shift()).toString(16),n+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return i.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r,i=[],a={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(e));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:t.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,a[d["DATA-ID"]]=d)}return{levels:i,sessionData:o?a:null}},t.parseMasterPlaylistMedia=function(e,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(e));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,n):""};if(i.length){var h=t.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,n,u,h){var d,m,v,y=new o.LevelDetails(e),x=y.fragments,S=null,C=0,E=0,k=0,w=0,T=null,O=new a.Fragment(u,e),L=-1,A=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){A&&(A=!1,(O=new a.Fragment(u,e)).start=k,O.sn=C,O.cc=w,O.level=n,S&&(O.initSegment=S,O.rawProgramDateTime=S.rawProgramDateTime));var D=d[1];if(D){O.duration=parseFloat(D);var R=(" "+d[2]).slice(1);O.title=R||null,O.tagList.push(R?["INF",D,R]:["INF",D])}else if(d[3])Object(r.isFiniteNumber)(O.duration)&&(O.start=k,v&&(O.levelkey=v),O.sn=C,O.level=n,O.cc=w,O.urlId=h,x.push(O),O.relurl=(" "+d[3]).slice(1),b(O,T),T=O,k+=O.duration,C++,E=0,A=!0);else if(d[4]){var _=(" "+d[4]).slice(1);T?O.setByteRange(_,T):O.setByteRange(_)}else if(d[5])O.rawProgramDateTime=(" "+d[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),-1===L&&(L=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=s.LevelKey.fromURL(e,V),V&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=z));break;case"START":var Y=new l.AttrList(N).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var X=new l.AttrList(N);O.relurl=X.URI,X.BYTERANGE&&O.setByteRange(X.BYTERANGE),O.level=n,O.sn="initSegment",v&&(O.levelkey=v),O.initSegment=null,S=O,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(N);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(N);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var J=y.partList;J||(J=y.partList=[]);var Q=E>0?J[J.length-1]:void 0,tt=E++,et=new a.Part(new l.AttrList(N),O,e,tt,Q);J.push(et),O.duration+=et.duration;break;case"PRELOAD-HINT":var nt=new l.AttrList(N);y.preloadHint=nt;break;case"RENDITION-REPORT":var rt=new l.AttrList(N);y.renditionReports=y.renditionReports||[],y.renditionReports.push(rt);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),k-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(O,T),O.cc=w,y.fragmentHint=O);var it=x.length,at=x[0],ot=x[it-1];if((k+=y.skippedSegments*y.targetduration)>0&&it&&ot){y.averagetargetduration=k/it;var st=ot.sn;y.endSN="initSegment"!==st?st:0,at&&(y.startCC=at.cc,at.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,g.test(null!=(n=null===(r=i.parseURL(e))||void 0===r?void 0:r.path)?n:""));var e,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(O=new a.Fragment(u,e)).relurl=ot.relurl,O.level=n,O.sn="initSegment",at.initSegment=O,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=w,L>0&&function(t,e){for(var n=t[e],r=e;r--;){var i=t[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,L),y},t}();function v(t,e){["video","audio","text"].forEach((function(n){var r=t.filter((function(t){return Object(u.isCodecType)(t,n)}));if(r.length){var i=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[n+"Codec"]=i.length>0?i[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,n){var r=e[n];r&&(t[n]=r)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(r.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/playlist-loader.ts ***! + \***************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var n=t.url;return void 0!==n&&0!==n.indexOf("data:")||(n=e.url),n}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,n=e.pLoader,r=e.loader,i=new(n||r)(e);return t.loader=i,this.loaders[t.type]=i,i},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var n=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var n=e.id,r=e.level,i=e.url,a=e.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},e.onAudioTrackLoading=function(t,e){var n=e.id,r=e.groupId,i=e.url,a=e.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},e.onSubtitleTrackLoading=function(t,e){var n=e.id,r=e.groupId,i=e.url,a=e.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},e.load=function(t){var e,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?s=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?s=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(s=this.hls.subtitleTracks[t.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,g)},e.loadsuccess=function(t,e,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(t,n),void this.handlePlaylistLoaded(t,e,n,r);this.resetInternalLoader(n.type);var i=t.data;0===i.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,n,r):this.handleMasterPlaylist(t,e,n,r)):this.handleManifestParsingError(t,n,"no EXTM3U delimiter",r)},e.loaderror=function(t,e,n){void 0===n&&(n=null),this.handleNetworkError(e,n,!1,t)},e.loadtimeout=function(t,e,n){void 0===n&&(n=null),this.handleNetworkError(e,n,!0)},e.handleMasterPlaylist=function(t,e,n,r){var a=this.hls,s=t.data,c=h(t,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var g=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),m=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(t,n,"no level found in manifest",r)},e.handleTrackOrLevelPlaylist=function(t,e,n,o){var s=this.hls,d=n.id,f=n.level,p=n.type,g=h(t,n),m=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:m,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(t.data,g,v,y,m);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:o,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var S,C=null===(S=b.fragments[0].initSegment)||void 0===S?void 0:S.url;this.load({url:C,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=b,this.handlePlaylistLoaded(t,e,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},e.handleSidxRequest=function(t,e){var n=Object(s.parseSegmentIndex)(new Uint8Array(t.data));if(n){var r=n.references,i=e.levelDetails;r.forEach((function(t,e){var r=t.info,a=i.fragments[e];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:n,response:t,context:e,networkDetails:r})},e.handleNetworkError=function(t,e,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:o||0,id:s||0,stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(t,n,"invalid target duration",r)},t}();e.default=d},"./src/polyfills/number.ts": +/*!*********************************!*\ + !*** ./src/polyfills/number.ts ***! + \*********************************/ +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,n){"use strict";n.r(e),n.d(e,"isFiniteNumber",(function(){return r})),n.d(e,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*!*********************************!*\ + !*** ./src/remux/aac-helper.ts ***! + \*********************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},t}();e.default=r},"./src/remux/mp4-generator.ts": +/*!************************************!*\ + !*** ./src/remux/mp4-generator.ts ***! + \************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=Math.pow(2,32)-1,i=function(){function t(){}return t.init=function(){var e;for(e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))},t.box=function(t){for(var e=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=e>>16&255,s[2]=e>>8&255,s[3]=255&e,s.set(t,4),a=0,e=8;a>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))},t.moov=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,n){n*=e;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,o)},t.sdtp=function(e){var n,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=t.box(t.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|e.sps.length].concat(a).concat([e.pps.length]).concat(o))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var n=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var n=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var n=e.id,i=e.duration*e.timescale,a=e.width,o=e.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,n){var i=t.sdtp(e),a=e.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,n){var r,i,a,o,s,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var n=t.moov(e),r=new Uint8Array(t.FTYP.byteLength+n.byteLength);return r.set(t.FTYP),r.set(n,t.FTYP.byteLength),r},t}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,e.default=i},"./src/remux/mp4-remuxer.ts": +/*!**********************************!*\ + !*** ./src/remux/mp4-remuxer.ts ***! + \**********************************/ +/*! exports provided: default, normalizePts */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g})),n.d(e,"normalizePts",(function(){return m}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e0?t:n.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),n},e.remux=function(t,e,n,r,i,a,o,s){var u,h,d,f,p,g,v=i,y=i,b=t.pid>-1,x=e.pid>-1,S=e.samples.length,C=t.samples.length>0,E=S>1;if((!b||C)&&(!x||E)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,i));var k=this.isVideoContiguous,w=-1;if(E&&(w=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+w+" out of "+S+" video samples due to a missing keyframe");var T=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(w),e.dropped+=w,y+=(e.samples[0].pts-T)/(e.timescale||9e4)}else-1===w&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+S+" video samples"),g=!1);if(this.ISGenerated){if(C&&E){var O=this.getVideoStartPts(e.samples),L=(m(t.samples[0].pts,O)-O)/e.inputTimeScale;v+=Math.max(0,L),y+=Math.max(0,-L)}if(C){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,i)),h=this.remuxAudio(t,v,this.isAudioContiguous,a,x||E||s===c.PlaylistLevelType.AUDIO?y:void 0),E){var A=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,i)),u=this.remuxVideo(e,y,k,A)}}else E&&(u=this.remuxVideo(e,y,k,0));u&&(u.firstKeyFrame=w,u.independent=-1!==w)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:g,text:f,id3:p}},e.generateIS=function(t,e,n){var i,o,s,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=o=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(s=t.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:a.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){s=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(s*n);o=Math.min(o,m(c[0].dts,p)-g),i=Math.min(i,p-g)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=o),{tracks:h,initPTS:i,timescale:s}},e.remuxVideo=function(t,e,n,r){var i,c,f,g=t.inputTimeScale,y=t.samples,b=[],x=y.length,S=this._initPTS,C=this.nextAvcDts,E=8,k=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,T=0,O=!1;n&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var L=0;LA.pts&&(T=Math.max(Math.min(T,A.pts-A.dts),-18e3)),A.dts0?L-1:L].dts&&(O=!0)}O&&y.sort((function(t,e){var n=t.dts-e.dts,r=t.pts-e.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var D=Math.round((f-c)/(x-1));if(T<0){if(T<-2*D){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-D,!0)+" ms");for(var R=T,_=0;_D;if(M||N<-1){M?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms ("+N+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-N,!0)+" ms ("+N+"dts) overlapping between fragments detected"),c=C;var P=y[0].pts-N;y[0].dts=c,y[0].pts=P,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(P,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,j=0,B=0;B0?Y-1:Y].dts;if(rt.stretchShortVideoTrack&&null!==this.nextAudioPts){var at=Math.floor(rt.maxBufferHole*g),ot=(r?k+r*g:this.nextAudioPts)-X.pts;ot>at?((i=ot-it)<0&&(i=it),l.logger.log("[mp4-remuxer]: It is approximately "+ot/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=it}else i=it}var st=Math.round(X.pts-X.dts);b.push(new v(X.key,i,Z,st))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+i,this.isVideoContiguous=!0;var ct={data1:a.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:W,startPTS:k/g,endPTS:(w+i)/g,startDTS:c/g,endDTS:C/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(W.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,n,r,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,g=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],x=t.samples,S=y?0:8,C=this.nextAudioPts||-1,E=e*u;if(this.isAudioContiguous=n=n||x.length&&C>0&&(r&&Math.abs(E-C)<9e3||Math.abs(m(x[0].pts-g,E)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,E)})),!n||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,E):x[0].pts}if(t.isAAC)for(var k=void 0!==c,w=this.config.maxAudioFramesDrift,T=0,O=C;T=w*p&&R<1e4&&k){var _=Math.round(D/p);(O=A-_*p)<0&&(_--,O+=p),0===T&&(this.nextAudioPts=C=O),l.logger.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(O/u).toFixed(3)+"s due to "+Math.round(1e3*D/u)+" ms gap.");for(var I=0;I<_;I++){var N=Math.max(O,0),M=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);M||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),M=L.unit.subarray()),x.splice(T,0,{unit:M,pts:N}),O+=p,T++}}L.pts=O,O+=p}for(var P,F=null,j=null,B=0,U=x.length;U--;)B+=x[U].unit.byteLength;for(var H=0,G=x.length;H0))return;B+=S;try{P=new Uint8Array(B)}catch(t){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}y||(new DataView(P.buffer).setUint32(0,B),P.set(a.default.types.mdat,4))}P.set(z,S);var K=z.byteLength;S+=K,b.push(new v(!0,f,K,0)),j=W}var q=b.length;if(q){var Y=b[b.length-1];this.nextAudioPts=C=j+d*Y.duration;var X=y?new Uint8Array(0):a.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,J={data1:X,data2:P,startPTS:$,endPTS:Z,startDTS:$,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(P.length,"MDAT length must not be zero"),J}},e.remuxEmptyAudio=function(t,e,n,r){var a=t.inputTimeScale,o=a/(t.samplerate?t.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],g=0;g4294967296;)t+=n;return t}var v=function(t,e,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=n,this.cts=r,this.flags=new y(t)},y=function(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1}},"./src/remux/passthrough-remuxer.ts": +/*!******************************************!*\ + !*** ./src/remux/passthrough-remuxer.ts ***! + \******************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,n){this.audioCodec=e,this.videoCodec=n,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,n=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(t);e||(e=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:e+","+n,initSegment:t,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:t,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},e.remux=function(t,e,n,a,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var g=Object(i.getDuration)(d,p),m=u,v=g+m;Object(i.offsetStartDTS)(p,d,c),g>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var S={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.text=a,h.id3=n,h.initSegment=f,h},t}(),l=function(t,e,n){return Object(i.getStartDTS)(t,e)-n};function c(t,e){var n=null==t?void 0:t.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||e===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=s},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.ts ***! + \**************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts": +/*!***************************!*\ + !*** ./src/types/cmcd.ts ***! + \***************************/ +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,n){"use strict";n.r(e),n.d(e,"CMCDVersion",(function(){return o})),n.d(e,"CMCDObjectType",(function(){return r})),n.d(e,"CMCDStreamingFormat",(function(){return i})),n.d(e,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(r||(r={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(i||(i={})),function(t){t.VOD="v",t.LIVE="l"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(t,e,n){"use strict";function r(t,e){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var n=this[t];return n?parseFloat(n):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=r.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,n={};for(i.lastIndex=0;null!==(e=i.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n},t}()},"./src/utils/binary-search.ts": +/*!************************************!*\ + !*** ./src/utils/binary-search.ts ***! + \************************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default={search:function(t,e){for(var n=0,r=t.length-1,i=null,a=null;n<=r;){var o=e(a=t[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(t,e,n){"use strict";n.r(e),n.d(e,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function t(){}return t.isBuffered=function(e,n){try{if(e)for(var r=t.getBuffered(e),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(e,n,r){try{if(e){var i,a=t.getBuffered(e),o=[];for(i=0;io&&(r[a-1].end=t[i].end):r.push(t[i])}else r.push(t[i])}else r=t;for(var s,l=0,c=e,u=e,h=0;h=d&&e=t&&i.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],n=0;n100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n=144&&this.backSpace();var e=o(t);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new m(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,n=0;n<15;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(r.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(r.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(r.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(t,e,r),new y(t+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var n,i,a,o=!1;this.logger.time=t;for(var s=0;s ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([e[s],e[s+1]]))}},e.parseCmd=function(t,e){var n=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(S(t,e,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var i=20===t||21===t||23===t?1:2,a=this.channels[i];return 20===t||21===t||28===t||29===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.ccTO(e-32),x(t,e,n),this.currentChannel=i,!0},e.parseMidrow=function(t,e){var n=0;if((17===t||25===t)&&e>=32&&e<=47){if((n=17===t?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(e),this.logger.log(r.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var n,r=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(S(t,e,r))return x(null,null,r),!0;var i=t<=23?1:2;n=e>=64&&e<=95?1===i?s[t]:c[t]:1===i?l[t]:u[t];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,e)),x(t,e,r),this.currentChannel=i,!0)},e.interpretPAC=function(t,e){var n,r={color:null,italics:!1,indent:null,underline:!1,row:t};return n=e>95?e-96:e-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},e.parseChars=function(t,e){var n,i,a=null,s=null;if(t>=25?(n=2,s=t-8):(n=1,s=t),s>=17&&s<=19?(i=17===s?e+80:18===s?e+112:e+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):t>=32&&t<=127&&(a=0===e?[t]:[t,e]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return a},e.parseBackgroundAttributes=function(t,e){var n;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var r={};16===t||24===t?(n=Math.floor((e-32)/2),r.background=h[n],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0));var i=t<=23?1:2;return this.channels[i].setBkgData(r),x(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(e,n,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,n,v)).id=y,c.line=g+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(a.addCueToTrack)(t,e)}))),f}};e.default=s},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(t,e,n){"use strict";n.r(e),n.d(e,"findFirstFragWithCC",(function(){return o})),n.d(e,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(e,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(e,"adjustSlidingStart",(function(){return u})),n.d(e,"alignStream",(function(){return h})),n.d(e,"alignPDT",(function(){return d})),n.d(e,"alignFragmentByPDTDelta",(function(){return f})),n.d(e,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(t,e){for(var n=null,r=0,i=t.length;rn.startCC||t&&t.cc=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=i},"./src/utils/ewma.ts": +/*!***************************!*\ + !*** ./src/utils/ewma.ts ***! + \***************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=n}var e=t.prototype;return e.sample=function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=r},"./src/utils/fetch-loader.ts": +/*!***********************************!*\ + !*** ./src/utils/fetch-loader.ts ***! + \***********************************/ +/*! exports provided: fetchSupported, default */function(t,e,n){"use strict";n.r(e),n.d(e,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return s(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function s(t,e,n){return(s=l()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e=r&&i(e,n,o.flush(),t)):i(e,n,l,t),a()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var g=function(t){var e,n;function r(e,n,r){var i;return(i=t.call(this,e)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,c(e,n),r}(o(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(t,e,n){"use strict";n.r(e),n.d(e,"IMSC1_CODEC",(function(){return u})),n.d(e,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(t){for(var e=1;e"):r}function s(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r>24,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n}function h(t,e){var n,r,i,a=[];if(!e.length)return a;"data"in t?(n=t.data,r=t.start,i=t.end):(r=0,i=(n=t).byteLength);for(var l=r;l1?l+u:i;if(s(n.subarray(l+4,l+8))===e[0])if(1===e.length)a.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},e.slice(1));f.length&&o.apply(a,f)}l=d}return a}function d(t){var e=h(t,["moov"])[0],n=e?e.end:null,r=h(t,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var d=a.end+0,f=l(a,s);s+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,g);g+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=g+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(t){for(var e=[],n=h(t,["moov","trak"]),r=0;rt)&&(this.startTime=t),this.endTime=e,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts": +/*!**************************************!*\ + !*** ./src/utils/texttrack-utils.ts ***! + \**************************************/ +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,n){"use strict";n.r(e),n.d(e,"sendAddTrackEvent",(function(){return i})),n.d(e,"addCueToTrack",(function(){return a})),n.d(e,"clearCurrentCues",(function(){return o})),n.d(e,"removeCuesInRange",(function(){return s})),n.d(e,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(t,e){var n;try{n=new Event("addtrack")}catch(t){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)}function a(t,e){var n=t.mode;if("disabled"===n&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}"disabled"===n&&(t.mode=n)}function o(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var n=t.cues.length;n--;)t.removeCue(t.cues[n]);"disabled"===e&&(t.mode=e)}function s(t,e,n){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var i=l(t.cues,e,n),a=0;at[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(et[a].startTime&&r-1)for(var a=i,o=t.length;a=e&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default={toString:function(t){for(var e="",n=t.length,r=0;r1?e-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return C},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");C=e,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(t,e,n){"use strict";n.r(e),n.d(e,"parseTimeStamp",(function(){return a})),n.d(e,"fixLineBreaks",(function(){return h})),n.d(e,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function a(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+parseFloat(r||0)}var n=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?e(n[2],n[3],0,n[4]):e(n[1],n[2],n[3],n[4]):null}var o=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,n){for(var r=0;r=0&&n<=100)return this.set(t,n),!0}return!1},t}();function s(t,e,n,r){var i=r?t.split(r):[t];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&e(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,n){var r=t;function i(){var e=a(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=i(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),u(),e.endTime=i(),u(),function(t,e){var r=new o;s(t,(function(t,e){var i;switch(t){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===e){r.set(t,n[a].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":i=e.split(","),r.integer(t,i[0]),r.percent(t,i[0])&&r.set("snapToLines",!1),r.alt(t,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=e.split(","),r.percent(t,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),e.line=i,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=a}(t,e)}function h(t){return t.replace(//gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function n(){var t=e.buffer,n=0;for(t=h(t);n>>0).toString()};function h(t,e,n){return u(t.toString())+u(e.toString())+u(n)}function d(t,e,n,u,d,f,p,g){var m,v=new i.VTTParser,y=Object(a.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(e,n),S="00:00.000",C=0,E=0,k=!0,w=!1;v.oncue=function(t){var e=u[d],n=u.ccOffset,r=(C-x)/9e4;if(null!=e&&e.new&&(void 0!==E?n=u.ccOffset=e.start:function(t,e,n){var r=t[e],i=t[r.prevCC];if(!i||!i.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;t.ccOffset+=r.start-i.start,r.new=!1,i=t[(r=i).prevCC]}t.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),w){var i=t.endTime-t.startTime,a=Object(s.normalizePts)(9e4*(t.startTime+n-E),9e4*f)/9e4;t.startTime=a,t.endTime=a+i}var o=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(o)),t.id||(t.id=h(t.startTime,t.endTime,o)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){m=t},v.onflush=function(){m?g(m):p(b)},y.forEach((function(t){if(k){if(c(t,"X-TIMESTAMP-MAP=")){k=!1,w=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?S=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{E=function(t){var e=parseInt(t.substr(-3)),n=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),a=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(e)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*n,e+=6e4*i,e+=36e5*a}(S)/1e3}catch(t){w=!1,m=t}return}""===t&&(k=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function t(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t?t.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=n,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,e.url)}catch(t){n.open("GET",e.url,!0),i(n,e.url)}n.readyState||n.open("GET",e.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(t){return void this.callbacks.onError({code:n.status,text:t.message},e,n)}e.rangeEnd&&n.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),n.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,n=this.stats;if(t&&e){var i=e.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){e.onreadystatechange=null,e.onprogress=null;var o=e.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===t.responseType?(s=e.response).byteLength:(s=e.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,t,s,e),!this.callbacks)return;var u={url:e.responseURL,data:s};this.callbacks.onSuccess(u,n,t,e)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+t.url),this.callbacks.onError({code:o,text:e.statusText},t,e)):(r.logger.warn(o+" while loading "+t.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},e.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=o}}).default},t.exports=r())},vHTk: +/*!******************************************************!*\ + !*** ./src/components/PreviewAll/index.less?modules ***! + \******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF: +/*!********************************************************!*\ + !*** ./node_modules/rc-table/es/Table.js + 17 modules ***! + \********************************************************/ +/*! exports provided: INTERNAL_HOOKS, default */ +/*! exports used: INTERNAL_HOOKS, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return J}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),h=n("Gytx"),d=n.n(h),f=n("Kwbf"),p=n("t23M"),g=n("qx4F"),m=n("6eGT"),v=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),x=n("fyJ8"),S=n("biw7");function C(t,e,n,r,i){var a,o,s=n[t]||{},l=n[e]||{};"left"===s.fixed?a=r.left[t]:"right"===l.fixed&&(o=r.right[e]);var c=!1,u=!1,h=!1,d=!1,f=n[e+1],p=n[t-1];if("rtl"===i){if(void 0!==a)d=!(p&&"left"===p.fixed);else if(void 0!==o){h=!(f&&"right"===f.fixed)}}else if(void 0!==a){c=!(f&&"left"===f.fixed)}else if(void 0!==o){u=!(p&&"right"===p.fixed)}return{fixLeft:a,fixRight:o,lastFixLeft:c,firstFixRight:u,lastFixRight:h,firstFixLeft:d,isSticky:r.isSticky}}var E=n("sR1s");function k(t){var e,n=t.cells,r=t.stickyOffsets,i=t.flattenColumns,a=t.rowComponent,o=t.cellComponent,s=t.onHeaderRow,c=t.index,u=l.useContext(S.a),h=u.prefixCls,d=u.direction;s&&(e=s(n.map((function(t){return t.column})),c));var f=Object(E.a)(n.map((function(t){return t.column})));return l.createElement(a,Object.assign({},e),n.map((function(t,e){var n,a=t.column,s=C(t.colStart,t.colEnd,i,r,d);return a&&a.onHeaderCell&&(n=t.column.onHeaderCell(a)),l.createElement(x.a,Object.assign({},t,{ellipsis:a.ellipsis,align:a.align,component:o,prefixCls:h,key:f[e]},s,{additionalProps:n,rowType:"header"}))})))}k.displayName="HeaderRow";var w=k;var T=function(t){var e=t.stickyOffsets,n=t.columns,r=t.flattenColumns,i=t.onHeaderRow,a=l.useContext(S.a),o=a.prefixCls,s=a.getComponent,c=l.useMemo((function(){return function(t){var e=[];!function t(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e[i]=e[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=t(s,a,i+1).reduce((function(t,e){return t+e}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,e[i].push(r),a+=o,o}));return o}(t,0);for(var n=e.length,r=function(t){e[t].forEach((function(e){"rowSpan"in e||e.hasSubColumns||(e.rowSpan=n-t)}))},i=0;i=0;a-=1){var o=e[a],s=n&&n[a],c=s&&s[O.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var A=l.forwardRef((function(t,e){var n=t.noData,o=t.columns,s=t.flattenColumns,c=t.colWidths,h=t.columCount,d=t.stickyOffsets,f=t.direction,p=t.fixHeader,g=t.offsetHeader,m=t.stickyClassName,v=t.onScroll,x=Object(y.a)(t,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),C=l.useContext(S.a),E=C.prefixCls,k=C.scrollbarSize,w=C.isSticky,O=w&&!p?0:k,A=l.useRef(null),D=l.useCallback((function(t){Object(b.b)(e,t),Object(b.b)(A,t)}),[]);l.useEffect((function(){var t;function e(t){var e=t.currentTarget,n=t.deltaX;n&&(v({currentTarget:e,scrollLeft:e.scrollLeft+n}),t.preventDefault())}return null===(t=A.current)||void 0===t||t.addEventListener("wheel",e),function(){var t;null===(t=A.current)||void 0===t||t.removeEventListener("wheel",e)}}),[]);var R=s[s.length-1],_={fixed:R?R.fixed:null,onHeaderCell:function(){return{className:"".concat(E,"-cell-scrollbar")}}},I=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(o),[_]):o}),[O,o]),N=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(s),[_]):s}),[O,s]),M=Object(l.useMemo)((function(){var t=d.right,e=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(a.a)(e.map((function(t){return t+O}))),[0]):e,right:"rtl"===f?t:[].concat(Object(a.a)(t.map((function(t){return t+O}))),[0]),isSticky:w})}),[O,d,w]),P=function(t,e){return Object(l.useMemo)((function(){for(var n=[],r=0;r1?n-1:0),a=1;a=p&&(r=p-m),c({scrollLeft:r/p*(f+2)}),E.current.x=t.pageX}else T&&O(!1)},D=function(){var t=Object(Y.b)(o.current).top,e=t+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;e-Object(g.a)()<=n||t>=n-h?C((function(t){return Object(i.a)(Object(i.a)({},t),{},{isHiddenScrollBar:!0})})):C((function(t){return Object(i.a)(Object(i.a)({},t),{},{isHiddenScrollBar:!1})}))},R=function(t){C((function(e){return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:t/f*p||0})}))};return l.useImperativeHandle(e,(function(){return{setScrollLeft:R}})),l.useEffect((function(){var t=Object(q.a)(document.body,"mouseup",L,!1),e=Object(q.a)(document.body,"mousemove",A,!1);return D(),function(){t.remove(),e.remove()}}),[m,T]),l.useEffect((function(){var t=Object(q.a)(window,"scroll",D,!1),e=Object(q.a)(window,"resize",D,!1);return function(){t.remove(),e.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||C((function(t){var e,n;return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:o.current.scrollLeft/(null===(e=o.current)||void 0===e?void 0:e.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!m||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(g.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(t){t.persist(),E.current.delta=t.pageX-x.scrollLeft,E.current.x=0,O(!0),t.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),T)),style:{width:"".concat(m,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var $=[],Z={},J="rc-table-internal-hook",Q=l.memo((function(t){return t.children}),(function(t,e){return!!d()(t.props,e.props)&&(t.pingLeft!==e.pingLeft||t.pingRight!==e.pingRight)}));function tt(t){var e,n=t.prefixCls,c=t.className,h=t.rowClassName,d=t.style,m=t.data,v=t.rowKey,y=t.scroll,b=t.tableLayout,x=t.direction,k=t.title,w=t.footer,A=t.summary,_=t.id,I=t.showHeader,N=t.components,P=t.emptyText,F=t.onRow,U=t.onHeaderRow,H=t.internalHooks,q=t.transformColumns,Y=t.internalRefs,tt=t.sticky,et=m||$,nt=!!et.length,rt=l.useState(0),it=Object(s.a)(rt,2),at=it[0],ot=it[1];l.useEffect((function(){ot(Object(g.a)())}));var st,lt,ct,ut=l.useMemo((function(){return Object(E.c)(N,{})}),[N]),ht=l.useCallback((function(t,e){return Object(E.b)(ut,t)||e}),[ut]),dt=l.useMemo((function(){return"function"==typeof v?v:function(t){return t&&t[v]}}),[v]),ft=Object(O.c)(t),pt=ft.expandIcon,gt=ft.expandedRowKeys,mt=ft.defaultExpandedRowKeys,vt=ft.defaultExpandAllRows,yt=ft.expandedRowRender,bt=ft.onExpand,xt=ft.onExpandedRowsChange,St=ft.expandRowByClick,Ct=ft.rowExpandable,Et=ft.expandIconColumnIndex,kt=ft.expandedRowClassName,wt=ft.childrenColumnName,Tt=ft.indentSize,Ot=pt||K,Lt=wt||"children",At=l.useMemo((function(){return yt?"row":!!(t.expandable&&H===J&&t.expandable.__PARENT_RENDER_ICON__||et.some((function(t){return t&&"object"===Object(o.a)(t)&&t[Lt]})))&&"nest"}),[!!yt,et]),Dt=l.useState((function(){return mt||(vt?function(t,e,n){var r=[];return function t(i){(i||[]).forEach((function(i,a){r.push(e(i,a)),t(i[n])}))}(t),r}(et,dt,Lt):[])})),Rt=Object(s.a)(Dt,2),_t=Rt[0],It=Rt[1],Nt=l.useMemo((function(){return new Set(gt||_t||[])}),[gt,_t]),Mt=l.useCallback((function(t){var e,n=dt(t,et.indexOf(t)),r=Nt.has(n);r?(Nt.delete(n),e=Object(a.a)(Nt)):e=[].concat(Object(a.a)(Nt),[n]),It(e),bt&&bt(!r,t),xt&&xt(e)}),[dt,Nt,et,bt,xt]),Pt=l.useState(0),Ft=Object(s.a)(Pt,2),jt=Ft[0],Bt=Ft[1],Ut=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},t),ft),{},{expandable:!!yt,expandedKeys:Nt,getRowKey:dt,onTriggerExpand:Mt,expandIcon:Ot,expandIconColumnIndex:Et,direction:x}),H===J?q:null),Ht=Object(s.a)(Ut,2),Gt=Ht[0],Vt=Ht[1],zt=l.useMemo((function(){return{columns:Gt,flattenColumns:Vt}}),[Gt,Vt]),Wt=l.useRef(),Kt=l.useRef(),qt=l.useRef(),Yt=l.useState(!1),Xt=Object(s.a)(Yt,2),$t=Xt[0],Zt=Xt[1],Jt=l.useState(!1),Qt=Object(s.a)(Jt,2),te=Qt[0],ee=Qt[1],ne=G(new Map),re=Object(s.a)(ne,2),ie=re[0],ae=re[1],oe=Object(E.a)(Vt).map((function(t){return ie.get(t)})),se=l.useMemo((function(){return oe}),[oe.join("_")]),le=V(se,Vt.length,x),ce=y&&Object(E.d)(y.y),ue=y&&Object(E.d)(y.x),he=ue&&Vt.some((function(t){return t.fixed})),de=l.useRef(),fe=function(t,e){return l.useMemo((function(){var n=!!t;return{isSticky:n,stickyClassName:n?"".concat(e,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(t)&&t.offsetHeader||0,offsetScroll:"object"===Object(o.a)(t)&&t.offsetScroll||0}}),[t,e])}(tt,n),pe=fe.isSticky,ge=fe.offsetHeader,me=fe.offsetScroll,ve=fe.stickyClassName;ce&&(lt={overflowY:"scroll",maxHeight:y.y}),ue&&(st={overflowX:"auto"},ce||(lt={overflowY:"hidden"}),ct={width:!0===y.x?"auto":y.x,minWidth:"100%"});var ye=l.useCallback((function(t,e){ae((function(n){var r=new Map(n);return r.set(t,e),r}))}),[]),be=function(t){var e=Object(l.useRef)(t),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(t){e.current=t,r(),n.current=window.setTimeout((function(){e.current=null,n.current=null}),100)},function(){return e.current}]}(null),xe=Object(s.a)(be,2),Se=xe[0],Ce=xe[1];function Ee(t,e){e&&("function"==typeof e?e(t):e.scrollLeft!==t&&(e.scrollLeft=t))}var ke=function(t){var e,n=t.currentTarget,r=t.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||Z;Ce()&&Ce()!==a||(Se(a),Ee(i,Kt.current),Ee(i,qt.current),Ee(i,null===(e=de.current)||void 0===e?void 0:e.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Zt(i>0),ee(i0?[].concat(Object(i.a)(t),Object(i.a)(h(o).map((function(t){return Object(a.a)({fixed:r},t)})))):[].concat(Object(i.a)(t),[Object(a.a)(Object(a.a)({},e),{},{fixed:r})])}),[])}e.b=function(t,e){var n=t.prefixCls,i=t.columns,l=t.children,d=t.expandable,f=t.expandedKeys,p=t.getRowKey,g=t.onTriggerExpand,m=t.expandIcon,v=t.rowExpandable,y=t.expandIconColumnIndex,b=t.direction,x=t.expandRowByClick,S=s.useMemo((function(){return i||u(l)}),[i,l]),C=s.useMemo((function(){if(d){var t,e=y||0,i=S[e],a=(t={},Object(r.a)(t,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(t,"title",""),Object(r.a)(t,"fixed",i?i.fixed:null),Object(r.a)(t,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(t,"render",(function(t,e,r){var i=p(e,r),a=f.has(i),o=!v||v(e),l=m({prefixCls:n,expanded:a,expandable:o,record:e,onExpand:g});return x?s.createElement("span",{onClick:function(t){return t.stopPropagation()}},l):l})),t),o=S.slice();return e>=0&&o.splice(e,0,a),o}return S}),[d,S,p,f,m,b]),E=s.useMemo((function(){var t=C;return e&&(t=e(t)),t.length||(t=[{render:function(){return null}}]),t}),[e,C,b]),k=s.useMemo((function(){return"rtl"===b?function(t){return t.map((function(t){var e=t.fixed,n=Object(o.a)(t,["fixed"]),r=e;return"left"===e?r="right":"right"===e&&(r="left"),Object(a.a)({fixed:r},n)}))}(h(E)):h(E)}),[E,b]);return[E,k]}},"y0+3": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/Dom/css.js ***! + \********************************************/ +/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ +/*! exports used: getClientSize, getOffset */function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},yFVG: +/*!*********************************************************!*\ + !*** ./src/pages/Problemset/NewItem/index.less?modules ***! + \*********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={bg:"bg___239CK",main:"main___rgkgN",formWrap:"formWrap___18Cpt",knowledgeWrap:"knowledgeWrap___rGX80",knowledgeIcon:"knowledgeIcon___2ajWi",knowledgeContent:"knowledgeContent___Qaosn",knowledgeItem:"knowledgeItem___1db86",knowledgeItemName:"knowledgeItemName___34_4x",knowledgeItemIcon:"knowledgeItemIcon___1O9dB",button:"button___3a82z",buttonFixed:"buttonFixed___2PTyf",buttonWrap:"buttonWrap___2c5Pc",topicWrap:"topicWrap____aMgV"}}}]); \ No newline at end of file diff --git a/p__Problemset__index.2f681e0e.async.js b/p__Problemset__index.2f681e0e.async.js new file mode 100644 index 0000000000..de5614ac41 --- /dev/null +++ b/p__Problemset__index.2f681e0e.async.js @@ -0,0 +1,881 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[190,5,7,8,10],{"+vTd": +/*!******************************************************************!*\ + !*** ./src/pages/Problemset/components/Topic/index.less?modules ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___37CPQ",flex_space_between:"flex_space_between___1yzV5",flex_box_vertical_center:"flex_box_vertical_center___2QH_C",flex_box_center_end:"flex_box_center_end___22kLi",flex_box_column:"flex_box_column___1Y3On",list:"list___1gpez",row:"row___3uQSh",typeRow:"typeRow___ADZSj",type:"type___2pfNZ",typeName:"typeName___8ZhPv",typeIcon:"typeIcon___1Xniv",unpublished:"unpublished___dTXTI",private:"private___XQiDx",public:"public___iIFou",reviewFlag:"reviewFlag___YP4vk",typeRightAction:"typeRightAction___1PQjp",actionLink:"actionLink___2E5q_",actionIcon:"actionIcon___GCvNK",topicTitle:"topicTitle___3fJds",topicTitleContent:"topicTitleContent___35cf9",judgmentContent:"judgmentContent___SU5rV",programContent:"programContent___3G6-D",otherContent:"otherContent___1JHnX",combinationContent:"combinationContent___6ZXO-",con:"con___1_qCl",otherContentItem:"otherContentItem___18WrV",otehrContentHtml:"otehrContentHtml___LW3nV",difficultyRow:"difficultyRow___3HvT0",updateTimeRow:"updateTimeRow___1dNd0",updateTimeWrap:"updateTimeWrap___2PKks",updateTimeContent:"updateTimeContent___1mNBy",programLanguage:"programLanguage___3CnaJ",updateTimeRowAction:"updateTimeRowAction___1DaMt",bottomAction:"bottomAction___Y-BNC",borderColorBlue:"borderColorBlue___2Xd-0",borderColorRed:"borderColorRed___2zA_q",borderColorFFF:"borderColorFFF___2R5-5",borderColorGray:"borderColorGray___nZnDe",selectIcon:"selectIcon___2byLd",colorGreen:"colorGreen___1iOKR",parseAnswerBorder:"parseAnswerBorder___1LTYn",answer:"answer___2L9lv",answerHtml:"answerHtml___3zrOk",parse:"parse___3d3dm",parseText:"parseText___1C_VL",parseAnswer:"parseAnswer___QMVPC",parseAnswerHtml:"parseAnswerHtml___2TCVz",actionBar:"actionBar___2ItMN",line:"line___-rzSr",know:"know___y8QKK",title:"title___21uOv",tr:"tr___3kTJL",menu:"menu___SYdg7",bottom:"bottom___2dFIa"}},"+z73": +/*!*******************************************************************!*\ + !*** ./src/pages/Problemset/components/Crumbs/index.less?modules ***! + \*******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3WSrc",flex_space_between:"flex_space_between___1fpCp",flex_box_vertical_center:"flex_box_vertical_center___3Wy8W",flex_box_center_end:"flex_box_center_end___3YIs2",flex_box_column:"flex_box_column___3CNwR",pWrap:"pWrap___2jVbQ",few:"few___3Eebn"}},"1ZF9": +/*!*****************************************!*\ + !*** ./src/assets/images/Authorize.png ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/Authorize.cc9c212f.png"},"6+eU": +/*!************************************************************!*\ + !*** ./node_modules/rc-pagination/es/index.js + 4 modules ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var i=n("wx14"),r=n("rePB"),a=n("VTBJ"),s=n("1OyB"),o=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),i=f()(n,"".concat(n,"-").concat(e.page),(t={},Object(r.a)(t,"".concat(n,"-active"),e.active),Object(r.a)(t,e.className,!!e.className),Object(r.a)(t,"".concat(n,"-disabled"),!e.page),t));return h.a.createElement("li",{title:e.showTitle?e.page:null,className:i,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",h.a.createElement("a",{rel:"nofollow"},e.page)))},v=13,g=38,m=40,y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(s.a)(this,n);for(var i=arguments.length,r=new Array(i),a=0;a=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),r(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==v&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(o.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,i=t.locale,r=t.rootPrefixCls,a=t.changeSize,s=t.quickGo,o=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(r,"-options"),v=l,g=null,m=null,y=null;if(!a&&!s)return null;var b=this.getPageSizeOptions();if(a&&v){var E=b.map((function(t,n){return h.a.createElement(v.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(v,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},E)}return s&&(o&&(y="boolean"==typeof o?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},i.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},o)),m=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},i.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),i.page,y)),h.a.createElement("li",{className:"".concat(p)},g,m)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,E=n("N2Kk");function k(){}function C(e,t,n){var i=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/i)+1}var S=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var i;Object(s.a)(this,n),(i=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(C(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(e,t){var n=i.props.prefixCls,r=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(r=h.a.createElement(e,Object(a.a)({},i.props))),r},i.savePaginationNode=function(e){i.paginationNode=e},i.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==i.state.current;var t},i.shouldDisplayQuickJumper=function(){var e=i.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},i.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==m||e.preventDefault()},i.handleKeyUp=function(e){var t=i.getValidValue(e);t!==i.state.currentInputValue&&i.setState({currentInputValue:t}),e.keyCode===v?i.handleChange(t):e.keyCode===g?i.handleChange(t-1):e.keyCode===m&&i.handleChange(t+1)},i.changePageSize=function(e){var t=i.state.current,n=C(e,i.state,i.props);t=t>n?n:t,0===n&&(t=i.state.current),"number"==typeof e&&("pageSize"in i.props||i.setState({pageSize:e}),"current"in i.props||i.setState({current:t,currentInputValue:t})),i.props.onShowSizeChange(t,e),"onChange"in i.props&&i.props.onChange&&i.props.onChange(t,e)},i.handleChange=function(e){var t=i.props.disabled,n=e;if(i.isValid(n)&&!t){var r=C(void 0,i.state,i.props);n>r?n=r:n<1&&(n=1),"current"in i.props||i.setState({current:n,currentInputValue:n});var a=i.state.pageSize;return i.props.onChange(n,a),n}return i.state.current},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current2?n-2:0),r=2;r=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,i=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>i}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,i=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),r=!this.hasPrev();return Object(u.isValidElement)(i)?Object(u.cloneElement)(i,{disabled:r}):i}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,i=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),r=!this.hasNext();return Object(u.isValidElement)(i)?Object(u.cloneElement)(i,{disabled:r}):i}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,s=t.style,o=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,v=t.showQuickJumper,g=t.showLessItems,m=t.showTitle,y=t.showTotal,E=t.simple,k=t.itemRender,S=t.showPrevNextJumpers,x=t.jumpPrevIcon,w=t.jumpNextIcon,T=t.selectComponentClass,_=t.selectPrefixCls,O=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,R=A.currentInputValue;if(!0===l&&c<=D)return null;var I=C(void 0,this.state,this.props),N=[],P=null,M=null,j=null,B=null,F=null,U=v&&v.goButton,G=g?1:2,H=L-1>0?L-1:0,K=L+1=2*G&&3!==L&&(N[0]=Object(u.cloneElement)(N[0],{className:"".concat(n,"-item-after-jump-prev")}),N.unshift(P)),I-L>=2*G&&L!==I-2&&(N[N.length-1]=Object(u.cloneElement)(N[N.length-1],{className:"".concat(n,"-item-before-jump-next")}),N.push(M)),1!==$&&N.unshift(j),J!==I&&N.push(B)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!I,ne=!this.hasNext()||!I;return h.a.createElement("ul",Object(i.a)({className:f()(n,a,Object(r.a)({},"".concat(n,"-disabled"),o)),style:s,unselectable:"unselectable",ref:this.savePaginationNode},z),ee,h.a.createElement("li",{title:m?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(r.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(H)),N,h.a.createElement("li",{title:m?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(r.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(K)),h.a.createElement(b,{disabled:o,locale:d,rootPrefixCls:n,selectComponentClass:T,selectPrefixCls:_,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var i=t.current,r=C(e.pageSize,t,e);i=i>r?r:i,"current"in e||(n.current=i,n.currentInputValue=i),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:k,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:k,locale:E.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var x=S},"815F": +/*!***************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! + \***************************************************/ +/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ +/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return v}));var i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=n(/*! rc-util/es/Children/toArray */"Zm9Q"),o=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(s.a)(t).map((function(t){if(!Object(l.i)(t))return Object(o.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,i=t.props,s=i.children,c=Object(a.a)(i,["children"]),u=Object(r.a)({key:n},c),h=e(s);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function s(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(o?o.pos:"0",h),f=c(u.key,d),p=Object(r.a)(Object(r.a)({},u),{},{parent:o,pos:d,children:null,data:u,isStart:[].concat(Object(i.a)(o?o.isStart:[]),[0===h]),isEnd:[].concat(Object(i.a)(o?o.isEnd:[]),[h===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=s(u.children||[],p):p.children=[],p}))}return s(e),a}function d(e,t,n){var i;n?"string"==typeof n?i=function(e){return e[n]}:"function"==typeof n&&(i=function(e){return n(e)}):i=function(e,t){return c(e.key,t)},function n(r,a,s){var o=r?r.children:e,c=r?Object(l.h)(s.pos,a):"0";if(r){var u=i(r,c),h={node:r,index:a,pos:c,key:u,parentPos:s.node?s.pos:null,level:s.level+1};t(h)}o&&o.forEach((function(e,t){n(e,t,{node:r,pos:c,level:s?s.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,i=t.processEntity,r=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,s={},o={},l={posEntities:s,keyEntities:o};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,r=e.pos,a=e.key,u=e.parentPos,h={node:t,index:n,key:a,pos:r,level:e.level},d=c(a,r);s[r]=h,o[d]=h,h.parent=s[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),i&&i(h,l)}),a),r&&r(l),l}function p(e,t){var n=t.expandedKeys,i=t.selectedKeys,r=t.loadedKeys,a=t.loadingKeys,s=t.checkedKeys,o=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==i.indexOf(e),loaded:-1!==r.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==s.indexOf(e),halfChecked:-1!==o.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function v(e){var t=e.data,n=e.expanded,i=e.selected,a=e.checked,s=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,v=Object(r.a)(Object(r.a)({},t),{},{expanded:n,selected:i,checked:a,loaded:s,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in v||Object.defineProperty(v,"props",{get:function(){return Object(o.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}},"8hTe": +/*!******************************************************!*\ + !*** ./src/components/RenderHtml/index.less?modules ***! + \******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={button:"button___1wy9m"}},"9Bee": +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 3 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n("DYRE");var i=n("zeV3"),r=(n("+L6B"),n("2/Rp")),a=n("k1fw"),s=n("9og8"),o=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),f=n.n(d),p=n("rUJ1");var v=[],g=["