@pod-os/elements 0.41.0-rc.fcadbb6.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chunk.URTPIBTY-CyUQzrtC.js → chunk.URTPIBTY-C9cOc4B-.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-Dfzydh50.js → chunk.XQ2OKYYA-CTZvRtz3.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-BhNheC5q.js → chunk.ZGGPD2XJ-BvGHEYp6.js} +1 -1
- package/dist/cjs/{class-map-DFvbJjpM.js → class-map-C9P5WsLw.js} +1 -1
- package/dist/cjs/elements.cjs.js +2 -2
- package/dist/cjs/{index-BP03J2RA.js → index-BPvAwpRj.js} +137 -33
- package/dist/cjs/{index-CFcC3IGM.js → index-CjKppELa.js} +2 -2
- package/dist/cjs/{jsonld-V2RB47OZ-B6QDxKa1.js → jsonld-V2RB47OZ-C8WVLsWC.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +5 -5
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +27 -10
- package/dist/cjs/pos-add-relation.cjs.entry.js +3 -3
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-case.cjs.entry.js +1 -1
- package/dist/cjs/pos-container-contents.cjs.entry.js +2 -2
- package/dist/cjs/pos-container-item_3.cjs.entry.js +4 -4
- package/dist/cjs/pos-document.cjs.entry.js +4 -4
- package/dist/cjs/pos-list.cjs.entry.js +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +412 -122
- package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
- package/dist/cjs/pos-switch.cjs.entry.js +1 -1
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-value.cjs.entry.js +22 -2
- package/dist/collection/components/pos-description/pos-description.js +18 -3
- package/dist/collection/components/pos-label/pos-label.js +15 -4
- package/dist/collection/components/pos-value/pos-value.js +27 -4
- package/dist/components/index2.js +2 -2
- package/dist/components/pos-description2.js +1 -1
- package/dist/components/pos-label2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-value.js +1 -1
- package/dist/custom-elements.json +5 -3
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-33783890.entry.js → p-1b8c9b61.entry.js} +1 -1
- package/dist/elements/p-1bcdde10.entry.js +1 -0
- package/dist/elements/{p-2f122da6.entry.js → p-1e98efdc.entry.js} +1 -1
- package/dist/elements/{p-3ef3a9a9.entry.js → p-380d72c2.entry.js} +1 -1
- package/dist/elements/{p-31370224.entry.js → p-440a8508.entry.js} +1 -1
- package/dist/elements/{p-aca646a4.entry.js → p-4d349a89.entry.js} +1 -1
- package/dist/elements/{p-a234b3fe.entry.js → p-52443feb.entry.js} +1 -1
- package/dist/elements/{p-513f7548.entry.js → p-641e64fd.entry.js} +1 -1
- package/dist/elements/{p-DqO-cIHe.js → p-7TsXf0Xj.js} +1 -1
- package/dist/elements/{p-a78df72b.entry.js → p-941b9b51.entry.js} +1 -1
- package/dist/elements/{p-5506bf9a.entry.js → p-9b5c45b6.entry.js} +1 -1
- package/dist/elements/{p-DPNKR_cm.js → p-BKLehMby.js} +5 -5
- package/dist/elements/p-BzjgviTt.js +67 -0
- package/dist/elements/{p-DO6v4X9H.js → p-C-Ke6Sdx.js} +3 -3
- package/dist/elements/{p-spEUIGXI.js → p-CsdCh9hf.js} +1 -1
- package/dist/elements/{p-Bz2zblgU.js → p-KLP10Ef6.js} +7 -7
- package/dist/elements/{p-d31c55b9.entry.js → p-a62af5eb.entry.js} +1 -1
- package/dist/elements/{p-1e0bd264.entry.js → p-b30e9b9c.entry.js} +9 -9
- package/dist/elements/{p-5f8df3c2.entry.js → p-c1cb97ef.entry.js} +1 -1
- package/dist/elements/p-c60dc303.entry.js +1 -0
- package/dist/elements/{p-c4034954.entry.js → p-c697bb3c.entry.js} +1 -1
- package/dist/elements/{p-0febf76e.entry.js → p-c83d76f9.entry.js} +1 -1
- package/dist/elements/{p-4fa32d10.entry.js → p-ccfbad21.entry.js} +1 -1
- package/dist/elements/{p-e4eae182.entry.js → p-eadbef6c.entry.js} +1 -1
- package/dist/elements/p-f26842e5.entry.js +1 -0
- package/dist/elements/{p-17d63fec.entry.js → p-f57e26b7.entry.js} +1 -1
- package/dist/elements/{p-DpbuT47x.js → p-jSCnU8fW.js} +1 -1
- package/dist/esm/{chunk.URTPIBTY-DGDKVdvN.js → chunk.URTPIBTY-CndE5cVS.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-DY8d9BRU.js → chunk.XQ2OKYYA-BBXcL00i.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-CLV8PNGL.js → chunk.ZGGPD2XJ-DGIJXk11.js} +1 -1
- package/dist/esm/{class-map-CtuZET5H.js → class-map-BaV3g1im.js} +1 -1
- package/dist/esm/elements.js +3 -3
- package/dist/esm/{index-CMbRpNym.js → index-CmKOSDim.js} +137 -33
- package/dist/esm/{index-spEUIGXI.js → index-CsdCh9hf.js} +1 -1
- package/dist/esm/{jsonld-V2RB47OZ-zn531VHn.js → jsonld-V2RB47OZ-CIDz9zb9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +5 -5
- package/dist/esm/pos-add-new-thing_32.entry.js +27 -10
- package/dist/esm/pos-add-relation.entry.js +3 -3
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-image-viewer.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/dist/esm/pos-attachments.entry.js +1 -1
- package/dist/esm/pos-case.entry.js +1 -1
- package/dist/esm/pos-container-contents.entry.js +2 -2
- package/dist/esm/pos-container-item_3.entry.js +4 -4
- package/dist/esm/pos-document.entry.js +4 -4
- package/dist/esm/pos-list.entry.js +1 -1
- package/dist/esm/pos-markdown-document.entry.js +412 -122
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +2 -2
- package/dist/esm/pos-switch.entry.js +1 -1
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/esm/pos-value.entry.js +22 -2
- package/dist/types/components/pos-description/pos-description.d.ts +9 -2
- package/dist/types/components/pos-label/pos-label.d.ts +6 -2
- package/dist/types/components/pos-value/pos-value.d.ts +7 -2
- package/dist/types/components.d.ts +32 -8
- package/package.json +7 -7
- package/dist/elements/p-624503dd.entry.js +0 -1
- package/dist/elements/p-d6e9d178.entry.js +0 -1
- package/dist/elements/p-f9c10964.entry.js +0 -1
- package/dist/elements/p-sVi8GCz5.js +0 -67
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as t}from"./p-
|
|
1
|
+
import{f as t}from"./p-CsdCh9hf.js";var s=Object.defineProperty,i=Object.defineProperties,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,l=(t,s)=>(s=Symbol[t])?s:Symbol.for("Symbol."+t),a=t=>{throw TypeError(t)},c=(t,i,e)=>i in t?s(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,d=(t,s)=>{for(var i in s||(s={}))o.call(s,i)&&c(t,i,s[i]);if(r)for(var i of r(s))h.call(s,i)&&c(t,i,s[i]);return t},u=(t,s)=>i(t,n(s)),v=(t,i,n,r)=>{for(var o,h=r>1?void 0:r?e(i,n):i,l=t.length-1;l>=0;l--)(o=t[l])&&(h=(r?o(i,n,h):o(h))||h);return r&&h&&s(i,n,h),h},f=(t,s,i)=>s.has(t)||a("Cannot "+i),p=function(t,s){this[0]=t,this[1]=s},g=t=>{var s,i=t[l("asyncIterator")],e=!1,n={};return null==i?(i=t[l("iterator")](),s=t=>n[t]=s=>i[t](s)):(i=i.call(t),s=t=>n[t]=s=>{if(e){if(e=!1,"throw"===t)throw s;return s}return e=!0,{done:!1,value:new p(new Promise((e=>{var n=i[t](s);n instanceof Object||a("Object expected"),e(n)})),1)}}),n[l("iterator")]=()=>n,s("next"),"throw"in i?s("throw"):n.throw=t=>{throw t},"return"in i&&s("return"),n},w={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>\n <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>\n <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>\n <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n </svg>\n ',"x-circle-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>\n </svg>\n '},b=[{name:"default",resolver:s=>t(`assets/icons/${s}.svg`)},{name:"system",resolver:t=>t in w?`data:image/svg+xml,${encodeURIComponent(w[t])}`:""}],m=[];function y(t){return b.find((s=>s.name===t))}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
@@ -8,18 +8,18 @@ import{f as t}from"./p-spEUIGXI.js";var s=Object.defineProperty,i=Object.defineP
|
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/,{is:A,defineProperty:L,getOwnPropertyDescriptor:_,getOwnPropertyNames:E,getOwnPropertySymbols:O,getPrototypeOf:j}=Object,
|
|
11
|
+
*/,{is:A,defineProperty:L,getOwnPropertyDescriptor:_,getOwnPropertyNames:E,getOwnPropertySymbols:O,getPrototypeOf:j}=Object,B=globalThis,U=B.trustedTypes,P=U?U.emptyScript:"",T=B.reactiveElementPolyfillSupport,I={toAttribute(t,s){switch(s){case Boolean:t=t?P:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},N=(t,s)=>!A(t,s),R={attribute:!0,type:String,converter:I,reflect:!1,useDefault:!1,hasChanged:N};Symbol.metadata??=Symbol("metadata"),B.litPropertyMetadata??=new WeakMap;let H=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=R){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),e=this.getPropertyDescriptor(t,i,s);void 0!==e&&L(this.prototype,t,e)}}static getPropertyDescriptor(t,s,i){const{get:e,set:n}=_(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const r=e?.call(this);n?.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??R}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=j(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,s=[...E(t),...O(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)s.unshift(z(t))}else void 0!==t&&s.push(z(t));return s}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(C)t.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of s){const s=document.createElement("style"),e=x.litNonce;void 0!==e&&s.setAttribute("nonce",e),s.textContent=i.cssText,t.appendChild(s)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:I).toAttribute(s,i.type);this._$Em=t,null==n?this.removeAttribute(e):this.setAttribute(e,n),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:I;this._$Em=e;const r=n.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,n=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??N)(n,s)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:n},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==n||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H.elementProperties=new Map,H.finalized=new Map,T?.({ReactiveElement:H}),(B.reactiveElementVersions??=[]).push("2.1.1");
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const V=globalThis,D=V.trustedTypes,Z=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,W="$lit$",J=`lit$${Math.random().toFixed(9).slice(2)}$`,q="?"+J,F=`<${q}>`,
|
|
17
|
+
const V=globalThis,D=V.trustedTypes,Z=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,W="$lit$",J=`lit$${Math.random().toFixed(9).slice(2)}$`,q="?"+J,F=`<${q}>`,K=document,G=()=>K.createComment(""),Q=t=>null===t||"object"!=typeof t&&"function"!=typeof t,X=Array.isArray,Y="[ \t\n\f\r]",tt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,it=/>/g,et=RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),nt=/'/g,rt=/"/g,ot=/^(?:script|style|textarea|title)$/i,ht=(t,...s)=>({_$litType$:1,strings:t,values:s}),lt=Symbol.for("lit-noChange"),at=Symbol.for("lit-nothing"),ct=new WeakMap,dt=K.createTreeWalker(K,129);function ut(t,s){if(!X(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Z?Z.createHTML(s):s}const vt=(t,s)=>{const i=t.length-1,e=[];let n,r=2===s?"<svg>":3===s?"<math>":"",o=tt;for(let s=0;s<i;s++){const i=t[s];let h,l,a=-1,c=0;for(;c<i.length&&(o.lastIndex=c,l=o.exec(i),null!==l);)c=o.lastIndex,o===tt?"!--"===l[1]?o=st:void 0!==l[1]?o=it:void 0!==l[2]?(ot.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=et):void 0!==l[3]&&(o=et):o===et?">"===l[0]?(o=n??tt,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?et:'"'===l[3]?rt:nt):o===rt||o===nt?o=et:o===st||o===it?o=tt:(o=et,n=void 0);const d=o===et&&t[s+1].startsWith("/>")?" ":"";r+=o===tt?i+F:a>=0?(e.push(h),i.slice(0,a)+W+i.slice(a)+J+d):i+J+(-2===a?s:d)}return[ut(t,r+(t[i]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),e]};class ft{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[l,a]=vt(t,s);if(this.el=ft.createElement(l,i),dt.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(e=dt.nextNode())&&h.length<o;){if(1===e.nodeType){if(e.hasAttributes())for(const t of e.getAttributeNames())if(t.endsWith(W)){const s=a[r++],i=e.getAttribute(t).split(J),o=/([.?@])?(.*)/.exec(s);h.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?mt:"?"===o[1]?yt:"@"===o[1]?xt:bt}),e.removeAttribute(t)}else t.startsWith(J)&&(h.push({type:6,index:n}),e.removeAttribute(t));if(ot.test(e.tagName)){const t=e.textContent.split(J),s=t.length-1;if(s>0){e.textContent=D?D.emptyScript:"";for(let i=0;i<s;i++)e.append(t[i],G()),dt.nextNode(),h.push({type:2,index:++n});e.append(t[s],G())}}}else if(8===e.nodeType)if(e.data===q)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf(J,t+1));)h.push({type:7,index:n}),t+=J.length-1}n++}}static createElement(t,s){const i=K.createElement("template");return i.innerHTML=t,i}}function pt(t,s,i=t,e){if(s===lt)return s;let n=void 0!==e?i._$Co?.[e]:i._$Cl;const r=Q(s)?void 0:s._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,i,e)),void 0!==e?(i._$Co??=[])[e]=n:i._$Cl=n),void 0!==n&&(s=pt(t,n._$AS(t,s.values),n,e)),s}class gt{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,e=(t?.creationScope??K).importNode(s,!0);dt.currentNode=e;let n=dt.nextNode(),r=0,o=0,h=i[0];for(;void 0!==h;){if(r===h.index){let s;2===h.type?s=new wt(n,n.nextSibling,this,t):1===h.type?s=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(s=new Ct(n,this,t)),this._$AV.push(s),h=i[++o]}r!==h?.index&&(n=dt.nextNode(),r++)}return dt.currentNode=K,e}p(t){let s=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}}class wt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,e){this.type=2,this._$AH=at,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=pt(this,t,s),Q(t)?t===at||null==t||""===t?(this._$AH!==at&&this._$AR(),this._$AH=at):t!==this._$AH&&t!==lt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>X(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==at&&Q(this._$AH)?this._$AA.nextSibling.data=t:this.T(K.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:i}=t,e="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=ft.createElement(ut(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===e)this._$AH.p(s);else{const t=new gt(e,this),i=t.u(this.options);t.p(s),this.T(i),this._$AH=t}}_$AC(t){let s=ct.get(t.strings);return void 0===s&&ct.set(t.strings,s=new ft(t)),s}k(t){X(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const n of t)e===s.length?s.push(i=new wt(this.O(G()),this.O(G()),this,this.options)):i=s[e],i._$AI(n),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class bt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,e,n){this.type=1,this._$AH=at,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=at}_$AI(t,s=this,i,e){const n=this.strings;let r=!1;if(void 0===n)t=pt(this,t,s,0),r=!Q(t)||t!==this._$AH&&t!==lt,r&&(this._$AH=t);else{const e=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=pt(this,e[i+o],s,o),h===lt&&(h=this._$AH[o]),r||=!Q(h)||h!==this._$AH[o],h===at?t=at:t!==at&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!e&&this.j(t)}j(t){t===at?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class mt extends bt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===at?void 0:t}}class yt extends bt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==at)}}class xt extends bt{constructor(t,s,i,e,n){super(t,s,i,e,n),this.type=5}_$AI(t,s=this){if((t=pt(this,t,s,0)??at)===lt)return;const i=this._$AH,e=t===at&&i!==at||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==at&&(i===at||e);e&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ct{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){pt(this,t)}}const St=V.litHtmlPolyfillSupport;St?.(ft,wt),(V.litHtmlVersions??=[]).push("3.3.1");const Mt=globalThis;
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/class $t extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,i)=>{const e=i?.renderBefore??s;let n=e._$litPart$;if(void 0===n){const t=i?.renderBefore??null;e._$litPart$=n=new wt(s.insertBefore(
|
|
22
|
+
*/class $t extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,i)=>{const e=i?.renderBefore??s;let n=e._$litPart$;if(void 0===n){const t=i?.renderBefore??null;e._$litPart$=n=new wt(s.insertBefore(G(),t),t,void 0,i??{})}return n._$AI(t),n})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return lt}}$t._$litElement$=!0,$t.finalized=!0,Mt.litElementHydrateSupport?.({LitElement:$t});const kt=Mt.litElementPolyfillSupport;kt?.({LitElement:$t}),(Mt.litElementVersions??=[]).push("4.2.1");var zt=k`
|
|
23
23
|
:host {
|
|
24
24
|
display: inline-block;
|
|
25
25
|
width: 1em;
|
|
@@ -56,12 +56,12 @@ const V=globalThis,D=V.trustedTypes,Z=D?D.createPolicy("lit-html",{createHTML:t=
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/}function jt(t){return Ot({...t,state:!0,attribute:!1})}var Ut
|
|
59
|
+
*/}function jt(t){return Ot({...t,state:!0,attribute:!1})}var Bt,Ut=class extends $t{constructor(){var t;super(),(t=Bt).has(this)?a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(this):t.set(this,false),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([t,s])=>{this.constructor.define(t,s)}))}emit(t,s){const i=new CustomEvent(t,d({bubbles:!0,cancelable:!1,composed:!0,detail:{}},s));return this.dispatchEvent(i),i}static define(t,s=this,i={}){const e=customElements.get(t);if(!e){try{customElements.define(t,s,i)}catch(e){customElements.define(t,class extends s{},i)}return}let n=" (unknown version)",r=n;"version"in s&&s.version&&(n=" v"+s.version),"version"in e&&e.version&&(r=" v"+e.version),n&&r&&n===r||console.warn(`Attempted to register <${t}>${n}, but <${t}>${r} has already been registered.`)}attributeChangedCallback(t,s,i){var e;f(this,e=Bt,"read from private field"),e.get(this)||(this.constructor.elementProperties.forEach(((t,s)=>{t.reflect&&null!=this[s]&&this.initialReflectedProperties.set(s,this[s])})),((t,s)=>{f(t,s,"write to private field"),s.set(t,!0)})(this,Bt)),super.attributeChangedCallback(t,s,i)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach(((s,i)=>{t.has(i)&&null==this[i]&&(this[i]=s)}))}};Bt=new WeakMap,Ut.version="2.20.1",Ut.dependencies={},v([Ot()],Ut.prototype,"dir",2),v([Ot()],Ut.prototype,"lang",2);
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2020 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
const Pt=t=>void 0===t.strings;var Tt,It=Symbol(),Nt=Symbol(),Rt=new Map,Ht=class extends
|
|
65
|
+
const Pt=t=>void 0===t.strings;var Tt,It=Symbol(),Nt=Symbol(),Rt=new Map,Ht=class extends Ut{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,s){var i;let e;if(null==s?void 0:s.spriteSheet)return this.svg=ht`<svg part="svg">
|
|
66
66
|
<use part="use" href="${t}"></use>
|
|
67
|
-
</svg>`,this.svg;try{if(e=await fetch(t,{mode:"cors"}),!e.ok)return 410===e.status?It:Nt}catch(t){return Nt}try{const t=document.createElement("div");t.innerHTML=await e.text();const s=t.firstElementChild;if("svg"!==(null==(i=null==s?void 0:s.tagName)?void 0:i.toLowerCase()))return It;Tt||(Tt=new DOMParser);const n=Tt.parseFromString(s.outerHTML,"text/html").body.querySelector("svg");return n?(n.part.add("svg"),document.adoptNode(n)):It}catch(t){return It}}connectedCallback(){super.connectedCallback(),m.push(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,m=m.filter((s=>s!==t))}getIconSource(){const t=y(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:s,fromLibrary:i}=this.getIconSource(),e=i?y(this.library):void 0;if(!s)return void(this.svg=null);let n=Rt.get(s);if(n||(n=this.resolveIcon(s,e),Rt.set(s,n)),!this.initialRender)return;const r=await n;if(r===Nt&&Rt.delete(s),s===this.getIconSource().url)if((t=>void 0!==t?._$litType$)(r)){if(this.svg=r,e){await this.updateComplete;const t=this.shadowRoot.querySelector("[part='svg']");"function"==typeof e.mutator&&t&&e.mutator(t)}}else switch(r){case Nt:case It:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==e?void 0:e.mutator)||t.call(e,this.svg),this.emit("sl-load")}}render(){return this.svg}};Ht.styles=[Lt,zt],v([jt()],Ht.prototype,"svg",2),v([Ot({reflect:!0})],Ht.prototype,"name",2),v([Ot()],Ht.prototype,"src",2),v([Ot()],Ht.prototype,"label",2),v([Ot({reflect:!0})],Ht.prototype,"library",2),v([At("label")],Ht.prototype,"handleLabelChange",1),v([At(["name","src","library"])],Ht.prototype,"setIcon",1),Ht.define("sl-icon");export{at as E,
|
|
67
|
+
</svg>`,this.svg;try{if(e=await fetch(t,{mode:"cors"}),!e.ok)return 410===e.status?It:Nt}catch(t){return Nt}try{const t=document.createElement("div");t.innerHTML=await e.text();const s=t.firstElementChild;if("svg"!==(null==(i=null==s?void 0:s.tagName)?void 0:i.toLowerCase()))return It;Tt||(Tt=new DOMParser);const n=Tt.parseFromString(s.outerHTML,"text/html").body.querySelector("svg");return n?(n.part.add("svg"),document.adoptNode(n)):It}catch(t){return It}}connectedCallback(){super.connectedCallback(),m.push(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,m=m.filter((s=>s!==t))}getIconSource(){const t=y(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:s,fromLibrary:i}=this.getIconSource(),e=i?y(this.library):void 0;if(!s)return void(this.svg=null);let n=Rt.get(s);if(n||(n=this.resolveIcon(s,e),Rt.set(s,n)),!this.initialRender)return;const r=await n;if(r===Nt&&Rt.delete(s),s===this.getIconSource().url)if((t=>void 0!==t?._$litType$)(r)){if(this.svg=r,e){await this.updateComplete;const t=this.shadowRoot.querySelector("[part='svg']");"function"==typeof e.mutator&&t&&e.mutator(t)}}else switch(r){case Nt:case It:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==e?void 0:e.mutator)||t.call(e,this.svg),this.emit("sl-load")}}render(){return this.svg}};Ht.styles=[Lt,zt],v([jt()],Ht.prototype,"svg",2),v([Ot({reflect:!0})],Ht.prototype,"name",2),v([Ot()],Ht.prototype,"src",2),v([Ot()],Ht.prototype,"label",2),v([Ot({reflect:!0})],Ht.prototype,"library",2),v([At("label")],Ht.prototype,"handleLabelChange",1),v([At(["name","src","library"])],Ht.prototype,"setIcon",1),Ht.define("sl-icon");export{at as E,Ut as S,lt as T,v as _,u as a,d as b,Lt as c,Ht as d,g as e,Pt as f,k as i,Ot as n,jt as r,At as w,ht as x}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i}from"./p-CsdCh9hf.js";import{L as n}from"./p-BzjgviTt.js";import{s as o}from"./p-BW_CkW1K.js";import{c as r}from"./p-vFMstSdt.js";const l=class{constructor(e){t(this,e),this.subscribeResource=s(this,"pod-os:resource",7),this.contents=[],this.loading=!0,this.createNewItem=null,this.disconnected$=new r.Subject,this.receiveResource=t=>{this.container=t.assume(n),this.loading=!1,this.container.observeContains().pipe(r.takeUntil(this.disconnected$)).subscribe((t=>this.contents=t.toSorted(((t,s)=>t.name.localeCompare(s.name)))))}}onCreateNewFile(){this.createNewItem="file"}onCreateNewFolder(){this.createNewItem="folder"}componentWillLoad(){o(this)}handleKeyDown(t){"Escape"===t.key&&(this.createNewItem=null)}render(){if(this.loading)return null;const t=this.contents.map((t=>e("li",{key:t.uri},e("pos-resource",{lazy:!0,uri:t.uri},e("pos-container-item",null,t.name)))));return null!==this.createNewItem&&t.unshift(e("li",{key:"new-item"},e("pos-create-new-container-item",{type:this.createNewItem,container:this.container}))),e(i,null,e("pos-container-toolbar",{"onPod-os:create-new-file":()=>this.onCreateNewFile(),"onPod-os:create-new-folder":()=>this.onCreateNewFolder()}),t.length>0?e("ul",{"aria-label":"Container contents"},t):e("p",null,"The container is empty"))}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.complete()}};l.style="ul{list-style:none;padding:0;margin:0}li{padding:0;margin:0}";export{l as pos_container_contents}
|