diff --git a/18b8c68e64126db9ce88.ttf b/18b8c68e64126db9ce88.ttf new file mode 100644 index 0000000..721147d Binary files /dev/null and b/18b8c68e64126db9ce88.ttf differ diff --git a/26a30a5f1103393aac70.woff2 b/26a30a5f1103393aac70.woff2 new file mode 100644 index 0000000..66691b8 Binary files /dev/null and b/26a30a5f1103393aac70.woff2 differ diff --git a/3e3cb905bf27a4c8c370.ttf b/3e3cb905bf27a4c8c370.ttf new file mode 100644 index 0000000..e98b84c Binary files /dev/null and b/3e3cb905bf27a4c8c370.ttf differ diff --git a/3ee890bd00a8751acbc3.woff b/3ee890bd00a8751acbc3.woff new file mode 100644 index 0000000..0df2bc7 Binary files /dev/null and b/3ee890bd00a8751acbc3.woff differ diff --git a/828b5dfc027ace162d5d.woff b/828b5dfc027ace162d5d.woff new file mode 100644 index 0000000..80f70f0 Binary files /dev/null and b/828b5dfc027ace162d5d.woff differ diff --git a/9cd7588f47651215d52f.ttf b/9cd7588f47651215d52f.ttf new file mode 100644 index 0000000..96fd6a1 Binary files /dev/null and b/9cd7588f47651215d52f.ttf differ diff --git a/ab15890d6f6bc7f32adf.woff2 b/ab15890d6f6bc7f32adf.woff2 new file mode 100644 index 0000000..b09ea9d Binary files /dev/null and b/ab15890d6f6bc7f32adf.woff2 differ diff --git a/d0a58d956cf2f4cf078f.woff2 b/d0a58d956cf2f4cf078f.woff2 new file mode 100644 index 0000000..ffb4206 Binary files /dev/null and b/d0a58d956cf2f4cf078f.woff2 differ diff --git a/df60e0aa5fcfd8bb7d54.woff2 b/df60e0aa5fcfd8bb7d54.woff2 new file mode 100644 index 0000000..622e5f1 Binary files /dev/null and b/df60e0aa5fcfd8bb7d54.woff2 differ diff --git a/e148c4a1158f8cee8285.woff b/e148c4a1158f8cee8285.woff new file mode 100644 index 0000000..7cb4990 Binary files /dev/null and b/e148c4a1158f8cee8285.woff differ diff --git a/e7dd1399358ca04ed457.ttf b/e7dd1399358ca04ed457.ttf new file mode 100644 index 0000000..a5f0736 Binary files /dev/null and b/e7dd1399358ca04ed457.ttf differ diff --git a/eec0ea57721daa33c7a2.woff b/eec0ea57721daa33c7a2.woff new file mode 100644 index 0000000..1d50f80 Binary files /dev/null and b/eec0ea57721daa33c7a2.woff differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..69f6735 --- /dev/null +++ b/index.html @@ -0,0 +1,636 @@ +
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
f?Z(e,o,s,!0,!1,p):k(t,n,r,o,s,a,l,u,p)},X=(e,t,n,r,o,s,a,l,u)=>{let c=0;const f=t.length;let p=e.length-1,d=f-1;for(;c<=p&&c<=d;){const i=e[c],r=t[c]=u?Tr(t[c]):Ar(t[c]);if(!hr(i,r))break;E(i,r,n,null,o,s,a,l,u),c++}for(;c<=p&&c<=d;){const i=e[p],r=t[d]=u?Tr(t[d]):Ar(t[d]);if(!hr(i,r))break;E(i,r,n,null,o,s,a,l,u),p--,d--}if(c>p){if(c<=d){const e=d+1,i=e \n {{ i18n.templates.size.before }}\n {{ prettyBytes(beforeSize) }}\n \n {{ i18n.templates.size.after }}\n {{ prettyBytes(afterSize) }}\n \n {{ i18n.templates.size.saving }}\n \n {{ (savingPer || 0).toLocaleString(undefined, { maximumFractionDigits: 2 }) }}% ({{ prettyBytes(saving) }})\n \n \n {{ i18n.templates.explainer.forMoreInformationPleaseSee }}\n (e===d||e.expression instanceof ac)&&(0===e.body.length||zf(e)||l.length-1===t))))for(let e=0;e$1
")}},Qv={name:"App",components:{Header:ds,PrettyCheck:xs,PrismEditor:rs,Output:Qp,Size:fd,SourceMap:hd,Config:Hv,Explainer:(0,ps.Z)(Jv,[["render",function(e,t,n,i,r,o){const s=mn("ExternalLink"),a=mn("Output");return ar(),fr("div",zv,[vr("h3",null,q(r.i18n.templates.explainer.whyMinifyYourJavaScript),1),(ar(!0),fr(tr,null,li(r.i18n.templates.explainer.whyMinifyYourJavaScriptContent,(e=>(ar(),fr("p",{innerHTML:o.inlineCode(e)},null,8,Xv)))),256)),vr("h3",null,q(r.i18n.templates.explainer.usingTerserInAProductionPipeline),1),(ar(!0),fr(tr,null,li(r.i18n.templates.explainer.usingTerserInAProductionPipelineContent,(e=>(ar(),fr("p",{innerHTML:o.inlineCode(e)},null,8,$v)))),256)),vr("p",null,[Sr(q(r.i18n.templates.explainer.forMoreInformationPleaseSee)+" ",1),yr(s,{link:"https://github.com/terser/terser#command-line-usage",text:r.i18n.templates.explainer.theirDocumentationOnGitHub},null,8,["text"])]),vr("h4",null,q(r.i18n.templates.explainer.exampleUsageForTerser),1),(ar(),pr(a,{key:o.example,code:o.example},null,8,["code"]))])}]]),Footer:Ts},data:()=>({i18n:nd,liveCompress:!0,input:"/* This a top-level function with some arguments that should be mangled */\nconst test = (argumentOne, argumentTwo) => {\n\n /* This is an unused function that compression should remove as dead code */\n const hello = () => console.log('hello world');\n\n /* Use the input arguments, which should match the new mangled names */\n console.log(argumentOne, argumentTwo);\n};",tab:"output",error:"",warn:"",output:"",map:"",config:Hv.delegated}),watch:{input(){this.$data.liveCompress&&this.generate()},config:{handler(){this.generate()},deep:!0},error(e){e||"errors"!==this.$data.tab?e&&(this.$data.tab="errors"):this.$data.tab="output"},warn(e){e||"warnings"!==this.$data.tab||(this.$data.tab="output")},map(e){e||"map"!==this.$data.tab||(this.$data.tab="output")}},methods:{async generate(){try{const e=await async function(e,t,n){const i=jp(e,t,void 0);let r,o;do{o=i.next(await r),r=o.value}while(!o.done);return o.value}(this.$data.input,{...Fs()(this.$data.config),warnings:"verbose"});this.$data.error=null,this.$data.warn=e.warnings,this.$data.output=e.code,this.$data.map=e.map}catch(e){this.$data.error=`Line ${e.line.toLocaleString()}: ${e.message}`,this.$data.warn=null,this.$data.output="// Failed to generate",this.$data.map=null}},highlighter:e=>(0,os.highlight)(e,os.languages.js)}},ey=(0,ps.Z)(Qv,[["render",function(e,t,n,i,r,o){const s=mn("Header"),a=mn("PrettyCheck"),l=mn("PrismEditor"),u=mn("Output"),c=mn("Size"),f=mn("SourceMap"),p=mn("Config"),d=mn("Explainer"),h=mn("Footer");return ar(),fr("div",Vo,[vr("div",Uo,[yr(s,{title:r.i18n.templates.app.title},{description:un((()=>[Sr(q(r.i18n.templates.app.description),1)])),_:1},8,["title"]),vr("div",Ko,[vr("div",Go,[vr("div",Ho,[vr("a",{class:"button is-primary",onClick:t[0]||(t[0]=(...e)=>o.generate&&o.generate(...e))},q(r.i18n.templates.app.compress),1),vr("div",zo,[yr(a,{modelValue:r.liveCompress,"onUpdate:modelValue":t[1]||(t[1]=e=>r.liveCompress=e),class:"p-default p-curve p-fill p-icon"},{extra:un((()=>[Xo])),default:un((()=>[Sr(" "+q(r.i18n.templates.app.liveCompression),1)])),_:1},8,["modelValue"])])]),vr("h3",null,q(r.i18n.templates.app.input),1),vr("div",$o,[yr(l,{modelValue:r.input,"onUpdate:modelValue":t[2]||(t[2]=e=>r.input=e),highlight:o.highlighter},null,8,["modelValue","highlight"])])]),vr("div",Wo,[vr("div",jo,[vr("ul",null,[r.error?(ar(),fr("li",{key:0,class:X("errors"===r.tab?"is-active":""),onClick:t[3]||(t[3]=e=>r.tab="errors")},[vr("a",null,q(r.i18n.templates.app.errors),1)],2)):Dr("v-if",!0),r.warn?(ar(),fr("li",{key:1,class:X("warnings"===r.tab?"is-active":""),onClick:t[4]||(t[4]=e=>r.tab="warnings")},[vr("a",null,q(r.i18n.templates.app.warnings),1)],2)):Dr("v-if",!0),vr("li",{class:X("output"===r.tab?"is-active":""),onClick:t[5]||(t[5]=e=>r.tab="output")},[vr("a",null,q(r.i18n.templates.app.output),1)],2),r.map?(ar(),fr("li",{key:2,class:X("map"===r.tab?"is-active":""),onClick:t[6]||(t[6]=e=>r.tab="map")},[vr("a",null,q(r.i18n.templates.app.map),1)],2)):Dr("v-if",!0)])]),"errors"===r.tab?(ar(),fr("article",qo,[vr("div",Yo,[vr("p",null,q(r.i18n.templates.app.errorMsg),1)]),vr("div",Zo,q(r.error),1)])):Dr("v-if",!0),"warnings"===r.tab?(ar(),fr("article",Jo,[vr("div",Qo,[vr("p",null,q(1===r.warn.length?r.i18n.templates.app.warningMsg:r.i18n.templates.app.warningsMsg),1)]),vr("div",es,[(ar(!0),fr(tr,null,li(r.warn,(e=>(ar(),fr("ul",null,[vr("li",null,q(e),1)])))),256))])])):Dr("v-if",!0),"output"===r.tab?(ar(),fr(tr,{key:2},[vr("h3",null,q(r.i18n.templates.app.output),1),(ar(),pr(u,{key:r.output,code:r.output},null,8,["code"])),yr(c,{before:r.input,after:r.output},null,8,["before","after"])],64)):Dr("v-if",!0),"map"===r.tab?(ar(),fr(tr,{key:3},[vr("h3",null,q(r.i18n.templates.app.mapTitle),1),(ar(),pr(f,{key:r.map,code:r.map},null,8,["code"]))],64)):Dr("v-if",!0)])]),yr(p,{config:r.config},null,8,["config"]),yr(d,{config:r.config},null,8,["config"])]),yr(h,{text:r.i18n.templates.app.oss},null,8,["text"])])}]]);document.head.title=nd.templates.app.title,Lo(ey).mount("#app")})()})();
+//# sourceMappingURL=mount.js.map
\ No newline at end of file
diff --git a/mount.js.LICENSE.txt b/mount.js.LICENSE.txt
new file mode 100644
index 0000000..f6d47db
--- /dev/null
+++ b/mount.js.LICENSE.txt
@@ -0,0 +1,31 @@
+/*!
+ * vue-tippy v6.4.1
+ * (c) 2023
+ * @license MIT
+ */
+
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
';\n // todo: VNode support?\n return result;\n },\n lineNumbersCount(): number {\n const totalLines = this.codeData.split(/\\r\\n|\\n/).length;\n return totalLines;\n },\n },\n mounted() {\n this._recordCurrentState();\n this.styleLineNumbers();\n },\n\n methods: {\n setLineNumbersHeight(): void {\n this.lineNumbersHeight = getComputedStyle(this.$refs.pre as HTMLTextAreaElement).height;\n },\n styleLineNumbers(): void {\n if (!this.lineNumbers || !this.autoStyleLineNumbers) return;\n\n const $editor = this.$refs.pre as HTMLTextAreaElement;\n const $lineNumbers: HTMLDivElement | null = this.$el.querySelector('.prism-editor__line-numbers');\n const editorStyles = window.getComputedStyle($editor);\n\n this.$nextTick(() => {\n const btlr: any = 'border-top-left-radius';\n const bblr: any = 'border-bottom-left-radius';\n if (!$lineNumbers) return;\n $lineNumbers.style[btlr] = editorStyles[btlr];\n $lineNumbers.style[bblr] = editorStyles[bblr];\n $editor.style[btlr] = '0';\n $editor.style[bblr] = '0';\n\n const stylesList = ['background-color', 'margin-top', 'padding-top', 'font-family', 'font-size', 'line-height'];\n stylesList.forEach((style: any) => {\n $lineNumbers.style[style] = editorStyles[style];\n });\n $lineNumbers.style['margin-bottom' as any] = '-' + editorStyles['padding-top' as any];\n });\n },\n _recordCurrentState(): void {\n const input = this.$refs.textarea as HTMLTextAreaElement;\n\n if (!input) return;\n // Save current state of the input\n const { value, selectionStart, selectionEnd } = input;\n\n this._recordChange({\n value,\n selectionStart,\n selectionEnd,\n });\n },\n _getLines(text: string, position: number): Array{{ code }}
{{ i18n.templates.size.codeSize }}
\n {{ code }}
Config Presets
\n\n \n\n Terser Config
\n\n
\n {{ i18n.templates.config.filenameDesc }}\n {{ i18n.templates.explainer.whyMinifyYourJavaScript }}
\n\n \n\n {{ i18n.templates.explainer.usingTerserInAProductionPipeline }}
\n\n \n\n {{ i18n.templates.explainer.exampleUsageForTerser }}
\n \n