1"use strict";(self.webpackChunkttoools_web=self.webpackChunkttoools_web||[]).push([[3160,3993],{93993:(O,f,r)=>{r.d(f,{B:()=>M});var m=r(45312),g=r(17705),u=r(345),t=r(60177);let C=(()=>{class p{constructor(i){this.dom=i}setCanonicalURL(i){const c=this.dom.getElementsByTagName("head")[0];var d=this.dom.querySelector("link[rel='canonical']")||null;null==d&&(d=this.dom.createElement("link"),c.appendChild(d)),d.setAttribute("rel","canonical"),d.setAttribute("href",i)}static{this.\u0275fac=function(c){return new(c||p)(g.KVO(t.qQ))}}static{this.\u0275prov=g.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})(),M=(()=>{class p{constructor(i,c,d){this.metaTagService=i,this.titleService=c,this._CanonicalService=d}setTitle(i){this.titleService.setTitle(i+" | "+m.c.app_name),this.metaTagService.updateTag({property:"og:title",content:i+" | "+m.c.app_name})}updateMetaTag(i,c){this.metaTagService.updateTag({name:i,content:c}),"description"===i&&this.metaTagService.updateTag({property:"og:description",content:c})}setCanonicalURL(i){this._CanonicalService.setCanonicalURL(i),this.metaTagService.updateTag({property:"og:url",content:i})}updateMetaTagProp(i,c){this.metaTagService.updateTag({property:i,content:c})}static{this.\u0275fac=function(c){return new(c||p)(g.KVO(u.W8),g.KVO(u.hE),g.KVO(C))}}static{this.\u0275prov=g.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})()},83160:(O,f,r)=>{r.r(f),r.d(f,{ImageToBase64Module:()=>b});var m=r(60177),g=r(51188),u=r(45312),t=r(17705),C=r(345),M=r(35035),p=r(93993),x=r(89417);let i=(()=>{class e{constructor(){this.onFileDropped=new t.bkB,this.background="#ccc",this.opacity="1"}onDragOver(n){n.preventDefault(),n.stopPropagation(),this.background="#ff8d3c"}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this.background="#ccc",this.opacity="1"}ondrop(n){n.preventDefault(),n.stopPropagation(),this.background="#ccc",this.opacity="1";let o=n.dataTransfer.files;o.length>0&&this.onFileDropped.emit(o[0])}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275dir=t.FsC({type:e,selectors:[["","appDnd",""]],hostVars:4,hostBindings:function(o,a){1&o&&t.bIt("dragover",function(s){return a.onDragOver(s)})("dragleave",function(s){return a.onDragLeave(s)})("drop",function(s){return a.ondrop(s)}),2&o&&t.xc7("border-color",a.background)("opacity",a.opacity)},outputs:{onFileDropped:"onFileDropped"}})}}return e})();function c(e,w){1&e&&(t.qex(0),t.j41(1,"p"),t.EFF(2,"Drag and drop file here"),t.k0s(),t.j41(3,"p",19),t.EFF(4,"or"),t.k0s(),t.bVm())}function d(e,w){if(1&e&&(t.qex(0),t.j41(1,"div",20),t.nrm(2,"img",21),t.k0s(),t.j41(3,"p",22),t.EFF(4),t.k0s(),t.bVm()),2&e){const n=t.XpG();t.R7$(2),t.FS9("src",n.base64,t.B4B),t.R7$(2),t.JRh(n.selected_file.name)}}const P=[{path:"",component:(()=>{class e{constructor(n,o,a,h){this.metaTagService=n,this.titleService=o,this.clipboard=a,this._SeoService=h,this.title="Convert Image to Base64 Online",this.desc="Free online tool to easily convert image to base64.",this.text_input="",this.base64="",this.seo()}ngOnInit(){}convertToImage(n){this.selected_file=n;var o=new FileReader;o.onload=a=>{this.base64=a.target.result},o.readAsDataURL(n)}seo(){this.titleService.setTitle(this.title+" | "+u.c.app_name),this.metaTagService.updateTag({name:"description",content:this.desc}),this._SeoService.setCanonicalURL(u.c.base_url+"/image-tools/image-to-base64")}copyToClipboard(n){this.clipboard.copyToClipboard(n)}fileBrowseHandler(n){this.convertToImage(n?.target?.files[0])}onFileDropped(n){this.convertToImage(n)}static{this.\u0275fac=function(o){return new(o||e)(t.rXU(C.W8),t.rXU(C.hE),t.rXU(M.W),t.rXU(p.B))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["app-image-to-base64"]],decls:25,vars:5,consts:[[1,"content","content--max-width"],[1,"page-title"],[1,"desc"],[1,"form-wrapper"],[1,"form-group"],["appDnd","",1,"image-form-container",3,"onFileDropped"],[1,"image-form"],["type","file","id","fileDropRef",3,"change"],["fileDropRef",""],[4,"ngIf"],[1,"my-btn",3,"click"],[1,"result-wrapper"],[1,"result-container"],[1,"result-card"],[1,"result-title"],[1,"result-value"],["disabled","","rows","10",1,"textarea",3,"ngModel","ngModelChange"],[1,"my-icon","my-icon--btn",3,"click"],["src","assets/icons/copy-icon.svg","alt","copy icon"],[1,"se"],[1,"preview-image"],["alt","preview-image",3,"src"],[1,"in"]],template:function(o,a){if(1&o){const h=t.RV6();t.j41(0,"div",0)(1,"div",1)(2,"h1"),t.EFF(3),t.k0s(),t.j41(4,"p",2),t.EFF(5),t.k0s()(),t.j41(6,"div",3)(7,"div",4)(8,"div",5),t.bIt("onFileDropped",function(l){return a.onFileDropped(l)}),t.j41(9,"div",6)(10,"input",7,8),t.bIt("change",function(l){return a.fileBrowseHandler(l)}),t.k0s(),t.DNE(12,c,5,0,"ng-container",9),t.DNE(13,d,5,2,"ng-container",9),t.j41(14,"button",10),t.bIt("click",function(){t.eBV(h);const l=t.sdS(11);return t.Njj(l.click())}),t.EFF(15," Browse File "),t.k0s()()()()(),t.j41(16,"div",11)(17,"div",12)(18,"div",13)(19,"h2",14),t.EFF(20," Base64 Image "),t.k0s(),t.j41(21,"div",15)(22,"textarea",16),t.bIt("ngModelChange",function(l){return a.base64=l}),t.k0s()(),t.j41(23,"div",17),t.bIt("click",function(){return a.copyToClipboard(a.base64)}),t.nrm(24,"img",18),t.k0s()()()()()}
12&o&&(t.R7$(3),t.JRh(a.title),t.R7$(2),t.JRh(a.desc),t.R7$(7),t.Y8G("ngIf",!a.selected_file),t.R7$(1),t.Y8G("ngIf",a.selected_file),t.R7$(9),t.Y8G("ngModel",a.base64))},dependencies:[m.bT,x.me,x.BC,x.vS,i],styles:[".content[_ngcontent-%COMP%]{padding:25px 30px;margin:70px 30px 30px}@media (max-width: 768px){.content[_ngcontent-%COMP%]{padding:15px;margin:15px}}.content--max-width[_ngcontent-%COMP%]{max-width:1300px;margin-left:auto;margin-right:auto}@media (max-width: 768px){.content--max-width[_ngcontent-%COMP%]{max-width:100%}}h1[_ngcontent-%COMP%]{margin:15px 0;font-size:30px;font-weight:600}@media (max-width: 768px){h1[_ngcontent-%COMP%]{margin:10px 0;line-height:27px;font-size:20px}}.actions[_ngcontent-%COMP%]{display:flex;align-items:center}.actions[_ngcontent-%COMP%] .my-btn.submit[_ngcontent-%COMP%]{background:#ff7902;color:#fff}@media (max-width: 768px){.actions[_ngcontent-%COMP%]{margin:10px}}.page-title[_ngcontent-%COMP%] p.desc[_ngcontent-%COMP%]{padding-top:10px;line-height:1.4em}@media (max-width: 768px){.page-title[_ngcontent-%COMP%] p.desc[_ngcontent-%COMP%]{font-size:15px}}.result-wrapper[_ngcontent-%COMP%] .result-container[_ngcontent-%COMP%]{display:flex;margin:0 -10px}.result-wrapper[_ngcontent-%COMP%] .result-card[_ngcontent-%COMP%]{box-shadow:var(--box-sha
1dow-card);border-radius:8px;padding:15px 20px;margin:10px;flex:1}.result-wrapper[_ngcontent-%COMP%] .result-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;margin-bottom:10px}@media (max-width: 768px){.result-wrapper[_ngcontent-%COMP%] .result-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media (max-width: 768px){.result-wrapper[_ngcontent-%COMP%] .result-card[_ngcontent-%COMP%]{padding:15px}}@media (max-width: 768px){.result-wrapper[_ngcontent-%COMP%]{padding:8px 0}}.form-wrapper[_ngcontent-%COMP%]{margin:30px 0}.form-wrapper[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{padding:10px 0;text-align:center;display:flex}@media (max-width: 768px){.form-wrapper[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{padding:10px 0}}.form-wrapper[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;padding:12px;border-color:#dadce0;border-radius:8px;outline-color:var(--theme-color)}@media (max-width: 768px){.form-wrapper[_ngcontent-%COMP%]{margin:25px -15px 40px}}.page-info[_ngcontent-%COMP%]{margin-top:70px;line-height:1.7em;padding:30px 15px;border:1px solid #EEe;background:whitesmoke;border-radius:8px}.page-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .page-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:24px;margin-bottom:20px;margin-top:30px}.page-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]:nth-child(1), .page-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]:nth-child(1){margin-top:0}@media (max-width: 768px){.page-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .page-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px}}.page-info[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin:15px 0}.page-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:5px 0}.page-info[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:40px;list-style-type:disc}@media (max-width: 768px){.page-info[_ngcontent-%COMP%]{margin-top:70px}}.tool-tip-container[_ngcontent-%COMP%]{background-color:#ebfaf5;color:#08c988;padding:30px;border-radius:8px}.tool-tip-container[_ngcontent-%COMP%] .tool-tip-title[_ngcontent-%COMP%]{font-size:1.3em;display:flex;align-items:center;margin-bottom:15px}.tool-tip-container[_ngcontent-%COMP%] .tool-tip-title[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{margin-right:5px} .darkMode .content .page-info{background-color:inherit!important}p[_ngcontent-%COMP%]{font-size:16px!important}textarea[_ngcontent-%COMP%]{width:100%}.result-wrapper[_ngcontent-%COMP%] .result-card[_ngcontent-%COMP%]{padding:0;margin:0;border:initial;position:relative}.result-wrapper[_ngcontent-%COMP%] .my-icon[_ngcontent-%COMP%]{z-index:2;position:absolute;bottom:10px;right:10px}.result-wrapper[_ngcontent-%COMP%] .result-value[_ngcontent-%COMP%]{display:flex}.result-wrapper[_ngcontent-%COMP%] .result-value[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{border:initial;border-radius:12px;margin:60px 15px 55px;background:white;color:#444!important}.result-wrapper[_ngcontent-%COMP%] .result-container[_ngcontent-%COMP%]{padding:10px 10px 20px}.result-wrapper[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{position:absolute;top:0;left:0;padding:15px;width:100%;border-bottom:1px solid whitesmoke}.image-form-container[_ngcontent-%COMP%]{height:350px;width:100%;border:2px dashed #ccc;border-radius:4px}.image-form[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;flex-direction:column}.image-form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:20px!important}.image-form[_ngcontent-%COMP%] p.se[_ngcontent-%COMP%]{margin:20px 0}.image-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:10px 20px;outline:none;
1box-shadow:var(--box-shadow-card)}.image-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;position:absolute;z-index:2}.image-form[_ngcontent-%COMP%] .preview-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:160px;width:auto}.image-form[_ngcontent-%COMP%] .in[_ngcontent-%COMP%]{margin:15px 0}"]})}}return e})()}];let _=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=t.$C({type:e})}static{this.\u0275inj=t.G2t({imports:[g.iI.forChild(P),g.iI]})}}return e})(),v=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=t.$C({type:e})}static{this.\u0275inj=t.G2t({imports:[m.MD]})}}return e})(),b=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=t.$C({type:e})}static{this.\u0275inj=t.G2t({imports:[m.MD,_,x.YN,v]})}}return e})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.