@hep-code-runner/vue2 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -233,4 +233,4 @@ This is a sample markdown document.`};function W(r){const e=r.toLowerCase();retu
|
|
|
233
233
|
.hep-cr-editor .token.console {
|
|
234
234
|
color: #333 !important;
|
|
235
235
|
}
|
|
236
|
-
`;function Y(r,e,t,l,p,m,f,u){var g=typeof r=="function"?r.options:r;return e&&(g.render=e,g.staticRenderFns=t,g._compiled=!0),m&&(g._scopeId="data-v-"+m),{exports:r,options:g}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null,changeTimer:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value),this.emitChange(r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value),this.emitChange(e.value)}},emitChange:function(r){var e=this;e.changeTimer&&clearTimeout(e.changeTimer),e.changeTimer=setTimeout(function(){e.$emit("change",r)},500)}},beforeDestroy:function(){this.changeTimer&&clearTimeout(this.changeTimer)}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],me=Y(pe,ge,he,!1,null,"525880d3");const fe=me.exports,be={name:"CodeRunner",components:{CodeEditor:fe},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||W(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},themeStyle:function(){if(!this.themeColor)return{};var r=this.currentTheme==="dark",e=this.themeColor,t=function(f,u){var g=parseInt(f.replace("#",""),16),E=Math.round(2.55*u),w=Math.min(255,Math.max(0,(g>>16)+E)),k=Math.min(255,Math.max(0,(g>>8&255)+E)),x=Math.min(255,Math.max(0,(g&255)+E));return"#"+(16777216+w*65536+k*256+x).toString(16).slice(1)},l=function(f){var u=parseInt(f.replace("#",""),16),g=u>>16&255,E=u>>8&255,w=u&255,k=(.299*g+.587*E+.114*w)/255;return k>.5},p=l(e),m=p?"#000":"#fff";return{"--hep-cr-theme-color":e,"--hep-cr-theme-color-hover":r?t(e,20):t(e,-20),"--hep-cr-tab-active-color":m}},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=W(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes()},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e;var t=r.currentLanguage.split(":")[0],l=e.find(function(p){return p.language===t});l&&!r.currentLanguage.includes(":")&&(r.currentLanguage=t+":"+l.version)}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var r=this;navigator.clipboard.writeText(this.code),this.copiedEditor=!0,setTimeout(function(){r.copiedEditor=!1},2e3)},copyOutput:function(){var r=this,e=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(e),this.copiedOutput=!0,setTimeout(function(){r.copiedOutput=!1},2e3)},resetCode:function(){this.code=W(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(m){var f=t.getBoundingClientRect(),u=(m.clientX-f.left)/f.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(m){return m.selected}).map(function(m){var f="_value"in m?m._value:m.value;return f});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e.currentTheme==="light"?t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("path",{attrs:{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}})]):t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("circle",{attrs:{cx:"12",cy:"12",r:"5"}}),t("line",{attrs:{x1:"12",y1:"1",x2:"12",y2:"3"}}),t("line",{attrs:{x1:"12",y1:"21",x2:"12",y2:"23"}}),t("line",{attrs:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}}),t("line",{attrs:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}}),t("line",{attrs:{x1:"1",y1:"12",x2:"3",y2:"12"}}),t("line",{attrs:{x1:"21",y1:"12",x2:"23",y2:"12"}}),t("line",{attrs:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}}),t("line",{attrs:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}})])])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("div",{staticClass:"hep-cr-output-actions"},[t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))]),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedEditor},attrs:{disabled:e.copiedEditor,title:e.copiedEditor?"已复制":"复制"},on:{click:e.copyCode}},[e.copiedEditor?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l},change:function(l){return e.$emit("change",l)}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedOutput},attrs:{disabled:e.copiedOutput,title:e.copiedOutput?"已复制":"复制"},on:{click:e.copyOutput}},[e.copiedOutput?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.isRunning?"代码执行中...":e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"8916bba0");const O=ye.exports,Se={name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Ae=function(){var e=this,t=e._self._c;return e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._g(e._b({},"CodeRunner",e.$attrs,!1),e.$listeners))],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},Te=[],we=Y(Se,Ae,Te,!1,null,"518c34f1");const ke=we.exports;O.install=r=>{r.component("CodeRunner",O)};const _e={install(r){r.component("CodeRunner",O)}};exports.CodeRunner=O;exports.CodeRunnerDialog=ke;exports.default=_e;
|
|
236
|
+
`;function Y(r,e,t,l,p,m,f,u){var g=typeof r=="function"?r.options:r;return e&&(g.render=e,g.staticRenderFns=t,g._compiled=!0),m&&(g._scopeId="data-v-"+m),{exports:r,options:g}}typeof window<"u"&&(window.Prism=j);const pe={name:"CodeEditor",props:{value:{type:String,default:""},language:{type:String,default:"javascript"},theme:{type:String,default:"dark"},disabled:{type:Boolean,default:!1}},data:function(){return{highlightRef:null,changeTimer:null}},mounted(){this.loadPrismTheme(this.theme)},watch:{theme(r){this.loadPrismTheme(r)}},computed:{languageMap:function(){return{javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",python:"python",py:"python",java:"java",c:"c",cpp:"cpp","c++":"cpp",csharp:"csharp","c#":"csharp",go:"go",golang:"go",rust:"rust",ruby:"ruby",rb:"ruby",php:"php",swift:"swift",kotlin:"kotlin",kt:"kotlin",sql:"sql",bash:"bash",sh:"bash",shell:"bash",json:"json",yaml:"yaml",yml:"yaml",markdown:"markdown",md:"markdown"}},prismLanguage:function(){return this.languageMap[this.language.toLowerCase()]||"javascript"},editorBackground:function(){return this.theme==="dark"?"#1e1e1e":"#fafafa"},highlightedCode:function(){try{var r=j.languages[this.prismLanguage];if(r)return j.highlight(this.value||"",r,this.prismLanguage)}catch{}return this.escapeHtml(this.value||"")}},methods:{loadPrismTheme(r){const e="hep-cr-prism-styles",t=document.getElementById(e),l=r==="dark"?ce:de;t&&t.remove();const p=document.createElement("style");p.id=e,p.textContent=l,document.head.appendChild(p)},escapeHtml:function(r){var e=document.createElement("div");return e.textContent=r,e.innerHTML},handleInput:function(r){this.$emit("input",r.target.value),this.$emit("update:value",r.target.value),this.emitChange(r.target.value)},handleScroll:function(r){var e=this.$refs.highlightRef;e&&(e.scrollTop=r.target.scrollTop,e.scrollLeft=r.target.scrollLeft)},handleKeydown:function(r){if(r.key==="Tab"){r.preventDefault();var e=r.target,t=e.selectionStart,l=e.selectionEnd,p=e.value;e.value=p.substring(0,t)+" "+p.substring(l),e.selectionStart=e.selectionEnd=t+2,this.$emit("input",e.value),this.$emit("update:value",e.value),this.emitChange(e.value)}},emitChange:function(r){var e=this;e.changeTimer&&clearTimeout(e.changeTimer),e.changeTimer=setTimeout(function(){e.$emit("change",r)},500)}},beforeDestroy:function(){this.changeTimer&&clearTimeout(this.changeTimer)}};var ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"hep-cr-editor",class:"hep-cr-theme-"+e.theme,style:{background:e.editorBackground}},[t("pre",{ref:"highlightRef",staticClass:"hep-cr-highlight",class:"language-"+e.prismLanguage,attrs:{"aria-hidden":"true"}},[t("code",{domProps:{innerHTML:e._s(e.highlightedCode)}})]),t("textarea",{staticClass:"hep-cr-input",attrs:{disabled:e.disabled,spellcheck:"false",placeholder:"Write your code here..."},domProps:{value:e.value},on:{input:e.handleInput,scroll:e.handleScroll,keydown:e.handleKeydown}})])},he=[],me=Y(pe,ge,he,!1,null,"525880d3");const fe=me.exports,be={name:"CodeRunner",components:{CodeEditor:fe},props:{pistonUrl:{type:String,default:"/api/piston"},language:{type:String,default:"javascript"},theme:{type:String,default:"light",validator:function(r){return["light","dark"].indexOf(r)!==-1}},themeColor:{type:String,default:""},showLanguageSelector:{type:Boolean,default:!0},showEditor:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},defaultCode:{type:String,default:""},executorLabel:{type:String,default:"运行"}},data:function(){return{runtimes:[],currentLanguage:this.language,currentTheme:this.theme,code:this.defaultCode||W(this.language),output:"",stderr:"",isRunning:!1,executionTime:null,activeTab:"stdout",error:null,runtimesLoading:!1,client:null,editorWidth:60,copiedEditor:!1,copiedOutput:!1}},computed:{themeClass:function(){return"hep-cr-runner-"+this.currentTheme},themeStyle:function(){if(!this.themeColor)return{};var r=this.currentTheme==="dark",e=this.themeColor,t=function(f,u){var g=parseInt(f.replace("#",""),16),E=Math.round(2.55*u),w=Math.min(255,Math.max(0,(g>>16)+E)),k=Math.min(255,Math.max(0,(g>>8&255)+E)),x=Math.min(255,Math.max(0,(g&255)+E));return"#"+(16777216+w*65536+k*256+x).toString(16).slice(1)},l=function(f){var u=parseInt(f.replace("#",""),16),g=u>>16&255,E=u>>8&255,w=u&255,k=(.299*g+.587*E+.114*w)/255;return k>.5},p=l(e),m=p?"#000":"#fff";return{"--hep-cr-theme-color":e,"--hep-cr-theme-color-hover":r?t(e,20):t(e,-20),"--hep-cr-tab-active-color":m}},languageOptions:function(){return this.runtimes.map(function(r){return{value:r.language+":"+r.version,label:r.language.charAt(0).toUpperCase()+r.language.slice(1)+" "+r.version}})},languageName:function(){var r=this.currentLanguage;return r.includes(":")?r.split(":")[0]:r}},watch:{currentLanguage:function(r){var e=r.includes(":")?r.split(":")[0]:r;this.code=W(e),this.$emit("language-change",e,this.code)}},mounted:function(){this.client=new se({pistonUrl:this.pistonUrl}),this.loadRuntimes(),this.$emit("change",this.code)},methods:{loadRuntimes:function(){var r=this;this.runtimesLoading=!0,this.error=null,this.client.getRuntimes().then(function(e){r.runtimes=e;var t=r.currentLanguage.split(":")[0],l=e.find(function(p){return p.language===t});l&&!r.currentLanguage.includes(":")&&(r.currentLanguage=t+":"+l.version)}).catch(function(e){r.error=e.message||"Failed to load runtimes"}).finally(function(){r.runtimesLoading=!1})},execute:function(){var r=this;this.isRunning||(this.isRunning=!0,this.output="",this.stderr="",this.executionTime=null,this.error=null,this.activeTab="stdout",this.$emit("execute-start"),this.client.execute(this.languageName,this.code).then(function(e){r.output=e.output,r.stderr=e.stderr,r.executionTime=e.executionTime||null,r.activeTab=e.stderr?"stderr":"stdout",r.$emit("execute-end",e)}).catch(function(e){r.error=e.message||"Execution failed",r.$emit("execute-end",{success:!1,output:"",stderr:r.error,code:-1})}).finally(function(){r.isRunning=!1}))},clearOutput:function(){this.output="",this.stderr="",this.executionTime=null,this.error=null},copyCode:function(){var r=this;navigator.clipboard.writeText(this.code),this.copiedEditor=!0,setTimeout(function(){r.copiedEditor=!1},2e3)},copyOutput:function(){var r=this,e=this.activeTab==="stdout"?this.output:this.stderr;navigator.clipboard.writeText(e),this.copiedOutput=!0,setTimeout(function(){r.copiedOutput=!1},2e3)},resetCode:function(){this.code=W(this.languageName)},toggleTheme:function(){this.currentTheme=this.currentTheme==="light"?"dark":"light"},startDrag:function(r){var e=this,t=document.querySelector(".hep-cr-runner-main");if(t){var l=function(m){var f=t.getBoundingClientRect(),u=(m.clientX-f.left)/f.width*100;e.editorWidth=Math.max(20,Math.min(80,u))},p=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",l),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}}};var Ee=function(){var e=this,t=e._self._c;return t("div",{class:["hep-cr-runner",e.themeClass],style:e.themeStyle},[t("div",{staticClass:"hep-cr-runner-header"},[t("div",{staticClass:"hep-cr-runner-controls"},[e.showLanguageSelector?t("select",{directives:[{name:"model",rawName:"v-model",value:e.currentLanguage,expression:"currentLanguage"}],staticClass:"hep-cr-language-select",attrs:{disabled:e.isRunning},on:{change:function(l){var p=Array.prototype.filter.call(l.target.options,function(m){return m.selected}).map(function(m){var f="_value"in m?m._value:m.value;return f});e.currentLanguage=l.target.multiple?p:p[0]}}},[e.runtimesLoading?t("option",{attrs:{value:""}},[e._v("加载中...")]):e._e(),e._l(e.languageOptions,function(l){return t("option",{key:l.value,domProps:{value:l.value}},[e._v(" "+e._s(l.label)+" ")])})],2):e._e()]),t("div",{staticClass:"hep-cr-runner-actions"},[t("button",{staticClass:"hep-cr-btn hep-cr-btn-run",attrs:{disabled:e.isRunning||e.runtimesLoading},on:{click:e.execute}},[e.isRunning?t("span",{staticClass:"hep-cr-spinner"}):t("span",{staticClass:"hep-cr-run-icon"},[e._v("▶")]),e._v(" "+e._s(e.isRunning?"运行中...":e.executorLabel)+" ")]),e.showEditor&&e.editable?t("button",{staticClass:"hep-cr-btn hep-cr-btn-reset",on:{click:e.resetCode}},[e._v(" 重置 ")]):e._e(),t("button",{staticClass:"hep-cr-btn hep-cr-btn-theme",attrs:{title:e.currentTheme==="light"?"Switch to dark mode":"Switch to light mode"},on:{click:e.toggleTheme}},[e.currentTheme==="light"?t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("path",{attrs:{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}})]):t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("circle",{attrs:{cx:"12",cy:"12",r:"5"}}),t("line",{attrs:{x1:"12",y1:"1",x2:"12",y2:"3"}}),t("line",{attrs:{x1:"12",y1:"21",x2:"12",y2:"23"}}),t("line",{attrs:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}}),t("line",{attrs:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}}),t("line",{attrs:{x1:"1",y1:"12",x2:"3",y2:"12"}}),t("line",{attrs:{x1:"21",y1:"12",x2:"23",y2:"12"}}),t("line",{attrs:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}}),t("line",{attrs:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}})])])])]),e.error?t("div",{staticClass:"hep-cr-error-message"},[e._v(" "+e._s(e.error)+" ")]):e._e(),t("div",{staticClass:"hep-cr-runner-main"},[e.showEditor?t("div",{staticClass:"hep-cr-editor-panel",style:{width:e.editorWidth+"%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("span",{staticClass:"hep-cr-panel-title"},[e._v("编辑器")]),t("div",{staticClass:"hep-cr-output-actions"},[t("span",{staticClass:"hep-cr-language-badge"},[e._v(e._s(e.languageName))]),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedEditor},attrs:{disabled:e.copiedEditor,title:e.copiedEditor?"已复制":"复制"},on:{click:e.copyCode}},[e.copiedEditor?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("CodeEditor",{attrs:{value:e.code,language:e.languageName,theme:e.currentTheme,disabled:!e.editable||e.isRunning},on:{input:function(l){e.code=l},change:function(l){return e.$emit("change",l)}}})],1):e._e(),e.showEditor?t("div",{staticClass:"hep-cr-resize-handle",on:{mousedown:e.startDrag}},[t("div",{staticClass:"hep-cr-resize-line"})]):e._e(),t("div",{staticClass:"hep-cr-output-panel",style:{width:e.showEditor?100-e.editorWidth+"%":"100%"}},[t("div",{staticClass:"hep-cr-panel-header"},[t("div",{staticClass:"hep-cr-output-tabs"},[t("button",{class:["hep-cr-tab",{active:e.activeTab==="stdout"}],on:{click:function(l){e.activeTab="stdout"}}},[e._v(" 输出 ")]),e.stderr?t("button",{class:["hep-cr-tab","hep-cr-tab-error",{active:e.activeTab==="stderr"}],on:{click:function(l){e.activeTab="stderr"}}},[e._v(" 错误 ")]):e._e()]),t("div",{staticClass:"hep-cr-output-actions"},[e.executionTime!==null?t("span",{staticClass:"hep-cr-execution-time"},[e._v(" "+e._s(e.executionTime)+"ms ")]):e._e(),t("button",{staticClass:"hep-cr-btn-icon",class:{"hep-cr-btn-copied":e.copiedOutput},attrs:{disabled:e.copiedOutput,title:e.copiedOutput?"已复制":"复制"},on:{click:e.copyOutput}},[e.copiedOutput?t("span",{staticClass:"hep-cr-copied-text"},[e._v("已复制")]):t("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("rect",{attrs:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}})])])])]),t("div",{staticClass:"hep-cr-output-content"},[e.activeTab==="stdout"?t("pre",[e._v(e._s(e.isRunning?"代码执行中...":e.output||'点击"运行"执行代码'))]):t("pre",{staticClass:"hep-cr-stderr"},[e._v(e._s(e.stderr))])])])])])},ve=[],ye=Y(be,Ee,ve,!1,null,"f28df58a");const O=ye.exports,Se={name:"CodeRunnerDialog",components:{CodeRunner:O},props:{value:{type:Boolean,default:!1},title:{type:String,default:"代码执行器"},width:{type:[String,Number],default:800}},model:{prop:"value",event:"input"},data(){return{localVisible:this.value}},computed:{dialogWidth(){return typeof this.width=="number"?this.width+"px":this.width}},watch:{value(r){this.localVisible=r}},methods:{close(){this.localVisible=!1,this.$emit("input",!1),this.$emit("update:value",!1),this.$emit("close")},handleOverlayClick(r){r.target===r.currentTarget&&this.close()}},expose:["close"]};var Ae=function(){var e=this,t=e._self._c;return e.localVisible?t("div",{staticClass:"hep-cr-dialog-overlay",on:{click:e.handleOverlayClick}},[t("div",{staticClass:"hep-cr-dialog-container",style:{width:e.dialogWidth}},[t("div",{staticClass:"hep-cr-dialog-header"},[t("h3",{staticClass:"hep-cr-dialog-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"hep-cr-dialog-close",on:{click:e.close}},[t("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"}},[t("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),t("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])]),t("div",{staticClass:"hep-cr-dialog-body"},[t("CodeRunner",e._g(e._b({},"CodeRunner",e.$attrs,!1),e.$listeners))],1),t("div",{staticClass:"hep-cr-dialog-footer"},[e._t("footer",null,{close:e.close})],2)])]):e._e()},Te=[],we=Y(Se,Ae,Te,!1,null,"518c34f1");const ke=we.exports;O.install=r=>{r.component("CodeRunner",O)};const _e={install(r){r.component("CodeRunner",O)}};exports.CodeRunner=O;exports.CodeRunnerDialog=ke;exports.default=_e;
|
package/dist/index.mjs
CHANGED
|
@@ -2624,7 +2624,7 @@ const fe = me.exports, be = {
|
|
|
2624
2624
|
}
|
|
2625
2625
|
},
|
|
2626
2626
|
mounted: function() {
|
|
2627
|
-
this.client = new se({ pistonUrl: this.pistonUrl }), this.loadRuntimes();
|
|
2627
|
+
this.client = new se({ pistonUrl: this.pistonUrl }), this.loadRuntimes(), this.$emit("change", this.code);
|
|
2628
2628
|
},
|
|
2629
2629
|
methods: {
|
|
2630
2630
|
loadRuntimes: function() {
|
|
@@ -2718,7 +2718,7 @@ var Ee = function() {
|
|
|
2718
2718
|
ve,
|
|
2719
2719
|
!1,
|
|
2720
2720
|
null,
|
|
2721
|
-
"
|
|
2721
|
+
"f28df58a"
|
|
2722
2722
|
);
|
|
2723
2723
|
const M = ye.exports, Se = {
|
|
2724
2724
|
name: "CodeRunnerDialog",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hep-cr-editor[data-v-525880d3]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-525880d3],.hep-cr-input[data-v-525880d3]{position:absolute;top:0;left:0;width:100%;height:100%;padding:12px 16px;margin:0;border:none;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;white-space:pre;overflow:auto}.hep-cr-highlight[data-v-525880d3]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-525880d3]{background:transparent!important}.hep-cr-highlight code[data-v-525880d3]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-525880d3]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-525880d3]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-525880d3]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-525880d3]{text-shadow:none}.hep-cr-runner[data-v-
|
|
1
|
+
.hep-cr-editor[data-v-525880d3]{position:relative;flex:1;overflow:hidden}.hep-cr-highlight[data-v-525880d3],.hep-cr-input[data-v-525880d3]{position:absolute;top:0;left:0;width:100%;height:100%;padding:12px 16px;margin:0;border:none;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace;font-size:14px;line-height:1.6;white-space:pre;overflow:auto}.hep-cr-highlight[data-v-525880d3]{pointer-events:none;z-index:1}.hep-cr-highlight.hep-cr-highlight[data-v-525880d3]{background:transparent!important}.hep-cr-highlight code[data-v-525880d3]{display:block;font-family:inherit;background:transparent!important}.hep-cr-input[data-v-525880d3]{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#d4d4d4;resize:none;outline:none}.hep-cr-input[data-v-525880d3]:disabled{opacity:.7}.hep-cr-theme-light .hep-cr-input[data-v-525880d3]{caret-color:#333}.hep-cr-highlight pre[class*=language-][data-v-525880d3]{text-shadow:none}.hep-cr-runner[data-v-f28df58a]{display:flex;flex-direction:column;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden;font-family:SF Mono,Monaco,Menlo,Ubuntu Mono,monospace}.hep-cr-runner-light[data-v-f28df58a]{background:#fff}.hep-cr-runner-dark[data-v-f28df58a]{background:#1e1e1e;border-color:#333}.hep-cr-runner-header[data-v-f28df58a]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#252526;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-runner-header[data-v-f28df58a]{background:#f3f3f3;border-color:#e0e0e0}.hep-cr-runner-controls[data-v-f28df58a]{display:flex;gap:8px}.hep-cr-language-select[data-v-f28df58a]{padding:6px 12px;border:1px solid #444;border-radius:6px;background:#2d2d2d;color:#d4d4d4;font-size:13px;cursor:pointer;outline:none}.hep-cr-runner-light .hep-cr-language-select[data-v-f28df58a]{background:#fff;color:#333;border-color:#ccc}.hep-cr-language-select[data-v-f28df58a]:focus{border-color:#4fc3f7}.hep-cr-runner-actions[data-v-f28df58a]{display:flex;gap:8px}.hep-cr-btn[data-v-f28df58a]{padding:6px 16px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all .2s}.hep-cr-btn[data-v-f28df58a]:disabled{opacity:.5;cursor:not-allowed}.hep-cr-btn-run[data-v-f28df58a]{background:var(--hep-cr-theme-color, #4caf50);color:var(--hep-cr-tab-active-color, #fff);font-weight:600}.hep-cr-btn-run[data-v-f28df58a]:hover:not(:disabled){background:var(--hep-cr-theme-color-hover, #43a047)}.hep-cr-btn-reset[data-v-f28df58a]{background:#3d3d3d;color:#aaa}.hep-cr-runner-light .hep-cr-btn-reset[data-v-f28df58a]{background:#e0e0e0;color:#666}.hep-cr-btn-reset[data-v-f28df58a]:hover:not(:disabled){background:#4d4d4d;color:#fff}.hep-cr-btn-theme[data-v-f28df58a]{background:transparent;color:#fdd835;padding:6px 10px;font-size:14px;line-height:1;height:auto;min-height:28px;display:flex;align-items:center;justify-content:center}.hep-cr-btn-theme svg[data-v-f28df58a]{display:block;width:18px;height:18px}.hep-cr-runner-light .hep-cr-btn-theme[data-v-f28df58a]{color:#f57c00}.hep-cr-btn-theme[data-v-f28df58a]:hover{background:#ffffff1a;color:#fff}.hep-cr-runner-light .hep-cr-btn-theme[data-v-f28df58a]:hover{background:#0000000d}.hep-cr-error-message[data-v-f28df58a]{padding:10px 16px;background:#c62828;color:#fff;font-size:13px}.hep-cr-runner-main[data-v-f28df58a]{display:flex;height:400px;overflow:hidden}.hep-cr-editor-panel[data-v-f28df58a]{display:flex;flex-direction:column;min-width:20%;max-width:80%}.hep-cr-panel-header[data-v-f28df58a]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#2d2d2d;border-bottom:1px solid #333}.hep-cr-runner-light .hep-cr-panel-header[data-v-f28df58a]{background:#f0f0f0;border-color:#e0e0e0}.hep-cr-panel-title[data-v-f28df58a]{font-size:12px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.5px}.hep-cr-language-badge[data-v-f28df58a]{font-size:11px;padding:2px 8px;background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);border-radius:10px;font-weight:600}.hep-cr-editor[data-v-f28df58a]{flex:1;width:100%;background:#1e1e1e}.hep-cr-editor .hep-cr-highlight[data-v-f28df58a]{background:transparent!important}.hep-cr-editor .hep-cr-input[data-v-f28df58a]{color:transparent!important;caret-color:#d4d4d4}.hep-cr-runner-light .hep-cr-editor[data-v-f28df58a]{background:#fafafa}.hep-cr-runner-light .hep-cr-editor .hep-cr-highlight code[data-v-f28df58a]{color:#333}.hep-cr-resize-handle[data-v-f28df58a]{width:8px;background:#2d2d2d;cursor:col-resize;display:flex;align-items:center;justify-content:center;transition:background .2s;border-left:1px solid #3d3d3d;border-right:1px solid #3d3d3d}.hep-cr-resize-handle[data-v-f28df58a]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-resize-line[data-v-f28df58a]{width:3px;height:40px;background:#555;border-radius:2px;transition:background .2s}.hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-f28df58a]{background:#fff}.hep-cr-runner-light .hep-cr-resize-handle[data-v-f28df58a]{background:#e0e0e0;border-color:#ccc}.hep-cr-runner-light .hep-cr-resize-line[data-v-f28df58a]{background:#bbb}.hep-cr-runner-light .hep-cr-resize-handle[data-v-f28df58a]:hover{background:var(--hep-cr-theme-color, #4fc3f7)}.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line[data-v-f28df58a]{background:#fff}.hep-cr-output-panel[data-v-f28df58a]{display:flex;flex-direction:column;min-width:20%;border-left:1px solid #333}.hep-cr-runner-light .hep-cr-output-panel[data-v-f28df58a]{border-color:#e0e0e0}.hep-cr-output-tabs[data-v-f28df58a]{display:flex;gap:4px}.hep-cr-tab[data-v-f28df58a]{padding:4px 12px;border:none;background:transparent;cursor:pointer;font-size:12px;border-radius:4px;color:#888;transition:all .2s}.hep-cr-tab[data-v-f28df58a]:hover{color:#d4d4d4;background:#3d3d3d}.hep-cr-runner-light .hep-cr-tab[data-v-f28df58a]:hover{color:#333;background:#e0e0e0}.hep-cr-tab.active[data-v-f28df58a]{background:var(--hep-cr-theme-color, #4fc3f7);color:var(--hep-cr-tab-active-color, #000);font-weight:600}.hep-cr-tab-error.active[data-v-f28df58a]{background:#f44336;color:#fff}.hep-cr-output-actions[data-v-f28df58a]{display:flex;align-items:center;gap:12px}.hep-cr-execution-time[data-v-f28df58a]{font-size:12px;color:var(--hep-cr-theme-color, #4caf50);font-weight:500}.hep-cr-btn-icon[data-v-f28df58a]{background:transparent;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#888;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-btn-icon[data-v-f28df58a]:hover{color:#fff;background:#3d3d3d}.hep-cr-runner-light .hep-cr-btn-icon[data-v-f28df58a]:hover{color:#333;background:#e0e0e0}.hep-cr-btn-icon[data-v-f28df58a]:disabled{cursor:not-allowed;opacity:.7}.hep-cr-btn-copied[data-v-f28df58a]{color:#4caf50!important}.hep-cr-copied-text[data-v-f28df58a]{font-size:12px;color:#4caf50}.hep-cr-output-content[data-v-f28df58a]{flex:1;padding:12px 16px;overflow:auto;background:#1e1e1e}.hep-cr-runner-light .hep-cr-output-content[data-v-f28df58a]{background:#fff}.hep-cr-output-content pre[data-v-f28df58a]{margin:0;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-all;color:#d4d4d4}.hep-cr-runner-light .hep-cr-output-content pre[data-v-f28df58a]{color:#333}.hep-cr-output-content .hep-cr-stderr[data-v-f28df58a]{color:#f44336}.hep-cr-spinner[data-v-f28df58a]{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin-f28df58a .8s linear infinite}@keyframes spin-f28df58a{to{transform:rotate(360deg)}}.hep-cr-dialog-overlay[data-v-518c34f1]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:9999}.hep-cr-dialog-container[data-v-518c34f1]{background:#fff;border-radius:12px;box-shadow:0 20px 60px #0000004d;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.hep-cr-dialog-header[data-v-518c34f1]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e0e0e0}.hep-cr-dialog-title[data-v-518c34f1]{margin:0;font-size:16px;font-weight:600;color:#333}.hep-cr-dialog-close[data-v-518c34f1]{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#666;display:flex;align-items:center;justify-content:center;transition:all .2s}.hep-cr-dialog-close[data-v-518c34f1]:hover{background:#f0f0f0;color:#333}.hep-cr-dialog-body[data-v-518c34f1]{flex:1;overflow:auto;padding:0}.hep-cr-dialog-body[data-v-518c34f1] .hep-cr-runner{border:none;border-radius:0}.hep-cr-dialog-footer[data-v-518c34f1]{padding:12px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:12px}.hep-cr-dialog-fade-enter-active[data-v-518c34f1],.hep-cr-dialog-fade-leave-active[data-v-518c34f1]{transition:opacity .2s ease}.hep-cr-dialog-fade-enter-from[data-v-518c34f1],.hep-cr-dialog-fade-leave-to[data-v-518c34f1]{opacity:0}.hep-cr-dialog-fade-enter-active .hep-cr-dialog-container[data-v-518c34f1],.hep-cr-dialog-fade-leave-active .hep-cr-dialog-container[data-v-518c34f1]{transition:transform .2s ease}.hep-cr-dialog-fade-enter-from .hep-cr-dialog-container[data-v-518c34f1],.hep-cr-dialog-fade-leave-to .hep-cr-dialog-container[data-v-518c34f1]{transform:scale(.95)}
|