-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-1d69fb11.entry.js
5 lines (5 loc) · 23.3 KB
/
p-1d69fb11.entry.js
1
2
3
4
5
/*!
* Built by BASIS
* Copyright BASIS International Ltd.
*/
import{r as t,c as e,h as i,H as s,g as o}from"./p-00e3df8e.js";import{l as r}from"./p-f5397639.js";import{s as n}from"./p-89a330bf.js";import{h as a}from"./p-3e9fe89f.js";import{i as c}from"./p-94175f2e.js";import{o as d}from"./p-6875fc29.js";import"./p-21e654a9.js";import"./p-58156e74.js";import"./p-5119ef20.js";import"./p-ece60743.js";const h=window.matchMedia("(any-pointer: coarse)").matches,l=class{constructor(i){t(this,i),this.selectedEvent=e(this,"dwc-selected",7),this.deselectedEvent=e(this,"dwc-deselected",7),this.changedEvent=e(this,"dwc-changed",7),this.searchedEvent=e(this,"dwc-searched",7),this.allowDeselectionByClick=!1,this.connect=!0,this.contiguousSelection=!1,this.disabled=!1,this.editable=!1,this.expanse="m",this.iconCollapsed="",this.iconExpanded="",this.iconLeaf="",this.iconLeafSelected="",this.label=void 0,this.multiSelection=!0,this.multiSelectionByClick=!1,this.nodata=!1,this.noGroupIcons=!1,this.noLeafIcons=!1,this.readonly=!1,this.searchCaseSensitive=!1,this.searchInput=!1,this.searchNodata="No data to display",this.searchPlaceholder="Search",this.searchTerm="",this.suppressExpandAll=!0}onConnectChanged(){this.updateConnect()}onSearchTermChanged(){this.search(this.searchTerm)}onIconsChanged(){this.updateIconsProperties()}onNoIconsChanged(){this.updateNoIcons()}connectedCallback(){this.handleSlotChange=this.handleSlotChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNodeClick=this.handleNodeClick.bind(this),this.handleNodePressed=this.handleNodePressed.bind(this),this.handleNodeCollapsed=this.handleNodeCollapsed.bind(this),this.handleNodeExpanded=this.handleNodeExpanded.bind(this),this.handleNodeSelectionChanged=this.handleNodeSelectionChanged.bind(this),this.handleNodeStateChanged=this.handleNodeStateChanged.bind(this),this.handleSearch=this.handleSearch.bind(this)}componentDidLoad(){this.updateConnect(),this.updateNoIcons(),this.updateIconsProperties(),this.searchTerm&&this.search(this.searchTerm),this.iconsMutationObserver=new MutationObserver((t=>{for(const e of t)"childList"===e.type&&e.addedNodes.length&&this.updateIconsProperties()})),this.iconsMutationObserver.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){var t;null===(t=this.iconsMutationObserver)||void 0===t||t.disconnect()}async expand(t=null,e=!0){const i=this.getNodeInstance(t)||this.el;i&&!i.isSameNode(this.el)&&i.group&&(i.expanded=!0),Array.from(this.getNodes(i,!e,!0)).forEach((t=>{t.group&&(t.expanded=!0)}))}async collapse(t=null,e=!0){const i=this.getNodeInstance(t)||this.el;i&&!i.isSameNode(this.el)&&i.group&&(i.expanded=!1),Array.from(this.getNodes(i,!e,!0)).forEach((t=>{t.group&&(t.expanded=!1)}))}async getNextNode(t){return this.getNodeByLocation(this.getNodeInstance(t),"next")}async getPreviousNode(t){return this.getNodeByLocation(this.getNodeInstance(t),"previous")}async getFirstNode(){const t=Array.from(this.getNodes());for(const e of t)if(!e.flat&&!e.hidden)return e}async getLastNode(){const t=Array.from(this.getNodes()).reverse();let e;for(const i of t)if(!i.flat&&!i.hidden){e=i;break}for(;e.group&&e.expanded;){const t=this.getNodes(e,!0);e=t[t.length-1]}return e}async getSelectedNodes(){return this.el.querySelectorAll("dwc-tree-node[selected]")}async getFirstSelectedNode(){const t=Array.from(await this.getSelectedNodes());return t.length?t[0]:null}async getLastSelectedNode(){const t=Array.from(await this.getSelectedNodes());return t.length?t[t.length-1]:null}async clearSelections(){Array.from(this.getNodes()).forEach((t=>t.selected=!1))}async ensureVisible(t){const e=t=>t.parentElement.closest("dwc-tree-node");let i=e(this.getNodeInstance(t));for(;null==i?void 0:i.group;)i.expanded=!0,i=e(i)}async scrollToNode(t){const e=this.getNodeInstance(t);n(e,this.$tree),(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&e.classList.contains("hydrated")||requestAnimationFrame((()=>{this.scrollToNode(t)}))}async getExpandedNodes(){return this.el.querySelectorAll("dwc-tree-node[group][expanded]")}async getCollapsedNode(){return this.$lastCollapsedNode}async getExpandedNode(){return this.$lastExpandedNode}async getPart(t){return new Promise((e=>{e(this.el.shadowRoot.querySelector(`[part="${t}"]`))}))}getNodes(t=null,e=!1,i=!1,s=!0){return(t||this.el).querySelectorAll(`${e?":scope > ":""} dwc-tree-node${i?"[group]":""}${s?":not([hidden])":""}`)}getNodeInstance(t){return t instanceof HTMLElement?t:"string"==typeof t?this.el.querySelector(`dwc-tree-node[id="${t}"]`):void 0}getNodeByLocation(t,e){const i=t=>t&&"dwc-tree-node"===t.nodeName.toLowerCase(),s=t=>{let e=t.parentElement;return e.isSameNode(this.el)&&(e=null),e&&(e.flat||e.hidden)&&(e=s(e.parentElement)),e},o=(t,e=null)=>{if(!t)return;let r=t.nextElementSibling;if(t.group&&t.expanded){const i=Array.from(this.getNodes(t,!0,!1,!1));if(i.length){const s=i.filter((t=>!t.hidden&&!t.flat));s.length&&(r=s[0]),i[i.length-1].isSameNode(e)&&(r=t.nextElementSibling)}}return i(r)&&(r.flat||r.hidden)&&(r=o(r,r)),i(r)||(r=o(s(t),t)),i(r)?r:null},r=t=>{let e=t.previousElementSibling;for(;(null==e?void 0:e.group)&&(null==e?void 0:e.expanded);){const t=this.getNodes(e,!0);e=t[t.length-1]}for(e||(e=s(t));i(e)&&(e.flat||e.hidden);)e=r(e);return i(e)?e:null};return"next"===e?o(t):r(t)}async toggleSelection(t,e){var i;if(this.readonly)return;e=Object.assign({isCtrl:!1,initialState:null,emitEvents:!0,ensureVisible:!0},e),this.el.removeEventListener("dwc-selected-changed",this.handleNodeSelectionChanged);const s=null!==(i=e.initialState)&&void 0!==i?i:t.selected,o=this.$lastSelectedItem,r=e.isCtrl||this.allowDeselectionByClick||this.multiSelection&&h;if(e.ensureVisible&&await this.ensureVisible(t),this.multiSelection&&this.contiguousSelection&&o&&!t.isSameNode(o)){const e=o.parentElement.closest("dwc-tree-node");if(e){const i=Array.from(this.getNodes(e,!0));i.push(e),i.includes(t)||i.forEach((i=>{const s=Array.from(this.getNodes(i,!0));!i.selected||s.includes(t)||e.selected||(i.selected=!1,this.deselectedEvent.emit(i))}))}}t.selected=!r||!s,t.selected&&(this.$lastSelectedItem=t),this.multiSelection&&e.isCtrl||this.multiSelection&&h||this.multiSelection&&this.multiSelectionByClick||Array.from(this.getNodes()).forEach((i=>{!i.isSameNode(t)&&i.selected&&(i.selected=!1,e.emitEvents&&this.deselectedEvent.emit(i))})),s!==t.selected&&e.emitEvents&&(t.selected?this.selectedEvent.emit(t):this.deselectedEvent.emit(t)),Array.from(this.getNodes()).forEach((t=>{t.tabTraversable=-1,t.stopEdit()})),t.tabTraversable=0,e.emitEvents&&this.changedEvent.emit(),this.el.addEventListener("dwc-selected-changed",this.handleNodeSelectionChanged)}syncIconProperties(t){t.iconTreeCollapsed=this.iconCollapsed,t.iconTreeExpanded=this.iconExpanded,t.iconTreeLeaf=this.iconLeaf,t.iconTreeLeafSelected=this.iconLeafSelected}updateIconsProperties(){Array.from(this.getNodes()).forEach((t=>this.syncIconProperties(t)))}updateConnect(){this.el.style.setProperty("--_bt-connectors",this.connect?"block":"none")}updateNoIcons(){const t=this.el.style;t.setProperty("--_bt-leafIcons",this.noLeafIcons?"none":"block"),t.setProperty("--_bt-groupIcons",this.noGroupIcons?"none":"block")}search(t){const e=t.trim();if(this.searchedEvent.emit({term:e,done:()=>{this.handleSlotChange(!1)}}).defaultPrevented)return;const i=Array.from(this.getNodes(this.el,!1,!1,!1));let s;try{s=new RegExp(e,"g"+(this.searchCaseSensitive?"":"i"))}catch(t){console.warn("Failed to construct search regex.\n",t)}if(s){this.nodata=!0;for(const t of i){const e=t;if(e.hidden=!0,s.test(t.label)){e.removeAttribute("hidden"),this.nodata=!1;let t=e.parentElement;for(;(null==t?void 0:t.group)&&!t.isSameNode(this.el);)t.hidden=!1,t.expanded=!0,t=t.parentElement}}this.handleSlotChange(!1)}}async handleKeyDown(t){if(t.defaultPrevented||this.disabled)return;const e=document.activeElement;if(e&&"dwc-tree-node"===e.tagName.toLowerCase()){if(["Enter"," "].includes(t.key)&&(t.preventDefault(),e.group&&(e.expanded=!e.expanded,e.dispatchEvent(new CustomEvent("dwc-"+(e.expanded?"expanded":"collapsed"),{bubbles:!0,cancelable:!0,detail:null})))),"ArrowRight"===t.key&&e.group&&(t.preventDefault(),e.expanded=!0,e.dispatchEvent(new CustomEvent("dwc-expanded",{bubbles:!0,cancelable:!0,detail:null}))),"ArrowLeft"===t.key&&e.group&&(t.preventDefault(),e.expanded=!1,e.dispatchEvent(new CustomEvent("dwc-collapsed",{bubbles:!0,cancelable:!0,detail:null}))),"*"!==t.key||this.suppressExpandAll||(t.preventDefault(),Array.from(this.getNodes(this.el,!1,!0)).forEach((t=>{t.group&&(t.expanded=!0,t.dispatchEvent(new CustomEvent("dwc-expanded",{bubbles:!0,cancelable:!0,detail:null})))}))),"*"===t.key&&t.shiftKey){t.preventDefault(),Array.from(this.getNodes(this.el,!1,!0)).forEach((t=>{t.group&&(t.expanded=!1,t.dispatchEvent(new CustomEvent("dwc-collapsed",{bubbles:!0,cancelable:!0,detail:null})))}));const e=await this.getFirstNode();e&&e.setFocus()}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let i;"Home"===t.key?i=await this.getFirstNode():"End"===t.key?i=await this.getLastNode():"ArrowUp"===t.key?i=await this.getPreviousNode(e):"ArrowDown"===t.key&&(i=await this.getNextNode(e)),i&&(i.setFocus(),await this.toggleSelection(i,{isCtrl:t.ctrlKey||t.metaKey,ensureVisible:!1}),t.preventDefault())}}}handleSlotChange(t){this.handleNodeStateChanged((async e=>{const i=Array.from(e.parentElement.querySelectorAll(":scope > :not([hidden])")),s=i[0],o=i[i.length-1];e.first=null==s?void 0:s.isSameNode(e),e.last=null==o?void 0:o.isSameNode(e),this.syncIconProperties(e),!1!==t&&e.selected&&await this.toggleSelection(e,{isCtrl:!0,initialState:!e.selected,emitEvents:!1})})),this.el.removeEventListener("dwc-selected-changed",this.handleNodeSelectionChanged),this.el.addEventListener("dwc-selected-changed",this.handleNodeSelectionChanged)}async handleNodeClick(t){if(this.disabled)return;if(t.defaultPrevented||this.disableClickHandling)return void(this.disableClickHandling=!1);const e=t.detail,i=t.target,s=e.ctrlKey||e.metaKey;!this.editable||3!==e.detail||this.readonly?await this.toggleSelection(i,{isCtrl:s,ensureVisible:!1}):await i.startEdit()}handleNodePressed(t){if(this.disabled)return;const e=t.target;this.disableClickHandling=!0,this.editable&&!this.readonly&&e.startEdit()}async handleNodeSelectionChanged(t){const e=t.target;await this.toggleSelection(e,{isCtrl:!0,initialState:!t.detail,emitEvents:!1})}handleNodeCollapsed(t){this.$lastCollapsedNode=t.target}handleNodeExpanded(t){this.$lastExpandedNode=t.target}handleNodeStateChanged(t=null){const e=Array.from(this.getNodes());let i=!1;if(e.forEach((async e=>{e.tabTraversable>-1&&!1===i&&(e.flat||e.hidden?e.tabTraversable=-1:i=!0),t&&t(e)})),!i)for(const t of e)if(!t.flat&&!t.hidden){t.tabTraversable=0;break}}handleSearch(t){this.searchTerm=t.detail}render(){return i(s,{key:"28901ecf76512090a2433d32187df73ef9743cc9",class:a({BBjControl:!0,BBjTree:!0,"bbj-disabled":this.disabled,"bbj-readonly":this.readonly})},i("div",{key:"5d47e760d27e0025886fa2a117da4c11006a5640",part:"control"},this.searchInput&&i("dwc-field",{key:"af29dd6bf66f8a44730ae1ac2936b4559fe42f3a",part:"input",type:"search",placeholder:this.searchPlaceholder,expanse:this.expanse,value:this.searchTerm,"onDwc-modified":this.handleSearch},i("dwc-icon",{key:"f49030a73e4a01dfc6adcbdd578fdedb322373f6",slot:"prefix",name:"search"})),i("div",{key:"1fc2adaa7f1d871a67b3938ff864a1ad3752dc09",part:"tree-wrapper"},i("div",{key:"b6559f363f26ff4be9df73c24defcbc3a2ff2ed2",ref:t=>this.$tree=t,role:"tree",part:"tree","aria-label":this.label,"onDwc-clicked":this.handleNodeClick,"onDwc-pressed":this.handleNodePressed,"onDwc-collapsed":this.handleNodeCollapsed,"onDwc-expanded":this.handleNodeExpanded,"onDwc-flat-changed":this.handleNodeStateChanged,onKeyDown:this.handleKeyDown},i("slot",{key:"19e5bf9850a688cd14689d777a0e03c2380d5447",onSlotchange:this.handleSlotChange}),i("div",{key:"325defc4756c21c8d4ca0741bb008358e2e66db9",innerHTML:this.searchNodata,hidden:!this.nodata})))))}get el(){return o(this)}static get watchers(){return{connect:["onConnectChanged"],searchTerm:["onSearchTermChanged"],iconCollapsed:["onIconsChanged"],iconExpanded:["onIconsChanged"],iconLeaf:["onIconsChanged"],iconLeafSelected:["onIconsChanged"],noGroupIcons:["onNoIconsChanged"],noLeafIcons:["onNoIconsChanged"]}}};(function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);r>3&&n&&Object.defineProperty(e,i,n)})([r.debounce(50)],l.prototype,"search",null),l.style="@media (prefers-reduced-motion: reduce){*,::before,::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;background-attachment:initial !important;scroll-behavior:auto !important;transition-delay:0s !important;transition-duration:0s !important}}:host{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;-webkit-tap-highlight-color:transparent;text-size-adjust:100%}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{display:inline-block}:host([disabled]){cursor:var(--dwc-disabled-cursor);opacity:var(--dwc-disabled-opacity);user-select:none;pointer-events:none}:host([disabled]) *{cursor:var(--dwc-disabled-cursor);user-select:none;pointer-events:none}[hidden]{display:none}[part=control]{border-radius:var(--dwc-border-radius);display:flex;flex-direction:column;height:100%;width:100%}[part=tree-wrapper]{flex:1;height:inherit;overflow:hidden;width:inherit}[part=tree]{height:100%;overflow:auto;width:100%}:host([readonly]) [part=control]{--_bt-node-leaf-cursor:var(--dwc-cursor-disabled);--_bt-node-group-cursor:var(--dwc-cursor-disabled)}[part=input]{height:auto;margin-bottom:var(--dwc-space-s);max-height:auto;max-width:100%;min-height:auto;min-width:100%;width:100%}[part=input] dwc-icon{font-size:1.2em;margin-left:var(--dwc-space-xs)}:host([expanse=xl]) [part=control]{font-size:var(--dwc-font-size-xl)}:host([expanse=l]) [part=control]{font-size:var(--dwc-font-size-l)}:host([expanse=m]) [part=control]{font-size:var(--dwc-font-size-m)}:host([expanse=s]) [part=control]{font-size:var(--dwc-font-size-s)}:host([expanse=xs]) [part=control]{font-size:var(--dwc-font-size-xs)}";let b=0;const p=class{constructor(i){t(this,i),this.focusedEvent=e(this,"dwc-focused",7),this.blurredEvent=e(this,"dwc-blurred",7),this.expandedEvent=e(this,"dwc-expanded",7),this.collapsedEvent=e(this,"dwc-collapsed",7),this.clickedEvent=e(this,"dwc-clicked",7),this.pressedEvent=e(this,"dwc-pressed",7),this.selectedChangedEvent=e(this,"dwc-selected-changed",7),this.flatChangedEvent=e(this,"dwc-flat-changed",7),this.editedEvent=e(this,"dwc-edited",7),this.itemId="tree-node-"+ ++b,this.editing=void 0,this.editable=!0,this.expanded=!1,this.first=!1,this.flat=!1,this.group=!1,this.hasFocus=!1,this.icon="",this.iconSelected="",this.iconTreeCollapsed="",this.iconTreeExpanded="",this.iconTreeLeaf="",this.iconTreeLeafSelected="",this.last=!1,this.label=void 0,this.leaf=!0,this.selected=!1,this.tabTraversable=-1}onSelectedChanged(t){this.selectedChangedEvent.emit(t)}connectedCallback(){this.handleToggle=this.handleToggle.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handlePressed=this.handlePressed.bind(this),this.handleInputKeydown=this.handleInputKeydown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this)}componentDidLoad(){window.MutationObserver&&(this.mutationObserver=new MutationObserver((()=>{this.group=Array.from(this.el.querySelectorAll(":not([hidden])")).length>0,this.leaf=!this.group})),this.mutationObserver.observe(this.el,{attributes:!0,childList:!0,subtree:!0})),null!=window.applyFocusVisiblePolyfill&&window.applyFocusVisiblePolyfill(this.el.shadowRoot),d(this.el,this.handlePressed)}async setFocus(){this.$itemEl.focus()}async removeFocus(){this.$itemEl.blur()}async toggle(){this.expanded=!this.expanded}async startEdit(){if(!this.editable)return;const t=this.el.closest("dwc-tree");if(t){if(!t.editable)return;Array.from(t.querySelectorAll("dwc-tree-node")).forEach((t=>{t.isSameNode(this.el)||t.stopEdit()}))}const e=this.$inputEl;this.oldValue=this.$labelEl.textContent,e.value=this.oldValue,this.editing=!0,e.focus(),requestAnimationFrame((()=>{e.focus()}))}async stopEdit(){if(!this.editable||!this.editing)return;const t=this.$labelEl;this.newValue=this.$inputEl.value,t.textContent=this.newValue,this.editedEvent.emit({oldValue:this.oldValue,newValue:this.newValue}),this.editing=!1}handleToggle(t){t.defaultPrevented||(t.preventDefault(),this.toggle(),this.expanded?this.expandedEvent.emit():this.collapsedEvent.emit())}handleClick(t){t.defaultPrevented||(this.clickedEvent.emit(t),t.preventDefault())}handlePressed(t,e){t.stopPropagation(),e.stopPropagation(),this.pressedEvent.emit({downEvent:t,upEvent:e})}handleFocus(){this.hasFocus=!0,this.focusedEvent.emit()}handleBlur(){this.hasFocus=!1,this.blurredEvent.emit()}handleInputKeydown(t){t.stopPropagation(),"Enter"!==t.key&&"Tab"!==t.key||this.stopEdit(),"Escape"===t.key&&(this.editing=!1)}handleInputBlur(){this.stopEdit()}render(){const t=this.el.id||this.itemId,e=`${t}-label`,o=`${t}-group`;let r;this.icon?r=c(this.icon):this.group&&!this.expanded?r=Object.assign({name:"folder",pool:"dwc"},c(this.iconTreeCollapsed)):this.group&&this.expanded?r=Object.assign({name:"folder-opened",pool:"dwc"},c(this.iconTreeExpanded)):this.leaf&&!this.selected&&(r=Object.assign({name:"file",pool:"dwc"},c(this.iconTreeLeaf))),this.leaf&&this.selected&&(r=Object.assign(Object.assign(Object.assign({name:"file",pool:"dwc"},r),c(this.iconTreeLeafSelected)),c(this.iconSelected)));const{src:n,pool:d,name:h}=r;return i(s,{key:"37023ba21c565ca55cb79944df9ea6d2610d8d9f",id:t,class:a({"BBjTree-node":!0,"bbj-leaf":this.leaf,"bbj-group":this.group,"bbj-expanded":this.expanded,"bbj-selected":this.selected,"bbj-first":this.first,"bbj-last":this.last,"bbj-editing":this.editing,"bbj-flat":this.flat})},i("div",{key:"632f45deb98a0a6559343288de40d1d9e2c4a4a3",ref:t=>this.$itemEl=t,role:"treeitem",part:"control",tabindex:this.tabTraversable,"aria-expanded":this.group?this.expanded?"true":"false":"undefined","aria-selected":this.selected?"true":"false","aria-owns":o,"aria-labelledby":e,onFocus:this.handleFocus,onBlur:this.handleBlur},i("div",{key:"b286ad5b2ebe1cf0f4c9426fbe7c2c8a492364d3",part:"label-wrapper"},i("div",{key:"ff1daf768a513644e3c1de9d2a0311971fa61309",part:"icons"},i("dwc-icon",{key:"cae37c8be229ff5ab9d88755216731fbfb1f4a80",part:"icon icon-toggle",pool:"dwc",name:this.expanded?"square-minus":"square-plus",onClick:this.handleToggle}),i("dwc-icon",{key:"66fce9e9163e71b6abd6c1bde963f07c27f719d5",part:"icon icon-type",onClick:this.handleClick,src:n,pool:d,name:h,modifier:t=>{for(const e in r){const i=r[e];"style"!==e?t.setAttribute(e,String(i)):Object.assign(t.style,i)}}})),i("div",{key:"6eec324f0be7c85410f0f2f56ec51be907107adb",ref:t=>this.$labelEl=t,id:e,part:"label",hidden:this.editing,innerHTML:this.label,onClick:this.handleClick}),i("input",{key:"302075baf23d9603208e152fb90241cff74d048e",ref:t=>this.$inputEl=t,part:"input",hidden:!this.editing,onKeyDown:this.handleInputKeydown,onBlur:this.handleInputBlur})),i("div",{key:"752e5352c774ec6291761ebcb73effb0f9b72e99",id:o,role:"group",part:"list",hidden:!this.expanded},i("slot",{key:"c674f12cb706c00e75c2b234650478e8f89e0e00"}))))}get el(){return o(this)}static get watchers(){return{selected:["onSelectedChanged"]}}};p.style='@media (prefers-reduced-motion: reduce){*,::before,::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;background-attachment:initial !important;scroll-behavior:auto !important;transition-delay:0s !important;transition-duration:0s !important}}:host{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;-webkit-tap-highlight-color:transparent;text-size-adjust:100%}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{--_bt-node-border-width:var(--dwc-tree-node-border-width, 1px);--_bt-node-border-style:var(--dwc-tree-node-border-style, dotted);--_bt-node-border-color:var(--dwc-tree-node-border-color, var(--dwc-color-gray-light));--_bt-node-border-radius:var(--dwc-tree-node-border-radius, 0 0 0 0.5em);--_bt-node-margin:var(--dwc-tree-node-margin, 1.5em);--_bt-icon-bg:var(--dwc-tree-icon-background, inherit);--_bt-icon-fill:var(--dwc-tree-icon-fill, var(--dwc-color-gray-text));--_bt-icon-color:var(--dwc-tree-icon-color, var(--_bt-icon-fill));--_bt-font:initial;display:block}[hidden]{display:none}[part=control],[part=control]::before,[part=control]::after{outline:none}:host([leaf]) [part=control]{cursor:var(--_bt-node-leaf-cursor, var(--dwc-cursor-click))}:host([leaf]) [part=control]::before{border-left:var(--_bt-node-border-width) var(--_bt-node-border-style) var(--_bt-node-border-color);bottom:0;content:"";display:var(--_bt-connectors, block);left:0.7em;position:absolute;top:0;width:0}:host([leaf]) [part=control]::after{border-bottom:var(--_bt-node-border-width) var(--_bt-node-border-style) var(--_bt-node-border-color);content:"";display:var(--_bt-connectors, block);height:50%;left:0.7em;position:absolute;top:0;width:1em}:host([leaf][last]) [part=control]::before{height:50%}:host([leaf][last]) [part=control]::after{border-left:var(--_bt-node-border-width) var(--_bt-node-border-style) var(--_bt-node-border-color)}:host([group]) [part=control]{cursor:var(--_bt-node-group-cursor, var(--dwc-cursor-click))}[part=label-wrapper]{align-items:center;display:inline-flex;justify-content:center;position:relative;user-select:none;white-space:nowrap}:host([flat]) [part=label-wrapper]{display:none}[part=icons]{--dwc-icon-size:1.5em;align-items:center;display:flex;justify-content:center}[part~=icon]{align-items:center;background:var(--_bt-icon-bg);display:flex;justify-content:center;z-index:2}[part~=icon][name=folder][pool=dwc]::part(icon){color:var(--_bt-icon-color);fill:var(--_bt-icon-fill)}[part~=icon][name=folder-opened][pool=dwc]::part(icon),[part~=icon][name=file][pool=dwc]::part(icon){color:var(--_bt-icon-color)}:host([leaf]) [part~=icon-toggle]{background:transparent;color:transparent}[part~=icon-toggle]{cursor:var(--dwc-cursor-click)}[part~=icon-toggle][name=square-minus][pool=dwc]::part(icon),[part~=icon-toggle][name=square-plus][pool=dwc]::part(icon){stroke-width:1}:host([leaf]) [part~=icon-type]{display:var(--_bt-leafIcons, block)}:host([group]) [part~=icon-type]{display:var(--_bt-groupIcons, block)}[part=label]{border-radius:var(--dwc-border-radius-s);font:var(--_bt-font);margin:0 var(--dwc-space-xs);padding:var(--dwc-space-xs) var(--dwc-space-s)}[part=list]::before{border-left:var(--_bt-node-border-width) var(--_bt-node-border-style) var(--_bt-node-border-color);bottom:0;content:"";display:var(--_bt-connectors, block);left:0.7em;position:absolute;top:1.5em;width:0}:host([group][last]) [part=list]::before,:host([first][last]) [part=list]::before{display:none}:host(:not([flat])) [part=list] ::slotted(dwc-tree-node){margin-left:var(--_bt-node-margin)}:host([selected]) [part=label]{background:var(--dwc-tree-node-selected-background, var(--dwc-color-primary));color:var(--dwc-tree-node-selected-color, var(--dwc-color-on-primary-text))}[part=control].focus-visible [part=label]{background:var(--dwc-tree-node-highlight-background, var(--dwc-color-primary-alt));box-shadow:var(--dwc-tree-node-focus-ring, var(--dwc-focus-ring-default));color:var(--dwc-tree-node-highlight-color, var(--dwc-color-on-primary-text-alt))}';export{l as dwc_tree,p as dwc_tree_node}