/* @license Copyright (C) Exontrol. All rights reserved. */ !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):(t="undefined"!=typeof globalThis?globalThis:t||self,o(t.exontrol||{}))}(this,function(t){"use strict";function o(){d.aCSS(A+L,"{position:relative;width:33%;height:50%;}",!0),d.aCSS(A+H,"{position:absolute;width: 100%;overflow:hidden;box-sizing:border-box;}",!0),d.aCSS(A+w,"{position:absolute;}",!0),d.aCSS(A+w+" input","{outline:none;}",!0),d.aCSS(A+w+" span","{cursor:pointer;margin:0 4px 0 4px;}",!0),d.aCSS(A+C,"{background-color:yellow;}",!0),d.aCSS(A+F,"{display:none;}",!0),d.aCSS(A+E,"{outline: 1px solid gray;}",!0),o=i}function i(){}function e(t){return t instanceof Array}function n(t){return t instanceof HTMLElement}function r(t){return null!=t}function s(t){return null==t}function h(t){return W(t).toLowerCase()}function l(t,o,i){for(var e,n=0,r=i||0,s=t.length-o.length;r"==e)n--;else if(!n&&t.sWithI(o,r))return r;return-1}function u(t){return function(t,o,i){for(;~t.indexOf(o);)t=t.repAll(o,i);return t}(t,U,R).trim()}function p(){return a.apply(null,[arguments[0],!0].concat(Array.prototype.slice.call(arguments,1)))}function c(){return a.apply(null,[arguments[0],!1].concat(Array.prototype.slice.call(arguments,1)))}function a(t,o,i){function e(t,o){return u(t.repAll(o,v))}for(var n=t.className,r=arguments,s=r.length,h=2;hthis.rgU[0][1],i=this.path(o),e=o?-1:1,n=d.bin(i.length,function(o){return e*(m.Y(i[o])-t)>=0});return o?n:-n},t.prototype.y2P=function(t){return this.point(this.y2I(t))},t.prototype.h2I=function(t,o){var i,e=X(J(),t,-1,1);return o||(o=q(t),i=q(t.parentElement),Y(o,-i[0],-i[1]-e[1])),this.y2I(m.Y(m.R2C(o,T))+e[1])},t.prototype.point=function(t){return this.path(t>=0)[_(t)]},t.prototype.len=function(){return this.rgU.length},Object.addPrototypeOf(i.prototype,d.M1.prototype),i.prototype.init=function(t){return function(o,i,e){function n(t,o,i){var e=c.i2H(o),n=y(u.y2P(t),e);return this.push(o,n),e.style.zIndex=i,n}function r(t,o){var i=c.i2H(t),e=X(J(),i,1,o?2:3);return q(i)[3]/2+e[3]}function s(t,i){t.o=null;var e=t.i>=0&&t.iv?n=i(t):!n&&e.set(t,n=i(t)),n}.call(this,I.item(t.i))),t.o}function h(t){t=N(t);var o=!S.has(t);return o&&S.set(t,t),o}this.oT=o,t.call(this);var l,u,p,c,a,f,g,I=o.getVI(),v=I.len(),O=o.getCyclic(),S=new Map,b=o.misc("zIndex");if(this.clear(),v){p=(u=o.gEP()).len(),c=o.mIH,a=o.getClientRect(!0)[3],(e=N(e,0))<=-p?e=Z(e,p+1):e>=p&&(e=$(e,p-1)),i=Z(0,$(N(i,o.getSelect()),v-1)),f=g=n.call(this,m.Y(u.point(e)),I.item(i),b),l={i:i-1};for(U=1;s.call(this,l,!0)&&(R=d.TOf(f))>0&&h(R);l.i--,U++)f=n.call(this,R-r(l.o,!0),l.o,b-U);f=g,l={i:i+1};for(var R,U=1;s.call(this,l)&&(R=d.BOf(f))=o.getSelect()),i)).slice(0,2)),o.uph(i),this.set(t,i),o.onCreate(U.toPair(t,i))),i},R.prototype.h2I=d.BiM.prototype.getKey,R.prototype.all=function(t){var o=new d.Arr;return this.mK.forEach(function(i,e){o.push(t?i:e)}),o};var B={hAlign:.25,vAlign:0,tagName:"pre",selectPos:0,gradualOpacity:I,gradualOpacityTranstion:k,zIndex:9999};return U.version="4.4",U.type="Rollist",U.AllowFilterInputEnum={exHide:0,exAlwaysVisible:1,exShowOnAnyKey:2,exDisableHighlightOccurences:16},U.Options={wheelChange:null,allowActions:null,smooth:null,data:null,misc:null,select:null,cyclic:null,filter:null,allowFilterInput:null},U.prototype.init=function(t,i){o(),this.lnt=this.lnt||0,this.lnt++,this.oHH=function(t){return z(t)&&(t=d.doc.getElementById(t)),n(t)&&t||null}(t),this.oHH&&(p(this.oHH,L),function(t){var o,i=t&&t.oHH;if(n(i)){for(var e in Object.getPrototypeOf(t))e.startsWith(O)&&S+e.substr(O.length)in i&&(o=o||[]).push(e.substr(O.length));o&&o.forEach(function(o){i.addEventListener(o,t[b+o]=function(i){return t[O+o].call(t,i)}.bind(t))})}}(this),function(t,o,i){ResizeObserver&&t&&!t.oRO&&(t.oRO=new ResizeObserver(function(t){var e=t&&t[0]&&t[0].contentRect;e&&e.width&&e.height&&o.call(i,[e.x,e.y,e.width,e.height])}),t.oRO.observe(t))}(this.oHH,this.onSize,this)),this.mIH=new R(this),this.oI=new U.Items(this),this.lAI=0,this.lR=0,this.sSA="smth-"+d.Rand(),this.iLts(),this.bU(),this.oO=d.Cpy(d.Rollist.Options),this.SetOptions(i,!0),this.eU(),this.oHH&&(this.oFI=function(t){var o,i=this.misc("zIndex"),e=f(t,"div",function(t){p(t,w,F),t.style.zIndex=i,t.innerHTML=V}),n={p:e,i:e.querySelector("input"),c:e.querySelector("span")};return n.i&&(n.i.oninput=function(t){clearTimeout(o),o=this.setTimeout(function(){this.onChangeFilter(t.target.value)},d.Def.EF.modalTTC)}.bind(this)),n.c&&(n.c.onclick=this.onX.bind(this)),n}.call(this,this.oHH)),--this.lnt},U.prototype.term=function(){this.oHH&&(this.mIH.clear(),this.oFI&&this.oFI.p.remove(),function(t){t&&t.oRO&&(t.oRO.unobserve(t),t.oRO=null)}(this.oHH),function(t){var o=t&&t.oHH;if(n(o))for(var i in t)i.startsWith(b)&&t[i]&&(o.removeEventListener(i.substr(b.length),t[i]),t[i]=null)}(this),c(this.oHH,L),this.oFI=null,this.oHH=null)},U.prototype.setTimeout=function(){return d.setTimeout.apply(this,arguments)},U.prototype.gPtr=function(t){var o=d.eA2P(t,"client"),i=q(this.oHH);return o.x-=i[0],o.y-=i[1],o.buttons=d.e2B(t),o},U.prototype.e2I=function(t){var o,i=t.target;if(this.oHH&&this.oHH.contains(i))for(;i&&!(o=this.mIH.h2I(i));)i=i.parentElement;return g(o)},U.prototype.onSize=function(){this.Refresh()},U.prototype.gEP=function(){return this.oEP||(this.oEP=new t(this.getClientRect(!0),this.misc("hAlign",.25),this.misc("vAlign",0)))},U.prototype.resEP=function(){this.oEP=null},U.prototype.getInnerHTML=function(t){var o,i=W(t.getValue());return 16&this.getAllowFilterInput()||!(o=this.getFilter())||(i=function(t,o,i){var e,n=v,r=0,s=-1,u=o.length;if(u)for(e=h(t),o=h(o);~(s=l(e,o,r));)n+=t.substr(r,s-r)+i(t.substr(s,u)),r=s+u;return n+=t.substr(r)}(i,o,function(t){return""+t+""})),i},U.prototype.hemousedown=U.prototype.hepointerdown=U.prototype.hetouchstart=function(t){this.gAA().Do(this,t),!d.RUR.Rng()&&this.doRUR(t,function(t){switch(t.drag.status){case 4:case 5:this.rurActionClick(null,t)}},this)},U.prototype.hewheel=U.prototype.hemousewheel=function(t){if(this.oHH){var o,i,e,n=this.getWheelChange()*d.WhelInc(t);n&&(i=(o=this.getVI()).len(),e=this.getSelect()-n,this.getCyclic()&&(e<0?e=i-1:e>=i&&(e=0)),this.onSelect(o.item(e)))}},U.prototype.hekeydown=function(t){",Control,Shift,Alt,".indexOf(","+t.key+",")<0&&this.oFI&&this.oFI.p&&!function(t){var o=d.CSS(t);return o&&"none"!=o.display&&"hidden"!=o.visibility&&"0"!=o.opacity}(this.oFI.p)&&2&this.getAllowFilterInput()&&(this.ShowFilterInput(),this.oFI.i&&this.oFI.i.focus())},U.prototype.doRUR=function(t,o,i,e){var n,r=this.gAA();return d.RUR.Do(t,function(t){switch(n=t.drag.status){case 3:r.CanDo(t,1)&&(d.RUR.Cancel(),this.norurAction(t,1)||(this.lRURLong=(this.lRURLong||0)+1,r.Do(this,t,1),--this.lRURLong));break;case 5:this.norurAction(t,2)}o.call(i,t)},this,e)},U.prototype.allowRur=function(t,o){return!0},U.prototype.rurAction=function(t,o,i){var e={rurName:t,rurFlags:o,rurStatus:function(o){this.rurActionClick(t,o)}};if(this.allowRur(i,e)){var n="rur"+d.getP(function(t){for(var o,i=v,e=0,n=t.length;e1&&(n=K(l[1])),s=i.len(),h=this.gIESel(),r=i.h2I(t)-h,r=Math.abs(r)/(s+(r<0?h:-h)),o=n+(e-n)*(1-function(){return this.oGOT||(this.oGOT=new m.Bezier(this.misc("gradualOpacityTransition",k)))}.call(this).Get(r))),o}var i=this.gEP(),e=o.call(this);r(e)&&(t.style.opacity=e)},U.prototype.iLts=function(){this.Listeners=this.oLts=new d.Lts,this.oLts.add("onclick"),this.oLts.add("onload"),this.oLts.add("onerror"),this.oLts.add("oncreate"),this.oLts.add("ondestroy"),this.oLts.add("onadditem"),this.oLts.add("onremoveitem"),this.oLts.add("onselect"),this.oLts.add("onfilter")},U.prototype.on=function(t,o,i){},U.prototype.off=function(t,o,i){},d.Lts.Onf(U.prototype),Object.defineProperty(U.prototype,"Options",{get:function(){return this.GetOptions()},set:function(t){this.SetOptions(t)},configurable:!0}),U.prototype.GetItems=function(){return this.oI},U.prototype.Item=function(t){return this.oI.Item(t)},U.prototype.item=function(t){return this.oI.item(t)},U.prototype.onLoad=function(){this.onload()},U.prototype.onload=function(){this.oLts.onload.do()},U.prototype.onError=function(t){this.onerror(t)},U.prototype.onerror=function(t){this.oLts.onerror.do(t)},U.prototype.Import=function(t,o){function i(t){return d.IsS(t)&&t&&t.indexOf(this.oImp.eor)<0&&(!W(this.oImp.eof)||t.indexOf(this.oImp.eof)<0)&&t.indexOf(this.oImp.str)<0}function n(t,o){function i(t){l.Add(t)}function n(t){(function(t){var o=e(t);if(o)for(var n=0,r=s(h.limit)?t.length:$(limit,t.length);n