PageSourceSearch

https://aeroscreen.ru/bitrix/js/ui/hint/dist/ui.hint.bundle.min.js?17818604965362

js aeroscreen.ru collected 2026-10-08 23:48:37 UTC 5,362 bytes, 2 lines download raw bytes

1this.BX=this.BX||{};(function(t,e,i,n){"use strict";const s=17;const o=(t,e)=>{const i=e.getBoundingClientRect();const n=i.x;const s=i.x+i.width;const o=i.y;const a=i.y+i.height;return t.x>=n&&t.x<=s&&t.y>=o&&t.y<=a};const a=t=>{const e=t.getBoundingClientRect();return e.width||t.offsetWidth};const r=t=>{const e=a(t);return e?i.Popup.getOption("angleLeftOffset")-s+e/2:false};const p=(t,e)=>{const i=t.getBoundingClientRect();const n=e.getBoundingClientRect();return i.width?i.left+i.width/2-n.left-s:false};class u{attributeName="data-hint";attributeHtmlName="data-hint-html";attributeInitName="data-hint-init";attributeInteractivityName="data-hint-interactivity";classNameContent="ui-hint-content";#t="ui-hint";#e="ui-hint-icon";#i="ui-hint-popup";#n="ui-hint-popup-interactivity";#s="data-hint-size";#o=null;#a=null;#r=null;#p=null;#u={x:0,y:0};#c="data-hint-icon";#h=n.Main.HELP;#l=null;constructor(t={}){this.id=t.id||`ui-hint-popup-${Date.now()}`;if(t.attributeName){this.attributeName=t.attributeName}if(t.attributeInitName){this.attributeInitName=t.attributeInitName}if(t.classNameIcon){this.#e=t.classNameIcon}if(t.className){this.#t=t.className}if(t.content){if(!e.Type.isDomNode(t.content)){throw new Error("Parameter `content` should be a DOM Node.")}this.#a=t.content}if(t.popup){if(!(t.popup instanceof i.Popup)){throw new TypeError("Parameter `popup` should be an instance of Popup.")}this.#o=t.popup}if(t.popupParameters){this.#r=t.popupParameters}if(t.icon){this.#h=t.icon}if(t.iconResolver){this.#l=t.iconResolver}}#m(t){if(this.#l){const i=this.#l(t);if(e.Type.isString(i)&&i!==""){return i}}const i=t.getAttribute(this.#c);if(e.Type.isString(i)&&i!==""){return i}if(t.hasAttribute("data-hint-outline")){return n.Outline.QUESTION}return this.#h}initPage(){if(document.body){this.initByClassName()}e.Event.ready((()=>this.initByClassName()))}createInstance(t){return new u(t||{})}initByClassName(t){const e=t||document.body;if(!e){return}const i=[...e.getElementsByClassName(this.#t)];i.forEach((t=>this.initNode(t)));this.#f(e)}init(t){const e=t||document.body;if(!e){return}const i=[...e.querySelectorAll(`[${this.attributeName}]`)];i.forEach((t=>this.initNode(t)));this.#f(e)}initOwnerDocument(t){if(!t){return}this.#f(t)}#f(t){if(t.ownerDocument===this.#p){return}this.#p=t.ownerDocument;e.Event.bind(this.#p,"mousemove",(t=>{this.#u={x:t.x,y:t.y}}))}createNode(t){const e=document.createElement("span");e.setAttribute(this.attributeName,t);this.initNode(e);return e}initNode(t){if(t.getAttribute(this.attributeInitName)){return}t.setAttribute(this.attributeInitName,"y");let i=t.getAttribute(this.attributeName);if(!e.Type.isString(i)||i.trim()===""){return}if(!t.hasAttribute(this.attributeHtmlName)){i=e.Text.encode(i)}i=i.trim().replaceAll(/\r?\n/g,"<br>");const n=!t.hasAttribute("data-hint-no-icon");if(n){this.#d(t)}const s=t.hasAttribute("data-hint-center");e.Event.bind(t,"mouseenter",(()=>this.show(t,i||"",s,true)));e.Event.bind(t,"mouseleave",(()=>this.hide(t)))}#d(t){e.Dom.addClass(t,this.#t);const i=this.#m(t);const s=new n.Icon({icon:i});const o=s.render();e.Dom.addClass(o,this.#e);const a=t.querySelector(`.${this.#e}`);if(a){e.Dom.replace(a,o)}else{t.prepend(o)}const r=t.getAttribute(this.#s);if(r){e.Dom.addClass(t,`--ui-hint-size-${r.toLowerCase()}`)}}#N(t,i){if(!i){return true}const n=t.getAttribute(this.attributeName);return e.Type.isString(n)}#b(t,n){if(this.#o&&this.#o.bindElement!==t){this.#o.destroy();this.#o=null}if(!this.#a){this.#a=document.createElement("div");e.Dom.addClass(this.#a,this.classNameContent)}if(!this.#o){const s=this.#y(t,n);this.#o=new i.Popup(this.id,t,s);e.Event.bind(this.#o.getPopupContainer(),"mouseleave",(()=>this.hide(this.#o.getPopupContainer())))}}#y(t,e){const i=this.#g(this.#r);return this.#P(i,t,e)}#g(t){return{content:this.#a,className:this.#i,zIndex:1e3,darkMode:true,focusTrap:false,animation:"fading-slide",...t}}#P(t,e,i){const n={...t};if(i){n.offsetLeft??=0;n.angle??={offset:0};n.events??={onPopupShow:()=>{this.fixPopupAngle()}}}else if(!n.angle){n.angle={offset:r(e)}}return n}fixPopupAngle(t){if(!this.#o||!this.#o.angle){return}const i=this.#o.getPopupContainer();if(!i){return}setTimeout((()=>{const n=i.offsetWidth;const o=t?p(t,i):n?n/2-s:false;this.#o.angle.offset=o;if(this.#o.angle.position==="bottom"){e.Dom.style(this.#o.angle.element,"left","0");e.Dom.style(this.#o.angle.element,"marginLeft",o===false?"":`${o}px`)}else{e.Dom.style(this.#o.angle.element,"marginLeft","0");e.Dom.style(this.#o.angle.element,"left",o===false?"":`${o}px`)}}),0)}#I(t){const i=this.#o.getPopupContainer();if(t.hasAttribute(this.attributeInteractivityName)){e.Dom.addClass(i,this.#n)}else{e.Dom.removeClass(i,this.#n)}}#v(t){this.#a.innerHTML=t}#w(){const t=this.#o.getPopupContainer();e.Dom.style(t,"visibility","hidden");setTimeout((()=>{e.Dom.style(t,"visibility","")}),10)}
1show(t,e,i,n=false){if(!this.#N(t,n)){return}this.#b(t,i);if(!this.#o){return}this.#I(t);this.#v(e);this.#o.show();if(i){this.#w()}else{this.fixPopupAngle(t)}}hide(t){if(!this.#o){return}if(t&&t.hasAttribute(this.attributeInteractivityName)){setTimeout((()=>{if(this.#o&&!o(this.#u,this.#o.getPopupContainer())){this.#o.close()}}),100)}else{this.#o.close()}}}const c=new u;c.initPage();t.Hint=c})(this.BX.UI=this.BX.UI||{},BX,BX.Main,BX.UI.IconSet);
2//# sourceMappingURL=ui.hint.bundle.map.js

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.