diff --git a/asset-manifest.json b/asset-manifest.json index 0c9a560..1961892 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { "main.css": "/image-generator/static/css/main.93eb06e6.css", - "main.js": "/image-generator/static/js/main.194a214d.js", + "main.js": "/image-generator/static/js/main.9da3d885.js", "static/js/453.09c31211.chunk.js": "/image-generator/static/js/453.09c31211.chunk.js", "static/media/aelf-logo.png": "/image-generator/static/media/aelf-logo.5fc029290722e9be8bf4.png", "index.html": "/image-generator/index.html", "main.93eb06e6.css.map": "/image-generator/static/css/main.93eb06e6.css.map", - "main.194a214d.js.map": "/image-generator/static/js/main.194a214d.js.map", + "main.9da3d885.js.map": "/image-generator/static/js/main.9da3d885.js.map", "453.09c31211.chunk.js.map": "/image-generator/static/js/453.09c31211.chunk.js.map" }, "entrypoints": [ "static/css/main.93eb06e6.css", - "static/js/main.194a214d.js" + "static/js/main.9da3d885.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e64e35b..2a26c0d 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
{let n,r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,o=typeof ImageData<"u"&&e instanceof ImageData,a=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,i="string"==typeof e,s=null!==t&&void 0!==t?t:{},l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=e=>e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext("2d"):null;if(r){let r=l();r.width=e.width,r.height=e.height;let o=u(r);if(null==o)throw new Error("Can not access image data");{let r=e.height,a=e.width;if(void 0!==t&&void 0!==t.resizedHeight&&void 0!==t.resizedWidth&&(r=t.resizedHeight,a=t.resizedWidth),void 0!==t){if(s=t,void 0!==t.tensorFormat)throw new Error("Image input config format must be RGBA for HTMLImageElement");s.tensorFormat="RGBA",s.height=r,s.width=a}else s.tensorFormat="RGBA",s.height=r,s.width=a;o.drawImage(e,0,0),n=o.getImageData(0,0,a,r).data}}else{if(!o){if(a){if(void 0===t)throw new Error("Please provide image config with format for Imagebitmap");let r=l();r.width=e.width,r.height=e.height;let o=u(r);if(null!=o){let t=e.height,r=e.width;return o.drawImage(e,0,0,r,t),n=o.getImageData(0,0,r,t).data,s.height=t,s.width=r,qo(n,s)}throw new Error("Can not access image data")}if(i)return new Promise(((t,n)=>{let r=l(),o=u(r);if(!e||!o)return n();let a=new Image;a.crossOrigin="Anonymous",a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,o.drawImage(a,0,0,r.width,r.height);let e=o.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(qo(e.data,s))}}));throw new Error("Input data provided is not supported - aborted tensor creation")}{let r,o;if(void 0!==t&&void 0!==t.resizedWidth&&void 0!==t.resizedHeight?(r=t.resizedHeight,o=t.resizedWidth):(r=e.height,o=e.width),void 0!==t&&(s=t),s.format="RGBA",s.height=r,s.width=o,void 0!==t){let t=l();t.width=o,t.height=r;let a=u(t);if(null==a)throw new Error("Can not access image data");a.putImageData(e,0,0),n=a.getImageData(0,0,o,r).data}else n=e.data}}if(void 0!==n)return qo(n,s);throw new Error("Input data provided is not supported - aborted tensor creation")},ts=(e,t)=>{let{width:n,height:r,download:o,dispose:a}=t;return new Ye({location:"texture",type:"float32",texture:e,dims:[1,r,n,4],download:o,dispose:a})},rs=(e,t)=>{let{dataType:n,dims:r,download:o,dispose:a}=t;return new Ye({location:"gpu-buffer",type:null!==n&&void 0!==n?n:"float32",gpuBuffer:e,dims:r,download:o,dispose:a})},ns=(e,t,n)=>new Ye({location:"cpu-pinned",type:e,data:t,dims:null!==n&&void 0!==n?n:[t.length]})})),Qr,Cn,is,as,ss=L((()=>{Qr=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["float16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),Cn=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),is=!1,as=()=>{if(!is){is=!0;let e=typeof BigInt64Array<"u"&&"function"==typeof BigInt64Array.from,t=typeof BigUint64Array<"u"&&"function"==typeof BigUint64Array.from;e&&(Qr.set("int64",BigInt64Array),Cn.set(BigInt64Array,"int64")),t&&(Qr.set("uint64",BigUint64Array),Cn.set(BigUint64Array,"uint64"))}}})),us,ls,fs=L((()=>{$n(),us=e=>{let t=1;for(let n=0;n $(e,w,t,n),o.lengthBytesUTF8=q,I=function e(){ue||he(),ue||(I=e)},he(),t.ready}})();"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&define.amd&&define([],(()=>n))})),Pp=me((()=>{})),Ep=me((()=>{})),Dp={};Pr(Dp,{cpus:()=>ng});var ng,Lp=L((()=>{ng=void 0})),Cp=me(((e,t)=>{var n=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(e=e||__filename),function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(){return E.buffer!=I.buffer&&j(),I}function r(){return E.buffer!=I.buffer&&j(),R}function o(){return E.buffer!=I.buffer&&j(),N}function a(){return E.buffer!=I.buffer&&j(),D}function i(){return E.buffer!=I.buffer&&j(),M}var s,l,u=t;u.ready=new Promise(((e,t)=>{s=e,l=t}));var c,d,p,f=Object.assign({},u),h="./this.program",m=(e,t)=>{throw t},g="object"==typeof window,y="function"==typeof importScripts,b="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=u.ENVIRONMENT_IS_PTHREAD||!1,w="";function x(e){return u.locateFile?u.locateFile(e,w):w+e}if(b){var _=(ta(),rr(ea)),S=(na(),rr(ra));let e;w=y?S.dirname(w)+"/":__dirname+"/",c=(e,t)=>(e=K(e)?new URL(e):S.normalize(e),_.readFileSync(e,t?void 0:"utf8")),p=e=>((e=c(e,!0)).buffer||(e=new Uint8Array(e)),e),d=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=K(e)?new URL(e):S.normalize(e),_.readFile(e,r?void 0:"utf8",((e,o)=>{e?n(e):t(r?o.buffer:o)}))},!u.thisProgram&&1>>0,e.i.high>>>0).toNumber())),null!=e.s&&("string"==typeof e.s?a.base64.decode(e.s,t.s=a.newBuffer(a.base64.length(e.s)),0):e.s.length>=0&&(t.s=e.s)),null!=e.t){if("object"!=typeof e.t)throw TypeError(".onnx.AttributeProto.t: object expected");t.t=i.onnx.TensorProto.fromObject(e.t)}if(null!=e.g){if("object"!=typeof e.g)throw TypeError(".onnx.AttributeProto.g: object expected");t.g=i.onnx.GraphProto.fromObject(e.g)}if(null!=e.sparseTensor){if("object"!=typeof e.sparseTensor)throw TypeError(".onnx.AttributeProto.sparseTensor: object expected");t.sparseTensor=i.onnx.SparseTensorProto.fromObject(e.sparseTensor)}if(null!=e.tp){if("object"!=typeof e.tp)throw TypeError(".onnx.AttributeProto.tp: object expected");t.tp=i.onnx.TypeProto.fromObject(e.tp)}if(e.floats){if(!Array.isArray(e.floats))throw TypeError(".onnx.AttributeProto.floats: array expected");t.floats=[];for(var n=0;n>>0,e.dims[n].high>>>0).toNumber())}if(null!=e.dataType&&(t.dataType=0|e.dataType),null!=e.segment){if("object"!=typeof e.segment)throw TypeError(".onnx.TensorProto.segment: object expected");t.segment=i.onnx.TensorProto.Segment.fromObject(e.segment)}if(e.floatData){if(!Array.isArray(e.floatData))throw TypeError(".onnx.TensorProto.floatData: array expected");t.floatData=[];for(n=0;n>>0,e.dims[n].high>>>0).toNumber())}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dims=[]),t.defaults&&(n.values=null,n.indices=null),null!=e.values&&e.hasOwnProperty("values")&&(n.values=i.onnx.TensorProto.toObject(e.values,t)),null!=e.indices&&e.hasOwnProperty("indices")&&(n.indices=i.onnx.TensorProto.toObject(e.indices,t)),e.dims&&e.dims.length){n.dims=[];for(var r=0;r{mr(),bc=(e,t)=>(_b(t),[new Fe([t[0].dims.length],"int32",void 0,void 0,new Int32Array(t[0].dims))]),_b=e=>{if(!e||1!==e.length)throw new Error("Shape requires 1 input.")}})),zi,yc,Tc,xc,Ob,vc,Ib,Sb,wc=L((()=>{Ge(),pn(),fe(),ae(),zi={name:"Slice",inputNames:["A"],inputTypes:[0]},yc=(e,t,n)=>(Ob(t),[e.run({...zi,cacheHint:n.cacheKey,get:()=>xc(e,t[0],n)},t)]),Tc=e=>{let t=e.attributes.getInts("starts"),n=e.attributes.getInts("ends"),r=e.attributes.getInts("axes",[]);return ee({starts:t,ends:n,axes:r})},xc=(e,t,n)=>{let r=0===n.axes.length?t.dims.slice(0).map(((e,t)=>t)):n.axes,o=U.normalizeAxes(r,t.dims.length),a=n.starts.map(((e,n)=>e>t.dims[o[n]]-1?t.dims[o[n]]:U.normalizeAxis(e,t.dims[o[n]]))),i=n.ends.map(((e,n)=>e>t.dims[o[n]]-1?t.dims[o[n]]:U.normalizeAxis(e,t.dims[o[n]]))),s=t.dims.slice(),l=[];for(let c=0;c>>0],c=te[e];0===u||10===u?((1===e?g:y)(W(c,0)),c.length=0):c.push(u)}o+=s}return _[r>>>2>>>0]=o,0},r:oe,c:function(e,t,n,r){return oe(e>>>0,t>>>0,n>>>0,r>>>0)}},ie=function(){function e(e){return ie=e.exports,ie=function(){var e=ie;e=Object.assign({},e);var t=e=>()=>e()>>>0,n=e=>t=>e(t)>>>0;return e.la=t(e.la),e.ma=n(e.ma),e.qa=t(e.qa),e.sa=n(e.sa),e}(),b=ie.K,A(),O.unshift(ie.L),0==--P&&(null!==C&&(clearInterval(C),C=null),I&&(e=I,I=null,e())),ie}var t={a:ae};if(P++,o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(n){y("Module.instantiateWasm callback failed with error: ".concat(n)),r(n)}return function(e,t){var n=N;return"function"!=typeof WebAssembly.instantiateStreaming||D(n)||M(n)||p||"function"!=typeof fetch?F(n,e,t):fetch(n,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,e).then(t,(function(r){return y("wasm streaming compile failed: ".concat(r)),y("falling back to ArrayBuffer instantiation"),F(n,e,t)}))))}(t,(function(t){e(t.instance)})).catch(r),{}}();o._OrtInit=(e,t)=>(o._OrtInit=ie.M)(e,t),o._OrtGetLastError=(e,t)=>(o._OrtGetLastError=ie.N)(e,t),o._OrtCreateSessionOptions=(e,t,n,r,a,i,s,l,u,c)=>(o._OrtCreateSessionOptions=ie.O)(e,t,n,r,a,i,s,l,u,c),o._OrtAppendExecutionProvider=(e,t)=>(o._OrtAppendExecutionProvider=ie.P)(e,t),o._OrtAddFreeDimensionOverride=(e,t,n)=>(o._OrtAddFreeDimensionOverride=ie.Q)(e,t,n),o._OrtAddSessionConfigEntry=(e,t,n)=>(o._OrtAddSessionConfigEntry=ie.R)(e,t,n),o._OrtReleaseSessionOptions=e=>(o._OrtReleaseSessionOptions=ie.S)(e),o._OrtCreateSession=(e,t,n)=>(o._OrtCreateSession=ie.T)(e,t,n),o._OrtReleaseSession=e=>(o._OrtReleaseSession=ie.U)(e),o._OrtGetInputOutputCount=(e,t,n)=>(o._OrtGetInputOutputCount=ie.V)(e,t,n),o._OrtGetInputName=(e,t)=>(o._OrtGetInputName=ie.W)(e,t),o._OrtGetOutputName=(e,t)=>(o._OrtGetOutputName=ie.X)(e,t),o._OrtFree=e=>(o._OrtFree=ie.Y)(e),o._OrtCreateTensor=(e,t,n,r,a,i)=>(o._OrtCreateTensor=ie.Z)(e,t,n,r,a,i),o._OrtGetTensorData=(e,t,n,r,a)=>(o._OrtGetTensorData=ie._)(e,t,n,r,a),o._OrtReleaseTensor=e=>(o._OrtReleaseTensor=ie.$)(e),o._OrtCreateRunOptions=(e,t,n,r)=>(o._OrtCreateRunOptions=ie.aa)(e,t,n,r),o._OrtAddRunConfigEntry=(e,t,n)=>(o._OrtAddRunConfigEntry=ie.ba)(e,t,n),o._OrtReleaseRunOptions=e=>(o._OrtReleaseRunOptions=ie.ca)(e),o._OrtCreateBinding=e=>(o._OrtCreateBinding=ie.da)(e),o._OrtBindInput=(e,t,n)=>(o._OrtBindInput=ie.ea)(e,t,n),o._OrtBindOutput=(e,t,n,r)=>(o._OrtBindOutput=ie.fa)(e,t,n,r),o._OrtClearBoundOutputs=e=>(o._OrtClearBoundOutputs=ie.ga)(e),o._OrtReleaseBinding=e=>(o._OrtReleaseBinding=ie.ha)(e),o._OrtRunWithBinding=(e,t,n,r,a)=>(o._OrtRunWithBinding=ie.ia)(e,t,n,r,a),o._OrtRun=(e,t,n,r,a,i,s,l)=>(o._OrtRun=ie.ja)(e,t,n,r,a,i,s,l),o._OrtEndProfiling=e=>(o._OrtEndProfiling=ie.ka)(e);var se=()=>(se=ie.la)(),le=o._malloc=e=>(le=o._malloc=ie.ma)(e);o._free=e=>(o._free=ie.na)(e);var ue,ce=e=>(ce=ie.pa)(e),de=()=>(de=ie.qa)(),pe=e=>(pe=ie.ra)(e),fe=e=>(fe=ie.sa)(e);function he(){if(!(0