PageSourceSearch

https://www.siniat.pl/etex/js/assets/js/3346.fc31c371a61a7d43250f.mjs

js siniat.pl collected 2026-10-07 23:23:55 UTC 6,825 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebpack=self.webpackChunkwebpack||[]).push([[3346],{63346:function(e,t,s){s.r(t),s.d(t,{default:function(){return d}});var i=s(70392),l=s.n(i),n=s(94994),r=s(42799),o=s(30333),c=".js-multi-selector",a="[data-js='cancel-button']",h="[data-js='selected-entities-count']";class d extends r.o{constructor(e){super(e),this.FLYOUT_TOGGLE_TRIGGER_SELECTOR=".js-flyout-toggle",this.FLYOUT_CTA_GROUP_SELECTOR=".js-flyout-cta-group",this.BUTTON_TOGGLE_CTA_GROUP_SELECTOR=".js-flyout-cta-more",this.FLYOUT_SELECTED_LIST_SELECTOR=".js-flyout-selected-list",this.CTA_GROUP_HIDDEN_CLASS="u-hidden-until@desktop",this.SELECTED_ITEM_REMOVE_ICON_SELECTOR=".js-selected-remove-icon",this.SELECTED_ITEM_REMOVE_BUTTON_SELECTOR=".js-flyout-selected-remove-btn",this.FIX_LOADER_SELECTOR=".js-fix-loader",this.toasterExpanded=!1,this.selectedItems=[],this.userSelection=[],this.entityTitles=new Map,this.isSelectedClass="is-selected",this.init()}init(){this.toaster=this.element.querySelector(c),this.toasterSelectedList=this.element.querySelector(this.FLYOUT_SELECTED_LIST_SELECTOR),this.selectedRemoveIcon=this.element.querySelector(this.SELECTED_ITEM_REMOVE_ICON_SELECTOR).innerHTML,this.bindPubSubEvents(),this.handleCancelClick(),this.handleToggleToaster(),this.handleToggleCtaGroup(),this.fixLoaderOverlapFlyout(),l().subscribe(n.Y.userSelectionRestored,((e,t)=>{const s=[];t.forEach((e=>s.push(e.id))),this.initializeSelection(s)})),l().subscribe(n.Y.userSelectionRestoredFullItems,((e,t)=>{this.selectedItems=t,this.renderSelectedItems(),this.handleRemoveSelectedButtonClick()})),l().publish(o.E.toasterInitialized,new o.I((e=>{this.initializeSelection(e)})))}initializeSelection(e){this.userSelection=Array.from(e),this.evaluateToasterMessageVisibility(),this.setUserSelection(),this.renderSelectedItems(),this.handleRemoveSelectedButtonClick()}handleCancelClick(){var e=this.element.querySelector(a);e&&e.addEventListener("click",(()=>{l().publish(n.Y.userSelectionCancelled),this.userSelection=[],this.selectedItems=[],this.evaluateToasterMessageVisibility(),this.setUserSelection()}))}handleToggleToaster(){this.btnToggleToaster=this.element.querySelector(this.FLYOUT_TOGGLE_TRIGGER_SELECTOR),this.btnToggleToaster.addEventListener("click",(()=>{this.toasterExpanded=!this.toasterExpanded,this.toaster.setAttribute("aria-expanded",this.toasterExpanded.toString())}))}handleToggleCtaGroup(){this.btnToggleCtaGroup=this.element.querySelector(this.BUTTON_TOGGLE_CTA_GROUP_SELECTOR),this.toasterCtaGroup=this.element.querySelector(this.FLYOUT_CTA_GROUP_SELECTOR),this.btnToggleCtaGroup&&this.toasterCtaGroup&&this.btnToggleCtaGroup.addEventListener("click",(()=>{this.toasterCtaGroup.classList.toggle(this.CTA_GROUP_HIDDEN_CLASS)}))}handleEscPress(){this.element.addEventListener("keyup",(e=>{"Escape"===e.key&&(this.toasterExpanded=!this.toasterExpanded,this.element.setAttribute("aria-expanded",this.toasterExpanded.toString()),!this.toasterCtaGroup.classList.contains(this.CTA_GROUP_HIDDEN_CLASS)&&this.toasterCtaGroup.classList.add(this.CTA_GROUP_HIDDEN_CLASS))}))}bindPubSubEvents(){l().subscribe(n.Y.entitySelected,((e,t)=>{var s=t;let i=s.entityId;this.userSelectionType=s.entityType,this.userSelection.includes(i)||(this.selectedItems.push(s),this.userSelection.push(i),this.entityTitles.set(i,s.entityName),this.evaluateToasterMessageVisibility(),this.setUserSelection(),this.renderSelectedItems(),this.handleRemoveSelectedButtonClick())})),l().subscribe(n.Y.entityUnselected,((e,t)=>{var s=t;let i=s.entityId;this.entityTitles.set(i,s.entityName),this.userSelectionType=s.entityType,this.removeSelectionFromList(i),this.evaluateToasterMessageVisibility(),this.setUserSelection(),this.renderSelectedItems(),this.handleRemoveSelectedButtonClick()}))}removeSelectionFromList(e){this.userSelection.includes(e)&&(this.userSelection=this.userSelection.filter((t=>t!==e)),this.selectedItems=this.selectedItems.filter((t=>t.entityId!==e)))}evaluateToasterMessageVisibility(){var e=this.element.querySelector(c);this.setAmountOfItemsSelected(),0!=this.userSelection.length?e.classList.contains(this.isSelectedClass)||e.classList.add(this.isSelectedClass):e.classList.contains(this.isSelectedClass)&&e.classList.remove(this.isSelectedClass)}setAmountOfItemsSelected(){var e=this.userSelection.length,t=this.element.querySelector(h);t&&(t.innerHTML=e.toString())}setUserSelection(){var e=this.element.querySelector("#user-selection-input");e&&(e.value=this.userSelection.join(","))}renderSelectedItems(){if(0!==this.selectedItems.length){let e="";
1return this.selectedItems.forEach((t=>{e+='\n                    <li class="c-m-selector-flyout__item">',t.entityUrl?e+=`<a href="${t.entityUrl}" class="c-m-selector-flyout__item-info" target="_blank">`:e+='<a class="c-m-selector-flyout__item-info" target="_blank">',t.entityImgUrl&&(e+=`<div class="c-m-selector-flyout__item-img"><img src="${t.entityImgUrl}" class="a-image" alt="${t.entityName}" height="48" width="48" loading="lazy"></div>`),e+=`<div class="u-txt-ellipsis">${t.entityName}</div></a>\n                        <button aria-label="remove" class="c-btn c-btn--icon js-flyout-selected-remove-btn" data-entity="${t.entityId}">\n                            <svg class="c-svg js-selected-remove-icon" width="12" height="12" role="img" aria-labelledby="icon_close" focusable="false">\n                                ${this.selectedRemoveIcon}\n                            </svg>\n                        </button>\n                    </li>`})),void(this.toasterSelectedList.innerHTML=e)}this.toaster.setAttribute("aria-expanded",this.selectedItems.toString())}handleRemoveSelectedButtonClick(){this.selectedRemoveButtons=this.element.querySelectorAll(this.SELECTED_ITEM_REMOVE_BUTTON_SELECTOR),this.selectedRemoveButtons.forEach((e=>{const t=e.dataset.entity;e.addEventListener("click",(()=>{l().publish(n.Y.removeSelectedEntity,t),this.removeSelectionFromList(t),this.renderSelectedItems()}))}))}fixLoaderOverlapFlyout(){const e=document.querySelector(this.FIX_LOADER_SELECTOR);e&&this.toaster.appendChild(e)}}},30333:function(e,t,s){s.d(t,{E:function(){return l},I:function(){return i}});class i{constructor(e){this.callBack=e}}class l{}l.toasterInitialized="multi-select-toaster-initialized"},94994:function(e,t,s){s.d(t,{Q:function(){return i},Y:function(){return l}});class i{constructor(e,t,s,i){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";this.entityId=e,this.entityName=t,this.entityType=s,this.entityImgUrl=i,this.entityUrl=l}}class l{}l.entitySelected="entity-selected",l.entityUnselected="entity-unselected",l.removeSelectedEntity="entity-remove-selected",l.userSelectionCancelled="user-selection-cancelled",l.userSelectionRestored="user-selection-restored",l.userSelectionRestoredFullItems="user-initial-restored"}}]);

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.