PageSourceSearch

https://mfikrisandip36-ocr-scm.hf.space/assets/Gallery-_8XnucUC.js

js mfikrisandip36-ocr-scm.hf.space collected 2026-10-03 17:07:27 UTC 21,382 bytes, 2 lines download raw bytes

1import"./IconButtonWrapper.svelte_svelte_type_style_lang-CPevJZa9.js";import"./MarkdownCode.svelte_svelte_type_style_lang-y3kXumMD.js";import{B as Ke}from"./BlockLabel-JbMBN4MZ.js";import{I as Be}from"./IconButton-DbC-jsk_.js";import{E as Qe}from"./Empty-BgOmVBFg.js";import{S as Ye}from"./ShareButton-BfWeO6Sd.js";import{C as Ze}from"./Clear-By3xiIwg.js";import{D as xe}from"./Download-DVtk-Jv3.js";import{I as Le,F as et}from"./FullscreenButton-3XpcKv2l.js";import{P as Te}from"./Play-B0Q0U1Qz.js";import{I as tt}from"./IconButtonWrapper-DrWC4NJv.js";import"./index-DpUtExHW.js";/* empty css                                             */import{M as lt}from"./ModifyUpload-BJHfZ7Fk.js";import{I as oe}from"./Image-CnqB5dbD.js";import"./DownloadLink.svelte_svelte_type_style_lang-C_5UIfol.js";/* empty css                                                   */import{V as fe}from"./Video-C-llMUaJ.js";import{u as nt}from"./utils-BsGrhMNe.js";import"./prism-python-bKXu7ZlJ.js";import"./Community-Dw1micSV.js";import"./svelte/svelte.js";import"./Edit-BpRIf5rU.js";import"./Undo-DCjBnnSO.js";import"./DownloadLink-QIttOhoR.js";import"./file-url-DoxvUUVV.js";import"./hls-CnVhpNcu.js";var ce=Object.prototype.hasOwnProperty;function _e(l,e,n){for(n of l.keys())if(Y(n,e))return n}function Y(l,e){var n,t,r;if(l===e)return!0;if(l&&e&&(n=l.constructor)===e.constructor){if(n===Date)return l.getTime()===e.getTime();if(n===RegExp)return l.toString()===e.toString();if(n===Array){if((t=l.length)===e.length)for(;t--&&Y(l[t],e[t]););return t===-1}if(n===Set){if(l.size!==e.size)return!1;for(t of l)if(r=t,r&&typeof r=="object"&&(r=_e(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(l.size!==e.size)return!1;for(t of l)if(r=t[0],r&&typeof r=="object"&&(r=_e(e,r),!r)||!Y(t[1],e.get(r)))return!1;return!0}if(n===ArrayBuffer)l=new Uint8Array(l),e=new Uint8Array(e);else if(n===DataView){if((t=l.byteLength)===e.byteLength)for(;t--&&l.getInt8(t)===e.getInt8(t););return t===-1}if(ArrayBuffer.isView(l)){if((t=l.byteLength)===e.byteLength)for(;t--&&l[t]===e[t];);return t===-1}if(!n||typeof l=="object"){t=0;for(n in l)if(ce.call(l,n)&&++t&&!ce.call(e,n)||!(n in e)||!Y(l[n],e[n]))return!1;return Object.keys(e).length===t}}return l!==l&&e!==e}async function it(l){return l?`<div style="display: flex; flex-wrap: wrap; gap: 16px">${(await Promise.all(l.map(async([n,t])=>n===null||!n.url?"":await nt(n.url)))).map(n=>`<img src="${n}" style="height: 400px" />`).join("")}</div>`:""}const{SvelteComponent:rt,add_render_callback:ot,append:R,attr:$,binding_callbacks:re,bubble:me,check_outros:U,create_component:B,destroy_component:L,destroy_each:Ee,detach:E,element:S,empty:De,ensure_array_like:le,flush:I,globals:ft,group_outros:C,init:st,insert:D,is_function:ut,listen:Z,mount_component:T,noop:at,run_all:ct,safe_not_equal:_t,set_data:Me,set_style:V,space:A,text:Re,toggle_class:M,transition_in:h,transition_out:d}=window.__gradio__svelte__internal,{window:Ae}=ft,{createEventDispatcher:mt,onMount:ht}=window.__gradio__svelte__internal,{tick:gt}=window.__gradio__svelte__internal;function he(l,e,n){const t=l.slice();return t[47]=e[n],t[49]=n,t}function ge(l,e,n){const t=l.slice();return t[50]=e[n],t[51]=e,t[49]=n,t}function pe(l){let e,n;return e=new Ke({props:{show_label:l[2],Icon:Le,label:l[3]||"Gallery"}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&4&&(i.show_label=t[2]),r[0]&8&&(i.label=t[3]||"Gallery"),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function pt(l){let e,n,t,r,i,s,c=l[22]&&l[7]&&de(l),o=l[12]&&l[1]===null&&ze(l),p=le(l[16]),u=[];for(let a=0;a<p.length;a+=1)u[a]=$e(he(l,p,a));const g=a=>d(u[a],1,1,()=>{u[a]=null});return{c(){e=S("div"),c&&c.c(),n=A(),t=S("div"),o&&o.c(),r=A(),i=S("div");for(let a=0;a<u.length;a+=1)u[a].c();$(i,"class","grid-container svelte-842rpi"),V(i,"--grid-cols",l[4]),V(i,"--grid-rows",l[5]),V(i,"--object-fit",l[8]),V(i,"height",l[6]),M(i,"pt-6",l[2]),$(t,"class","grid-wrap svelte-842rpi"),M(t,"minimal",l[13]==="minimal"),M(t,"fixed-height",l[13]!=="minimal"&&(!l[6]||l[6]=="auto")),M(t,"hidden",l[17]),$(e,"class","gallery-container")},m(a,_){D(a,e,_),c&&c.m(e,null),R(e,n),R(e,t),o&&o.m(t,null),R(t,r),R(t,i);for(let b=0;b<u.length;b+=1)u[b]&&u[b].m(i,null);l[43](e),s=!0},p(a,_){if(a[22]&&a[7]?c?(c.p(a,_),_[0]&4194432&&h(c,1)):(c=de(a),c.c(),h(c,1),c.m(e,n)):c&&(C(),d(c,1,1,()=>{c=null}),U()),a[12]&&a[1]===null?o?(o.p(a,_),_[0]&4098&&h(o,1)):(o=ze(a),o.c(),h(o,1
vendor: 16,898 bytes, lines 1-2
1),o.m(t,r)):o&&(C(),d(o,1,1,()=>{o=null}),U()),_[0]&8454274){p=le(a[16]);let b;for(b=0;b<p.length;b+=1){const j=he(a,p,b);u[b]?(u[b].p(j,_),h(u[b],1)):(u[b]=$e(j),u[b].c(),h(u[b],1),u[b].m(i,null))}for(C(),b=p.length;b<u.length;b+=1)g(b);U()}(!s||_[0]&16)&&V(i,"--grid-cols",a[4]),(!s||_[0]&32)&&V(i,"--grid-rows",a[5]),(!s||_[0]&256)&&V(i,"--object-fit",a[8]),(!s||_[0]&64)&&V(i,"height",a[6]),(!s||_[0]&4)&&M(i,"pt-6",a[2]),(!s||_[0]&8192)&&M(t,"minimal",a[13]==="minimal"),(!s||_[0]&8256)&&M(t,"fixed-height",a[13]!=="minimal"&&(!a[6]||a[6]=="auto")),(!s||_[0]&131072)&&M(t,"hidden",a[17])},i(a){if(!s){h(c),h(o);for(let _=0;_<p.length;_+=1)h(u[_]);s=!0}},o(a){d(c),d(o),u=u.filter(Boolean);for(let _=0;_<u.length;_+=1)d(u[_]);s=!1},d(a){a&&E(e),c&&c.d(),o&&o.d(),Ee(u,a),l[43](null)}}}function dt(l){let e,n;return e=new Qe({props:{unpadded_box:!0,size:"large",$$slots:{default:[It]},$$scope:{ctx:l}}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[1]&2097152&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function de(l){let e,n,t,r,i,s,c,o,p,u,g,a;n=new tt({props:{display_top_corner:l[15],$$slots:{default:[bt]},$$scope:{ctx:l}}});const _=[kt,wt],b=[];function j(k,v){return"image"in k[22]?0:1}i=j(l),s=b[i]=_[i](l);let w=l[22]?.caption&&ye(l),y=le(l[16]),m=[];for(let k=0;k<y.length;k+=1)m[k]=je(ge(l,y,k));const x=k=>d(m[k],1,1,()=>{m[k]=null});return{c(){e=S("button"),B(n.$$.fragment),t=A(),r=S("button"),s.c(),c=A(),w&&w.c(),o=A(),p=S("div");for(let k=0;k<m.length;k+=1)m[k].c();$(r,"class","media-button svelte-842rpi"),V(r,"height","calc(100% - "+(l[22].caption?"80px":"60px")+")"),$(r,"aria-label","detailed view of selected image"),$(p,"class","thumbnails scroll-hide svelte-842rpi"),$(p,"data-testid","container_el"),$(e,"class","preview svelte-842rpi"),M(e,"minimal",l[13]==="minimal")},m(k,v){D(k,e,v),T(n,e,null),R(e,t),R(e,r),b[i].m(r,null),R(e,c),w&&w.m(e,null),R(e,o),R(e,p);for(let N=0;N<m.length;N+=1)m[N]&&m[N].m(p,null);l[40](p),u=!0,g||(a=[Z(r,"click",function(){ut("image"in l[22]?l[37]:null)&&("image"in l[22]?l[37]:null).apply(this,arguments)}),Z(e,"keydown",l[25])],g=!0)},p(k,v){l=k;const N={};v[0]&32768&&(N.display_top_corner=l[15]),v[0]&4673026|v[1]&2097152&&(N.$$scope={dirty:v,ctx:l}),n.$set(N);let q=i;if(i=j(l),i===q?b[i].p(l,v):(C(),d(b[q],1,1,()=>{b[q]=null}),U(),s=b[i],s?s.p(l,v):(s=b[i]=_[i](l),s.c()),h(s,1),s.m(r,null)),(!u||v[0]&4194304)&&V(r,"height","calc(100% - "+(l[22].caption?"80px":"60px")+")"),l[22]?.caption?w?w.p(l,v):(w=ye(l),w.c(),w.m(e,o)):w&&(w.d(1),w=null),v[0]&598018){y=le(l[16]);let z;for(z=0;z<y.length;z+=1){const H=ge(l,y,z);m[z]?(m[z].p(H,v),h(m[z],1)):(m[z]=je(H),m[z].c(),h(m[z],1),m[z].m(p,null))}for(C(),z=y.length;z<m.length;z+=1)x(z);U()}(!u||v[0]&8192)&&M(e,"minimal",l[13]==="minimal")},i(k){if(!u){h(n.$$.fragment,k),h(s);for(let v=0;v<y.length;v+=1)h(m[v]);u=!0}},o(k){d(n.$$.fragment,k),d(s),m=m.filter(Boolean);for(let v=0;v<m.length;v+=1)d(m[v]);u=!1},d(k){k&&E(e),L(n),b[i].d(),w&&w.d(),Ee(m,k),l[40](null),g=!1,ct(a)}}}function be(l){let e,n;return e=new Be({props:{Icon:xe,label:l[11]("common.download")}}),e.$on("click",l[33]),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&2048&&(i.label=t[11]("common.download")),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function we(l){let e,n;return e=new et({props:{container:l[18]}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&262144&&(i.container=t[18]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function ke(l){let e,n,t;return n=new Ye({props:{i18n:l[11],value:l[16],formatter:it}}),n.$on("share",l[34]),n.$on("error",l[35]),{c(){e=S("div"),B(n.$$.fragment),$(e,"class","icon-button")},m(r,i){D(r,e,i),T(n,e,null),t=!0},p(r,i){const s={};i[0]&2048&&(s.i18n=r[11]),i[0]&65536&&(s.value=r[16]),n.$set(s)},i(r){t||(h(n.$$.fragment,r),t=!0)},o(r){d(n.$$.fragment,r),t=!1},d(r){r&&E(e),L(n)}}}function ve(l){let e,n;return e=new Be({props:{Icon:Ze,label:"Close"}}),e.$on("click",l[36]),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p:at,i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function bt(l){let e,n,t,r,i,s=l[10]&&be(l),c=l[14]&&we(l),o=l[9]&&ke(l),p=!l[17]&&ve(l);return{c(){s&&s.c(),e=A(),c&&c.c(),n=A(),o&&o.c(),t=A(),p&&p.c(),r=De()},m(u,g){s&&s.m(u,g),D(u,e,g),c&&c.m(u,g),D(u,n,g),o&&o.m(u,g),D(u,t,g),p&&p.m(u,g),D(u,r,g),i=!0},p(u,g){u[10]?s?(s.p(u,g),g[0]&1024&&h(s,1)):(s=be(u),s.c(),h(s,1),s.m(e.parentNode,e)):s&&(C(),d(s,1,1,()=>{s=null}),U()),u[14]?c?(c.p(u,g),g[0]&16384&&h(c,1)):(c=we(u),c.c(),h(c,1),c.m(n.parentNode,n)):c&&(C(),d(c,1,1,()=>{c=null}),U()),u[9]?o?(o.p(u,g),g[0]&512&&h(o,1)):(o=ke(u),o.c(),h(o,1),o.m(t.parentNode,t)):o&&(C(),d(o,1,1,()=>{o=null}),U()),u[17]?p&&(C(),d(p,1,1,()=>{p=null}),U()):p?(p.p(u,g),g[0]&131072&&h(p,1)):(p=ve(u),p.c(),h(p,1),p.m(r.parentNode,r))},i(u){i||(h(s),h(c),h(o),h(p),i=!0)},o(u){d(s),d(c),d(o),d(p),i=!1},d(u){u&&(E(e),E(n),E(t),E(r)),s&&s.d(u),c&&c.d(u),o&&o.d(u),p&&p.d(u)}}}function wt(l){let e,n;return e=new fe({props:{src:l[22].video.url,"data-testid":"detailed-video",alt:l[22].caption||"",loading:"lazy",loop:!1,is_stream:!1,muted:!1,controls:!0}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&4194304&&(i.src=t[22].video.url),r[0]&4194304&&(i.alt=t[22].caption||""),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function kt(l){let e,n;return e=new oe({props:{"data-testid":"detailed-image",src:l[22].image.url,alt:l[22].caption||"",title:l[22].caption||null,class:l[22].caption&&"with-caption",loading:"lazy"}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&4194304&&(i.src=t[22].image.url),r[0]&4194304&&(i.alt=t[22].caption||""),r[0]&4194304&&(i.title=t[22].caption||null),r[0]&4194304&&(i.class=t[22].caption&&"with-caption"),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function ye(l){let e,n=l[22].caption+"",t;return{c(){e=S("caption"),t=Re(n),$(e,"class","caption svelte-842rpi")},m(r,i){D(r,e,i),R(e,t)},p(r,i){i[0]&4194304&&n!==(n=r[22].caption+"")&&Me(t,n)},d(r){r&&E(e)}}}function vt(l){let e,n,t,r;return e=new Te({}),t=new fe({props:{src:l[50].video.url,title:l[50].caption||null,is_stream:!1,"data-testid":"thumbnail "+(l[49]+1),alt:"",loading:"lazy",loop:!1}}),{c(){B(e.$$.fragment),n=A(),B(t.$$.fragment)},m(i,s){T(e,i,s),D(i,n,s),T(t,i,s),r=!0},p(i,s){const c={};s[0]&65536&&(c.src=i[50].video.url),s[0]&65536&&(c.title=i[50].caption||null),t.$set(c)},i(i){r||(h(e.$$.fragment,i),h(t.$$.fragment,i),r=!0)},o(i){d(e.$$.fragment,i),d(t.$$.fragment,i),r=!1},d(i){i&&E(n),L(e,i),L(t,i)}}}function yt(l){let e,n;return e=new oe({props:{src:l[50].image.url,title:l[50].caption||null,"data-testid":"thumbnail "+(l[49]+1),alt:"",loading:"lazy"}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&65536&&(i.src=t[50].image.url),r[0]&65536&&(i.title=t[50].caption||null),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function je(l){let e,n,t,r,i,s=l[49],c,o,p;const u=[yt,vt],g=[];function a(w,y){return"image"in w[50]?0:1}n=a(l),t=g[n]=u[n](l);const _=()=>l[38](e,s),b=()=>l[38](null,s);function j(){return l[39](l[49])}return{c(){e=S("button"),t.c(),r=A(),$(e,"class","thumbnail-item thumbnail-small svelte-842rpi"),$(e,"aria-label",i="Thumbnail "+(l[49]+1)+" of "+l[16].length),M(e,"selected",l[1]===l[49]&&l[13]!=="minimal")},m(w,y){D(w,e,y),g[n].m(e,null),R(e,r),_(),c=!0,o||(p=Z(e,"click",j),o=!0)},p(w,y){l=w;let m=n;n=a(l),n===m?g[n].p(l,y):(C(),d(g[m],1,1,()=>{g[m]=null}),U(),t=g[n],t?t.p(l,y):(t=g[n]=u[n](l),t.c()),h(t,1),t.m(e,r)),(!c||y[0]&65536&&i!==(i="Thumbnail "+(l[49]+1)+" of "+l[16].length))&&$(e,"aria-label",i),s!==l[49]&&(b(),s=l[49],_()),(!c||y[0]&8194)&&M(e,"selected",l[1]===l[49]&&l[13]!=="minimal")},i(w){c||(h(t),c=!0)},o(w){d(t),c=!1},d(w){w&&E(e),g[n].d(),b(),o=!1,p()}}}function ze(l){let e,n;return e=new lt({props:{i18n:l[11]}}),e.$on("clear",l[41]),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&2048&&(i.i18n=t[11]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function jt(l){let e,n,t,r;return e=new Te({}),t=new fe({props:{src:l[47].video.url,title:l[47].caption||null,is_stream:!1,"data-testid":"thumbnail "+(l[49]+1),alt:"",loading:"lazy",loop:!1}}),{c(){B(e.$$.fragment),n=A(),B(t.$$.fragment)},m(i,s){T(e,i,s),D(i,n,s),T(t,i,s),r=!0},p(i,s){const c={};s[0]&65536&&(c.src=i[47].video.url),s[0]&65536&&(c.title=i[47].caption||null),t.$set(c)},i(i){r||(h(e.$$.fragment,i),h(t.$$.fragment,i),r=!0)},o(i){d(e.$$.fragment,i),d(t.$$.fragment,i),r=!1},d(i){i&&E(n),L(e,i),L(t,i)}}}function zt(l){let e,n;return e=new oe({props:{alt:l[47].caption||"",src:typeof l[47].image=="string"?l[47].image:l[47].image.url,loading:"lazy"}}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},p(t,r){const i={};r[0]&65536&&(i.alt=t[47].caption||""),r[0]&65536&&(i.src=typeof t[47].image=="string"?t[47].image:t[47].image.url),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function Ie(l){let e,n=l[47].caption+"",t;return{c(){e=S("div"),t=Re(n),$(e,"class","caption-label svelte-842rpi")},m(r,i){D(r,e,i),R(e,t)},p(r,i){i[0]&65536&&n!==(n=r[47].caption+"")&&Me(t,n)},d(r){r&&E(e)}}}function $e(l){let e,n,t,r,i,s,c,o,p;const u=[zt,jt],g=[];function a(j,w){return"image"in j[47]?0:1}n=a(l),t=g[n]=u[n](l);let _=l[47].caption&&Ie(l);function b(){return l[42](l[49])}return{c(){e=S("button"),t.c(),r=A(),_&&_.c(),i=A(),$(e,"class","thumbnail-item thumbnail-lg svelte-842rpi"),$(e,"aria-label",s="Thumbnail "+(l[49]+1)+" of "+l[16].length),M(e,"selected",l[1]===l[49])},m(j,w){D(j,e,w),g[n].m(e,null),R(e,r),_&&_.m(e,null),R(e,i),c=!0,o||(p=Z(e,"click",b),o=!0)},p(j,w){l=j;let y=n;n=a(l),n===y?g[n].p(l,w):(C(),d(g[y],1,1,()=>{g[y]=null}),U(),t=g[n],t?t.p(l,w):(t=g[n]=u[n](l),t.c()),h(t,1),t.m(e,r)),l[47].caption?_?_.p(l,w):(_=Ie(l),_.c(),_.m(e,i)):_&&(_.d(1),_=null),(!c||w[0]&65536&&s!==(s="Thumbnail "+(l[49]+1)+" of "+l[16].length))&&$(e,"aria-label",s),(!c||w[0]&2)&&M(e,"selected",l[1]===l[49])},i(j){c||(h(t),c=!0)},o(j){d(t),c=!1},d(j){j&&E(e),g[n].d(),_&&_.d(),o=!1,p()}}}function It(l){let e,n;return e=new Le({}),{c(){B(e.$$.fragment)},m(t,r){T(e,t,r),n=!0},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){d(e.$$.fragment,t),n=!1},d(t){L(e,t)}}}function $t(l){let e,n,t,r,i,s,c;ot(l[32]);let o=l[2]&&pe(l);const p=[dt,pt],u=[];function g(a,_){return a[0]==null||a[16]==null||a[16].length===0?0:1}return n=g(l),t=u[n]=p[n](l),{c(){o&&o.c(),e=A(),t.c(),r=De()},m(a,_){o&&o.m(a,_),D(a,e,_),u[n].m(a,_),D(a,r,_),i=!0,s||(c=Z(Ae,"resize",l[32]),s=!0)},p(a,_){a[2]?o?(o.p(a,_),_[0]&4&&h(o,1)):(o=pe(a),o.c(),h(o,1),o.m(e.parentNode,e)):o&&(C(),d(o,1,1,()=>{o=null}),U());let b=n;n=g(a),n===b?u[n].p(a,_):(C(),d(u[b],1,1,()=>{u[b]=null}),U(),t=u[n],t?t.p(a,_):(t=u[n]=p[n](a),t.c()),h(t,1),t.m(r.parentNode,r))},i(a){i||(h(o),h(t),i=!0)},o(a){d(o),d(t),i=!1},d(a){a&&(E(e),E(r)),o&&o.d(a),u[n].d(a),s=!1,c()}}}function Bt(l,e,n){let t,r,i,{show_label:s=!0}=e,{label:c}=e,{value:o=null}=e,{columns:p=[2]}=e,{rows:u=void 0}=e,{height:g="auto"}=e,{preview:a}=e,{allow_preview:_=!0}=e,{object_fit:b="cover"}=e,{show_share_button:j=!1}=e,{show_download_button:w=!1}=e,{i18n:y}=e,{selected_index:m=null}=e,{interactive:x}=e,{_fetch:k}=e,{mode:v="normal"}=e,{show_fullscreen_button:N=!0}=e,{display_icon_button_wrapper_top_corner:q=!1}=e,z=!1,H;const J=mt();let K=!0,O=null,ne=o;m==null&&a&&o?.length&&(m=0);let ie=m;function se(f){const P=f.target,G=f.offsetX,X=P.offsetWidth/2;G<X?n(1,m=t):n(1,m=r)}function Ue(f){switch(f.code){case"Escape":f.preventDefault(),n(1,m=null);break;case"ArrowLeft":f.preventDefault(),n(1,m=t);break;case"ArrowRight":f.preventDefault(),n(1,m=r);break}}let W=[],F;async function Ce(f){if(typeof f!="number"||(await gt(),W[f]===void 0))return;W[f]?.focus();const{left:P,width:G}=F.getBoundingClientRect(),{left:ee,width:X}=W[f].getBoundingClientRect(),Q=ee-P+X/2-G/2+F.scrollLeft;F&&typeof F.scrollTo=="function"&&F.scrollTo({left:Q<0?0:Q,behavior:"smooth"})}let ue=0;async function ae(f,P){let G;try{G=await k(f)}catch(Q){if(Q instanceof TypeError){window.open(f,"_blank","noreferrer");return}throw Q}const ee=await G.blob(),X=URL.createObjectURL(ee),te=document.createElement("a");te.href=X,te.download=P,te.click(),URL.revokeObjectURL(X)}ht(()=>{document.addEventListener("fullscreenchange",()=>{n(17,z=!!document.fullscreenElement)})});function Ne(){n(21,ue=Ae.innerHeight)}const Se=()=>{const f="image"in i?i?.image:i?.video;if(f==null)return;const{url:P,orig_name:G}=f;P&&ae(P,G??"image")};function Oe(f){me.call(this,l,f)}function Pe(f){me.call(this,l,f)}const Ve=()=>{n(1,m=null),J("preview_close")},Fe=f=>se(f);function Ge(f,P){re[f?"unshift":"push"](()=>{W[P]=f,n(19,W)})}const qe=f=>n(1,m=f);function He(f){re[f?"unshift":"push"](()=>{F=f,n(20,F)})}const We=()=>n(0,o=[]),Xe=f=>{m===null&&_&&J("preview_open"),n(1,m=f)};function Je(f){re[f?"unshift":"push"](()=>{H=f,n(18,H)})}return l.$$set=f=>{"show_label"in f&&n(2,s=f.show_label),"label"in f&&n(3,c=f.label),"value"in f&&n(0,o=f.value),"columns"in f&&n(4,p=f.columns),"rows"in f&&n(5,u=f.rows),"height"in f&&n(6,g=f.height),"preview"in f&&n(27,a=f.preview),"allow_preview"in f&&n(7,_=f.allow_preview),"object_fit"in f&&n(8,b=f.object_fit),"show_share_button"in f&&n(9,j=f.show_share_button),"show_download_button"in f&&n(10,w=f.show_download_button),"i18n"in f&&n(11,y=f.i18n),"selected_index"in f&&n(1,m=f.selected_index),"interactive"in f&&n(12,x=f.interactive),"_fetch"in f&&n(28,k=f._fetch),"mode"in f&&n(13,v=f.mode),"show_fullscreen_button"in f&&n(14,N=f.show_fullscreen_button),"display_icon_button_wrapper_top_corner"in f&&n(15,q=f.display_icon_button_wrapper_top_corner)},l.$$.update=()=>{l.$$.dirty[0]&536870913&&n(29,K=o==null||o.length===0?!0:K),l.$$.dirty[0]&1&&n(16,O=o==null?null:o.map(f=>"video"in f?{video:f.video,caption:f.caption}:"image"in f?{image:f.image,caption:f.caption}:{})),l.$$.dirty[0]&1744830467&&(Y(ne,o)||(K?(n(1,m=a&&o?.length?0:null),n(29,K=!1)):m!==null&&o!==null?n(1,m=Math.max(0,Math.min(m,o.length-1))):n(1,m=null),J("change"),n(30,ne=o))),l.$$.dirty[0]&65538|l.$$.dirty[1]&1&&m!==ie&&(n(31,ie=m),m!==null&&(O!=null&&n(1,m=Math.max(0,Math.min(m,O.length-1))),J("select",{index:m,value:O?.[m]}))),l.$$.dirty[0]&65538&&(t=((m??0)+(O?.length??0)-1)%(O?.length??0)),l.$$.dirty[0]&65538&&(r=((m??0)+1)%(O?.length??0)),l.$$.dirty[0]&130&&_&&Ce(m),l.$$.dirty[0]&65538&&n(22,i=m!=null&&O!=null?O[m]:null)},[o,m,s,c,p,u,g,_,b,j,w,y,x,v,N,q,O,z,H,W,F,ue,i,J,se,Ue,ae,a,k,K,ne,ie,Ne,Se,Oe,Pe,Ve,Fe,Ge,qe,He,We,Xe,Je]}class tl extends rt{constructor(e){super(),st(this,e,Bt,$t,_t,{show_label:2,label:3,value:0,columns:4,rows:5,height:6,preview:27,allow_preview:7,object_fit:8,show_share_button:9,show_download_button:10,i18n:11,selected_index:1,interactive:12,_fetch:28,mode:13,show_fullscreen_button:14,display_icon_button_wrapper_top_corner:15},null,[-1,-1])}get show_label(){return this.$$.ctx[2]}set show_label(e){this.$$set({show_label:e}),I()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),I()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),I()}get columns(){return this.$$.ctx[4]}set columns(e){this.$$set({columns:e}),I()}get rows(){return this.$$.ctx[5]}set rows(e){this.$$set({rows:e}),I()}get height(){return this.$$.ctx[6]}set height(e){this.$$set({height:e}),I()}get preview(){return this.$$.ctx[27]}set preview(e){this.$$set({preview:e}),I()}get allow_preview(){return this.$$.ctx[7]}set allow_preview(e){this.$$set({allow_preview:e}),I()}get object_fit(){return this.$$.ctx[8]}set object_fit(e){this.$$set({object_fit:e}),I()}get show_share_button(){return this.$$.ctx[9]}set show_share_button(e){this.$$set({show_share_button:e}),I()}get show_download_button(){return this.$$.ctx[10]}set show_download_button(e){this.$$set({show_download_button:e}),I()}get i18n(){return this.$$.ctx[11]}set i18n(e){this.$$set({i18n:e}),I()}get selected_index(){return this.$$.ctx[1]}set selected_index(e){this.$$set({selected_index:e}),I()}get interactive(){return this.$$.ctx[12]}set interactive(e){this.$$set({interactive:e}),I()}get _fetch(){return this.$$.ctx[28]}set _fetch(e){this.$$set({_fetch:e}),I()}get mode(){return this.$$.ctx[13]}set mode(e){this.$$set({mode:e}),I()}get show_fullscreen_button(){return this.$$.ctx[14]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),I()}get display_icon_button_wrapper_top_corner(){return this.$$.ctx[15]}set display_icon_button_wrapper_top_corner(e){this.$$set({display_icon_button_wrapper_top_corner:e}),I()}}export{tl as default};
2//# sourceMappingURL=Gallery-_8XnucUC.js.map

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.