PageSourceSearch

https://dubberkuro-myanmar-tts.hf.space/assets/Index-tpJ3a7iw.js

js dubberkuro-myanmar-tts.hf.space collected 2026-10-04 16:50:39 UTC 34,865 bytes, 1 lines download raw bytes

vendor: 6,998 bytes, line 1
1import{w as _t,p as g,e as Re,s as Ie,d as be,b as ze,f as Xe,l as Ve,c as ft,S as mt,C as pt,i as te,q as vt,m as bt,r as wt,g as qe}from"./i18n-D-XRiFon.js";import{R as ye,aa as Ge,w as l,a1 as we,G as S,a2 as He,Z as tt,aw as yt,V as ie,Y as ne,X as V,a8 as xt,x as D,t as Me,a as A,T as xe,a3 as $,U as _,W as Z,a4 as Ce,M as Ne,_ as zt,S as re,z as T,ad as N,a6 as ve,u as je,a5 as de}from"./index-iG-u5S-q.js";import{G as Yt}from"./utils.svelte-CICM1RSu.js";import{b as Oe}from"./size-DTlrKfcv.js";import{b as pe}from"./misc-37w0soXi.js";import{s as Te}from"./select-BigU4G0v.js";import{d as Xt}from"./dispatch-kxCwF96_.js";import{I as Ee}from"./ScrollFade.svelte_svelte_type_style_lang-DsKPVR6v.js";import{B as rt}from"./BlockLabel-DVGK1tqL.js";import{D as st}from"./DownloadLink-KH8WzTNR.js";import{E as it}from"./Empty-Ai5bf-OD.js";import{C as nt}from"./Clear-CcflhvKy.js";import{D as at}from"./Download-CBPCAP8L.js";import{I as Pe}from"./Image-Dlx1om_4.js";import{U as Mt}from"./Undo-Bv5lUv47.js";import{I as Et}from"./IconButtonWrapper-Bf43UAL9.js";import{F as Tt}from"./FullscreenButton-BAuJSnhH.js";import{r as Dt,l as Rt}from"./StreamingBar.svelte_svelte_type_style_lang-CMrNvDrX.js";import{i as Je,S as Ze}from"./index-BkRuG29m.js";import{U as Ke}from"./Upload-BtVQ7CFw.js";import{B as Qe}from"./Block-BGVavOyF.js";import{U as kt}from"./UploadText-DjYYU5m0.js";import"./clone-B9Q0I3Xo.js";import"./snippet-DI-UvdwT.js";import"./Maximize-CQCkRcLK.js";import"./html-CIBSB0m2.js";import"./index-B_pwUImq.js";import"./actions-6QVFIipz.js";function St(i){return i}function $e(i,e){if(i===e||i!==i)return()=>i;const t=typeof i;if(t!==typeof e||Array.isArray(i)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(i)){const s=e.map((a,r)=>$e(i[r],a));return a=>s.map(r=>r(a))}if(t==="object"){if(!i||!e)throw new Error("Object cannot be null");if(Je(i)&&Je(e)){const r=i.getTime(),o=e.getTime()-r;return f=>new Date(r+f*o)}const s=Object.keys(e),a={};return s.forEach(r=>{a[r]=$e(i[r],e[r])}),r=>{const u={};return s.forEach(o=>{u[o]=a[o](r)}),u}}if(t==="number"){const s=e-i;return a=>i+a*s}return()=>e}function It(i,e={}){const t=_t(i);let s,a=i;function r(u,o){if(a=u,i==null)return t.set(i=u),Promise.resolve();let f=s,M=!1,{delay:x=0,duration:z=400,easing:w=St,interpolate:I=$e}={...e,...o};if(z===0)return f&&(f.abort(),f=null),t.set(i=a),Promise.resolve();const C=Dt.now()+x;let c;return s=Rt(d=>{if(d<C)return!0;M||(c=I(i,u),typeof z=="function"&&(z=z(i,u)),M=!0),f&&(f.abort(),f=null);const v=d-C;return v>z?(t.set(i=u),!1):(t.set(i=c(w(v/z))),!0)}),s.promise}return{set:r,update:(u,o)=>r(u(a,i),o),subscribe:t.subscribe}}function Pt(i){let e;for(;e=i.sourceEvent;)i=e;return i}function et(i,e){if(i=Pt(i),e===void 0&&(e=i.currentTarget),e){var t=e.ownerSVGElement||e;if(t.createSVGPoint){var s=t.createSVGPoint();return s.x=i.clientX,s.y=i.clientY,s=s.matrixTransform(e.getScreenCTM().inverse()),[s.x,s.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[i.clientX-a.left-e.clientLeft,i.clientY-a.top-e.clientTop]}}return[i.pageX,i.pageY]}const Lt={passive:!1},De={capture:!0,passive:!1};function Ae(i){i.stopImmediatePropagation()}function Ye(i){i.preventDefault(),i.stopImmediatePropagation()}function Ct(i){var e=i.document.documentElement,t=Te(i).on("dragstart.drag",Ye,De);"onselectstart"in e?t.on("selectstart.drag",Ye,De):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Bt(i,e){var t=i.document.documentElement,s=Te(i).on("dragstart.drag",null);e&&(s.on("click.drag",Ye,De),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in t?s.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}const Se=i=>()=>i;function Fe(i,{sourceEvent:e,subject:t,target:s,identifier:a,active:r,x:u,y:o,dx:f,dy:M,dispatch:x}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:M,enumerable:!0,configurable:!0},_:{value:x}})}Fe.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function Ut(i){return!i.ctrlKey&&!i.button}function Wt(){return this.parentNode}function jt(i,e){return e??{x:i.x,y:i.y}}function At(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ot(){var i=Ut,e=Wt,t=jt,s=At,a={},r=Xt("start","drag","end"),u=0,o,f,M,x,z=0;function w(n){n.on("mousedown.drag",I).filter(s).on("touchstart.drag",d).on("touchmove.drag",v,Lt).on("touchend.drag touchcancel.drag",B).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function I(n,y){if(!(x||!i.call(this,n,y))){var Y=O(this,e.call(this,n,y),n,y,"mouse");Y&&(Te(n.view).on("mousemove.drag",C,De).on("mouseup.drag",c,De),Ct(n.view),Ae(n),M=!1,o=n.clientX,f=n.clientY,Y("start",n))}}function C(n){if(Ye(n),!M){var y=n.clientX-o,Y=n.clientY-f;M=y*y+Y*Y>z}a.mouse("drag",n)}function c(n){Te(n.view).on("mousemove.drag mouseup.drag",null),Bt(n.view,M),Ye(n),a.mouse("end",n)}function d(n,y){if(i.call(this,n,y)){var Y=n.changedTouches,X=e.call(this,n,y),R=Y.length,L,p;for(L=0;L<R;++L)(p=O(this,X,n,y,Y[L].identifier,Y[L]))&&(Ae(n),p("start",n,Y[L]))}}function v(n){var y=n.changedTouches,Y=y.length,X,R;for(X=0;X<Y;++X)(R=a[y[X].identifier])&&(Ye(n),R("drag",n,y[X]))}function B(n){var y=n.changedTouches,Y=y.length,X,R;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),X=0;X<Y;++X)(R=a[y[X].identifier])&&(Ae(n),R("end",n,y[X]))}function O(n,y,Y,X,R,L){var p=r.copy(),U=et(L||Y,y),K,ae,F;if((F=t.call(n,new Fe("beforestart",{sourceEvent:Y,target:w,identifier:R,active:u,x:U[0],y:U[1],dx:0,dy:0,dispatch:p}),X))!=null)return K=F.x-U[0]||0,ae=F.y-U[1]||0,function G(b,h,W){var H=U,q;switch(b){case"start":a[R]=G,q=u++;break;case"end":delete a[R],--u;case"drag":U=et(W||h,y),q=u;break}p.call(b,n,new Fe(b,{sourceEvent:h,subject:F,target:w,identifier:R,active:q,x:U[0]+K,y:U[1]+ae,dx:U[0]-H[0],dy:U[1]-H[1],dispatch:p}),X)}}return w.filter=function(n){return arguments.length?(i=typeof n=="function"?n:Se(!!n),w):i},w.container=function(n){return arguments.length?(e=typeof n=="function"?n:Se(n),w):e},w.subject=function(n){return arguments.length?(t=typeof n=="function"?n:Se(n),w):t},w.touchable=function(n){return arguments.length?(s=typeof n=="function"?n:Se(!!n),w):s},w.on=function(){var n=r.on.apply(r,arguments);return n===r?w:n},w.clickDistance=function(n){return arguments.length?(z=(n=+n)*n,w):Math.sqrt(z)},w}var $t=Z('<div class="wrap svelte-b2bl92" role="none"><div class="content svelte-b2bl92"><!></div> <div data-testid="slider" role="none"><span><span class="icon left svelte-b2bl92">
1◢</span><span class="icon center svelte-b2bl92"></span><span class="icon right svelte-b2bl92">◢</span></span> <div class="inner svelte-b2bl92"></div></div></div>');function lt(i,e){ye(e,!1);function t(b,h,W){return Math.min(Math.max(b,h),W)}let s=g(e,"position",12,.5),a=g(e,"disabled",12,!1),r=g(e,"slider_color",12,"var(--border-color-primary)"),u=g(e,"image_size",28,()=>({top:0,left:0,width:0,height:0})),o=g(e,"el",12,void 0),f=g(e,"parent_el",12,void 0),M=$(),x=$(0),z=$(!1),w=0;function I(b){w=f()?.getBoundingClientRect().width||0,b===0&&u(u().width=o()?.getBoundingClientRect().width||0,!0),D(x,t(u().width*s()+u().left,0,w))}function C(b,h){const W=Math.pow(10,h);return Math.round((b+Number.EPSILON)*W)/W}function c(b){D(x,t(b,0,w)),s(C((b-u().left)/u().width,5))}function d(b){a()||(D(z,!0),c(b.x))}function v(b){a()||c(b.x)}function B(){a()||D(z,!1)}function O(b){D(x,t(u().width*b+u().left,0,w))}Ge(()=>{I(u().width);const b=Ot().on("start",d).on("drag",v).on("end",B);Te(l(M)).call(b)}),we(()=>S(u()),()=>{I(u().width)}),we(()=>S(s()),()=>{O(s())}),He();var n={get position(){return s()},set position(b){s(b),_()},get disabled(){return a()},set disabled(b){a(b),_()},get slider_color(){return r()},set slider_color(b){r(b),_()},get image_size(){return u()},set image_size(b){u(b),_()},get el(){return o()},set el(b){o(b),_()},get parent_el(){return f()},set parent_el(b){f(b),_()}};Re();var y=$t();tt("resize",yt,()=>I(u().width));var Y=ie(y),X=ie(Y);Ie(X,e,"default",{}),ne(Y),be(Y,b=>o(b),()=>o());var R=V(Y,2);let L;var p=ie(R);let U;var K=V(ie(p));let ae;xt(),ne(p);var F=V(p,2);let G;return ne(R),be(R,b=>D(M,b),()=>l(M)),ne(y),be(y,b=>f(b),()=>f()),Me(()=>{L=ze(R,1,"outer svelte-b2bl92",null,L,{disabled:a(),grab:l(z)}),Xe(R,`transform: translateX(${l(x)??""}px)`),U=ze(p,1,"icon-wrap svelte-b2bl92",null,U,{active:l(z),disabled:a()}),ae=Xe(K,"",ae,{"--color":r()}),G=Xe(F,"",G,{"--color":r()})}),A(i,y),xe(n)}var Ft=Z("<img/>");function Le(i,e){const t=Ve(e,["children","$$slots","$$events","$$legacy"]),s=Ve(t,["src","fullscreen","fixed","transform","img_el","hidden","variant","max_height"]);ye(e,!1);let a=g(e,"src",12,void 0),r=g(e,"fullscreen",12,!1),u=g(e,"fixed",12,!1),o=g(e,"transform",12,"translate(0px, 0px) scale(1)"),f=g(e,"img_el",12,null),M=g(e,"hidden",12,!1),x=g(e,"variant",12,"upload"),z=g(e,"max_height",12,500);const w=Ce();function I(d){if(!d)return{top:0,left:0,width:0,height:0};const v=d.parentElement?.getBoundingClientRect();if(!v)return{top:0,left:0,width:0,height:0};const B=d.naturalWidth/d.naturalHeight,O=v.width/v.height;let n,y;B>O?(n=v.width,y=v.width/B):(y=v.height,n=v.height*B);const Y=(v.width-n)/2;return{top:(v.height-y)/2,left:Y,width:n,height:y}}Ge(()=>{const d=new ResizeObserver(async v=>{for(const B of v)await Ne(),w("load",I(f()))});return d.observe(f()),()=>{d.disconnect()}});var C={get src(){return a()},set src(d){a(d),_()},get fullscreen(){return r()},set fullscreen(d){r(d),_()},get fixed(){return u()},set fixed(d){u(d),_()},get transform(){return o()},set transform(d){o(d),_()},get img_el(){return f()},set img_el(d){f(d),_()},get hidden(){return M()},set hidden(d){M(d),_()},get variant(){return x()},set variant(d){x(d),_()},get max_height(){return z()},set max_height(d){z(d),_()}};Re();var c=Ft();return ft(c,()=>({src:a(),"data-testid":"imageslider-image",...s,[pt]:{fixed:u(),hidden:M(),preview:x()==="preview",slider:x()==="upload",fullscreen:r(),small:!r()},[mt]:{transform:o(),"max-height":z()&&!r()?`${z()}px`:null}}),void 0,void 0,void 0,"svelte-j3ek2n"),be(c,d=>f(d),()=>f()),zt(c),tt("load",c,()=>w("load",I(f()))),A(i,c),xe(C)}class Gt{container;image;scale;offsetX;offsetY;isDragging;lastX;lastY;initial_left_padding;initial_top_padding;initial_width;initial_height;subscribers;handleImageLoad;real_image_size={top:0,left:0,width:0,height:0};last_touch_distance;constructor(e,t){this.container=e,this.image=t,this.scale=1,this.offsetX=0,this.offsetY=0,this.isDragging=!1,this.lastX=0,this.lastY=0,this.initial_left_padding=0,this.initial_top_padding=0,this.initial_width=0,this.initial_height=0,this.subscribers=[],this.last_touch_distance=0,this.handleWheel=this.handleWheel.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleImageLoad=this.init.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.image.addEventListener("load",this.handleImageLoad),this.container.addEventListener("wheel",this.handleWheel),this.container.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.container.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd),new ResizeObserver(a=>{for(const r of a)r.target===this.container&&(this.handleResize(),this.get_image_size(this.image))}).observe(this.container)}handleResize(){this.init()}init(){const e=this.container.getBoundingClientRect(),t=this.image.getBoundingClientRect();this.initial_left_padding=t.left-e.left,this.initial_top_padding=t.top-e.top,this.initial_width=t.width,this.initial_height=t.height,this.reset_zoom(),this.updateTransform()}reset_zoom(){this.scale=1,this.offsetX=0,this.offsetY=0,this.updateTransform()}handleMouseDown(e){const t=this.image.getBoundingClientRect();if(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>
vendor: 5,024 bytes, line 1
1=t.top&&e.clientY<=t.bottom){if(e.preventDefault(),this.scale===1)return;this.isDragging=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.image.style.cursor="grabbing"}}handleMouseMove(e){if(!this.isDragging)return;const t=e.clientX-this.lastX,s=e.clientY-this.lastY;this.offsetX+=t,this.offsetY+=s,this.lastX=e.clientX,this.lastY=e.clientY,this.updateTransform(),this.updateTransform()}handleMouseUp(){this.isDragging&&(this.constrain_to_bounds(!0),this.updateTransform(),this.isDragging=!1,this.image.style.cursor=this.scale>1?"grab":"zoom-in")}async handleWheel(e){e.preventDefault();const t=this.container.getBoundingClientRect(),s=this.image.getBoundingClientRect();if(e.clientX<s.left||e.clientX>s.right||e.clientY<s.top||e.clientY>s.bottom)return;const a=1.05,r=this.scale,u=-Math.sign(e.deltaY)>0?Math.min(15,r*a):Math.max(1,r/a);if(u===r)return;const o=e.clientX-t.left-this.initial_left_padding,f=e.clientY-t.top-this.initial_top_padding;this.scale=u,this.offsetX=this.compute_new_offset({cursor_position:o,current_offset:this.offsetX,new_scale:u,old_scale:r}),this.offsetY=this.compute_new_offset({cursor_position:f,current_offset:this.offsetY,new_scale:u,old_scale:r}),this.updateTransform(),this.constrain_to_bounds(),this.updateTransform(),this.image.style.cursor=this.scale>1?"grab":"zoom-in"}compute_new_position({position:e,scale:t,anchor_position:s}){return e-(e-s)*(t/this.scale)}compute_new_offset({cursor_position:e,current_offset:t,new_scale:s,old_scale:a}){return e-s/a*(e-t)}constrain_to_bounds(e=!1){if(this.scale===1){this.offsetX=0,this.offsetY=0;return}const t={top:this.real_image_size.top*this.scale+this.offsetY,left:this.real_image_size.left*this.scale+this.offsetX,width:this.real_image_size.width*this.scale,height:this.real_image_size.height*this.scale,bottom:this.real_image_size.top*this.scale+this.offsetY+this.real_image_size.height*this.scale,right:this.real_image_size.left*this.scale+this.offsetX+this.real_image_size.width*this.scale},s=this.real_image_size.left+this.real_image_size.width,a=this.real_image_size.top+this.real_image_size.height;e&&(t.top>this.real_image_size.top?this.offsetY=this.calculate_position(this.real_image_size.top,0,"y"):t.bottom<a&&(this.offsetY=this.calculate_position(a,1,"y")),t.left>this.real_image_size.left?this.offsetX=this.calculate_position(this.real_image_size.left,0,"x"):t.right<s&&(this.offsetX=this.calculate_position(s,1,"x")))}updateTransform(){this.notify({x:this.offsetX,y:this.offsetY,scale:this.scale})}destroy(){this.container.removeEventListener("wheel",this.handleWheel),this.container.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.container.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),this.image.removeEventListener("load",this.handleImageLoad)}subscribe(e){this.subscribers.push(e)}unsubscribe(e){this.subscribers=this.subscribers.filter(t=>t!==e)}notify({x:e,y:t,scale:s}){this.subscribers.forEach(a=>a({x:e,y:t,scale:s}))}handleTouchStart(e){e.preventDefault();const t=this.image.getBoundingClientRect(),s=e.touches[0];if(s.clientX>=t.left&&s.clientX<=t.right&&s.clientY>=t.top&&s.clientY<=t.bottom){if(e.touches.length===1&&this.scale>1)this.isDragging=!0,this.lastX=s.clientX,this.lastY=s.clientY;else if(e.touches.length===2){const a=e.touches[0],r=e.touches[1];this.last_touch_distance=Math.hypot(r.clientX-a.clientX,r.clientY-a.clientY)}}}get_image_size(e){if(!e)return;const t=e.parentElement?.getBoundingClientRect();if(!t)return;const s=e.naturalWidth/e.naturalHeight,a=t.width/t.height;let r,u;s>a?(r=t.width,u=t.width/s):(u=t.height,r=t.height*s);const o=(t.width-r)/2,f=(t.height-u)/2;this.real_image_size={top:f,left:o,width:r,height:u}}handleTouchMove(e){if(e.touches.length===1&&this.isDragging){e.preventDefault();const t=e.touches[0],s=t.clientX-this.lastX,a=t.clientY-this.lastY;this.offsetX+=s,this.offsetY+=a,this.lastX=t.clientX,this.lastY=t.clientY,this.updateTransform()}else if(e.touches.length===2){e.preventDefault();const t=e.touches[0],s=e.touches[1],a=Math.hypot(s.clientX-t.clientX,s.clientY-t.clientY);if(this.last_touch_distance===0){this.last_touch_distance=a;return}const r=a/this.last_touch_distance,u=this.scale,o=Math.min(15,Math.max(1,u*r));if(o===u){this.last_touch_distance=a;return}const f=this.container.getBoundingClientRect(),M=(t.clientX+s.clientX)/2-f.left-this.initial_left_padding,x=(t.clientY+s.clientY)/2-f.top-this.initial_top_padding;this.scale=o,this.offsetX=this.compute_new_offset({cursor_position:M,current_offset:this.offsetX,new_scale:o,old_scale:u}),this.offsetY=this.compute_new_offset({cursor_position:x,current_offset:this.offsetY,new_scale:o,old_scale:u}),this.updateTransform(),this.constrain_to_bounds(),this.updateTransform(),this.last_touch_distance=a,this.image.style.cursor=this.scale>
11?"grab":"zoom-in"}}handleTouchEnd(e){this.isDragging&&(this.constrain_to_bounds(!0),this.updateTransform(),this.isDragging=!1),e.touches.length===0&&(this.last_touch_distance=0)}calculate_position(e,t,s){if(this.container.getBoundingClientRect(),s==="x"){const a=e,r=this.real_image_size.left+t*this.real_image_size.width;return a-r*this.scale}if(s==="y"){const a=e,r=this.real_image_size.top+t*this.real_image_size.height;return a-r*this.scale}return 0}}var Ht=Z("<!> <!> <!> <!>",1),Nt=Z("<!> <!>",1),Vt=Z('<div class="image-container svelte-1880bc6"><!> <div><!></div></div>'),qt=Z("<!> <!>",1);function Jt(i,e){ye(e,!1);const t=()=>vt(U,"$transform",s),[s,a]=bt(),r=$(),u=$();let o=g(e,"value",28,()=>[null,null]),f=g(e,"label",12,void 0),M=g(e,"show_download_button",12,!0),x=g(e,"show_label",12),z=g(e,"i18n",12),w=g(e,"position",12),I=g(e,"layer_images",12,!0),C=g(e,"show_single",12,!1),c=g(e,"slider_color",12),d=g(e,"show_fullscreen_button",12,!0),v=g(e,"fullscreen",12,!1),B=g(e,"buttons",12,null),O=g(e,"on_custom_button_click",12,null),n=g(e,"el_width",12,0),y=g(e,"max_height",12),Y=g(e,"interactive",12,!0);const X=Ce();let R=$(),L=$(),p=$(),U=It({x:0,y:0,z:1},{duration:75}),K=$();function ae(m,P,j,k,le,oe){return(m*j+k-le)/oe/P}let F=$(0),G=$(null),b=null;function h(m,P){!m||!P||(l(G)?.destroy(),b?.disconnect(),m?.getBoundingClientRect().width,D(F,P?.getBoundingClientRect().width||0),D(G,new Gt(P,m)),l(G).subscribe(({x:j,y:k,scale:le})=>{U.set({x:j,y:k,z:le})}),b=new ResizeObserver(j=>{for(const k of j)k.target===P&&D(F,k.contentRect.width),k.target===m&&k.contentRect.width}),b.observe(P),b.observe(m))}Ge(()=>()=>{l(G)?.destroy(),b?.disconnect()});let W=$(),H=$({top:0,left:0,width:0,height:0});function q(m){D(H,m.detail)}we(()=>(S(w()),l(F),l(H),t()),()=>{D(r,ae(w(),l(F),l(H).width,l(H).left,t().x,t().z))}),we(()=>(S(I()),l(r)),()=>{D(u,I()?`clip-path: inset(0 0 0 ${l(r)*100}%)`:"")}),we(()=>(l(R),l(L)),()=>{h(l(R),l(L))}),He();var he={get value(){return o()},set value(m){o(m),_()},get label(){return f()},set label(m){f(m),_()},get show_download_button(){return M()},set show_download_button(m){M(m),_()},get show_label(){return x()},set show_label(m){x(m),_()},get i18n(){return z()},set i18n(m){z(m),_()},get position(){return w()},set position(m){w(m),_()},get layer_images(){return I()},set layer_images(m){I(m),_()},get show_single(){return C()},set show_single(m){C(m),_()},get slider_color(){return c()},set slider_color(m){c(m),_()},get show_fullscreen_button(){return d()},set show_fullscreen_button(m){d(m),_()},get fullscreen(){return v()},set fullscreen(m){v(m),_()},get buttons(){return B()},set buttons(m){B(m),_()},get on_custom_button_click(){return O()},set on_custom_button_click(m){O(m),_()},get el_width(){return n()},set el_width(m){n(m),_()},get max_height(){return y()},set max_height(m){y(m),_()},get interactive(){return Y()},set interactive(m){Y(m),_()}};Re();var ge=qt(),_e=re(ge);{let m=N(()=>(S(f()),S(z()),T(()=>f()||z()("image.image"))));rt(_e,{get show_label(){return x()},get Icon(){return Pe},get label(){return l(m)}})}var ke=V(_e,2);{var Be=m=>{it(m,{unpadded_box:!0,size:"large",children:(P,j)=>{Pe(P)},$$slots:{default:!0}})},Ue=m=>{var P=Vt(),j=ie(P);Et(j,{get buttons(){return B()},get on_custom_button_click(){return O()},children:(E,se)=>{var J=Ht(),Q=re(J);{let ee=N(()=>(S(z()),T(()=>z()("common.undo")))),me=N(()=>(t(),T(()=>t().z===1)));Ee(Q,{get Icon(){return Mt},get label(){return l(ee)},get disabled(){return l(me)},onclick:()=>l(G)?.reset_zoom()})}var ue=V(Q,2);{var ce=ee=>{Tt(ee,{get fullscreen(){return v()},$$events:{fullscreen(me){pe.call(this,e,me)}}})};te(ue,ee=>{d()&&ee(ce)})}var fe=V(ue,2);{var ot=ee=>{{let me=N(()=>(S(o()),T(()=>o()[1]?.url))),dt=N(()=>(S(o()),T(()=>o()[1]?.orig_name||"image")));st(ee,{get href(){return l(me)},get download(){return l(dt)},children:(ht,or)=>{{let gt=N(()=>(S(z()),T(()=>z()("common.download"))));Ee(ht,{get Icon(){return at},get label(){return l(gt)}})}},$$slots:{default:!0}})}};te(fe,ee=>{M()&&ee(ot)})}var ut=V(fe,2);{var ct=ee=>{Ee(ee,{get Icon(){return nt}
1,label:"Remove Image",onclick:me=>{o([null,null]),X("clear"),me.stopPropagation()}})};te(ut,ee=>{Y()&&ee(ct)})}A(E,J)},$$slots:{default:!0}});var k=V(j,2);let le;var oe=ie(k);lt(oe,{get slider_color(){return c()},get image_size(){return l(H)},get position(){return w()},set position(E){w(E)},get el(){return l(L)},set el(E){D(L,E)},get parent_el(){return l(K)},set parent_el(E){D(K,E)},children:(E,se)=>{var J=Nt(),Q=re(J);{let ce=N(()=>(S(o()),T(()=>o()?.[0]?.url)));Le(Q,{get src(){return l(ce)},alt:"",loading:"lazy",variant:"preview",get transform(){return`translate(${t(),T(()=>t().x)??""}px, ${t(),T(()=>t().y)??""}px) scale(${t(),T(()=>t().z)??""})`},get fullscreen(){return v()},get max_height(){return y()},get img_el(){return l(R)},set img_el(fe){D(R,fe)},$$events:{load:q},$$legacy:!0})}var ue=V(Q,2);{let ce=N(()=>(S(o()),T(()=>!o()?.[1]?.url))),fe=N(()=>(S(o()),T(()=>o()?.[1]?.url)));Le(ue,{variant:"preview",get fixed(){return I()},get hidden(){return l(ce)},get src(){return l(fe)},alt:"",loading:"lazy",get style(){return`${l(u)??""}; background: var(--block-background-fill);`},get transform(){return`translate(${t(),T(()=>t().x)??""}px, ${t(),T(()=>t().y)??""}px) scale(${t(),T(()=>t().z)??""})`},get fullscreen(){return v()},get max_height(){return y()},$$events:{load:q}})}A(E,J)},$$slots:{default:!0},$$legacy:!0}),ne(k),be(k,E=>D(W,E),()=>l(W)),ne(P),be(P,E=>D(p,E),()=>l(p)),Me(()=>le=ze(k,1,"slider-wrap svelte-1880bc6",null,le,{limit_height:!v()})),Oe(k,"clientWidth",n),A(m,P)};te(ke,m=>{S(o()),S(C()),T(()=>(o()===null||o()[0]===null||o()[1]===null)&&!C())?m(Be):m(Ue,!1)})}A(i,ge);var We=xe(he);return a(),We}var Zt=Z('<div class="svelte-2ufkjh"><!></div>');function Kt(i,e){ye(e,!1);const t=Ce();Re();var s=Zt(),a=ie(s);Ee(a,{get Icon(){return nt},label:"Remove Image",onclick:r=>{t("remove_image"),r.stopPropagation()}}),ne(s),A(i,s),xe()}var Qt=Z('<div class="icon-buttons svelte-1c8zs50"><!></div>'),er=Z("<div><!></div>"),tr=Z("<div><!></div>"),rr=Z("<div><!> <!></div>"),sr=Z('<!> <div data-testid="image" class="image-container svelte-1c8zs50"><!> <!> <!></div>',1);function ir(i,e){ye(e,!1);let t=g(e,"value",12),s=g(e,"label",12,void 0),a=g(e,"show_label",12),r=g(e,"root",12),u=g(e,"position",12),o=g(e,"upload_count",12,2),f=g(e,"show_download_button",12,!0),M=g(e,"slider_color",12),x=g(e,"upload",12),z=g(e,"stream_handler",12),w=g(e,"max_file_size",12,null),I=g(e,"i18n",12),C=g(e,"max_height",12),c=g(e,"upload_promise",12,null),d=$(t()||[null,null]),v=$(),B=$(),O=$();async function n(h,W){const H=[t()[0],t()[1]];h.length>1?H[W]=h[0]:H[W]=h[W],t(H),await Ne(),Y("upload",H)}let y=$("");const Y=Ce();let X=g(e,"dragging",12,!1);we(()=>(S(t()),l(y)),()=>{JSON.stringify(t())!==l(y)&&(D(y,JSON.stringify(t())),D(d,t()))}),we(()=>S(X()),()=>{Y("drag",X())}),He();var R={get value(){return t()},set value(h){t(h),_()},get label(){return s()},set label(h){s(h),_()},get show_label(){return a()},set show_label(h){a(h),_()},get root(){return r()},set root(h){r(h),_()},get position(){return u()},set position(h){u(h),_()},get upload_count(){return o()},set upload_count(h){o(h),_()},get show_download_button(){return f()},set show_download_button(h){f(h),_()},get slider_color(){return M()},set slider_color(h){M(h),_()},get upload(){return x()},set upload(h){x(h),_()},get stream_handler(){return z()},set stream_handler(h){z(h),_()},get max_file_size(){return w()},set max_file_size(h){w(h),_()},get i18n(){return I()},set i18n(h){I(h),_()},get max_height(){return C()},set max_height(h){C(h),_()},get upload_promise(){return c()},set upload_promise(h){c(h),_()},get dragging(){return X()},set dragging(h){X(h),_()}};Re();var L=sr(),p=re(L);{let h=N(()=>(S(s()),S(I()),T(()=>s()||I()("image.image"))));rt(p,{get show_label(){return a()},get Icon(){return Pe},get label(){return l(h)}})}var U=V(p,2),K=ie(U);{var ae=h=>{Kt(h,{$$events:{remove_image:()=>{u(.5),t([null,null]),Y("clear")}}})};te(K,h=>{S(t()),T(()=>t()?.[0]?.url||t()?.[1]?.url)&&h(ae)})}var F=V(K,2);{var G=h=>{var W=Qt(),H=ie(W);{var q=he=>{{let ge=N(()=>(S(t()),T(()=>t()[1].orig_name||"image")));st(he,{get href(){return S(t()),T(()=>t()[1].url)},get download(){return l(ge)},children:(_e,ke)=>{Ee(_e,{get Icon(){return at}})},$$slots:{default:!0}})}};
1te(H,he=>{f()&&he(q)})}ne(W),A(h,W)};te(F,h=>{S(t()),T(()=>t()?.[1]?.url)&&h(G)})}var b=V(F,2);{let h=N(()=>(S(o()),S(t()),T(()=>o()==2||!t()?.[0])));lt(b,{get disabled(){return l(h)},get slider_color(){return M()},get position(){return u()},set position(W){u(W)},children:(W,H)=>{var q=rr();let he,ge;var _e=ie(q);{var ke=P=>{var j=er();let k;var le=ie(j);{let oe=N(()=>(S(t()),T(()=>!!t()?.[0])));Ke(le,{filetype:"image/*",onload:E=>n(E,0),get disable_click(){return l(oe)},get root(){return r()},file_count:"multiple",get upload(){return x()},get stream_handler(){return z()},get max_file_size(){return w()},get upload_promise(){return c()},set upload_promise(E){c(E)},get dragging(){return X()},set dragging(E){X(E)},children:(E,se)=>{var J=ve(),Q=re(J);Ie(Q,e,"default",{}),A(E,J)},$$slots:{default:!0},$$legacy:!0})}ne(j),Me(()=>k=ze(j,1,"wrap svelte-1c8zs50",null,k,{"half-wrap":o()===1})),A(P,j)},Be=P=>{{let j=N(()=>(l(d),T(()=>l(d)[0]?.url)));Le(P,{variant:"upload",get src(){return l(j)},alt:"",get max_height(){return C()},get img_el(){return l(v)},set img_el(k){D(v,k)},$$legacy:!0})}};te(_e,P=>{l(d),T(()=>!l(d)?.[0])?P(ke):P(Be,!1)})}var Ue=V(_e,2);{var We=P=>{{let j=N(()=>(S(t()),T(()=>!!t()?.[1])));Ke(P,{filetype:"image/*",onload:k=>n(k,1),get disable_click(){return l(j)},get root(){return r()},file_count:"multiple",get upload(){return x()},get stream_handler(){return z()},get max_file_size(){return w()},get upload_promise(){return c()},set upload_promise(k){c(k)},get dragging(){return X()},set dragging(k){X(k)},children:(k,le)=>{var oe=ve(),E=re(oe);Ie(E,e,"default",{}),A(k,oe)},$$slots:{default:!0},$$legacy:!0})}},m=P=>{var j=ve(),k=re(j);{var le=E=>{var se=tr();let J,Q;var ue=ie(se);it(ue,{unpadded_box:!0,size:"large",children:(ce,fe)=>{Pe(ce)},$$slots:{default:!0}}),ne(se),Me(()=>{J=ze(se,1,"empty-wrap fixed svelte-1c8zs50",null,J,{"white-icon":!t()?.[0]?.url}),Q=Xe(se,"",Q,{width:`${l(B)*(1-u())}px`,transform:`translateX(${l(B)*u()}px)`})}),A(E,se)},oe=E=>{var se=ve(),J=re(se);{var Q=ue=>{{let ce=N(()=>o()===1);Le(ue,{variant:"upload",get src(){return l(d),T(()=>l(d)[1].url)},alt:"",get fixed(){return l(ce)},transform:"translate(0px, 0px) scale(1)",get max_height(){return C()}})}};
1te(J,ue=>{l(d),T(()=>l(d)?.[1])&&ue(Q)},!0)}A(E,se)};te(k,E=>{l(d),S(o()),T(()=>!l(d)?.[1]&&o()===1)?E(le):E(oe,!1)},!0)}A(P,j)};te(Ue,P=>{l(d),S(o()),T(()=>!l(d)?.[1]&&o()===2)?P(We):P(m,!1)})}ne(q),Me(()=>{he=ze(q,1,"upload-wrap svelte-1c8zs50",null,he,{"side-by-side":o()===2}),ge=Xe(q,"",ge,{display:o()===2?"flex":"block"})}),A(W,q)},$$slots:{default:!0},$$legacy:!0})}return ne(U),Oe(U,"clientWidth",h=>D(B,h)),Oe(U,"clientHeight",h=>D(O,h)),A(i,L),xe(R)}function nr(i,e){ye(e,!1);let t=g(e,"value",28,()=>[null,null]),s=g(e,"upload",12),a=g(e,"stream_handler",12),r=g(e,"label",12),u=g(e,"show_label",12),o=g(e,"i18n",12),f=g(e,"root",12),M=g(e,"upload_count",12,1),x=g(e,"dragging",12),z=g(e,"max_height",12),w=g(e,"max_file_size",12,null),I=g(e,"upload_promise",12,null);var C={get value(){return t()},set value(c){t(c),_()},get upload(){return s()},set upload(c){s(c),_()},get stream_handler(){return a()},set stream_handler(c){a(c),_()},get label(){return r()},set label(c){r(c),_()},get show_label(){return u()},set show_label(c){u(c),_()},get i18n(){return o()},set i18n(c){o(c),_()},get root(){return f()},set root(c){f(c),_()},get upload_count(){return M()},set upload_count(c){M(c),_()},get dragging(){return x()},set dragging(c){x(c),_()},get max_height(){return z()},set max_height(c){z(c),_()},get max_file_size(){return w()},set max_file_size(c){w(c),_()},get upload_promise(){return I()},set upload_promise(c){I(c),_()}};return ir(i,{slider_color:"var(--border-color-primary)",position:.5,get root(){return f()},get label(){return r()},get show_label(){return u()},get upload_count(){return M()},get stream_handler(){return a()},get upload(){return s()},get max_file_size(){return w()},get max_height(){return z()},get i18n(){return o()},get upload_promise(){return I()},set upload_promise(c){I(c)},get value(){return t()},set value(c){t(c)},get dragging(){return x()},set dragging(c){x(c)},$$events:{edit(c){pe.call(this,e,c)},clear(c){pe.call(this,e,c)},stream(c){pe.call(this,e,c)},drag:({detail:c})=>x(c),upload(c){pe.call(this,e,c)},select(c){pe.call(this,e,c)},share(c){pe.call(this,e,c)}},children:(c,d)=>{var v=ve(),B=re(v);Ie(B,e,"default",{}),A(c,v)},$$slots:{default:!0},$$legacy:!0}),xe(C)}var ar=Z("<!> <!>",1),lr=Z("<!> <!>",1);function Br(i,e){ye(e,!0);let t=je(void 0);class s extends Yt{async get_data(){return l(t)&&(await l(t),await Ne()),await super.get_data()}}const a=wt(e,["$$slots","$$events","$$legacy"]),r=new s(a);let u=je(!1),o=je(!1),f,M=de(()=>Math.max(0,Math.min(100,r.props.slider_position))/100);r.watch_for_change();const x=d=>{const v=d;v.preventDefault(),v.stopPropagation(),v.type==="dragenter"||v.type==="dragover"?D(o,!0):v.type==="dragleave"&&D(o,!1)},z=d=>{if(r.shared.interactive){const v=d;v.preventDefault(),v.stopPropagation(),D(o,!1),f&&f.loadFilesFromDrop(v)}};var w=ve(),I=re(w);{var C=d=>{{let v=de(()=>l(o)?"focus":"base"),B=de(()=>r.props.height||void 0);Qe(d,{get visible(){return r.shared.visible},variant:"solid",get border_mode(){return l(v)},padding:!1,get elem_id(){return r.shared.elem_id},get elem_classes(){return r.shared.elem_classes},get height(){return l(B)},get width(){return r.props.width},allow_overflow:!1,get container(){return r.shared.container},get scale(){return r.shared.scale},get min_width(){return r.shared.min_width},get fullscreen(){return l(u)},set fullscreen(O){D(u,O,!0)},children:(O,n)=>{var y=ar(),Y=re(y);Ze(Y,qe({get autoscroll(){return r.shared.autoscroll},get i18n(){return r.i18n}},()=>r.shared.loading_status));var X=V(Y,2);{let R=de(()=>r.props.buttons.some(p=>typeof p=="string"&&p==="download")),L=de(()=>r.props.buttons.some(p=>typeof p=="string"&&p==="fullscreen"));Jt(X,{get fullscreen(){return l(u)},get interactive(){return r.shared.interactive},get label(){return r.shared.label},get show_label(){return r.shared.show_label},get show_download_button(){return l(R)},get i18n(){return r.i18n},get show_fullscreen_button(){return l(L)},get buttons(){return r.props.buttons},on_custom_button_click:p=>{r.dispatch("custom_button_click",{id:p})},get position(){return l(M)},get slider_color(){return r.props.slider_color},get max_height(){return r.props.max_height},get value(){return r.props.value},set value(p){r.props.value=p},$$events:{select:({detail:p})=>r.dispatch("select",p),share:({detail:p})=>r.dispatch("share",p),error:({detail:p})=>r.dispatch("error",p),clear:()=>
1{r.dispatch("clear"),r.dispatch("input")},fullscreen:({detail:p})=>{D(u,p,!0)}}})}A(O,y)},$$slots:{default:!0}})}},c=d=>{{let v=de(()=>r.props.value===null?"dashed":"solid"),B=de(()=>l(o)?"focus":"base"),O=de(()=>r.props.height||void 0);Qe(d,{get visible(){return r.shared.visible},get variant(){return l(v)},get border_mode(){return l(B)},padding:!1,get elem_id(){return r.shared.elem_id},get elem_classes(){return r.shared.elem_classes},get height(){return l(O)},get width(){return r.props.width},allow_overflow:!1,get container(){return r.shared.container},get scale(){return r.shared.scale},get min_width(){return r.shared.min_width},$$events:{dragenter:x,dragleave:x,dragover:x,drop:z},children:(n,y)=>{var Y=lr(),X=re(Y);Ze(X,qe({get autoscroll(){return r.shared.autoscroll},get i18n(){return r.i18n}},()=>r.shared.loading_status,{on_clear_status:()=>r.dispatch("clear_status",r.shared.loading_status)}));var R=V(X,2);{let L=de(()=>r.shared.client?.stream);be(nr(R,{get root(){return r.shared.root},get label(){return r.shared.label},get show_label(){return r.shared.show_label},get upload_count(){return r.props.upload_count},get max_file_size(){return r.shared.max_file_size},get i18n(){return r.i18n},upload:(...p)=>r.shared.client.upload(...p),get stream_handler(){return l(L)},get max_height(){return r.props.max_height},get upload_promise(){return l(t)},set upload_promise(p){D(t,p,!0)},get value(){return r.props.value},set value(p){r.props.value=p},get dragging(){return l(o)},set dragging(p){D(o,p,!0)},$$events:{edit:()=>r.dispatch("edit"),clear:()=>{r.dispatch("clear"),r.dispatch("input")},drag:({detail:p})=>D(o,p,!0),upload:()=>{r.dispatch("upload"),r.dispatch("input")},error:({detail:p})=>{r.shared.loading_status&&(r.shared.loading_status.status="error"),r.dispatch("error",p)},close_stream:()=>{r.dispatch("close_stream","stream")}},children:(p,U)=>{var K=ve(),ae=re(K);{var F=G=>{kt(G,{get i18n(){return r.i18n},type:"image",get placeholder(){return r.props.placeholder}})};te(ae,G=>{G(F)})}A(p,K)},$$slots:{default:!0}}),p=>f=p,()=>f)}A(n,Y)},$$slots:{default:!0}})}};te(I,d=>{!r.shared.interactive||r.props.value?.[1]&&r.props.value?.[0]?d(C):d(c,!1)})}A(i,w),xe()}export{Br as default};

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.