PageSourceSearch

https://botanic.com.pl/application/assets/storefront/chunk-phoenix_components_toggle.CVdJLbC.js

js botanic.com.pl collected 2026-10-07 23:25:07 UTC 2,756 bytes, 1 lines download raw bytes

1import{_ as s,a as l}from"./chunk-vendor-di.Bh23gdA.js";import{P as r,w as u,H as m,$ as v,e as a,V as b}from"./chunk-vendor-lit.NvY0u02.js";import{p as c}from"./chunk-phoenix_custom_element.-3oJuZO.js";import{B as C}from"./chunk-behavior_subject.BGn-8a7.js";import{C as T}from"./chunk-context_provider_controller.CCbkLM7.js";import{a as h,T as p,b as e}from"./chunk-toggle_constants.DD0OMP8.js";import{B as y}from"./chunk-btn_controller.BPcEEeZ.js";import{O}from"./chunk-observer.oe4_irb.js";import{C as f}from"./chunk-context_consumer_controller.DQ84A7A.js";import"./chunk-vendor-lodash.CWHFt7Z.js";import"./chunk-subject.nuVoBpB.js";import"./chunk-keystrokes_controller.BSiCZ0Y.js";let o=class extends r{constructor(){super(...arguments),this.opened=!1}connectedCallback(){super.connectedCallback(),this._reactiveOpened=new C(this.opened),this._toggleContext=new T(this),this._$content=this.querySelector("template"),this._toggleContext.provide(h,this._reactiveOpened),this.addEventListener(p.toggle,this.toggle)}toggle(){this.opened=!this.opened,this._reactiveOpened.notify(this.opened)}render(){return v`${this.opened&&this._$content?m(this._$content):u}`}};s([a({type:Boolean,reflect:!0}),l("design:type",Object)],o.prototype,"opened",void 0);o=s([c("h-toggle")],o);let i=class extends r{constructor(){super(),this.action=e.collapse,this._visibility={collapse:t=>{t?this._visibilityController.show():this._visibilityController.hide(),this._handleFocusOppositeToggleButtonIfLostFocus()},expand:t=>{t?this._visibilityController.hide():this._visibilityController.show(),this._handleFocusOppositeToggleButtonIfLostFocus()}},this._handleFocusOppositeToggleButtonIfLostFocus=()=>{var t;const g=this===document.activeElement,_=this.action===e.collapse?e.expand:e.collapse;if(g){const n=(t=this.parentElement)===null||t===void 0?void 0:t.querySelector(`[action="${_}"]`);n?.focus()}},this._dispatchToggleEvent=()=>{this.emitCustomEvent(p.toggle)},this._btnController=new y(this,this._dispatchToggleEvent),this._visibilityController=new b(this)}async connectedCallback(){super.connectedCallback(),this._toggleContextConsumer=new f(this),this._opened$=await this._toggleContextConsumer.consumeAsync(h),this._openedObserver=new O(t=>{this._visibility[this.action](t)}),this._opened$.subscribe(this._openedObserver),this.setAttribute("aria-expanded",this.action===e.collapse?"true":"false"),this.addEventListener("click",this._dispatchToggleEvent)}disconnectedCallback(){super.disconnectedCallback(),this._openedObserver&&this._opened$.unsubscribe(this._openedObserver)}};s([a({type:String}),l("design:type",Object)],i.prototype,"action",void 0);i=s([c("h-toggle-btn"),l("design:paramtypes",[])],i);requestAnimationFrame(()=>{});globalThis.__phoenix_wc__=[o,i];

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.