PageSourceSearch

https://renderpub.com/_app/immutable/nodes/18.CjacJh5w.js

js renderpub.com collected 2026-09-25 22:07:59 UTC 98,273 bytes, 32 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/6SrYUtMM.js","../chunks/CH7_noy2.js","../chunks/DwpXDfgr.js","../chunks/0H1qU9CE.js","../chunks/D0BVBMBK.js","../chunks/CIn4Bi2z.js","../chunks/B1zl_Bej.js","../chunks/BTTcuIq5.js","../chunks/CK_yFXzp.js","../chunks/CxI0cRt4.js","../chunks/DxY5rYD4.js","../chunks/coH2x1Ei.js","../chunks/CYYBhGOw.js","../chunks/BT_DQLaG.js","../chunks/Cg-bEYAm.js","../chunks/w-SqXnxC.js","../chunks/CFhrrsO1.js","../chunks/3l8JV31U.js","../chunks/CSbwNI4x.js","../chunks/DYkd7kTO.js","../chunks/CL1y-Ihx.js","../chunks/BFHzVG8a.js","../chunks/CbghLMiV.js","../chunks/CaE9HiRS.js","../chunks/DJDRW5NX.js"])))=>i.map(i=>d[i]);
2import"../chunks/DsnmJJEf.js";import"../chunks/DzQ3LQUL.js";import{o as vn}from"../chunks/Dv4fYviw.js";import{v as Us,u as an,p as mn,f as $,c as v,r as f,e as T,a as F,b as pn,x as a,a2 as O,s as m,z as g,au as ht,t as nt,aB as jt,aC as Ys,ax as Ue,av as nn,bl as hr,aE as rn}from"../chunks/D-o-UygI.js";import{s as De}from"../chunks/CrI9jjER.js";import{i as we}from"../chunks/CKQwpmFB.js";import{e as on,i as ln}from"../chunks/BchpjDvd.js";import{r as ve,s as vt,b as cn}from"../chunks/CTleG5eu.js";import{a as Ws,b as ge}from"../chunks/DnC4Hh-E.js";import{b as ye}from"../chunks/ieYLycA8.js";import{b as dn}from"../chunks/DwPouERG.js";import{p as $s}from"../chunks/D4Caz1gY.js";import{i as gn}from"../chunks/BOUGt3rX.js";import{p as Ye}from"../chunks/Dr22LGYI.js";import{a as wn,b as At,s as Dt}from"../chunks/BLBYUzx-.js";import{g as Ks}from"../chunks/BUC8SgUB.js";import{I as Ar,d as Lt,i as Xs,l as Zs}from"../chunks/CBCzOkLo.js";import{_ as R}from"../chunks/PPVm8Dsz.js";import{E as Qs,R as qs,S as vr,L as Js,a as ea}from"../chunks/CbDCF-QP.js";import{Object3D as mr,Vector3 as pr}from"../chunks/CH7_noy2.js";import{s as ta}from"../chunks/P2taT-2n.js";class _n{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(t){this.#n=t}observe(t,s){var i=this.#e.get(t)||new Set;return i.add(s),this.#e.set(t,i),this.#r().observe(t,this.#n),()=>{var r=this.#e.get(t);r.delete(s),r.size===0&&(this.#e.delete(t),this.#t.unobserve(t))}}#r(){return this.#t??(this.#t=new ResizeObserver(t=>{for(var s of t){_n.entries.set(s.target,s);for(var i of this.#e.get(s.target)||[])i(s)}}))}}var na=new _n({box:"border-box"});function ra(e,t,s){var i=na.observe(e,()=>s(e[t]));Us(()=>(an(()=>s(e[t])),i))}const Mt=Math.PI/2,gr=81,wr=69,_r=73,yr=75,br=74,xr=76;class sa{constructor(t,s){this.object=t,this.enabled=!0,this.movementSpeed=80,this.lookSpeedX=30,this.lookSpeedY=30,this.minY=Number.NEGATIVE_INFINITY,this.maxY=Number.POSITIVE_INFINITY,this.pitch=new mr,this.yaw=new mr,this.yaw.add(this.pitch),this.pitch.add(this.object),this.moveForward=!1,this.moveBackward=!1,this.moveLeft=!1,this.moveRight=!1,this.moveUp=!1,this.moveDown=!1,this.pitchUp=!1,this.pitchDown=!1,this.yawLeft=!1,this.yawRight=!1,this.canvas=s,this.velocity=new pr,this.direction=new pr,this.onMouseMove=this.onMouseMove.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),s.addEventListener("mousemove",this.onMouseMove,!1),s.addEventListener("keyup",this.onKeyUp,!1),s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("mousedown",()=>{this.shiftKey=!0},!1),s.addEventListener("mouseup",()=>{this.shiftKey=!1},!1)}getObject(){return this.yaw}dispose(){this.canvas.removeEventListener("mousemove",this.onMouseMove,!1),this.canvas.removeEventListener("keyup",this.onKeyUp,!1),this.canvas.removeEventListener("keydown",this.onKeyDown,!1)}onMouseMove(t){if(!this.enabled||!this.shiftKey)return!1;let s=t.movementX||t.mozMovementX||t.webkitMovementX||0,i=t.movementY||t.mozMovementY||t.webkitMovementY||0;this.yaw.rotation.y-=s*this.lookSpeedX/1e4,this.pitch.rotation.x-=i*this.lookSpeedY/1e4,this.pitch.rotation.x=Math.max(-Mt,Math.min(Mt,this.pitch.rotation.x))}onKeyDown(t){switch(t.keyCode){case 38:case 87:this.moveForward=!0;break;case 37:case 65:this.moveLeft=!0;break;case 40:case 83:this.moveBackward=!0;break;case 39:case 68:this.moveRight=!0;break;case gr:this.moveUp=!0;break;case wr:this.moveDown=!0;break;case _r:this.pitchUp=!0;break;case yr:this.pitchDown=!0;break;case br:this.yawLeft=!0;break;case xr:this.yawRight=!0;break}}onKeyUp(t){switch(event.keyCode){case 38:case 87:this.moveForward=!1;break;
2case 37:case 65:this.moveLeft=!1;break;case 40:case 83:this.moveBackward=!1;break;case 39:case 68:this.moveRight=!1;break;case gr:this.moveUp=!1;break;case wr:this.moveDown=!1;break;case _r:this.pitchUp=!1;break;case yr:this.pitchDown=!1;break;case br:this.yawLeft=!1;break;case xr:this.yawRight=!1;break}}update(t){if(this.velocity.x-=this.velocity.x*10*t,this.velocity.z-=this.velocity.z*10*t,this.direction.z=Number(this.moveForward)-Number(this.moveBackward),this.direction.x=Number(this.moveLeft)-Number(this.moveRight),this.direction.normalize(),(this.moveForward||this.moveBackward)&&(this.velocity.z-=this.direction.z*this.movementSpeed*t),(this.moveLeft||this.moveRight)&&(this.velocity.x-=this.direction.x*this.movementSpeed*t),(this.pitchUp||this.pitchDown)&&(this.pitch.rotation.x-=(Number(this.pitchDown)-Number(this.pitchUp))*this.lookSpeedY/1e3,this.pitch.rotation.x=Math.max(-Mt,Math.min(Mt,this.pitch.rotation.x))),(this.yawLeft||this.yawRight)&&(this.yaw.rotation.y-=(Number(this.yawRight)-Number(this.yawLeft))*this.lookSpeedX/1e3),this.yaw.translateX(this.velocity.x*t),this.yaw.translateZ(this.velocity.z*t),this.moveUp||this.moveDown){const s=(Number(this.moveUp)-Number(this.moveDown))/25;this.object.position.y=Math.max(this.minY,Math.min(this.maxY,this.object.position.y-s))}}}var aa=$('<main><canvas tabIndex="0" id="myCanvas" class="divcanvas rounded-md w-[]"></canvas></main>');function ia(e,t){mn(t,!1);const[s,i]=wn();let r,l,h,d,c,u,w,j,L,z,U,ee,oe,W,X,q,Z,H,Ie,Y=!1,le,Be,We,$e,Qe,xe,je,Le=null;function Ke(p){console.log(p),Le=p,p==="edge"?(console.log(p),ee.enabled=!0,j.render()):ee.enabled=!1}async function ne(p){console.log(p),Le=p,p==="depth"?(console.log(p),he(),Re(),Ge()):W.depthTexture=""}vn(async()=>{c=document.getElementById("myCanvas");let p=[R(()=>import("../chunks/CH7_noy2.js"),[],import.meta.url),R(()=>import("../chunks/6SrYUtMM.js"),__vite__mapDeps([0,1]),import.meta.url),R(()=>import("../chunks/DwpXDfgr.js"),__vite__mapDeps([2,1]),import.meta.url),R(()=>import("../chunks/CLFnyZCv.js"),[],import.meta.url)];try{const[G,D,te,b]=await Promise.all(p);r=G,l=D.OrbitControls,h=te.TGALoader,d=b.LoaderUtils,le=performance.now(),Be=new r.Vector3,We=new r.Vector3,$e=new r.Vector3,Qe=new r.Color,Ve()}catch(G){console.error(G)}});const ae=function(p){switch(p.code){case"ArrowUp":case"KeyW":break;case"ArrowLeft":case"KeyA":break;case"ArrowDown":case"KeyS":break;case"ArrowRight":case"KeyD":break;case"KeyQ":break;case"KeyE":break;case"Space":Y===!0&&(Be.y+=350),Y=!1;break}},ie=function(p){p.code};function he(){console.log("depth ----"),W&&W.dispose(),W=new r.WebGLRenderTarget(window.innerWidth,window.innerHeight),W.texture.minFilter=r.NearestFilter,W.texture.magFilter=r.NearestFilter,W.depthTexture=new r.DepthTexture}function Re(){console.log("depth ************** "),q=new r.OrthographicCamera(-1,1,1,-1,0,1),X=new r.ShaderMaterial({vertexShader:`
3				varying vec2 vUv;
4				void main() {
5				vUv = uv;
6				gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
7				}
8			`,fragmentShader:`
9				float perspectiveDepthToViewZ(float fragCoordZ, float cameraNear, float cameraFar) {
10					return 2.0 * cameraNear * cameraFar / (cameraFar + cameraNear - fragCoordZ * (cameraFar - cameraNear));
11				}
12
13				float viewZToOrthographicDepth(float viewZ, float cameraNear, float cameraFar) {
14					return (viewZ - cameraNear) / (cameraFar - cameraNear);
15				}
16				varying vec2 vUv;
17				uniform sampler2D tDiffuse;
18				uniform sampler2D tDepth;
19				uniform float cameraNear;
20				uniform float cameraFar;
21				float readDepth(sampler2D depthSampler, vec2 coord) {
22				float fragCoordZ = texture2D(depthSampler, coord).x;
23				float viewZ = perspectiveDepthToViewZ(fragCoordZ, cameraNear, cameraFar);
24				return viewZToOrthographicDepth(viewZ, cameraNear, cameraFar);
25				}
26				void main() {
27				//vec3 diffuse = texture2D( tDiffuse, vUv ).rgb;
28				float depth = readDepth(tDepth, vUv);
29				gl_FragColor.rgb = 1.0 - vec3(depth);
30				gl_FragColor.a = 1.0;
31				}
32			`,uniforms:{cameraNear:{value:w.near},cameraFar:{value:w.far},tDiffuse:{value:null},tDepth:{value:null}}});const p=new r.PlaneGeometry(2,2),G=new r.Mesh(p,X);Z=new r.Scene,Z.add(G)}function Ge(){if(console.log("depth &&&&&&&&&&&&&&"),H){let p=H.distanceToPoint(w.position),G=Ie.radiu
32s*2;const D=p+G;w.far=D,w.updateProjectionMatrix()}}function Ve(){u=new r.Scene,w=new r.PerspectiveCamera(75,window.innerWidth/window.innerHeight,1,1e3),je=new sa(w,c),u.add(je.getObject()),w.position.y=10,L=new r.WebGLRenderer({canvas:c,preserveDrawingBuffer:!0}),L.setSize(window.innerWidth/4.6*3,window.innerHeight/3*2.6),L.setClearColor("#27272A"),new r.MeshDepthMaterial,j=new Qs(L);const p=new qs(u,w);j.addPass(p),oe=new vr(Js),j.addPass(oe),ee=new vr(ea),ee.uniforms.resolution.value.x=window.innerWidth*window.devicePixelRatio,ee.uniforms.resolution.value.y=window.innerHeight*window.devicePixelRatio,j.addPass(ee),window.addEventListener("resize",Ce),new r.Raycaster(new r.Vector3,new r.Vector3(0,-1,0),0,10);const G=new r.BoxGeometry,D=new r.MeshBasicMaterial({color:65280});U=new r.Mesh(G,D),U.scale.set(.002,.002,.002),u.add(U),Et(10,10),kt(),mt()}function Ce(){w.aspect=window.innerWidth/window.innerHeight,w.updateProjectionMatrix(),L.setSize(window.innerWidth/4.6*3,window.innerHeight/3*2.6),j.setSize(window.innerWidth,window.innerHeight),ee.uniforms.resolution.value.x=window.innerWidth*window.devicePixelRatio,ee.uniforms.resolution.value.y=window.innerHeight*window.devicePixelRatio}const mt=function(){requestAnimationFrame(mt),Le==="edge"?j.render():Le==="depth"?(L.setRenderTarget(W),L.render(u,w),X.uniforms.tDiffuse.value=W.texture,X.uniforms.tDepth.value=W.depthTexture,L.setRenderTarget(null),L.render(Z,q)):L.render(u,w);const p=performance.now(),G=(p-le)/1e3;je.update(G);const D=5e-4;c.addEventListener("wheel",function(te){te.preventDefault();const b=te.deltaY,x=new r.Vector3;je.getObject().getWorldDirection(x),x.multiplyScalar(D*b*G),je.getObject().position.add(x)}),le=p};function kt(){const p=new r.AmbientLight(4210752),G=new r.HemisphereLight(16777147,526368,1),D=new r.DirectionalLight(16777215,1);D.position.set(1,1,1).normalize(),u.add(p),u.add(G),u.add(D)}function Et(p,G){xe=new r.GridHelper(p,G),u.add(xe)}var rt=Ye(t,"imgData",12);function pt(){try{z="image/octet-stream";var p="image/jpeg";rt(L.domElement.toDataURL(p)),At(Ar,rt().split("data:image/jpeg;base64,")[1]),Ct(rt().replace(p,z),"snap.jpg")}catch(G){console.log(G);return}}function Ct(p,G){var D=document.createElement("a");typeof D.download=="string"?(document.body.appendChild(D),D.download=G,D.href=p,D.click(),document.body.removeChild(D)):location.replace(uri)}const ce=function(p){if(p.length>0){const G=d.createFilesMap(p),D=new r.LoadingManager;D.setURLModifier(function(te){te=te.replace(/^(\.?\/)/,"");const b=G[te];return b?(console.log("Loading",te),URL.createObjectURL(b)):te}),D.addHandler(/\.tga$/i,new h);for(let te=0;te<p.length;te++)ke(p[te],D)}};let J;const ke=function(p,G){const D=p.name,te=D.split(".").pop().toLowerCase(),b=new FileReader;switch(b.addEventListener("progress",function(x){""+(x.total/1e3).toLocaleString(),Math.floor(x.loaded/x.total*100)+""}),te){case"glb":{b.addEventListener("load",async function(x){const M=x.target.result,{GLTFLoader:E}=await R(async()=>{const{GLTFLoader:S}=await import("../chunks/0H1qU9CE.js");return{GLTFLoader:S}},__vite__mapDeps([3,1]),import.meta.url),{DRACOLoader:y}=await R(async()=>{const{DRACOLoader:S}=await import("../chunks/D0BVBMBK.js");return{DRACOLoader:S}},__vite__mapDeps([4,1]),import.meta.url),{KTX2Loader:_}=await R(async()=>{const{KTX2Loader:S}=await import("../chunks/CIn4Bi2z.js");return{KTX2Loader:S}},__vite__mapDeps([5,1]),import.meta.url),{MeshoptDecoder:A}=await R(async()=>{const{MeshoptDecoder:S}=await import("../chunks/BbCP70j-.js");return{MeshoptDecoder:S}},[],import.meta.url),N=new y;N.setDecoderPath("https://www.gstatic.com/draco/v1/decoders/");const re=new _;re.setTranscoderPath("../examples/jsm/libs/basis/");const se=new E;se.setDRACOLoader(N),se.setKTX2Loader(re),se.setMeshoptDecoder(A),se.parse(M,"",function(S){J=S.scene,J.name=D,J.animations.push(...S.animations),u.add(J),console.log(J),H=new r.Box3().setFromObject(J),Ie=new r.Sphere,H.getBoundingSphere(Ie);const P=new r.Vector3;H.getCenter(P),P.y=0,J.position.sub(P),xe&&u.remove(xe),N.dispose()})}),b.readAsArrayBuffer(p);break}case"3dm":{b.addEventListener("load",async function(x){const M=x.target.result,{Rhino3dmLoader:E}=await R(async()=>{const{Rhino3dmLoader:_}=await import("../chunks/B1zl_Bej.js");return{Rhino3dmLoader:_}},__vite__mapDeps([6,1]),import.meta.url),y=new E;y.setLibraryPath("../examples/jsm/libs/rhino3dm/"),y.parse(M,function(_){_.name=D,editor.execute(new AddObjectC
32ommand(editor,_))},function(_){console.error(_)})},!1),b.readAsArrayBuffer(p);break}case"3ds":{b.addEventListener("load",async function(x){const{TDSLoader:M}=await R(async()=>{const{TDSLoader:_}=await import("../chunks/BTTcuIq5.js");return{TDSLoader:_}},__vite__mapDeps([7,1]),import.meta.url),y=new M().parse(x.target.result);editor.execute(new AddObjectCommand(editor,y))},!1),b.readAsArrayBuffer(p);break}case"3mf":{b.addEventListener("load",async function(x){const{ThreeMFLoader:M}=await R(async()=>{const{ThreeMFLoader:_}=await import("../chunks/CK_yFXzp.js");return{ThreeMFLoader:_}},__vite__mapDeps([8,1,9]),import.meta.url),y=new M().parse(x.target.result);editor.execute(new AddObjectCommand(editor,y))},!1),b.readAsArrayBuffer(p);break}case"amf":{b.addEventListener("load",async function(x){const{AMFLoader:M}=await R(async()=>{const{AMFLoader:_}=await import("../chunks/DxY5rYD4.js");return{AMFLoader:_}},__vite__mapDeps([10,1,9]),import.meta.url),y=new M().parse(x.target.result);editor.execute(new AddObjectCommand(editor,y))},!1),b.readAsArrayBuffer(p);break}case"dae":{b.addEventListener("load",async function(x){const M=x.target.result,{ColladaLoader:E}=await R(async()=>{const{ColladaLoader:A}=await import("../chunks/coH2x1Ei.js");return{ColladaLoader:A}},__vite__mapDeps([11,1,2]),import.meta.url),_=new E(G).parse(M);_.scene.name=D,editor.execute(new AddObjectCommand(editor,_.scene))},!1),b.readAsText(p);break}case"drc":{b.addEventListener("load",async function(x){const M=x.target.result,{DRACOLoader:E}=await R(async()=>{const{DRACOLoader:_}=await import("../chunks/D0BVBMBK.js");return{DRACOLoader:_}},__vite__mapDeps([4,1]),import.meta.url),y=new E;y.setDecoderPath("../examples/jsm/libs/draco/"),y.parse(M,function(_){let A;if(_.index!==null){const N=new r.MeshStandardMaterial;A=new r.Mesh(_,N),A.name=D}else{const N=new r.PointsMaterial({size:.01});N.vertexColors=_.hasAttribute("color"),A=new r.Points(_,N),A.name=D}y.dispose(),editor.execute(new AddObjectCommand(editor,A))})},!1),b.readAsArrayBuffer(p);break}case"fbx":{b.addEventListener("load",async function(x){const M=x.target.result,{FBXLoader:E}=await R(async()=>{const{FBXLoader:A}=await import("../chunks/CYYBhGOw.js");return{FBXLoader:A}},__vite__mapDeps([12,1,9]),import.meta.url),_=new E(G).parse(M);editor.execute(new AddObjectCommand(editor,_))},!1),b.readAsArrayBuffer(p);break}case"gltf":{b.addEventListener("load",async function(x){const M=x.target.result,{DRACOLoader:E}=await R(async()=>{const{DRACOLoader:S}=await import("../chunks/D0BVBMBK.js");return{DRACOLoader:S}},__vite__mapDeps([4,1]),import.meta.url),{GLTFLoader:y}=await R(async()=>{const{GLTFLoader:S}=await import("../chunks/0H1qU9CE.js");return{GLTFLoader:S}},__vite__mapDeps([3,1]),import.meta.url),{KTX2Loader:_}=await R(async()=>{const{KTX2Loader:S}=await import("../chunks/CIn4Bi2z.js");return{KTX2Loader:S}},__vite__mapDeps([5,1]),import.meta.url),{MeshoptDecoder:A}=await R(async()=>{const{MeshoptDecoder:S}=await import("../chunks/BbCP70j-.js");return{MeshoptDecoder:S}},[],import.meta.url),N=new E;N.setDecoderPath("../examples/jsm/libs/draco/gltf/");const re=new _;re.setTranscoderPath("../examples/jsm/libs/basis/");const se=new y(G);se.setDRACOLoader(N),se.setKTX2Loader(re),se.setMeshoptDecoder(A),se.parse(M,"",function(S){const P=S.scene;P.name=D,P.animations.push(...S.animations),editor.execute(new AddObjectCommand(editor,P)),N.dispose()})},!1),b.readAsArrayBuffer(p);break}case"js":case"json":{b.addEventListener("load",function(x){const M=x.target.result;if(M.indexOf("postMessage")!==-1){const y=new Blob([M],{type:"text/javascript"}),_=URL.createObjectURL(y),A=new Worker(_);A.onmessage=function(N){N.data.metadata={version:2},handleJSON(N.data)},A.postMessage(Date.now());return}let E;try{E=JSON.parse(M)}catch(y){alert(y);return}handleJSON(E)},!1),b.readAsText(p);break}case"kmz":{b.addEventListener("load",async function(x){const{KMZLoader:M}=await R(async()=>{const{KMZLoader:_}=await import("../chunks/BT_DQLaG.js");return{KMZLoader:_}},__vite__mapDeps([13,1,11,2,9]),import.meta.url),y=new M().parse(x.target.result);
32y.scene.name=D,editor.execute(new AddObjectCommand(editor,y.scene))},!1),b.readAsArrayBuffer(p);break}case"ldr":case"mpd":{b.addEventListener("load",async function(x){const{LDrawLoader:M}=await R(async()=>{const{LDrawLoader:y}=await import("../chunks/Cg-bEYAm.js");return{LDrawLoader:y}},__vite__mapDeps([14,1]),import.meta.url),E=new M;E.setPath("../../examples/models/ldraw/officialLibrary/"),E.parse(x.target.result,function(y){y.name=D,y.rotation.x=Math.PI,editor.execute(new AddObjectCommand(editor,y))})},!1),b.readAsText(p);break}case"md2":{b.addEventListener("load",async function(x){const M=x.target.result,{MD2Loader:E}=await R(async()=>{const{MD2Loader:N}=await import("../chunks/w-SqXnxC.js");return{MD2Loader:N}},__vite__mapDeps([15,1]),import.meta.url),y=new E().parse(M),_=new r.MeshStandardMaterial,A=new r.Mesh(y,_);A.mixer=new r.AnimationMixer(A),A.name=D,A.animations.push(...y.animations),editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsArrayBuffer(p);break}case"obj":{b.addEventListener("load",async function(x){const M=x.target.result,{OBJLoader:E}=await R(async()=>{const{OBJLoader:_}=await import("../chunks/CFhrrsO1.js");return{OBJLoader:_}},__vite__mapDeps([16,1]),import.meta.url),y=new E().parse(M);y.name=D,editor.execute(new AddObjectCommand(editor,y))},!1),b.readAsText(p);break}case"ply":{b.addEventListener("load",async function(x){const M=x.target.result,{PLYLoader:E}=await R(async()=>{const{PLYLoader:A}=await import("../chunks/3l8JV31U.js");return{PLYLoader:A}},__vite__mapDeps([17,1]),import.meta.url),y=new E().parse(M);let _;if(y.index!==null){const A=new r.MeshStandardMaterial;_=new r.Mesh(y,A),_.name=D}else{const A=new r.PointsMaterial({size:.01});A.vertexColors=y.hasAttribute("color"),_=new r.Points(y,A),_.name=D}editor.execute(new AddObjectCommand(editor,_))},!1),b.readAsArrayBuffer(p);break}case"stl":{b.addEventListener("load",async function(x){const M=x.target.result,{STLLoader:E}=await R(async()=>{const{STLLoader:N}=await import("../chunks/CSbwNI4x.js");return{STLLoader:N}},__vite__mapDeps([18,1]),import.meta.url),y=new E().parse(M),_=new r.MeshStandardMaterial,A=new r.Mesh(y,_);A.name=D,editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsBinaryString!==void 0?b.readAsBinaryString(p):b.readAsArrayBuffer(p);break}case"svg":{b.addEventListener("load",async function(x){const M=x.target.result,{SVGLoader:E}=await R(async()=>{const{SVGLoader:N}=await import("../chunks/DYkd7kTO.js");
32return{SVGLoader:N}},__vite__mapDeps([19,1]),import.meta.url),_=new E().parse(M).paths,A=new r.Group;A.scale.multiplyScalar(.1),A.scale.y*=-1;for(let N=0;N<_.length;N++){const re=_[N],se=new r.MeshBasicMaterial({color:re.color,depthWrite:!1}),S=E.createShapes(re);for(let P=0;P<S.length;P++){const de=S[P],Se=new r.ShapeGeometry(de),Te=new r.Mesh(Se,se);A.add(Te)}}editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsText(p);break}case"usdz":{b.addEventListener("load",async function(x){const M=x.target.result,{USDZLoader:E}=await R(async()=>{const{USDZLoader:_}=await import("../chunks/CL1y-Ihx.js");return{USDZLoader:_}},__vite__mapDeps([20,1,9]),import.meta.url),y=new E().parse(M);y.name=D,editor.execute(new AddObjectCommand(editor,y))},!1),b.readAsArrayBuffer(p);break}case"vox":{b.addEventListener("load",async function(x){const M=x.target.result,{VOXLoader:E,VOXMesh:y}=await R(async()=>{const{VOXLoader:N,VOXMesh:re}=await import("../chunks/BFHzVG8a.js");return{VOXLoader:N,VOXMesh:re}},__vite__mapDeps([21,1]),import.meta.url),_=new E().parse(M),A=new r.Group;A.name=D;for(let N=0;N<_.length;N++){const re=_[N],se=new y(re);A.add(se)}editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsArrayBuffer(p);break}case"vtk":case"vtp":{b.addEventListener("load",async function(x){const M=x.target.result,{VTKLoader:E}=await R(async()=>{const{VTKLoader:N}=await import("../chunks/CbghLMiV.js");return{VTKLoader:N}},__vite__mapDeps([22,1,9]),import.meta.url),y=new E().parse(M),_=new r.MeshStandardMaterial,A=new r.Mesh(y,_);A.name=D,editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsArrayBuffer(p);break}case"wrl":{b.addEventListener("load",async function(x){const M=x.target.result,{VRMLLoader:E}=await R(async()=>{const{VRMLLoader:_}=await import("../chunks/CaE9HiRS.js");return{VRMLLoader:_}},__vite__mapDeps([23,1]),import.meta.url),y=new E().parse(M);editor.execute(new SetSceneCommand(editor,y))},!1),b.readAsText(p);break}case"xyz":{b.addEventListener("load",async function(x){const M=x.target.result,{XYZLoader:E}=await R(async()=>{const{XYZLoader:N}=await import("../chunks/DJDRW5NX.js");return{XYZLoader:N}},__vite__mapDeps([24,1]),import.meta.url),y=new E().parse(M),_=new r.PointsMaterial;_.vertexColors=y.hasAttribute("color");const A=new r.Points(y,_);A.name=D,editor.execute(new AddObjectCommand(editor,A))},!1),b.readAsText(p);break}case"zip":{b.addEventListener("load",function(x){handleZIP(x.target.result)},!1),b.readAsArrayBuffer(p);break}default:console.error("Unsupported file format ("+te+").");break}};var St={toggleEdge:Ke,applyDepthMaterial:ne,initScene:Ve,saveAsImage:pt,loadFiles:ce,loadFile:ke};gn();var st=aa(),K=v(st);f(st),T("keydown",K,p=>ae(p)),T("keyup",K,p=>ie(p)),F(e,st),ye(t,"toggleEdge",Ke),ye(t,"applyDepthMaterial",ne),ye(t,"initScene",Ve),ye(t,"saveAsImage",pt),ye(t,"loadFiles",ce),ye(t,"loadFile",ke);var me=pn(St);return i(),me}var oa=$('<div class=" cursor-pointer flex flex-col justify-center items-center bg-rpGray-909 w-[98%] 2xl:h-[97.2%] 2xl:w-[98%] m-3 rounded-md p-4" id="dropAreaBig"><input accept="image/png,.png,image/jpeg,.jpeg,image/webp,.webp/,.glb,.3ds" multiple="" type="file" tabindex="-1" style="display: none;" id="file_bigger" name="file_bigger"/><img crossorigin="anonymous" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NCIgaGVpZ2h0PSI0NCIgZmlsbD0ibm9uZSIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIyMCIgZmlsbD0iI2U3ZWRmYiIvPjxwYXRoIGQ9Ik0zMC43OTMgMTcuMTI0Yy0uNDE5LTIuNTAyLTIuNTc1LTQuMzc1LTUuMTgtNC4zNzUtLjQ2IDAtLjkxMi4wNTktMS4zNS4xNzVhNi41MSA2LjUxIDAgMCAwLTUuMjI0LTIuNTkxYy0zLjYyNSAwLTYuNTc0IDIuOTQ5LTYuNTc0IDYuNTc0bC4wMTcuNDZhNi4xNCA2LjE0IDAgMCAwLTMuODE1IDUuNjc1YzAgMy4zODMgMi43NTIgNi4xMzYgNi4xMzYgNi4xMzYuNDg0IDAgLjg3Ny0uMzkyLjg3Ny0uODc2cy0uMzkyLS44NzYtLjg3Ni0uODc2YTQuMzkgNC4zOSAwIDAgMS00LjM4My00LjM4MyA0LjM4IDQuMzggMCAwIDEgMy4yNS00LjIyOGMuNDQzLS4xMTguNzItLjU1OC42MzUtMS4wMDlhNC44NyA0Ljg3IDAgMCAxLS4wODctLjg5OCA0LjgzIDQuODMgMCAwIDEgNC44MjEtNC44MjFjMS42OTggMCAzLjI0Ljg3MyA0LjEyNCAyLjMzNS4yMjUuMzcyLjY4OS41MjMgMS4wOS4zNTRhMy40OCAzLjQ4IDAgMCAxIDEuMzU5LS4yNzQgMy40OSAzLjQ5IDAgMCAxIDMuNDk5IDMuMzc4Yy4wMTUuNDIxLjMyOC43NzIuNzQ1LjgzNSAyLjEyMy4zMiAzLjcyNCAyLjE4ID
32MuNzI0IDQuMzI3YTQuMzkgNC4zOSAwIDAgMS00LjM4MiA0LjM4M2MtLjQ4NCAwLS44NzYuMzkyLS44NzYuODc3cy4zOTIuODc3Ljg3Ny44NzdjMy4zODMgMCA2LjEzNi0yLjc1MyA2LjEzNi02LjEzNiAwLTIuNzc0LTEuOTA5LTUuMjA3LTQuNTQtNS45MTh6bS0yLjM4OSA3LjIxMmwtNS43ODUtNS43ODVjLS4zNDItLjM0Mi0uODk3LS4zNDItMS4yMzkgMGwtNS43ODUgNS43ODVjLS4zNDIuMzQyLS4zNDIuODk3IDAgMS4yMzlzLjg5Ny4zNDIgMS4yMzkgMGw0LjI4OC00LjI4OHYxMC44NzVjMCAuNDg0LjM5Mi44NzcuODc3Ljg3N3MuODc3LS4zOTIuODc3LS44NzZWMjEuMjg3bDQuMjg4IDQuMjg4Yy4xNzEuMTcxLjM5Ni4yNTcuNjIuMjU3cy40NDktLjA4Ni42Mi0uMjU3YS44OC44OCAwIDAgMCAwLTEuMjR6IiBmaWxsPSIjMTk3N2YyIi8+PC9zdmc+" alt="" id="uploadIcon"/> <p class="antialiased font-inter-medium font-sans text-[0.875rem] leading-[1.5rem] text-our-blue2 text-center"><label for="file_bigger poppins-light" id="filebg_label">Drag and Drop or Choose Your File</label></p> <div class="mt-2.5 flex flex-row justify-center items-center w-full"><h6 class="!font-inter-regular antialiased font-inter-regular font-sans text-[0.75rem] tracking-wide leading-[1.25rem] text-gray-400 text-center poppins-light" id="imageType">PNG, JPEG, JPG Max File Size: 10 MB</h6></div></div>'),la=$('<div class=" cursor-pointer flex flex-col justify-center items-center w-[96%] m-1 rounded-md p-1" id="dropAreaBig_"><img src="" class=" w-full h-full object-contain" alt="" id="handleChnageImageData"/></div>'),ca=$('<main><div id="ImagePart" class="w-full 2xl:w-[68.9vw] h-[89.8vh] 2xl:h-[91vh] mb-0 -mt-0.5 rounded border-dashed border-2 border-rpGray-915 flex justify-center m-auto svelte-6n1kns"><!></div>  <div id="ThreeJsPart" class="svelte-6n1kns"><div class="flex absolute w-[2.2%] p-1 2xl:ml-6 mt-5" id="dashboardDiv"></div> <div class="w-full 2xl:w-[68vw] h-[89.8vh] 2xl:h-[91vh] -mt-0.5 rounded border-dashed border-2 border-rpGray-915 flex justify-center m-auto"><div class=" cursor-pointer flex flex-col justify-center items-center w-[97%] 2xl:w-[99%]" id="dropAreaBig"><!></div></div></div></main>');function da(e,t){mn(t,!1);const s=()=>Dt(Lt,"$changeDivOnImageChange",i),[i,r]=wn();At(Lt,!0);let l=O(),h,d,c;vn(()=>{let Y,le,Be=document.getElementById("ThreeJsPart"),We=document.getElementById("ImagePart");function $e(){let ne=document.getElementById("file_bigger"),ae=document.getElementById("filebg_label");ne.addEventListener("change",ie=>{ae.innerText=ie.target.files[0].name,h=ie.target.files,a(l).loadFiles(h),c=ae.innerText,Y=c.split(".").pop(),Y==="glb"&&(Be.style.display="flex",We.style.display="none");const he=new FileReader;he.onload=Re=>{At(Lt,!1),setTimeout(()=>{let Ge=document.getElementById("handleChnageImageData");Ge.src=Re.target.result},1e3)},he.readAsDataURL(ie.target.files[0])})}document.getElementById("dropAreaBig").addEventListener("click",()=>{document.getElementById("file_bigger").click()}),$e();function xe(){let ne=document.getElementById("dropAreaBig"),ae=document.getElementById("file_bigger");["dragenter","dragover"].forEach(he=>{ne.addEventListener(he,je,!1)}),["dragleave","drop"].forEach(he=>{ne.addEventListener(he,Le,!1)}),ne.addEventListener("drop",Ke,!1);let ie=document.querySelector('label[id="filebg_label"]');ae.addEventListener("change",function(){ae.files.length>0?ie.textContent=ae.files[0].name:ie.textContent="Choose File"})}function je(ne){let ae=document.getElementById("dropAreaBig");ae.style.backgroundColor="#2d3748",ne.preventDefault()}function Le(ne){let ae=document.getElementById("dropAreaBig");ae.style.backgroundColor="",ne.preventDefault()}function Ke(ne){let ie=ne.dataTransfer.files,he=document.querySelector('label[id="filebg_label"]'),Re=document.getElementById("file_bigger");Re.files=ie,he.textContent=ie[0].name,h=ie,d=he.textContent,le=d.split(".").pop(),le==="glb"&&(Be.style.display="flex",We.style.display="none"),a(l).loadFiles(h);const Ge=new FileReader;Ge.onload=Ve=>{At(Lt,!1),setTimeout(()=>{let Ce=document.getElementById("handleChnageImageData");Ce.src=Ve.target.result},1e3)},Ge.readAsDataURL(ie[0]),Le(ne)}xe()});function u(Y){a(l).applyDepthMaterial(Y)}function w(Y){a(l).toggleEdge(Y)}function j(){a(l).saveAsImage()}var L={applyDepthMaterial1:u,toggleEdge1:w,cameraTrig:j};gn();var z=ca(),U=v(z),ee=v(U);{var oe=Y=>{var le=oa();F(Y,le)},W=Y=>{var le=la();F(Y,le)};we(ee,Y=>{s()?Y(oe):Y(W,!1)})}f(U);var X=m(U,2),q=m(v(X),2),Z=v(q),H=v(Z);dn(ia(H,{$$legacy:!0}),Y=>g(l,Y),()=>a(l)),f(Z),f(q),f(X),f(z),F(e,z),ye(t,"applyDepthMaterial1",u),ye(t,"toggleEdge1",w),ye(t,"cameraTrig",j);var Ie=pn(L);return r(),Ie}var un="http://www.w3.org/1999/xhtml";const jr={svg:"http://www.w3.org/2000/svg",xhtml:un,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dr(e){var t=e+="",s=t.indexOf(":");return s>=0&&(t=e.slice(0,s))!=="xmlns"&&(e=e.slice(s+1)),jr.hasOwnProperty(t)?{space:jr[t],local:e}:e}function ua(e){return function(){var t=this.ownerDocument,s=this.namespaceURI;return s===un&&t.documentElement.namespaceURI===un?t.createElement(e):t.createElementNS(s,e)}}function fa(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ir(e){var t=Dr(e);return(t.local?fa:ua)(t)}function ha(){}function kr(e){return e==null?ha:function(){return this.querySelector(e)}}function va(e){typeof e!="function"&&(e=kr(e));for(var t=this._groups,s=t.length,i=new Array(s),r=0;r<s;++r)for(var l=t[r],h=l.length,d=i[r]=new Array(h),c,u,w=0;w<h;++w)(c=l[w])&&(u=e.call(c,c.__data__,w,l))&&("__data__"in c&&(u.__data__=c.__data__),d[w]=u);return new be(i,this._parents)}function ma(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pa(){return[]}function ga(e){return e==null?pa:function(){return this.querySelectorAll(e)}}function wa(e){return function(){return ma(e.apply(this,arguments))}}function _a(e){typeof e=="function"?e=wa(e):e=ga(e);for(var t=this._groups,s=t.length,i=[],r=[],l=0;l<s;++l)for(var h=t[l],d=h.length,c,u=0;u<d;++u)(c=h[u])&&(i.push(e.call(c,c.__data__,u,h)),r.push(c));return new be(i,r)}function ya(e){return function(){return this.matches(e)}}function Er(e){return function(t){return t.matches(e)}}var ba=Array.prototype.find;function xa(e){return function(){return ba.call(this.children,e)}}function ja(){return this.firstElementChild}function La(e){return this.select(e==null?ja:xa(typeof e=="function"?e:Er(e)))}var Ma=Array.prototype.filter;function Aa(){return Array.from(this.children)}function Da(e){return function(){return Ma.call(this.children,e)}}function Ia(e){return this.selectAll(e==null?Aa:Da(typeof e=="function"?e:Er(e)))}function ka(e){typeof e!="function"&&(e=ya(e));for(var t=this._groups,s=t.length,i=new Array(s),r=0;r<s;++r)for(var l=t[r],h=l.length,d=i[r]=[],c,u=0;u<h;++u)(c=l[u])&&e.call(c,c.__data__,u,l)&&d.push(c);return new be(i,this._parents)}function Cr(e){return new Array(e.length)}function Ea(){return new be(this._enter||this._groups.map(Cr),this._parents)}function It(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}It.prototype={constructor:It,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ca(e){return function(){return e}}function Sa(e,t,s,i,r,l){for(var h=0,d,c=t.length,u=l.length;h<u;
vendor: 8,792 bytes, line 32
32++h)(d=t[h])?(d.__data__=l[h],i[h]=d):s[h]=new It(e,l[h]);for(;h<c;++h)(d=t[h])&&(r[h]=d)}function Ta(e,t,s,i,r,l,h){var d,c,u=new Map,w=t.length,j=l.length,L=new Array(w),z;for(d=0;d<w;++d)(c=t[d])&&(L[d]=z=h.call(c,c.__data__,d,t)+"",u.has(z)?r[d]=c:u.set(z,c));for(d=0;d<j;++d)z=h.call(e,l[d],d,l)+"",(c=u.get(z))?(i[d]=c,c.__data__=l[d],u.delete(z)):s[d]=new It(e,l[d]);for(d=0;d<w;++d)(c=t[d])&&u.get(L[d])===c&&(r[d]=c)}function Na(e){return e.__data__}function Pa(e,t){if(!arguments.length)return Array.from(this,Na);var s=t?Ta:Sa,i=this._parents,r=this._groups;typeof e!="function"&&(e=Ca(e));for(var l=r.length,h=new Array(l),d=new Array(l),c=new Array(l),u=0;u<l;++u){var w=i[u],j=r[u],L=j.length,z=za(e.call(w,w&&w.__data__,u,i)),U=z.length,ee=d[u]=new Array(U),oe=h[u]=new Array(U),W=c[u]=new Array(L);s(w,j,ee,oe,W,z,t);for(var X=0,q=0,Z,H;X<U;++X)if(Z=ee[X]){for(X>=q&&(q=X+1);!(H=oe[q])&&++q<U;);Z._next=H||null}}return h=new be(h,i),h._enter=d,h._exit=c,h}function za(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Oa(){return new be(this._exit||this._groups.map(Cr),this._parents)}function Ba(e,t,s){var i=this.enter(),r=this,l=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),s==null?l.remove():s(l),i&&r?i.merge(r).order():r}function Ra(e){for(var t=e.selection?e.selection():e,s=this._groups,i=t._groups,r=s.length,l=i.length,h=Math.min(r,l),d=new Array(r),c=0;c<h;++c)for(var u=s[c],w=i[c],j=u.length,L=d[c]=new Array(j),z,U=0;U<j;++U)(z=u[U]||w[U])&&(L[U]=z);for(;c<r;++c)d[c]=s[c];return new be(d,this._parents)}function Ga(){for(var e=this._groups,t=-1,s=e.length;++t<s;)for(var i=e[t],r=i.length-1,l=i[r],h;--r>=0;)(h=i[r])&&(l&&h.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(h,l),l=h);return this}function Va(e){e||(e=Ha);function t(j,L){return j&&L?e(j.__data__,L.__data__):!j-!L}for(var s=this._groups,i=s.length,r=new Array(i),l=0;l<i;++l){for(var h=s[l],d=h.length,c=r[l]=new Array(d),u,w=0;w<d;++w)(u=h[w])&&(c[w]=u);c.sort(t)}return new be(r,this._parents).order()}function Ha(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Fa(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ua(){return Array.from(this)}function Ya(){for(var e=this._groups,t=0,s=e.length;t<s;++t)for(var i=e[t],r=0,l=i.length;r<l;++r){var h=i[r];if(h)return h}return null}function Wa(){let e=0;for(const t of this)++e;return e}function $a(){return!this.node()}function Ka(e){for(var t=this._groups,s=0,i=t.length;s<i;++s)for(var r=t[s],l=0,h=r.length,d;l<h;++l)(d=r[l])&&e.call(d,d.__data__,l,r);return this}function Xa(e){return function(){this.removeAttribute(e)}}function Za(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qa(e,t){return function(){this.setAttribute(e,t)}}function qa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ja(e,t){return function(){var s=t.apply(this,arguments);s==null?this.removeAttribute(e):this.setAttribute(e,s)}}function ei(e,t){return function(){var s=t.apply(this,arguments);s==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,s)}}function ti(e,t){var s=Dr(e);if(arguments.length<2){var i=this.node();return s.local?i.getAttributeNS(s.space,s.local):i.getAttribute(s)}return this.each((t==null?s.local?Za:Xa:typeof t=="function"?s.local?ei:Ja:s.local?qa:Qa)(s,t))}function Sr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ni(e){return function(){this.style.removeProperty(e)}}function ri(e,t,s){return function(){this.style.setProperty(e,t,s)}}function si(e,t,s){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,s)}}function ai(e,t,s){return arguments.length>1?this.each((t==null?ni:typeof t=="function"?si:ri)(e,t,s??"")):ii(this.node(),e)}function ii(e,t){return e.style.getPropertyValue(t)||Sr(e).getComputedStyle(e,null).getPropertyValue(t)}function oi(e){return function(){delete this[e]}}function li(e,t){return function(){this[e]=t}}function ci(e,t){return function(){var s=t.apply(this,arguments);s==null?delete this[e]:this[e]=s}}function di(e,t){return arguments.length>1?this.each((t==null?oi:typeof t=="function"?ci:li)(e,t)):this.node()[e]}function Tr(e){return e.trim().split(/^|\s+/)}function yn(e){return e.classList||new Nr(e)}function Nr(e){this._node=e,this._names=Tr(e.getAttribute("class")||"")}Nr.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Pr(e,t){for(var s=yn(e),i=-1,r=t.length;++i<r;)s.add(t[i])}function zr(e,t){for(var s=yn(e),i=-1,r=t.length;++i<r;)s.remove(t[i])}function ui(e){return function(){Pr(this,e)}}function fi(e){return function(){zr(this,e)}}function hi(e,t){return function(){(t.apply(this,arguments)?Pr:zr)(this,e)}}function vi(e,t){var s=Tr(e+"");if(arguments.length<2){for(var i=yn(this.node()),r=-1,l=s.length;++r<l;)if(!i.contains(s[r]))return!1;return!0}return this.each((typeof t=="function"?hi:t?ui:fi)(s,t))}function mi(){this.textContent=""}function pi(e){return function(){this.textContent=e}}function gi(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wi(e){return arguments.length?this.each(e==null?mi:(typeof e=="function"?gi:pi)(e)):this.node().textContent}function _i(){this.innerHTML=""}function yi(e){return function(){this.innerHTML=e}}function bi(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function xi(e){return arguments.length?this.each(e==null?_i:(typeof e=="function"?bi:yi)(e)):this.node().innerHTML}function ji(){this.nextSibling&&this.parentNode.appendChild(this)}function Li(){return this.each(ji)}function Mi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ai(){return this.each(Mi)}function Di(e){var t=typeof e=="function"?e:Ir(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ii(){return null}function ki(e,t){var s=typeof e=="function"?e:Ir(e),i=t==null?Ii:typeof t=="function"?t:kr(t);return this.select(function(){return this.insertBefore(s.apply(this,arguments),i.apply(this,arguments)||null)})}function Ei(){var e=this.parentNode;e&&e.removeChild(this)}function Ci(){return this.each(Ei)}function Si(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ti(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ni(e){return this.select(e?Ti:Si)}function Pi(e){return arguments.length?this.property("__data__",e):this.node().__data__}function zi(e){return function(t){e.call(this,t,this.__data__)}}function Oi(e){return e.trim().split(/^|\s+/).map(function(t){var s="",i=t.indexOf(".");return i>=0&&(s=t.slice(i+1),t=t.slice(0,i)),{type:t,name:s}})}function Bi(e){return function(){var t=this.__on;if(t){for(var s=0,i=-1,r=t.length,l;s<r;++s)l=t[s],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++i]=l;++i?t.length=i:delete this.__on}}}function Ri(e,t,s){return function(){var i=this.__on,r,l=zi(t);if(i){for(var h=0,d=i.length;h<d;++h)if((r=i[h]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=l,r.options=s),r.value=t;return}}this.addEventListener(e.type,l,s),r={type:e.type,name:e.name,value:t,listener:l,options:s},i?i.push(r):this.__on=[r]}}function Gi(e,t,s){var i=Oi(e+""),r,l=i.length,h;if(arguments.length<2){var d=this.node().__on;if(d){for(var c=0,u=d.length,w;c<u;++c)for(r=0,w=d[c];r<l;++r)if((h=i[r]).type===w.type&&h.name===w.name)return w.value}return}for(d=t?Ri:Bi,r=0;r<l;++r)this.each(d(i[r],t,s));return this}function Or(e,t,s){var i=Sr(e),r=i.CustomEvent;typeof r=="function"?r=new r(t,s):(r=i.document.createEvent("Event"),s?(r.initEvent(t,s.bubbles,s.cancelable),r.detail=s.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Vi(e,t){return function(){return Or(this,e,t)}}function Hi(e,t){return function(){return Or(this,e,t.apply(this,arguments))}}function Fi(e,t){return this.each((typeof t=="function"?Hi:Vi)(e,t))}function*Ui(){for(var e=this._groups,t=0,s=e.length;t<s;++t)for(var i=e[t],r=0,l=i.length,h;r<l;++r)(h=i[r])&&(yield h)}var Yi=[null];function be(e,t){this._groups=e,this._parents=t}function Wi(){return this}be.prototype={constructor:be,select:va,selectAll:_a,selectChild:La,selectChildren:Ia,filter:ka,data:Pa,enter
vendor: 16,384 bytes, line 32
32:Ea,exit:Oa,join:Ba,merge:Ra,selection:Wi,order:Ga,sort:Va,call:Fa,nodes:Ua,node:Ya,size:Wa,empty:$a,each:Ka,attr:ti,style:ai,property:di,classed:vi,text:wi,html:xi,raise:Li,lower:Ai,append:Di,insert:ki,remove:Ci,clone:Ni,datum:Pi,on:Gi,dispatch:Fi,[Symbol.iterator]:Ui};function Xe(e){return typeof e=="string"?new be([[document.querySelector(e)]],[document.documentElement]):new be([[e]],Yi)}function tt(e){return function(){return e}}const fn=Math.PI,hn=2*fn,Ze=1e-6,$i=hn-Ze;function Br(e){this._+=e[0];for(let t=1,s=e.length;t<s;++t)this._+=arguments[t]+e[t]}function Ki(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Br;const s=10**t;return function(i){this._+=i[0];for(let r=1,l=i.length;r<l;++r)this._+=Math.round(arguments[r]*s)/s+i[r]}}class Xi{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Br:Ki(t)}moveTo(t,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+s}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,s){this._append`L${this._x1=+t},${this._y1=+s}`}quadraticCurveTo(t,s,i,r){this._append`Q${+t},${+s},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,s,i,r,l,h){this._append`C${+t},${+s},${+i},${+r},${this._x1=+l},${this._y1=+h}`}arcTo(t,s,i,r,l){if(t=+t,s=+s,i=+i,r=+r,l=+l,l<0)throw new Error(`negative radius: ${l}`);let h=this._x1,d=this._y1,c=i-t,u=r-s,w=h-t,j=d-s,L=w*w+j*j;if(this._x1===null)this._append`M${this._x1=t},${this._y1=s}`;else if(L>Ze)if(!(Math.abs(j*c-u*w)>Ze)||!l)this._append`L${this._x1=t},${this._y1=s}`;else{let z=i-h,U=r-d,ee=c*c+u*u,oe=z*z+U*U,W=Math.sqrt(ee),X=Math.sqrt(L),q=l*Math.tan((fn-Math.acos((ee+L-oe)/(2*W*X)))/2),Z=q/X,H=q/W;Math.abs(Z-1)>Ze&&this._append`L${t+Z*w},${s+Z*j}`,this._append`A${l},${l},0,0,${+(j*z>w*U)},${this._x1=t+H*c},${this._y1=s+H*u}`}}arc(t,s,i,r,l,h){if(t=+t,s=+s,i=+i,h=!!h,i<0)throw new Error(`negative radius: ${i}`);let d=i*Math.cos(r),c=i*Math.sin(r),u=t+d,w=s+c,j=1^h,L=h?r-l:l-r;this._x1===null?this._append`M${u},${w}`:(Math.abs(this._x1-u)>Ze||Math.abs(this._y1-w)>Ze)&&this._append`L${u},${w}`,i&&(L<0&&(L=L%hn+hn),L>$i?this._append`A${i},${i},0,1,${j},${t-d},${s-c}A${i},${i},0,1,${j},${this._x1=u},${this._y1=w}`:L>Ze&&this._append`A${i},${i},0,${+(L>=fn)},${j},${this._x1=t+i*Math.cos(l)},${this._y1=s+i*Math.sin(l)}`)}rect(t,s,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+s}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Zi(e){let t=3;return e.digits=function(s){if(!arguments.length)return t;if(s==null)t=null;else{const i=Math.floor(s);if(!(i>=0))throw new RangeError(`invalid digits: ${s}`);t=i}return e},()=>new Xi(t)}function Qi(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Rr(e){this._context=e}Rr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function qi(e){return new Rr(e)}function Ji(e){return e[0]}function eo(e){return e[1]}function sn(e,t){var s=tt(!0),i=null,r=qi,l=null,h=Zi(d);e=typeof e=="function"?e:e===void 0?Ji:tt(e),t=typeof t=="function"?t:t===void 0?eo:tt(t);function d(c){var u,w=(c=Qi(c)).length,j,L=!1,z;for(i==null&&(l=r(z=h())),u=0;u<=w;++u)!(u<w&&s(j=c[u],u,c))===L&&((L=!L)?l.lineStart():l.lineEnd()),L&&l.point(+e(j,u,c),+t(j,u,c));if(z)return l=null,z+""||null}return d.x=function(c){return arguments.length?(e=typeof c=="function"?c:tt(+c),d):e},d.y=function(c){return arguments.length?(t=typeof c=="function"?c:tt(+c),d):t},d.defined=function(c){return arguments.length?(s=typeof c=="function"?c:tt(!!c),d):s},d.curve=function(c){return arguments.length?(r=c,i!=null&&(l=r(i)),d):r},d.context=function(c){return arguments.length?(c==null?i=l=null:l=r(i=c),d):i},d}function Lr(e,t,s){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+s)/6)}function Gr(e){this._context=e}Gr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Lr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Lr(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Mr(e){return new Gr(e)}var to=$('<input type="radio" name="color" class="svelte-10x91uf"/> <label class="mx-1 rounded svelte-10x91uf"></label>',1),no=$('<section id="colorSwatch" class="bg-our-blue1 flex items-center justify-between px-0.5 py-1 rounded ml-[22.1rem] relative svelte-10x91uf"></section>');function ro(e,t){const s=[];let i=Ye(t,"colors",24,()=>[{value:"rgba(0, 0, 0, 1)"},{value:"rgba(255, 255, 255, 1)"}]),r=Ye(t,"color",12);var l=no();on(l,5,i,ln,(h,d)=>{let c=()=>a(d).value,u=()=>a(d).checked;var w=to(),j=ht(w);ve(j);var L,z=m(j,2);nt(()=>{vt(j,"id",c()),cn(j,u()),L!==(L=c())&&(j.value=(j.__value=c())??""),vt(z,"for",c()),ta(z,`background:${c()??""}`)}),Ws(s,[],j,()=>(c(),r()),r),F(h,w)}),f(l),F(e,l)}var so=$('<div id="ImageWork" class="svelte-jfj5e2"><div class="w-full 2xl:w-[68vw] h-[89.8vh] 2xl:h-[91vh] -mt-0.5 rounded border-dashed border-2 border-rpGray-915 flex justify-center m-auto svelte-jfj5e2"><div class=" cursor-pointer flex flex-col justify-center items-center w-[97%] 2xl:w-[99%] svelte-jfj5e2" id="dropAreaBig"><img alt="" class="w-full h-full svelte-jfj5e2"/></div></div></div>'),ao=$('<div id="ImageWork" class="svelte-jfj5e2"><!></div>'),io=$('<img src="down.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),oo=$('<img src="right.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),lo=$('<div class="w-full border-rpGray-915 border-2 hover:border-cyan-900 rounded-md my-2 svelte-jfj5e2"><div class="w-[98%] svelte-jfj5e2"><input style="resize: none;" class="pl-2 bg-transparent outline-none h-[5vh] pt-1 placeholder:text-gray-500 text-gray-300 text-sm svelte-jfj5e2" id="folderInput" placeholder="Folder name"/></div></div>'),co=$('<img src="down.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),uo=$('<img src="right.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),fo=$('<div class="w-full border-rpGray-915 border-2 hover:border-cyan-900 rounded-md my-2 svelte-jfj5e2"><div class="flex items-center justify-around w-[98%] svelte-jfj5e2"><textarea style="resize: none;" class="textarea__ pl-2 pt-1 overflow-scroll no-scrollbar placeholder:text-gray-500 text-gray-300 text-sm svelte-jfj5e2" id="positiveIn" placeholder="positive prompt to create images"></textarea> <button class="text-white inline-block -mt-[10.7vh] -mr-2 w-fit px-1 h-7 rounded-full verticalText text-lg text-center items-center svelte-jfj5e2" aria-label="Reset Positive Prompt"><svg xmlns="http://www.w3.org/2000/svg" height="20px" width="18px" viewBox="0 0 384 512" class="svelte-jfj5e2"><path fill="#4b4c4e" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" class="svelte-jfj5e2"></path></svg></button></div> <p class="remainingCharacters relative float-right mr-1.5 text-gray-500 svelte-jfj5e2"> </p></div> <div class="w-full border-rpGray-915 border-2 hover:border-cyan-900 rounded-md mb-1 svelte-jfj5e2"><div class="flex items-center justify-around svelte-jfj5e2"><textarea style="resize: none;" class="textarea__ pl-2 pt-1 overflow-scroll no-scrollbar placeholder:text-gray-500 text-gray-300 text-sm svelte-jfj5e2" id="negativeIn" placeholder="negative prompt to create images"></textarea> <button class="text-white w-fit px-1 h-7 -mt-[10.7vh] rounded-full verticalText flex justify-center text-lg text-center items-center svelte-jfj5e2" aria-label="Reset Negative Prompt"><svg xmlns="http://www.w3.org/2000/svg" height="20px" width="18px" viewBox="0 0 384 512" class="svelte-jfj5e2"><path fill="#4b4c4e" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" class="svelte-jfj5e2"></path></svg></button></div> <p class="remainingCharacters text-gray-500 relative float-right mr-1.5 svelte-jfj5e2"> </p></div>',1),ho=$('<img src="down.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),vo=$('<img src="right.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),mo=$('<div id="collapsseSetting" class="flex flex-col items-center justify-between text-white w-[100%] border-0 border-red-400 text-xs mt-2 svelte-jfj5e2"><div class="mt-2 w-[90%] flex flex-col items-center open-sans svelte-jfj5e2"><div class="mb-1 mt-2 flex h-6 w-full justify-between items-center svelte-jfj5e2"><p class=" m-4 ml-1 w-[25vw] text-gray-300 tracking-normal text-[.9rem] svelte-jfj5e2">Prompt Weight</p> <div class=" flex justify-center items-center svelte-jfj5e2"><input id="PromptCount" type="number" class="rounded mt-2 w-12 focus:outline-none bg-rpGray-906 text-gray-200 px-3 h-6 text-center text-lg mb-2 p-1 svelte-jfj5e2"/> <button class=" border-2 transition duration-150 ease-in-out rounded border-rpGray-906 text-rpGray-906 bg-rpGray-906 px-2 ml-1 py-[3.5%] text-xs svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="13px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#828487}</style><path d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z" class="svelte-jfj5e2"></path></svg></button></div></div> <input type="range" name="" id="Prompt" class="py-0.5 mr-4 m-2 bg-transparent border-0 text-white w-full svelte-jfj5e2" min="1" max="50"/> <div class="mb-1 mt-2 flex h-6 w-full justify-between items-center svelte-jfj5e2"><p class=" m-4 ml-1 w-[25vw] text-gray-300 tracking-normal text-[.9rem] svelte-jfj5e2">Control Weight</p> <div class=" flex justify-between items-center svelte-jfj5e2"><input id="ControlWeight" class="rounded mt-2 w-12 bg-rpGray-906 text-gray-200 px-3 h-6 text-center text-lg mb-2 p-1 svelte-jfj5e2" type="number"/> <button class=" border-2 transition duration-150 ease-in-out hover:text-rpGray-906 rounded border-rpGray-906 text-rpGray-906 bg-rpGray-906 px-2 ml-1 py-[3.5%] text-xs svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="13px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#828487}</style><path d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z" class="svelte-jfj5e2"></path></svg></button></div></div> <input type="range" name="" id="ControlWeight_" class="py-0.5 mr-4 m-2 bg-transparent border-0 text-white w-full svelte-jfj5e2" min="0" max="1" step="0.1"/> <div class="mb-1 mt-2 flex h-6 w-full justify-between items-center svelte-jfj5e2"><p class=" m-4 ml-1 w-[25vw] text-gray-300 tracking-normal text-[.9rem] svelte-jfj5e2">Numbers of Images</p> <div class=" flex justify-between items-center svelte-jfj5e2"><input id="ImagesNos_" class="rounded mt-2 w-12 bg-rpGray-906 text-gray-200 px-3 h-6 text-center text-lg mb-2 p-1 svelte-jfj5e2" type="number"/> <button class=" border-2 transition duration-150 ease-in-out hover:text-rpGray-906 rounded border-rpGray-906 text-rpGray-906 bg-rpGray-906 px-2 ml-1 py-[3.5%] text-xs svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="13px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#828487}</style><path d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z" class="svelte-jfj5e2"></path></svg></button></div></div> <input type="range" name="" id="ImagesNos_" class="py-0.5 mr-4 m-2 bg-transparent border-0 text-white w-full svelte-jfj5e2" min="1" max="6"/></div>  <div class="mb-1 mt-2 flex items-center justify-between -ml-1 w-[86%] open-sans md:hidden sm:flex lg:flex 2xl:flex svelte-jfj5e2"><p class="text-[0.9rem] text-gray-300 svelte-jfj5e2">Seed</p> <input type="number" name="" class="w-[25%] 2xl:w-[5vw] pl-1 bg-transparent ml-[20%] 2xl:ml-[43%] 2xl:mr-4 h-8 border-2 text-white border-b-2 md:mb-2 border-rpGray-915 border-t-0 border-l-0 border-r-0 outline-none svelte-jfj5e2" placeholder="Default -1" id="resetButton"/> <button class=" font-semibold border-2 transition duration-150 ease-in-out hover:text-rpGray-906 rounded border-rpGray-906 text-rpGray-906 bg-rpGray-906 px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rpGray-906 2xl:mr-2 svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="15px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#6d6d6f}</style><path d="M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V160H352c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96h32V64c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V416H352c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8h32V320c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z" class="svelte-jfj5e2"></path></svg></button> <button class=" font-semibold mr-1 2xl:mr-1 border-2 transition duration-150 ease-in-out rounded border-rpGray-906 bg-rpGray-906 px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rpGray-906 svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="13px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#828487}</style><path d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z" class="svelte-jfj5e2"></path></svg></button></div>  <div class="mb-1 mt-2 flex items-center justify-between -ml-1 w-[86%] open-sans md:flex sm:hidden lg:hidden 2xl:hidden svelte-jfj5e2"><div class="flex flex-col items-center justify-between w-full svelte-jfj5e2"><div class="flex items-center justify-between w-full svelte-jfj5e2"><p class="text-[0.9rem] text-gray-300 svelte-jfj5e2">Seed</p> <div class="flex items-center justify-center svelte-jfj5e2"><button class=" font-semibold border-2 transition duration-150 ease-in-out hover:text-rpGray-906 rounded border-rpGray-906 text-rpGray-906 bg-rpGray-906 px-2 py-1 text
32-xs focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rpGray-906 md:mr-[10%] 2xl:mr-2 svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="15px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#6d6d6f}</style><path d="M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V160H352c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96h32V64c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V416H352c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8h32V320c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z" class="svelte-jfj5e2"></path></svg></button> <button class=" font-semibold mr-1 2xl:mr-1 border-2 transition duration-150 ease-in-out rounded border-rpGray-906 bg-rpGray-906 px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-rpGray-906 svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="13px" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#828487}</style><path d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z" class="svelte-jfj5e2"></path></svg></button></div></div> <input type="number" name="" class="md:w-full pl-1 bg-transparent ml-[20%] md:ml-[3%] 2xl:ml-[43%] 2xl:mr-4 h-8 border-2 text-white border-b-2 md:mb-2 border-rpGray-915 border-t-0 border-l-0 border-r-0 outline-none svelte-jfj5e2" placeholder="Default -1" id="resetButtonM"/></div></div>  <div class="w-[97%] rounded-md border-0 bg-rpGray-906 h-fit p-1 m-2 mt-4 text-lg svelte-jfj5e2"><div class=" w-full h-[5vh] p-2 mt-1 flex items-center justify-around rounded-l-lg svelte-jfj5e2"><div class="flex svelte-jfj5e2"><input type="radio" name="selectionDepthEdge" id="chooseEdgeDepth" class="mr-2 svelte-jfj5e2"/> <p class="text-gray-300 text-[.9rem] tracking-wider svelte-jfj5e2">Edge</p></div> <div class="flex svelte-jfj5e2"><input type="radio" name="selectionDepthEdge" id="chooseDepthEdge" class=" mr-2 svelte-jfj5e2"/> <p class="text-gray-300 text-[.9rem] tracking-wider svelte-jfj5e2">Depth</p></div></div></div></div>'),po=$('<img src="down.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),go=$('<img src="right.svg" alt="X" class="w-8 svelte-jfj5e2"/>'),wo=$('<div class="relative w-full h-[20vh] flex items-center justify-center svelte-jfj5e2"><div class="loader absolute bg-rpGray-900 svelte-jfj5e2"></div></div>'),_o=$('<a aria-label="View generated image" class="svelte-jfj5e2"><img alt="Generated preview" class="rounded svelte-jfj5e2"/></a>'),yo=$('<div class="grid grid-cols-2 gap-2 m-2 mt-0 overflow-y-scroll no-scrollbar shadow-2xl pt-4 svelte-jfj5e2"><!></div>'),bo=$('<div class=" flex justify-center items-center svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="21" height="20" class="svelte-jfj5e2"><path fill="#942440" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" class="svelte-jfj5e2"></path></svg> <span class="ml-3 font-sans tracking-normal open-sans svelte-jfj5e2">Cancel</span></div>'),xo=$('<div class=" flex justify-center items-center svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" fill="none" class="svelte-jfj5e2"><path d="M13.72 8.386l.54 2.239c.124.515.387.961.755 1.307s.844.593 1.392.709l2.384.507c.229.048.372.262.321.476-.037.155-.166.269-.321.302l-2.384.507a2.9 2.9 0 0 0-1.392.709c-.367.346-.631.792-.755 1.307l-.54 2.239c-.051.215-.279.35-.507.302-.165-.035-.286-.156-.321-.302l-.54-2.239a2.62 2.62 0 0 0-.755-1.307c-.369-.346-.844-.593-1.391-.71l-2.385-.507c-.229-.048-.373-.262-.321-.477.037-.155.166-.269.321-.302l2.384-.507a2.9 2.9 0 0 0 1.392-.709c.367-.346.631-.792.755-1.307l.54-2.239c.051-.215.279-.35.507-.302.165.035.287.156.321.302zm2.492-7.074l.249 1.035a1.02 1.02 0 0 0 .297.508 1.12 1.12 0 0 0 .523.262l1.102.234c.229.048.373.262.321.476-.037.155-.166.269-.322.302l-1.102.234c-.21.045-.392.139-.532.27s-.241.304-.288.5l-.25 1.035c-.051.215-.279.35-.507.302-.165-.035-.287.156-.321.302l-.25-1.035c-.047-.197-.148-.368-.287-.5a1.12 1.12 0 0 0-.532-.27l-1.102-.234c-.229-.048-.373-.262-.321-.476.037-.155.166-.269.322-.302l1.102-.234a1.12 1.12 0 0 0 .54-.279 1.01 1.01 0 0 0 .279-.491l.25-1.035c.051-.215.279-.35.507-.302.165.035.287.156.321.302zM7.133 3.007l.38 1.576a1.73 1.73 0 0 0 .498.862l.018.018c.24.218.547.375.9.45l1.678.356c.229.048.372.262.321.476-.037.155-.166.269-.321.302l-1.678.357c-.362.077-.675.24-.918.467s-.415.523-.497.863l-.38 1.576c-.051.215-.279.35-.507.302-.165-.035-.287-.156-.321-.302l-.38-1.576a1.73 1.73 0 0 0-.498-.862
32c-.243-.228-.556-.391-.917-.468l-1.678-.357c-.229-.048-.373-.262-.321-.476.037-.155.166-.269.321-.302l1.678-.356a1.91 1.91 0 0 0 .917-.468l.019-.017a1.73 1.73 0 0 0 .479-.845l.38-1.576c.051-.215.279-.35.507-.302.165.035.287.156.321.302z" fill="currentColor" class="svelte-jfj5e2"></path></svg> <span class="ml-3 font-sans tracking-normal open-sans svelte-jfj5e2">Generate</span></div>'),jo=$('<main class="svelte-jfj5e2"><div class="svelte-jfj5e2"><div class="flex flex-no-wrap bg-rpGray-903 mt-[7vh] h-[95vh] 2xl:h-[96vh] items-center justify-between pt-2 svelte-jfj5e2"><div class="bg-rpGray-906 shadow-2xl h-[93vh] 2xl:h-[94vh] w-[70.3vw] mb-2 ml-2 2xl:-mt-2 2xl:w-[70.5vw] flex justify-between rounded-lg svelte-jfj5e2"><div class="container m-4 svelte-jfj5e2"><div class="hideImage svelte-jfj5e2" id="HideImage"><div class="container relative svelte-jfj5e2"><div class="absolute flex item-center justify-center w-[100%] h-[96%] border-0 lg:mt-4 svelte-jfj5e2" id="closeGeneratedImage" role="button" tabindex="0"><div class="absolute z-30 border-0 mt-3 p-1 pb-0 svelte-jfj5e2" id="imageView"><button aria-label="Download Image" class="svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="w-[28px] h-[28px] border bg-gray-950 border-gray-950 p-1 m-1 rounded svelte-jfj5e2"><path fill="#2b8091" d="M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" class="svelte-jfj5e2"></path></svg></button> <button aria-label="Show Image Information" class="svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512" class="w-[28px] h-[28px] border bg-gray-950 border-gray-950 p-1 m-1 rounded svelte-jfj5e2"><path fill="#2b8091" d="M48 80a48 48 0 1 1 96 0A48 48 0 1 1 48 80zM0 224c0-17.7 14.3-32 32-32H96c17.7 0 32 14.3 32 32V448h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H64V256H32c-17.7 0-32-14.3-32-32z" class="svelte-jfj5e2"></path></svg></button> <div class="absolute w-[30vw] border-0 h-fit p-3 rounded bg-rpGray-900 text-sm svelte-jfj5e2" id="imageInfoData_"><p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Prompt</span> </p> <p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Negative Prompt</span> </p> <p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Control Weight</span> </p> <p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Prompt Weight</span> </p> <p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Seed</span> </p> <p class="text-white svelte-jfj5e2"><span class="text-our-blue2 svelte-jfj5e2">Type</span> </p></div> <button aria-label="Replicate Image Data" class="svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" class="w-[28px] h-[28px] border bg-gray-950 border-gray-950 p-1 m-1 rounded svelte-jfj5e2"><path fill="#2b8091" d="M0 241.1C0 161 65 96 145.1 96c38.5 0 75.4 15.3 102.6 42.5L320 210.7l72.2-72.2C419.5 111.3 456.4 96 494.9 96C575 96 640 161 640 241.1v29.7C640 351 575 416 494.9 416c-38.5 0-75.4-15.3-102.6-42.5L320 301.3l-72.2 72.2C220.5 400.7 183.6 416 145.1 416C65 416 0 351 0 270.9V241.1zM274.7 256l-72.2-72.2c-15.2-15.2-35.9-23.8-57.4-23.8C100.3 160 64 196.3 64 241.1v29.7c0 44.8 36.3 81.1 81.1 81.1c21.5 0 42.2-8.5 57.4-23.8L274.7 256zm90.5 0l72.2 72.2c15.2 15.2 35.9 23.8 57.4 23.8c44.8 0 81.1-36.3 81.1-81.1V241.1c0-44.8-36.3-81.1-81.1-81.1c-21.5 0-42.2 8.5-57.4 23.8L365.3 256z" class="svelte-jfj5e2"></path></svg></button> <button aria-label="Show Paint Interface" class="svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" class="w-[28px] h-[28px] border bg-gray-950 border-gray-950 p-1 m-1 rounded svelte-jfj5e2" viewBox="0 0 576 512"><path fill="#2b8091" d="M339.3 367.1c27.3-3.9 51.9-19.4 67.2-42.9L568.2 74.1c12.6-19.5 9.4-45.3-7.6-61.2S517.7-4.4 499.1 9.6L262.4 187.2c-24 18-38.2 46.1-38.4 76.1L339.3 367.1zm-19.6 25.4l-116-104.4C143.9 290.3 96 339.6 96 400c0 3.9 .2 7.8 .6 11.6C98.4 429.1 86.4 448 68.8 448H64c-17.7 0-32 14.3-32 32s14.3 32 32 32H208c61.9 0 112-50.1 112-112c0-2.5-.1-5-.2-7.5z" class="svelte-jfj5e2"></path></svg></button> <button class="w-fit h-fit svelte-jfj5e2" id="closeGeneratedImageBtn" aria-label="Close Image Viewport"><svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" class="w-[28px] h-[28px] border bg-gray-950 border-gray-950 p-1 m-1 rounded svelte-jfj5e2" viewBox="0 0 384 512"><path fill="#2b8091" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" class="svelte-jfj5e2"></path></svg></button></div>  <div class="absolute z-20 border-0 border-red-500 h-full w-[96%] svelte-jfj5e2" id="paintView"><svg class="h-full w-full svgPaint border-0 border-yellow-200 svelte-jfj5e2" role="button" tabindex="0"></svg> <div class="p-2 h-[3vh] flex flex-col items-center justify-around -mt-[10vh] w-full svelte-jfj5e2"><div class="flex items-center justify-between px-[15vw] mb-2 w-full svelte-jfj5e2"><label for="brushSize" class="text-white text-xs ml-2 svelte-jfj5e2">Brush Size:</label> <input type="range" min="1" max="100" name="brushSize" class="w-[25%] svelte-jfj5e2"/> <span class="text-white svelte-jfj5e2"> </span> <span class="font-extrabold bg-our-blue2 ml-5 w-[0.2vw] h-[3vh] rounded svelte-jfj5e2"></span> <label class="text-white text-xs ml-5 svelte-jfj5e2" for="eraser">Eraser Size:</label> <input type="range" min="1" max="100" name="eraser" class="slider w-[25%] svelte-jfj5e2"/> <span class="text-white svelte-jfj5e2"> </span></div> <div class="flex items-center justify-center svelte-jfj5e2"><!> <button class="border p-1 font-semibold text-white rounded mx-1 svelte-jfj5e2" aria-label="Undo Action"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="w-[20px] h-[20px] svelte-jfj5e2"><path fill="#2a74ac" d="M48.5 224H40c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H48.5z" class="svelte-jfj5e2"></path></svg></button> <button class="border p-1 font-semibold text-white rounded mx-1 svelte-jfj5e2" aria-label="Redo Action"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="w-[20px] h-[20px] -rotate-180 svelte-jfj5e2"><path fill="#2a74ac" d="M48.5 224H40c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H48.5z" class="svelte-jfj5e2"></path></svg></button> <button class="border p-1 font-semibold text-white rounded mx-1 svelte-jfj5e2" aria-label="Toggle Eraser Mode"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="w-[20px] h-[20px] svelte-jfj5e2"><path fill="#195685" d="M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l8
320 80c12 12 28.3 18.7 45.3 18.7H288h9.4H512c17.7 0 32-14.3 32-32s-14.3-32-32-32H387.9L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416H288l-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z" class="svelte-jfj5e2"></path></svg></button> <button class="border p-1 font-semibold text-white rounded mx-1 svelte-jfj5e2" aria-label="Activate Lasso Tool"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="w-[20px] h-[20px] svelte-jfj5e2"><path fill="#175787" d="M96 151.4V360.6c9.7 5.6 17.8 13.7 23.4 23.4H328.6c0-.1 .1-.2 .1-.3l-4.5-7.9-32-56 0 0c-1.4 .1-2.8 .1-4.2 .1c-35.3 0-64-28.7-64-64s28.7-64 64-64c1.4 0 2.8 0 4.2 .1l0 0 32-56 4.5-7.9-.1-.3H119.4c-5.6 9.7-13.7 17.8-23.4 23.4zM384.3 352c35.2 .2 63.7 28.7 63.7 64c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32H119.4c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4V151.4C12.9 140.4 0 119.7 0 96C0 60.7 28.7 32 64 32c23.7 0 44.4 12.9 55.4 32H328.6c11.1-19.1 31.7-32 55.4-32c35.3 0 64 28.7 64 64c0 35.3-28.5 63.8-63.7 64l-4.5 7.9-32 56-2.3 4c4.2 8.5 6.5 18 6.5 28.1s-2.3 19.6-6.5 28.1l2.3 4 32 56 4.5 7.9z" class="svelte-jfj5e2"></path></svg></button> <button class="border p-1 font-semibold text-sm text-our-blue1 rounded mx-1 svelte-jfj5e2">Save Mask</button> <button class="border p-1 font-semibold text-sm text-our-blue1 rounded mx-1 svelte-jfj5e2">clear</button></div></div></div>  <img src="" id="showPromptImageGeneration" alt="" class="h-full w-[96%] absolute border-0 border-red-600 rounded svelte-jfj5e2"/></div> <div class="hideImage svelte-jfj5e2" id="HideImage"><!></div></div></div></div></div> <div id="Sidebar_" class="w-[28vw] md:w-[28vw] lg:w-[28vw] md:max-h-[93vh] lg:max-h-[93vh] 2xl:max-h-[94vh] md:min-h-[93vh] lg:min-h-[93vh] 2xl:min-h-[94vh] sm:relative flex-col justify-between items-center hidden sm:flex bg-rpGray-906 shadow-2xl md:pl-5 p-4 mr-2 2xl:-mr-[.10px] mt-0 2xl:-mt-2 mb-2 ml-2 rounded-lg svelte-jfj5e2"><div id="overflowStyle" class="overflow-y-scroll no_scrollbar2 min-w-[26vw] svelte-jfj5e2"><div class=" w-full md:w-[26.5vw] md:m-auto mt-0 p-2 rounded-l flex flex-col justify-between border-0 border-gray-900 bg-rpGray-909 shadow-2xl svelte-jfj5e2"><div class=" h-full flex flex-col items-center svelte-jfj5e2"><button class=" w-full flex justify-between items-center p-2 border-0 text-white rounded border-rpGray-300 mt-0 bg-rpGray-903 svelte-jfj5e2"><div class=" flex justify-between w-full svelte-jfj5e2"><div class="flex justify-between items-center svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" height="20" width="20" class="svelte-jfj5e2"><path d="M407.9 319.9l-230.8-2.9a4.6 4.6 0 0 1 -3.6-1.9 4.6 4.6 0 0 1 -.5-4.1 6.1 6.1 0 0 1 5.4-4.1L411.3 303.9c27.6-1.3 57.5-23.6 68-50.8l13.3-34.5a7.9 7.9 0 0 0 .5-2.9 7.7 7.7 0 0 0 -.2-1.6A151.9 151.9 0 0 0 201.3 198.4 68.1 68.1 0 0 0 94.2 269.6C41.9 271.1 0 313.7 0 366.1a96.1 96.1 0 0 0 1 14 4.5 4.5 0 0 0 4.4 3.9l426.1 .1c0 0 .1 0 .1 0a5.6 5.6 0 0 0 5.3-4l3.3-11.3c3.9-13.4 2.4-25.8-4.1-34.9C430.1 325.4 420.1 320.5 407.9 319.9zM513.9 221.1c-2.1 0-4.3 .1-6.4 .2a3.8 3.8 0 0 0 -3.3 2.7l-9.1 31.2c-3.9 13.4-2.4 25.8 4.1 34.9 6 8.4 16.1 13.3 28.2 13.9l49.2 2.9a4.5 4.5 0 0 1 3.5 1.9 4.6 4.6 0 0 1 .5 4.2 6.2 6.2 0 0 1 -5.4 4.1l-51.1 2.9c-27.8 1.3-57.7 23.6-68.1 50.8l-3.7 9.6a2.7 2.7 0 0 0 2.4 3.7c0 0 .1 0 .1 0h175.9a4.7 4.7 0 0 0 4.5-3.4 124.8 124.8 0 0 0 4.7-34C640 277.3 583.5 221.1 513.9 221.1z" class="svelte-jfj5e2"></path></svg> <span class="text-[1rem] text-gray-200 ml-2 font-sans tracking-wider open-sans svelte-jfj5e2">Cloud Save Path</span></div> <div class="svelte-jfj5e2"><!></div></div></button> <!></div></div> <div class=" w-full md:w-[26.5vw] md:m-auto md:mt-2 mt-1.5 p-2 rounded-l flex flex-col justify-between border-0 border-gray-900 bg-rpGray-909 shadow-2xl svelte-jfj5e2"><div class=" h-full flex flex-col items-center svelte-jfj5e2"><button class=" w-full flex justify-between items-center p-2 border-0 text-white rounded border-rpGray-300 mt-0 bg-rpGray-903 svelte-jfj5e2"><div class=" flex justify-between w-full svelte-jfj5e2"><div class="flex justify-between items-center svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" height="20px" width="20px" class="mt-1 svelte-jfj5e2"><path fill="#f8f9fc" d="M112 0C99.1 0 87.4 7.8 82.5 19.7l-66.7 160-13.3 32c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L66.7 224h90.7l5.1 12.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8l-13.3-32-66.7-160C136.6 7.8 124.9 0 112 0zm18.7 160H93.3L112 115.2 130.7 160zM256 32v96 96c0 17.7 14.3 32 32 32h80c44.2 0 80-35.8 80-80c0-23.1-9.8-43.8-25.4-58.4c6-11.2 9.4-24 9.4-37.6c0-44.2-35.8-80-80-80H288c-17.7 0-32 14.3-32 32zm96 64H320V64h32c8.8 0 16 7.2 16 16s-7.2 16-16 16zm-32 64h32 16c8.8 0 16 7.2 16 16s-7.2 16-16 16H320V160zM566.6 310.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L352 434.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l192-192z" class="svelte-jfj5e2"></path></svg> <span class="text-[1rem] text-gray-200 ml-2 font-sans tracking-wider open-sans svelte-jfj5e2">Prompts</span></div> <div class="svelte-jfj5e2"><!></div></div></button> <!></div></div> <div class="overflow-scroll no-scrollbar w-full md:w-[26.5vw] md:m-auto md:mt-2 mt-1.5 p-2 rounded-l flex flex-col justify-between items-center bg-rpGray-909 border-0 border-gray-900 shadow-2xl svelte-jfj5e2"><button class="w-full flex justify-between items-center p-2 border-0 text-white rounded border-gray-500 mt-0 bg-rpGray-903 svelte-jfj5e2"><div class="flex justify-between items-center svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="1.25em" viewBox="0 0 512 512" class="svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#f9fafb}</style><path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.
326 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z" class="svelte-jfj5e2"></path></svg> <span class="text-[1rem] text-gray-200 ml-2 font-sans tracking-wider open-sans svelte-jfj5e2">Settings</span></div> <!></button> <!></div> <div class="w-full mt-1.5 p-2 rounded-l flex flex-col justify-between border-0 bg-rpGray-909 border-gray-900 shadow-2xl open-sans svelte-jfj5e2"><button class="w-full flex justify-between items-center p-2 border-0 text-white rounded border-gray-500 mt-0 bg-rpGray-903 svelte-jfj5e2"><div class="flex justify-between items-cente svelte-jfj5e2"><svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 576 512" class="mt-1.5 svelte-jfj5e2"><style class="svelte-jfj5e2">svg{fill:#f0f2f4}</style><path d="M160 32c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H160zM396 138.7l96 144c4.9 7.4 5.4 16.8 1.2 24.6S480.9 320 472 320H328 280 200c-9.2 0-17.6-5.3-21.6-13.6s-2.9-18.2 2.9-25.4l64-80c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l17.3 21.6 56-84C360.5 132 368 128 376 128s15.5 4 20 10.7zM192 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120V344c0 75.1 60.9 136 136 136H456c13.3 0 24-10.7 24-24s-10.7-24-24-24H136c-48.6 0-88-39.4-88-88V120z" class="svelte-jfj5e2"></path></svg> <span class="text-[1rem] text-gray-200 ml-2 mt-0.5 font-sans tracking-wider svelte-jfj5e2">Generated Images</span></div> <!></button> <!></div></div> <button class="text-white bg-rpGray-903 transition ease-in-out delay-150 hover:bg-our-blue2 p-2 mt-5 sticky verticalText shadow-inner flex rounded-md justify-center text-lg text-center items-center w-[104%] lg:w-[104%] 2xl:w-[102%] md:w-[112%] svelte-jfj5e2"><div class=" flex justify-around items-center svelte-jfj5e2"><!> <div class="py-12 absolute -mt-[21vh] ml-[8vw] svelte-jfj5e2" id="hideR"><div class="mx-auto container max-w-[228px] px-4 py-4 bg-rpGray-900 rounded relative svelte-jfj5e2"><div class="flex gap-2 svelte-jfj5e2"><svg class="w-4 h-4 svelte-jfj5e2" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.75 2C4.57469 2 2 4.57469 2 7.75C2 10.9253 4.57469 13.5 7.75 13.5C10.9253 13.5 13.5 10.9253 13.5 7.75C13.5 4.57469 10.9253 2 7.75 2Z" stroke="#1F2937" stroke-miterlimit="10" class="svelte-jfj5e2"></path><path d="M6.875 6.875H7.875V10.5" stroke="#1F2937" stroke-linecap="round" stroke-linejoin="round" class="svelte-jfj5e2"></path><path d="M6.5 10.625H9.25" stroke="#1F2937" stroke-miterlimit="10" stroke-linecap="round" class="svelte-jfj5e2"></path><path d="M7.75 4.0625C7.5893 4.0625 7.43222 4.11015 7.2986 4.19943C7.16499 4.28871 7.06084 4.41561 6.99935 4.56407C6.93785 4.71254 6.92176 4.8759 6.95311 5.03351C6.98446 5.19112 7.06185 5.3359 7.17548 5.44953C7.28911 5.56316 7.43388 5.64054 7.59149 5.67189C7.7491 5.70324 7.91247 5.68715 8.06093 5.62566C8.2094 5.56416 8.3363 5.46002 8.42557 5.3264C8.51485 5.19279 8.5625 5.0357 8.5625 4.875C8.5625 4.65951 8.4769 4.45285 8.32453 4.30048C8.17215 4.1481 7.96549 4.0625 7.75 4.0625Z" fill="#1F2937" class="svelte-jfj5e2"></path></svg> <p class="text-sm leading-none text-gray-200 svelte-jfj5e2">GenAi-Credits</p></div> <p class=" text-xs leading-none text-gray-400 pt-2 pb-2 text-left svelte-jfj5e2">Remaining GenAi-credits for generating images.</p> <div class=" pt-3 svelte-jfj5e2"><div class="text-xs font-medium leading-3 text-center text-white px-3 py-2 bg-rpGray-906 rounded-md w-full hover:text-rpGray-900 hover:bg-our-blue2 transform duration-300 ease-in-out svelte-jfj5e2">Buy More Credits</div></div> <svg class="absolute left-48 z-10 bottom-[-10px] svelte-jfj5e2" width="16" height="10" viewB
32ox="0 0 16 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 10L0 0L16 1.41326e-06L8 10Z" fill="black" class="svelte-jfj5e2"></path></svg></div></div> <div id="showR" class="border border-gray-800 text-gray-300 rounded-sm text-xs w-fit p-1 h-fit absolute ml-[20vw] svelte-jfj5e2"> </div></div></button></div></div></div></main>');function Yo(e,t){mn(t,!1);const s=()=>Dt(Xs,"$isUserLoggedIn",l),i=()=>Dt(Zs,"$loggedInUser",l),r=()=>Dt(Ar,"$ImageThree_D_Data",l),[l,h]=wn(),d=O(),c=O();let u=O(!0),w=O(!1),j=O(!1),L=O(!0),z=O(!0),U=O(0),ee=null,oe=O([]),W=O(0),X=O(0),q=O(0),Z=O(!1),H=O("-1"),Ie,Y,le,Be,We,$e=O(!1),Qe=O(),xe,je,Le=O(),Ke=O(),ne=O(),ae=O(),ie=O(),he=O(),Re=O();function Ge(){g(Z,!1)}async function Ve(){const n=await fetch("/api/creditsR",{method:"POST",headers:{"Content-Type":"application/json",Authorization:i().id_token},body:JSON.stringify({user_id:i().user_id})});g(U,await n.json())}vn(()=>{Ve();const n=document.getElementById("showR"),o=document.getElementById("hideR");n&&o&&(n.addEventListener("mouseover",function(){o.style.display="block"}),o.addEventListener("mouseout",function(k){o.contains(k.relatedTarget)||(o.style.display="none")}));let C="";function B(){const k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let I=0;I<32;I++){const V=Math.floor(Math.random()*k.length);C+=k.charAt(V),(I===7||I===11||I===15||I===19)&&(C+="")}return C}je=B(),console.log("session_idGuid",je),document.addEventListener("keydown",function(k){(k.ctrlKey||k.metaKey)&&(k.key==="z"||k.key==="Z"?(k.preventDefault(),xn()()):(k.key==="y"||k.key==="Y")&&(k.preventDefault(),jn()()))}),rs(),Mn()});function Ce(n){if(n==="seed"){const o=document.getElementById("resetButton");o&&(o.value="")}else if(n==="seedM"){const o=document.getElementById("resetButtonM");o&&(o.value="")}else n==="ImagesNos"?g(q,0):n==="Prompt"?g(W,0):n==="Control"&&g(X,0)}function mt(){const n=Math.floor(Math.random()*4294967297),o=document.getElementById("resetButton");o&&(o.value=n.toString()),g(H,n.toString())}function kt(){const n=Math.floor(Math.random()*4294967297),o=document.getElementById("resetButtonM");o&&(o.value=n.toString()),g(H,n.toString())}function Et(n){const o=document.getElementById(n);o&&(o.value="",g(d,450))}function rt(n){const o=document.getElementById(n);o&&(o.value="",g(c,450))}let pt="";function Ct(n){ee=n;const o=document.getElementById("closeGeneratedImage");o&&(o.style.display="flex");const C=document.getElementById("closeGeneratedImageBtn");C&&(C.style.float="right");const B=document.getElementById("showPromptImageGeneration");B&&(B.src=ee);const k=document.getElementById("uploadIcon"),I=document.getElementById("filebg_label"),V=document.getElementById("imageType");V&&(V.style.display="none"),I&&(I.style.display="none"),k&&(k.style.display="none")}let ce=O(""),J=O(""),ke=450;function St(n){const o=n.target;a(ce).length>ke&&g(ce,o.value.slice(0,ke))}function st(n){const o=n.target;a(J).length>ke&&g(J,o.value.slice(0,ke))}let K=O(),me=O();function p(){g(K,a(K)==="depth"?null:"depth");const n=document.getElementById("ControlWeight_");n&&(Be=parseFloat(n.value),le=Be)}function G(){g(K,a(K)==="edge"?null:"edge");const n=document.getElementById("ControlWeight_");n&&(We=parseFloat(n.value),le=We)}let D=new Map;D.set(a(H),0);function te(n){D.has(n)?(D.set(n,D.get(n)+1),xe=D.get(n)):(D.set(n,1),xe=D.get(n))}async function b(){if(a(me)&&(a(K)==="depth"||a(K)==="edge")&&(g($e,!0),M(),a(K)==="depth"&&(a(me).applyDepthMaterial1(a(K)),setTimeout(()=>{M(),g(K,a(K)==="depth"?null:"depth"),a(me)&&a(me).applyDepthMaterial1(a(K))},5e-5)),a(K)==="edge"&&(a(me).toggleEdge1(a(K)),M(),g(K,a(K)==="edge"?null:"edge"),a(me)&&a(me).toggleEdge1(a(K))),g($e,!1)),!a(Z))if(g(Z,!0),g(w,!0),g(u,!1),g(L,!1),g(z,!1),g(j,!0),a(U)===0)Ks("/pricing");else{(a(H)===-1||a(H)==="-1"||a(H)==="")&&g(H,Math.floor(Math.random()*4294967297).toString()),Ie=a(W),Y=a(q),Y==0&&(Y=1),Ie==0&&(Ie=7),a(ce)==""&&g(ce,"realistic, cinematic lighting, photorealistic, hyper-realistic, 3d rendering, render, 8k, 16k, extremely detailed, unreal engine, octane, maya"),a(J)==""&&g(J,"blurry, (distorted), unrealistic, white floor, untextured, cars"),te(a(H)),console.log("GenerationIndex => ",xe);let n;try{g(Z,!0),g(j,!0),r()===""&&(console.log("blank triggered"),n={input:{width:1024,height:1024,seed:a(H),prompt:a(ce)||"action, movie, scene, hero, pose, great, cinematic realistic, cinematic lighting, photorealistic, hyper-realistic , 8k, 16k, extremely detailed",negative_prompt:a(J)||" blurry, (distorted), unrealistic, white floor, untextured",refine:"base_image_refiner",scheduler:"KarrasDPM",num_outputs:Y||1,refine_steps:20,guidance_scale:Ie,apply_watermark:!1,sizing_strategy:"width_height",num_inference_steps:30,controlnet_1:"none",controlnet_1_start:0,controlnet_1_end:1,controlnet_1_conditioning_scale:.8}}),a(K)==="depth"&&(console.log("depth triggered"),n={input:{width:1024,height:1024,seed:"5337491236108369920",prompt:a(ce)||"action, movie, scene, hero, pose, great, cinematic realistic, cinematic lighting, photorealistic, hyper-realistic , 8k, 16k, extremely detailed",negative_prompt:a(J)||" blurry, (distorted), unrealistic, white floor, untextured",refine:"base_image_refiner",scheduler:"KarrasDPM",num_outputs:Y||1,refine_steps:20,guidance_scale:7,apply_watermark:!1,sizing_strategy:"width_height",num_inference_steps:30,controlnet_1:"depth_leres",controlnet_1_start:0,controlnet_1_end:1,controlnet_1_conditioning_scale:le,controlnet_1_image:r()}}),a(K)==="edge"&&(console.log("edge triggered"),n={input:{width:1024,height:1024,seed:"5337491236108369920",prompt:a(ce)||"action, movie, scene, hero, pose, great, cinematic realistic, cinematic lighting, photorealistic, hyper-realistic , 8k, 16k, extremely detailed",negative_prompt:a(J)||" blurry, (distorted), unrealistic, white floor, untextured",refine:"base_image_refiner",scheduler:"KarrasDPM",num_outputs:Y||1,refine_steps:20,guidance_scale:7,apply_watermark:!1,sizing_strategy:"width_height",num_inference_steps:30,controlnet_2:"soft_edge_hed",controlnet_2_start:0,controlnet_2_end:1,controlnet_2_conditioning_scale:le,controlnet_2_image:r()}});const B=await(await fetch("/api/genai/startGenerations",{method:"POST",headers:{"Content-Type":"application/json",Authorization:i().id_token,user_id:i().user_id,requestedCredits:Y},body:JSON.stringify(n?.input)})).json();console.log("result -> ",B);const k=B.urls.get;if(console.log("receivedURL -> ",k),k){const I=await o(k);if(console.log("imageData -----> ",I),I){const V={Prompt:I.input.prompt,NegativePrompt:I.input.negative_prompt,PromptWeight:
32I.input.guidance_scale,ControlWeight:I.input.controlnet_1_conditioning_scale||I.input.controlnet_2_conditioning_scale,seed:I.input.seed,type:I.input.controlnet_1||I.input.controlnet_2,image:Array.isArray(I.output)?I.output:[I.output]};console.log("imageInfoData -----> ",V),g(oe,[...a(oe),V])}}}catch(C){console.error(C)}finally{g(Z,!1),g(j,!1)}async function o(C){return new Promise((B,k)=>{const I=setInterval(async()=>{try{const V=await fetch("/api/genai/getGenerations",{method:"post",headers:{"Content-Type":"application/json",Authorization:i().id_token,pollUrl:C,cloudFolderName:a(Qe),user_id:i().user_id,session_id:je,generatedAt:"synthia",generationIndex:xe}});if(V.ok){const Me=await V.json();console.log("GenAiImageData -> ",Me);const pe=Me.status;pe==="succeeded"?(clearInterval(I),B(Me),console.log("Generation Completed")):pe==="processing"||pe==="starting"?console.log("Still processing..."):(clearInterval(I),k(new Error("Unexpected status: "+pe)))}else throw new Error("Network response was not ok.")}catch(V){clearInterval(I),k(V)}},5e3)})}}}function x(){const n=document.getElementById("closeGeneratedImage");n&&(n.style.display="none")}function M(){a(me)&&a(me).cameraTrig()}function E(){const n=document.getElementById("imageView");n&&(n.style.display="block")}function y(){const n=document.getElementById("imageView");n&&(n.style.display="none")}function _(n){console.log("iData showImageGeneratedInfo -> ",n);const o=document.getElementById("imageInfoData_");o&&(window.getComputedStyle(o).getPropertyValue("display")==="none"?o.style.display="block":o.style.display="none"),g(Ke,n.Prompt),g(ne,n.NegativePrompt),g(ae,n.PromptWeight),g(ie,n.ControlWeight),g(he,n.seed),g(Re,n.type)}async function A(n){console.log("iData downloadImage -> ",n);const C=await(await fetch(n)).blob(),B=URL.createObjectURL(C),k=document.createElement("a");k.href=B,k.download="download",document.body.appendChild(k),k.click(),document.body.removeChild(k)}async function N(n){console.log("handleReplicateImage -> ",n),g(ce,n.Prompt),g(J,n.NegativePrompt),g(W,n.PromptWeight),g(X,n.ControlWeight),g(H,n.seed),g(K,n.type)}let re=O(200),se=2900,S=[],P=O({isDrawing:!1,currentSegment:null,currentPath:null}),de=O(),Se=O("rgba(0, 0, 0, 1)"),Te=!1,He=O(20),at,ue=[],Ne=!1,it,Q;function Vr(n){!Te&&!Ne?(Ue(P,a(P).isDrawing=!0),Ue(P,a(P).currentSegment=[[n.offsetX,n.offsetY,a(Se),a(_e)]]),Ue(P,a(P).currentPath=Xe(a(de)).append("path").style("stroke-width",a(_e).toString()).style("fill","none").attr("stroke",a(Se)).style("stroke-linecap","round"))):Ne&&$r(n)}function Hr(n){Te?(es(n.offsetX,n.offsetY),ns(n.offsetX,n.offsetY)):a(P).isDrawing&&a(P).currentSegment&&a(P).currentPath?(a(P).currentSegment.push([n.offsetX,n.offsetY,a(Se),a(_e)]),a(P).currentPath.datum(a(P).currentSegment).attr("d",sn().x(o=>o[0]).y(o=>o[1]).curve(Mr)).style("stroke-width",a(_e).toString())):Ne&&Kr(n)}function Fr(){!Te&&!Ne&&a(P).isDrawing&&a(P).currentSegment?(S.push(a(P).currentSegment),Zr({action:"draw",segment:a(P).currentSegment}),Ue(P,a(P).isDrawing=!1),Ue(P,a(P).currentSegment=null),Ue(P,a(P).currentPath=null),Mn(),qe()):Te?Ln():Ne&&Yr()}function Ur(){const n=document.getElementById("paintView");if(n){const o=window.getComputedStyle(n).getPropertyValue("display");n.style.display=o==="none"?"block":"none"}}function Tt(){Ne=!0,ue=[],Ue(de,a(de).style.cursor="crosshair")}function Yr(){Ne=!1,Ue(de,a(de).style.cursor="default"),ue.length>0&&(Wr(),ue=[],Xe(a(de)).selectAll(".lasso").remove())}function Wr(){if(!(ue.length<3)){Q.fillStyle="black",Q.fillRect(0,0,a(re),se),Q.fillStyle="white",Q.beginPath(),Q.moveTo(ue[0][0],ue[0][1]);for(let n=1;n<ue.length;n++)Q.lineTo(ue[n][0],ue[n][1]);Q.closePath(),Q.fill(),An()()}}function $r(n){Ne&&ue.push([n.offsetX,n.offsetY])}function Kr(n){if(Ne&&ue.length>0){let o=ue[ue.length-1],C=[n.offsetX,n.offsetY];Math.hypot(C[0]-o[0],C[1]-o[1])>5&&ue.push(C),qe(),Xr()}}function Xr(){Xe(a(de)).selectAll(".lasso").remove(),Xe(a(de)).append("path").attr("class","lasso").style("stroke","blue").style("stroke-width",2).style("fill","none").attr("d",sn()(ue))}class bn{items=[];constructor(){this.items=[]}add(o){return this.items.push(o)}remove(){if(this.items.length>0)return this.items.pop()}peek(){return this.items[this.items.length-1]}isEmpty(){return this.items.length==0}size(){return this.items.length}clear(){this.items=[]}}let ot=new bn,lt=new bn;function Zr(n){ot.add(n),lt.clear()}let xn=Ye(t,"undo",8,()=>{if(!ot.isEmpty()){let n=ot.remove();lt.add(n),n.action==="draw"?S.pop():n.action==="erase"?S.push(...n.segments):n.action==="lasso"&&S.push(...n.segments),qe()}}),jn=Ye(t,"redo",8,()=>{if(!lt.isEmpty()){let n=lt.remove();ot.add(n),n.action==="draw"?S.push(n.segment):n.action==="erase"?S=S.filter(o=>!n.segments.includes(o)):n.action==="lasso"&&(S=S.filter(o=>!n.segments.includes(o))),qe()}}),Qr=Ye(t,"clearPaint",8,()=>{ot.clear(),lt.clear(),S=[],qe()}),qr=Ye(t,"startEraseMode",8,()=>{Te?Ln():(Te=!0,Jr())});function Ln(){Te=!1,ts()}function Jr(){at=Xe(a(de)).append("rect").attr("width",a(_e)).attr("height",a(_e)).attr("fill","rgba(255, 0, 0, 0.3)").attr("pointer-events","none")}
32function es(n,o){at.attr("x",n-a(_e)/2).attr("y",o-a(_e)/2)}function ts(){at&&(at.remove(),at=null)}function ns(n,o){let C={x1:n-a(He)/2,y1:o-a(He)/2,x2:n+a(He)/2,y2:o+a(He)/2},B=[];S.forEach(k=>{let I=[];k.forEach(V=>{V[0]<C.x1||V[0]>C.x2||V[1]<C.y1||V[1]>C.y2?I.push(V):I.length>0&&(B.push(I),I=[])}),I.length>0&&B.push(I)}),S=B,qe()}function rs(){it=document.createElement("canvas"),it.width=800,it.height=800,Q=it.getContext("2d"),Q.fillStyle="black",Q.fillRect(0,0,a(re),se)}let _e=O(10);function Mn(){Q.fillStyle="black",Q.fillRect(0,0,a(re),se),Q.lineJoin="round",Q.lineCap="round";for(let n of S)if(n.length>0){Q.beginPath(),Q.moveTo(n[0][0],n[0][1]),Q.lineWidth=n[0][3],Q.strokeStyle="white";for(let o=1;o<n.length;o++)Q.lineTo(n[o][0],n[o][1]);Q.stroke()}}let An=Ye(t,"saveMask",8,()=>{let n=it.toDataURL(),o=document.createElement("a");o.download="mask.png",o.href=n,o.click()});function qe(){Xe(a(de)).selectAll("*").remove(),S.forEach(n=>{Xe(a(de)).append("path").style("stroke-width",n[0][3]).style("fill","none").attr("stroke",n[0][2]).style("stroke-linecap","round").datum(n).attr("d",sn().x(o=>o[0]).y(o=>o[1]).curve(Mr))})}jt(()=>s(),()=>{s()&&Ve()}),jt(()=>a(ce),()=>{g(d,Math.max(0,ke-a(ce).length))}),jt(()=>a(J),()=>{g(c,ke-a(J).length)}),jt(()=>(a(P),a(Se)),()=>{a(P).currentPath&&a(P).currentPath.attr("stroke",a(Se))}),Ys();var ss={applyDepthMaterial2:p,toggleEdge2:G,startLassoMode:Tt};gn();var Nt=jo(),Dn=v(Nt),In=v(Dn),Pt=v(In),kn=v(Pt),En=v(kn),Cn=v(En),Je=v(Cn),zt=v(Je),Sn=v(zt),Tn=m(Sn,2),Ot=m(Tn,2),Bt=v(Ot),as=m(v(Bt));f(Bt);var Rt=m(Bt,2),is=m(v(Rt));f(Rt);var Gt=m(Rt,2),os=m(v(Gt));f(Gt);var Vt=m(Gt,2),ls=m(v(Vt));f(Vt);var Ht=m(Vt,2),cs=m(v(Ht));f(Ht);var Nn=m(Ht,2),ds=m(v(Nn));f(Nn),f(Ot);var Pn=m(Ot,2),zn=m(Pn,2),us=m(zn,2);f(zt);var On=m(zt,2),ct=v(On);dn(ct,n=>g(de,n),()=>a(de));var Bn=m(ct,2),Ft=v(Bn),gt=m(v(Ft),2);ve(gt);var Ut=m(gt,2),fs=v(Ut,!0);f(Ut);var wt=m(Ut,6);ve(wt);var Rn=m(wt,2),hs=v(Rn,!0);f(Rn),f(Ft);var Gn=m(Ft,2),Vn=v(Gn);ro(Vn,{get color(){return a(Se)},set color(n){g(Se,n)},$$legacy:!0});var Hn=m(Vn,2),Fn=m(Hn,2),Un=m(Fn,2),Yn=m(Un,2),Wn=m(Yn,2),vs=m(Wn,2);f(Gn),f(Bn),f(On),nn(2),f(Je);var $n=m(Je,2),ms=v($n);{var ps=n=>{var o=so(),C=v(o),B=v(C),k=v(B);f(B),f(C),f(o),nt(()=>vt(k,"src",`data:image/png;base64,${r()}`)),F(n,o)},gs=n=>{var o=ao(),C=v(o);dn(da(C,{$$legacy:!0}),B=>g(me,B),()=>a(me)),f(o),F(n,o)};we(ms,n=>{a($e)?n(ps):n(gs,!1)})}f($n),f(Cn),f(En),f(kn),f(Pt);var Kn=m(Pt,2),Yt=v(Kn),Wt=v(Yt),Xn=v(Wt),_t=v(Xn),Zn=v(_t),Qn=m(v(Zn),2),ws=v(Qn);{var _s=n=>{var o=io();F(n,o)},ys=n=>{var o=oo();F(n,o)};we(ws,n=>{a(z)?n(_s):n(ys,!1)})}f(Qn),f(Zn),f(_t);var bs=m(_t,2);{var xs=n=>{var o=lo(),C=v(o),B=v(C);ve(B),f(C),f(o),ge(B,()=>a(Qe),k=>g(Qe,k)),F(n,o)};we(bs,n=>{a(z)&&n(xs)})}f(Xn),f(Wt);var $t=m(Wt,2),qn=v($t),yt=v(qn),Jn=v(yt),er=m(v(Jn),2),js=v(er);{var Ls=n=>{var o=co();F(n,o)},Ms=n=>{var o=uo();F(n,o)};we(js,n=>{a(L)?n(Ls):n(Ms,!1)})}f(er),f(Jn),f(yt);var As=m(yt,2);{var Ds=n=>{var o=fo(),C=ht(o),B=v(C),k=v(B);hr(k);var I=m(k,2);f(B);var V=m(B,2),Me=v(V);f(V),f(C);var pe=m(C,2),Ee=v(pe),Ae=v(Ee);hr(Ae);var dt=m(Ae,2);f(Ee);var Fe=m(Ee,2),Pe=v(Fe);f(Fe),f(pe),nt(()=>{De(Me,`${a(d)??""}/450`),De(Pe,`${a(c)??""}/450`)}),ge(k,()=>a(ce),ze=>g(ce,ze)),T("input",k,St),T("click",I,()=>Et("positiveIn")),ge(Ae,()=>a(J),ze=>g(J,ze)),T("input",Ae,st),T("click",dt,()=>rt("negativeIn")),F(n,o)};we(As,n=>{a(L)&&n(Ds)})}f(qn),f($t);var Kt=m($t,2),bt=v(Kt),Is=m(v(bt),2);{var ks=n=>{var o=ho();F(n,o)},Es=n=>{var o=vo();F(n,o)};we(Is,n=>{a(u)?n(ks):n(Es,!1)})}f(bt);var Cs=m(bt,2);{var Ss=n=>{var o=mo(),C=v(o),B=v(C),k=m(v(B),2),I=v(k);ve(I);var V=m(I,2);f(k),f(B);var Me=m(B,2);ve(Me);var pe=m(Me,2),Ee=m(v(pe),2),Ae=v(Ee);ve(Ae);var dt=m(Ae,2);f(Ee),f(pe);var Fe=m(pe,2);ve(Fe);var Pe=m(Fe,2),ze=m(v(Pe),2),ut=v(ze);ve(ut);var Zt=m(ut,2);f(ze),f(Pe);var et=m(Pe,2);ve(et),f(C);var Oe=m(C,2),ft=m(v(Oe),2);ve(ft);var ar=m(ft,2),Hs=m(ar,2);f(Oe);var Qt=m(Oe,2),ir=v(Qt),qt=v(ir),or=m(v(qt),2),lr=v(or),Fs=m(lr,2);f(or),f(qt);var cr=m(qt,2);ve(cr),f(ir),f(Qt);var dr=m(Qt,2),ur=v(dr),Jt=v(ur),en=v(Jt);ve(en),nn(2),f(Jt);var fr=m(Jt,2),tn=v(fr);ve(tn),nn(2),f(fr),f(ur),f(dr),f(o),nt(()=>{cn(en,a(K)==="edge"),cn(tn,a(K)==="depth")}),ge(I,()=>a(W),fe=>g(W,fe)),T("click",V,()=>Ce("Prompt")),ge(Me,()=>
32a(W),fe=>g(W,fe)),ge(Ae,()=>a(X),fe=>g(X,fe)),T("click",dt,()=>Ce("Control")),ge(Fe,()=>a(X),fe=>g(X,fe)),ge(ut,()=>a(q),fe=>g(q,fe)),T("click",Zt,()=>Ce("ImagesNos")),ge(et,()=>a(q),fe=>g(q,fe)),ge(ft,()=>a(H),fe=>g(H,fe)),T("click",ar,mt),T("click",Hs,()=>Ce("seed")),T("click",lr,kt),T("click",Fs,()=>Ce("seedM")),ge(cr,()=>a(H),fe=>g(H,fe)),T("click",en,G),T("click",tn,p),F(n,o)};we(Cs,n=>{a(u)&&n(Ss)})}f(Kt);var tr=m(Kt,2),xt=v(tr),Ts=m(v(xt),2);{var Ns=n=>{var o=po();F(n,o)},Ps=n=>{var o=go();F(n,o)};we(Ts,n=>{a(w)?n(Ns):n(Ps,!1)})}f(xt);var zs=m(xt,2);{var Os=n=>{var o=rn(),C=ht(o);{var B=I=>{var V=wo();F(I,V)},k=I=>{var V=yo(),Me=v(V);{var pe=Ee=>{var Ae=rn(),dt=ht(Ae);on(dt,1,()=>a(oe),ln,(Fe,Pe)=>{var ze=rn(),ut=ht(ze);on(ut,1,()=>(a(Pe),an(()=>a(Pe).image)),ln,(Zt,et)=>{var Oe=_o(),ft=v(Oe);f(Oe),nt(()=>{vt(Oe,"href",a(et)),vt(ft,"src",a(et))}),T("click",Oe,$s(()=>{g(Le,a(Pe)),Ct(a(et))})),F(Zt,Oe)}),F(Fe,ze)}),F(Ee,Ae)};we(Me,Ee=>{a(oe),an(()=>a(oe).length>0)&&Ee(pe)})}f(V),F(I,V)};we(C,I=>{a(j)===!0?I(B):I(k,!1)})}F(n,o)};we(zs,n=>{a(w)&&n(Os)})}f(tr),f(Yt);var Xt=m(Yt,2),nr=v(Xt),rr=v(nr);{var Bs=n=>{var o=bo();F(n,o)},Rs=n=>{var o=xo();F(n,o)};we(rr,n=>{a(Z)?n(Bs):n(Rs,!1)})}var sr=m(rr,4),Gs=v(sr,!0);f(sr),f(nr),f(Xt),f(Kn),f(In),f(Dn),f(Nt),nt(()=>{De(as,` - ${a(Ke)??""}`),De(is,` - ${a(ne)??""}`),De(os,` - ${a(ie)??""}`),De(ls,` - ${a(ae)??""}`),De(cs,` - ${a(he)??""}`),De(ds,` - ${a(Re)??""}`),De(fs,a(_e)),De(hs,a(He)),De(Gs,a(U))}),T("click",Sn,()=>A(pt)),T("click",Tn,()=>_(a(Le))),T("click",Pn,()=>N(a(Le))),T("click",zn,Ur),T("click",us,x),T("mousemove",ct,n=>Hr(n)),T("mousedown",ct,n=>Vr(n)),T("mouseup",ct,Fr),ge(gt,()=>a(_e),n=>g(_e,n)),T("input",gt,n=>g(_e,+n.target.value)),ge(wt,()=>a(He),n=>g(He,n)),T("input",wt,n=>g(He,+n.target.value)),T("click",Hn,function(...n){xn()?.apply(this,n)}),T("click",Fn,function(...n){jn()?.apply(this,n)}),T("click",Un,function(...n){qr()?.apply(this,n)}),T("click",Yn,Tt),T("click",Wn,function(...n){An()?.apply(this,n)}),T("click",vs,function(...n){Qr()?.apply(this,n)}),T("mouseenter",Je,E),T("mouseleave",Je,y),ra(Je,"clientWidth",n=>g(re,n)),T("click",_t,()=>g(z,!a(z))),T("click",yt,()=>g(L,!a(L))),T("click",bt,()=>{g(u,!a(u))}),T("click",xt,()=>g(w,!a(w))),T("click",Xt,function(...n){(a(Z)?Ge:b)?.apply(this,n)}),F(e,Nt),ye(t,"applyDepthMaterial2",p),ye(t,"toggleEdge2",G),ye(t,"startLassoMode",Tt);var Vs=pn(ss);return h(),Vs}export{Yo as component};

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.