PageSourceSearch

https://my-account.konicaminolta.eu/app-selector/files/app-selector.min.js?v=

js konicaminolta.eu collected 2026-10-01 10:37:45 UTC 5,616 bytes, 8 lines download raw bytes

1var __awaiter=this&&this.__awaiter||function(e,a,p,l){return new(p=p||Promise)(function(n,t){function s(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof p?t:new p(function(e){e(t)})).then(s,i)}o((l=l.apply(e,a||[])).next())})};(()=>{if(void 0!==window.Reflect&&void 0!==window.customElements){let e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}})(),customElements.define("app-selector",class extends HTMLElement{constructor(){super(),this.openClassName="open",this.isOpened=!1,this.bodyClickHandler=e=>this.watchBodyClick(e)}connectedCallback(){this.attachShadow({mode:"open"}),this.appendStyles(),this.appendGoogleFonts(),this.fetchApps(),this.renderRoot(),this.renderButton(),this.closeOnEscKey=this.closeOnEscKey.bind(this)}static get observedAttributes(){return["open","user","hash"]}get open(){return this.hasAttribute("open")}set open(e){(this.isOpened=e)?this.setAttribute("open","true"):this.removeAttribute("open")}attributeChangedCallback(e,t,n){switch(e){case"user":this.user=n;break;case"hash":this.hash=n;break;case"open":this.isOpened="true"===n,this.isOpened?this.openMenu():this.closeMenu()}}fetchApps(){return __awaiter(this,void 0,void 0,function*(){if(this.user&&this.hash)try{var e=yield fetch("https://kmid-api.konicaminolta.eu/waffle-menu/applications?userId="+encodeURIComponent(this.user)+"&hash="+encodeURIComponent(this.hash));if(e.ok)return yield e.json();throw new Error("API error: "+e.statusText)}catch(e){console.log(e)}return null})}renderRoot(){this.root=document.createElement("div"),this.root.className="app-selector",this.root.setAttribute("part","selector"),this.shadowRoot.appendChild(this.root)}renderButton(){this.appButtonEl=document.createElement("button"),this.appButtonEl.className="app-selector-button",this.appButtonEl.setAttribute("part","button"),this.appButtonEl.addEventListener("click",e=>{this.open=!this.open});var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),t=(e.setAttribute("width","35px"),e.setAttribute("height","35px"),e.setAttribute("viewBox","0 0 30 30"),e.setAttribute("part","icon"),(e,t)=>{var n=document.createElementNS("http://www.w3.org/2000/svg","circle");return n.setAttribute("cx",e),n.setAttribute("cy",t),n.setAttribute("r","3"),n});e.appendChild(t("5","5")),e.appendChild(t("15","5")),e.appendChild(t("25","5")),e.appendChild(t("5","15")),e.appendChild(t("15","15")),e.appendChild(t("25","15")),e.appendChild(t("5","25")),e.appendChild(t("15","25")),e.appendChild(t("25","25")),this.appButtonEl.appendChild(e),this.root.appendChild(this.appButtonEl)}renderMenu(){this.appMenuEl=document.createElement("div"),this.appMenuEl.className="app-selector-menu",this.appMenuEl.setAttribute("part","menu");var e=document.createElement("div");e.className="app-selector-menu__content",this.appMenuEl.appendChild(e),null!=(e=this.root)&&e.appendChild(this.appMenuEl)}renderAppList(){let e,o=this.appMenuEl.querySelector(".app-selector-menu__content"),i=e=>{this.appMenuEl.className="app-selector-menu app-selector-menu-loaded";let i=document.createElement("div");i.className="app-selector-app-grid",i.setAttribute("part","grid"),5<e.length&&(i.classList.add("multicolumn"),this.appMenuEl.classList.add("multicolumn")),e.forEach(e=>{var t=document.createElement("a"),n=(t.className="app-selector-menu-item",t.setAttribute("part","item"),t.href=e.url,t.setAttribute("target","_blank"),document.createElement("div")),s=(n.className="app-selector-app-icon",n.style.backgroundColor=e.iconColor,n.textContent=e.iconText,document.createElement("div"));s.textContent=e.title,t.appendChild(n),t.appendChild(s),i.appendChild(t)}),o.appendChild(i)};if(void 0===this.appDefinitions){let s=document.createElement("div");s.className="loader",s.setAttribute("part","loader"),null!=(e=this.appMenuEl)&&e.append(s),this.fetchApps().then(e=>{var t,n;e?(t=e.title,(n=document.createElement("div")).className="app-selector-menu-title",n.setAttribute("part","main-title"),n.textContent=t,o.appendChild(n),i(e.waffleMenuApplicationItems),null!=(t=this.appMenuEl)&&t.removeChild(s)):(null!=(n=this.appMenuEl)&&n.removeChild(s),i([]))})}else i(this.appDefinitions)}openMenu(){var e;document.addEventListener("click",this.bodyClickHandler),this.renderMenu(),this.renderAppList(),null!=(e=this.appButtonEl)&&e.classList.add(this.openClassName),document.body.addEventListener("keyup",this.closeOnEscKey)}closeMenu(){var e;document.removeEventListener("click",this.bodyClickHandler),null!=(e=null==(e=this.appMenuEl)?void 0:e.parentElement)&&e.removeChild(this.appMenuEl),null!=(e=this.appButtonEl)&&e.classList.remove(this.openClassName),document.body.removeEventListener("keyup",this.closeOnEscKey)}watchBodyClick(e){this.contains(e.target)||(this.open=!1)}closeOnEscKey(e){"escape"===e.key.toLowerCase()&&(this.open=!1)}appendStyles(){var e,t=document.createElement("link");t.rel="stylesheet",t.href=this.getStylesUrl(),null!=(e=this.shadowRoot)&&e.appendChild(t)}getStylesUrl(){return"https://my-account.konicaminolta.eu/app-selector/files/app-selector.min.css?v=1.0.2"}appendGoogleFonts(){var e,t=document.createElement("style");t.textContent=`
2
3      @font-face {
4        font-family: 'Open Sans';
5        font-style: normal;
6        src: url('https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFUKZ0e.ttf') format('truetype');
7      }
8      `,null!=(e=this.shadowRoot)&&e.appendChild(t)}});

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.