{"version":3,"file":"Embed-DcWx_k2L.js","sources":["../../../../js/core/src/images/spaces.svg","../../../../js/core/src/Embed.svelte"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='10'%20fill='none'%3e%3cpath%20fill='%23FF3270'%20d='M1.93%206.03v2.04h2.04V6.03H1.93Z'/%3e%3cpath%20fill='%23861FFF'%20d='M6.03%206.03v2.04h2.04V6.03H6.03Z'/%3e%3cpath%20fill='%23097EFF'%20d='M1.93%201.93v2.04h2.04V1.93H1.93Z'/%3e%3cpath%20fill='%23000'%20fill-rule='evenodd'%20d='M.5%201.4c0-.5.4-.9.9-.9h3.1a.9.9%200%200%201%20.87.67A2.44%202.44%200%200%201%209.5%202.95c0%20.65-.25%201.24-.67%201.68.39.1.67.46.67.88v3.08c0%20.5-.4.91-.9.91H1.4a.9.9%200%200%201-.9-.9V1.4Zm1.43.53v2.04h2.04V1.93H1.93Zm0%206.14V6.03h2.04v2.04H1.93Zm4.1%200V6.03h2.04v2.04H6.03Zm0-5.12a1.02%201.02%200%201%201%202.04%200%201.02%201.02%200%200%201-2.04%200Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23FFD702'%20d='M7.05%201.93a1.02%201.02%200%201%200%200%202.04%201.02%201.02%200%200%200%200-2.04Z'/%3e%3c/svg%3e\"","<script lang=\"ts\">\n\timport space_logo from \"./images/spaces.svg\";\n\timport { _ } from \"svelte-i18n\";\n\texport let wrapper: HTMLDivElement;\n\texport let version: string;\n\texport let initial_height: string;\n\texport let fill_width: boolean;\n\texport let is_embed: boolean;\n\n\texport let space: string | null;\n\texport let display: boolean;\n\texport let info: boolean;\n\texport let loaded: boolean;\n</script>\n\n<div\n\tbind:this={wrapper}\n\tclass:app={!display && !is_embed}\n\tclass:fill_width\n\tclass:embed-container={display}\n\tclass:with-info={info}\n\tclass=\"gradio-container gradio-container-{version}\"\n\tstyle:min-height={loaded ? \"initial\" : initial_height}\n\tstyle:flex-grow={!display ? \"1\" : \"auto\"}\n\tdata-iframe-height\n>\n\t<div class=\"main\">\n\t\t<slot />\n\t</div>\n\t{#if display && space && info}\n\t\t<div class=\"info\">\n\t\t\t<span>\n\t\t\t\t<a href=\"https://huggingface.co/spaces/{space}\" class=\"title\">{space}</a\n\t\t\t\t>\n\t\t\t</span>\n\t\t\t<span>\n\t\t\t\t{$_(\"common.built_with\")}\n\t\t\t\t<a class=\"gradio\" href=\"https://gradio.app\">Gradio</a>.\n\t\t\t</span>\n\t\t\t<span>\n\t\t\t\t{$_(\"common.hosted_on\")}\n\t\t\t\t<a class=\"hf\" href=\"https://huggingface.co/spaces\"\n\t\t\t\t\t><span class=\"space-logo\">\n\t\t\t\t\t\t<img src={space_logo} alt=\"Hugging Face Space\" />\n\t\t\t\t\t</span> Spaces</a\n\t\t\t\t>\n\t\t\t</span>\n\t\t</div>\n\t{/if}\n</div>\n\n<style>\n\t.gradio-container {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\tflex-direction: column;\n\t\tpadding: 0;\n\t\tmin-height: 1px;\n\t\toverflow: hidden;\n\t\tcolor: var(--button-secondary-text-color);\n\t}\n\n\t.embed-container {\n\t\tmargin: var(--size-4) 0px;\n\t\tborder: 1px solid var(--button-secondary-border-color);\n\t\tborder-radius: var(--embed-radius);\n\t}\n\n\t.with-info {\n\t\tpadding-bottom: var(--size-7);\n\t}\n\n\t.embed-container > .main {\n\t\tpadding: var(--size-4);\n\t}\n\n\t.app > .main {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t.app {\n\t\tposition: relative;\n\t\tmargin: auto;\n\t\tpadding: var(--size-4) var(--size-8);\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t@media (--screen-sm) {\n\t\t.app:not(.fill_width) {\n\t\t\tmax-width: 640px;\n\t\t}\n\t}\n\t@media (--screen-md) {\n\t\t.app:not(.fill_width) {\n\t\t\tmax-width: 768px;\n\t\t}\n\t}\n\t@media (--screen-lg) {\n\t\t.app:not(.fill_width) {\n\t\t\tmax-width: 1024px;\n\t\t}\n\t}\n\t@media (--screen-xl) {\n\t\t.app:not(.fill_width) {\n\t\t\tmax-width: 1280px;\n\t\t}\n\t}\n\t@media (--screen-xxl) {\n\t\t.app:not(.fill_width) {\n\t\t\tmax-width: 1536px;\n\t\t}\n\t}\n\n\t.info {\n\t\tdisplay: flex;\n\t\tposition: absolute;\n\t\tbottom: 0;\n\t\tjustify-content: flex-start;\n\t\tborder-top: 1px solid var(--button-secondary-border-color);\n\t\tpadding: var(--size-1) var(--size-5);\n\t\twidth: 100%;\n\t\tcolor: var(--body-text-color-subdued);\n\t\tfont-size: var(--text-md);\n\t\twhite-space: nowrap;\n\t}\n\n\t.info > span {\n\t\tword-wrap: break-word;\n\t\t-break: keep-all;\n\t\tdisplay: block;\n\t\tword-break: keep-all;\n\t}\n\n\t.info > span:nth-child(1) {\n\t\tmargin-right: 4px;\n\t\tmin-width: 0px;\n\t\tmax-width: max-content;\n\t\toverflow: hidden;\n\t\tcolor: var(--body-text-color);\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n\n\t.info > span:nth-child(2) {\n\t\tmargin-right: 3px;\n\t}\n\n\t.info > span:nth-child(2),\n\t.info > span:nth-child(3) {\n\t\twidth: max-content;\n\t}\n\n\t.info > span:nth-child(3) {\n\t\talign-self: flex-end;\n\t\tjustify-self: flex-end;\n\t\tmargin-left: auto;\n\t\ttext-align: right;\n\t}\n\n\t.info > span:nth-child(1) {\n\t\tflex-shrink: 9;\n\t}\n\n\t.hidden-title {\n\t\tposition: absolute;\n\t\tleft: var(--size-5);\n\t\topacity: 0;\n\t\tbackground: var(--button-secondary-background-fill);\n\t\tpadding-right: 4px;\n\t}\n\n\t.info a {\n\t\tcolor: var(--body-text-color);\n\t}\n\n\t.title {\n\t\tfont-size: var(--text-sm);\n\t\tfont-family: var(--font-mono);\n\t}\n\n\t.hf {\n\t\tmargin-left: 5px;\n\t}\n\n\t.space-logo img {\n\t\tdisplay: inline-block;\n\t\tmargin-bottom: 4px;\n\t\theight: 12px;\n\t}\n\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n</style>\n"],"names":["space_logo","t2_value","ctx","t7_value","insert","target","div","anchor","append","span0","a0","span1","a1","span3","a2","dirty","set_data","t2","t7","create_if_block","toggle_class","div1","div0","wrapper","$$props","version","initial_height","fill_width","is_embed","space","display","info","loaded","$$value"],"mappings":"wCAAA,MAAeA,EAAA,wuCCoCVC,EAAAC,KAAG,mBAAmB,EAAA,eAItBC,EAAAD,KAAG,kBAAkB,EAAA,wDARyCA,EAAK,CAAA,CAAA,qEAKd,GACvD,0GAKaF,CAAU,iHAXkBE,EAAK,CAAA,CAAA,uTAF/CE,EAiBKC,EAAAC,EAAAC,CAAA,EAhBJC,EAGMF,EAAAG,CAAA,EAFLD,EACAC,EAAAC,CAAA,gBAEDF,EAGMF,EAAAK,CAAA,gBADLH,EAAsDG,EAAAC,CAAA,gBAEvDJ,EAOMF,EAAAO,CAAA,gBALLL,EAIAK,EAAAC,CAAA,oBAb+DZ,EAAK,CAAA,CAAA,gDAA5BA,EAAK,CAAA,kBAI5Ca,EAAA,KAAAd,KAAAA,EAAAC,KAAG,mBAAmB,EAAA,KAAAc,EAAAC,EAAAhB,CAAA,EAItBc,EAAA,KAAAZ,KAAAA,EAAAD,KAAG,kBAAkB,EAAA,KAAAc,EAAAE,EAAAf,CAAA,8FAXpBD,EAAO,CAAA,GAAIA,EAAK,CAAA,GAAIA,EAAI,CAAA,GAAAiB,EAAAjB,CAAA,gJARaA,EAAO,CAAA,EAAA,gBAAA,+BAJrCkB,EAAAC,EAAA,MAAA,CAAAnB,OAAYA,EAAQ,CAAA,CAAA,+CAETA,EAAO,CAAA,CAAA,kBACbA,EAAI,CAAA,CAAA,mBAEHA,EAAM,CAAA,EAAG,UAAYA,EAAc,CAAA,CAAA,kBACnCA,EAAO,CAAA,EAAS,OAAN,GAAY,UARzCE,EAkC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