tsgrid-ui 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/dist/tsgrid-ui.css +2 -2
- package/dist/tsgrid-ui.es6.js +7 -8
- package/dist/tsgrid-ui.es6.js.map +1 -1
- package/dist/tsgrid-ui.es6.min.js +1 -1
- package/dist/tsgrid-ui.js +8 -9
- package/dist/tsgrid-ui.min.css +2 -2
- package/dist/tsgrid-ui.min.js +2 -2
- package/package.json +1 -1
package/dist/tsgrid-ui.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* tsgrid-ui 1.0.x (nightly) (5/14/2026,
|
|
1
|
+
/* tsgrid-ui 1.0.x (nightly) (5/14/2026, 1:17:35 AM) (c) 2014 vitmalina@gmail.com, (c) 2026 DaverSoGT — MIT */
|
|
2
2
|
"use strict";var Xe=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var _i=Object.getOwnPropertyNames;var ki=Object.prototype.hasOwnProperty;var Ci=(n,e)=>{for(var s in e)Xe(n,s,{get:e[s],enumerable:!0})},Ei=(n,e,s,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _i(e))!ki.call(n,i)&&i!==s&&Xe(n,i,{get:()=>e[i],enumerable:!(t=wi(e,i))||t.enumerable});return n};var Si=n=>Ei(Xe({},"__esModule",{value:!0}),n);var Pi={};Ci(Pi,{Tooltip:()=>oe,TsAlert:()=>Wt,TsBase:()=>ne,TsColor:()=>$e,TsConfirm:()=>Yt,TsDate:()=>Ge,TsDialog:()=>Ie,TsEvent:()=>Re,TsField:()=>de,TsForm:()=>We,TsGrid:()=>qe,TsLayout:()=>Qe,TsLocale:()=>_e,TsMenu:()=>ie,TsPopup:()=>he,TsPrompt:()=>Xt,TsSidebar:()=>Be,TsTabs:()=>Te,TsToolbar:()=>pe,TsTooltip:()=>V,TsUi:()=>se,TsUtils:()=>p,query:()=>Ee});var _e={locale:"en-US",dateFormat:"m/d/yyyy",timeFormat:"hh:mi pm",datetimeFormat:"m/d/yyyy|hh:mi pm",currencyPrefix:"$",currencySuffix:"",currencyPrecision:2,groupSymbol:",",decimalSymbol:".",shortmonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullmonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortdays:["M","T","W","T","F","S","S"],fulldays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekStarts:"S",phrases:{"${count} letters or more...":"---","Add new record":"---","Add New":"---","Advanced Search":"---",after:"---","AJAX error. See console for more details.":"---","All Fields":"---",All:"---",Any:"---","Are you sure you want to delete ${count} ${records}?":"---","Attach files by dragging and dropping or Click to Select":"---",before:"---","begins with":"---",begins:"---",between:"---",buffered:"---",Cancel:"---",Close:"---",Column:"---",Confirmation:"---",contains:"---",Copied:"---","Copy to clipboard":"---","Current Date & Time":"---","Delete selected records":"---",Delete:"---",'Do you want to delete search item "${item}"?':"---","Edit selected record":"---",Edit:"---","Empty list":"---","ends with":"---",ends:"---","Field should be at least ${count} characters.":"---",Hide:"---",in:"---","is not":"---",is:"---","less than":"---","Line #":"---","Load ${count} more...":"---","Loading...":"---","Maximum number of files is ${count}":"---","Maximum total size is ${count}":"---",Modified:"---","more than":"---","Multiple Fields":"---",Name:"---","No items found":"---","No matches":"---",No:"---",none:"---","Not a float":"---","Not a hex number":"---","Not a valid date":"---","Not a valid email":"---","Not alpha-numeric":"---","Not an integer":"---","Not in money format":"---","not in":"---",Notification:"---",of:"---",Ok:"---",Opacity:"---","Record ID":"---",record:"---",records:"---","Refreshing...":"---",RegEx:"---",regex:"---","Reload data in the list":"---",Remove:"---","Remove This Field":"---","Request aborted.":"---","Required field":"---",Reset:"---","Restore Default State":"---","Returned data is not in valid JSON format.":"---","Save changed records":"---","Save Grid State":"---",Save:"---","Saved Searches":"---","Saving...":"---","Search took ${count} seconds":"---",Search:"---","Select Hour":"---","Select Minute":"---",selected:"---","Server Response ${count} seconds":"---","Show/hide columns":"---",Show:"---",Size:"---",Skip:"---","Sorting took ${count} seconds":"---","Type to search...":"---",Type:"---",Yes:"---",Yesterday:"---","Your remote data source record count has changed, reloading from the first record.":"---"}};var Me=class n{static version=.8;context;nodes;length;constructor(e,s){this.context=s??document;let t=[];if(Array.isArray(e))t=e;else if(e instanceof Node||e instanceof Window)t=[e];else if(e instanceof n)t=e.nodes;else if(typeof e=="string"){if(typeof this.context.querySelector!="function")throw new Error("Invalid context");t=Array.from(this.context.querySelectorAll(e))}else if(e==null)t=[];else{let i=Array.from(e??[]);if(typeof e=="object"&&Array.isArray(i))t=i;else throw new Error(`Invalid selector "${e}"`)}this.nodes=t,this.length=t.length,this.each((i,o)=>{this[o]=i})}static _fragment(e){let s=document.createElement("template");return s.innerHTML=e,s.content.childNodes.forEach(t=>{let i=n._scriptConvert(t);i!=t&&s.content.replaceChild(i,t)}),s.content}static _scriptConvert(e){let s=t=>{let o=t.ownerDocument.createElement("script");o.text=t.text;let l=t.attributes;for(let a=0;a<l.length;a++){let r=l[a];r&&o.setAttribute(r.name,r.value)}return o};return e.tagName=="SCRIPT"&&(e=s(e)),e.querySelectorAll&&e.querySelectorAll("script").forEach(t=>{t.parentNode.replaceChild(s(t),t)}),e}static _fixProp(e){let s={cellpadding:"cellPadding",cellspacing:"cellSpacing",class:"className",colspan:"colSpan",contenteditable:"contentEditable",for:"htmlFor",frameborder:"frameBorder",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return s[e]?s[e]:e}_insert(e,s){let t=[],i=this.length;if(i<1)return this;if(typeof s=="string")this.each(o=>{let l=n._fragment(s);t.push(...l.childNodes),o[e]?.(l)});else if(s instanceof n){let o=i==1;s.each(l=>{this.each(a=>{let r=o?l:l.cloneNode(!0);t.push(r),a[e]?.(r),n._scriptConvert(r)})}),o||s.remove()}else if(s instanceof Node)this.each(o=>{let l=i===1?s:n._fragment(s.outerHTML);t.push(...i===1?[s]:l.childNodes),o[e]?.(l)}),i>1&&s.remove();else throw new Error(`Incorrect argument for "${e}(html)". It expects one string argument.`);return e=="replaceWith"?new n(t,this.context):this}_save(e,s,t){e._mQuery=e._mQuery??{},Array.isArray(t)?(e._mQuery[s]=e._mQuery[s]??[],e._mQuery[s].push(...t)):t!=null?e._mQuery[s]=t:delete e._mQuery[s]}get(e){if(e==null)return this.nodes;e<0&&(e=this.length+e);let s=this[e];return s||null}eq(e){e<0&&(e=this.length+e);let s=this[e],t=s!=null?[s]:[];return new n(t,this.context)}then(e){let s=e(this);return s??this}find(e){let s=[];return this.each(t=>{let i=Array.from(t.querySelectorAll(e));i.length>0&&s.push(...i)}),new n(s,this.context)}filter(e){let s=[];return this.each(t=>{(t===e||typeof e=="string"&&t.matches&&t.matches(e)||typeof e=="function"&&e(t))&&s.push(t)}),new n(s,this.context)}next(){let e=[];return this.each(s=>{let t=s.nextElementSibling;t&&e.push(t)}),new n(e,this.context)}prev(){let e=[];return this.each(s=>{let t=s.previousElementSibling;t&&e.push(t)}),new n(e,this.context)}shadow(e){let s=[];this.each(i=>{i.shadowRoot&&s.push(i.shadowRoot)});let t=new n(s,this.context);return e?t.find(e):t}closest(e){let s=[];return this.each(t=>{let i=t.closest(e);i&&s.push(i)}),new n(s,this.context)}host(e){let s=[],t=o=>o.parentNode?t(o.parentNode):o,i=o=>{let l=t(o);s.push(l.host?l.host:l),l.host&&e&&i(l.host)};return this.each(o=>{i(o)}),new n(s,this.context)}parent(e){return this.parents(e,!0)}parents(e,s){let t=[],i=l=>{if(t.indexOf(l)==-1&&t.push(l),!s&&l.parentNode)return i(l.parentNode)};this.each(l=>{l.parentNode&&i(l.parentNode)});let o=new n(t,this.context);return e?o.filter(e):o}add(e){let s=e instanceof n?e.nodes:Array.isArray(e)?e:[e];return new n(this.nodes.concat(s),this.context)}each(e){return this.nodes.forEach((s,t)=>{e(s,t,this)}),this}append(e){return this._insert("append",e)}prepend(e){return this._insert("prepend",e)}after(e){return this._insert("after",e)}before(e){return this._insert("before",e)}replace(e){return this._insert("replaceWith",e)}remove(){return this.each(e=>{e.remove()}),this}css(e,s){let t=typeof e=="object"?e:{},i=arguments.length;if(i===0||i===1&&typeof e=="string")if(this[0]){let o=this[0].style;if(typeof e=="string"){let l=o.getPropertyPriority(e);return o.getPropertyValue(e)+(l?"!"+l:"")}else return Object.fromEntries(this[0].style.cssText.split(";").filter(l=>!!l).map(l=>l.split(":").map(a=>a.trim())))}else return;else return typeof e!="object"&&(t={},t[e]=s),this.each(o=>{Object.keys(t).forEach(l=>{let a=String(t[l]).toLowerCase().includes("!important")?"important":"";o.style.setProperty(l,String(t[l]).replace(/\!important/i,""),a)})}),this}addClass(e){return this.toggleClass(e,!0),this}removeClass(e){return this.toggleClass(e,!1),this}toggleClass(e,s){return typeof e=="string"&&(e=e.split(/[,\s]+/)),this.each(t=>{let i=e;i==null&&s===!1&&(i=Array.from(t.classList)),i&&i.forEach(o=>{if(o!==""){let l="toggle";s!=null&&(l=s?"add":"remove"),t.classList[l](o)}})}),this}hasClass(e){if(typeof e=="string"&&(e=e.split(/[,\s]+/)),e==null&&this.length>0)return Array.from(this[0].classList);let s=!1;return this.each(t=>{s=s||e.every(i=>Array.from(t.classList??[]).includes(i))}),s}on(e,s,t){let i;typeof s=="function"?(t=s,i=void 0):i=s;let o;return i?.delegate&&(o=i.delegate,delete i.delegate),e.split(/[,\s]+/).forEach(a=>{let r=String(a).toLowerCase().split("."),c=r[0]??"",d=r[1],u=t;if(o){let h=u;u=f=>{let m=j(f.target).parents(o);m.length>0?f.delegate=m[0]:f.delegate=f.target,(f.target.matches(o)||m.length>0)&&h(f)}}this.each(h=>{this._save(h,"events",[{event:c,scope:d,callback:u,options:i}]),h.addEventListener(c,u,i)})}),this}off(e,s,t){return typeof s=="function"&&(t=s,s=void 0),(e??"").split(/[,\s]+/).forEach(o=>{let l=String(o).toLowerCase().split("."),a=l[0]??"",r=l[1];this.each(c=>{if(Array.isArray(c._mQuery?.events))for(let d=c._mQuery.events.length-1;d>=0;d--){let u=c._mQuery.events[d];u&&(r==null||r===""?(u.event==a||a==="")&&(u.callback==t||t==null)&&(c.removeEventListener(u.event,u.callback,u.options),c._mQuery.events.splice(d,1)):(u.event==a||a==="")&&u.scope==r&&(c.removeEventListener(u.event,u.callback,u.options),c._mQuery.events.splice(d,1)))}})}),this}trigger(e,s){let t,i=["click","dblclick","mousedown","mouseup","mousemove"],o=["keydown","keyup","keypress"];return e instanceof Event?t=e:i.includes(e)?t=new MouseEvent(e,s):o.includes(e)?t=new KeyboardEvent(e,s):t=new Event(e,s),this.each(l=>{l.dispatchEvent(t)}),this}attr(e,s){if(s===void 0&&typeof e=="string")return this[0]?this[0].getAttribute(e)??void 0:void 0;{let t={};return typeof e=="object"?t=e:t[e]=s,this.each(i=>{Object.entries(t).forEach(([o,l])=>{i.setAttribute(o,l)})}),this}}removeAttr(...e){return this.each(s=>{e.forEach(t=>{s.removeAttribute(t)})}),this}prop(e,s){if(s===void 0&&typeof e=="string")return this[0]?this[0][e]:void 0;{let t={};return typeof e=="object"?t=e:t[e]=s,this.each(i=>{Object.entries(t).forEach(([o,l])=>{let a=n._fixProp(o);i[a]=l,a=="innerHTML"&&n._scriptConvert(i)})}),this}}removeProp(...e){return this.each(s=>{e.forEach(t=>{delete s[n._fixProp(t)]})}),this}data(e,s){if(e instanceof Object&&typeof e!="string"){Object.entries(e).forEach(t=>{this.data(t[0],t[1])});return}if(e&&typeof e=="string"&&e.indexOf("-")!=-1&&console.error(`Key "${e}" contains "-" (dash). Dashes are not allowed in property names. Use camelCase instead.`),arguments.length<2)if(this[0]){let t=Object.assign({},this[0].dataset);return Object.keys(t).forEach(i=>{let o=t[i];if(o.startsWith("[")||o.startsWith("{"))try{t[i]=JSON.parse(o)}catch{}}),e?t[e]:t}else return;else return this.each(t=>{s!=null?t.dataset[e]=s instanceof Object?JSON.stringify(s):s:delete t.dataset[e]}),this}removeData(e){return typeof e=="string"&&(e=e.split(/[,\s]+/)),this.each(s=>{e.forEach(t=>{delete s.dataset[t]})}),this}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}toggle(e){return this.each(s=>{let t=s.style.display,i=getComputedStyle(s).display,o=t=="none"||i=="none";if(o&&(e==null||e===!0)){let l=s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block";s.style.display=s._mQuery?.prevDisplay??(t==i&&i!="none"?"":l),this._save(s,"prevDisplay",null)}!o&&(e==null||e===!1)&&(i!="none"&&this._save(s,"prevDisplay",i),s.style.setProperty("display","none"))})}empty(){return this.html("")}html(e){return e instanceof HTMLElement?this.empty().append(e):this.prop("innerHTML",e)}text(e){return this.prop("textContent",e)}val(e){return this.prop("value",e)}change(){return this.trigger("change")}click(){return this.trigger("click")}},j=function(n,e){if(typeof n=="function"){let s=n;document.readyState=="complete"?s():window.addEventListener("load",s)}else return new Me(n,e)};j.html=n=>{let e=Me._fragment(n);return j(e.children,e)};j.version=Me.version;function ht(n){return/^[0-1]+$/.test(String(n))}function re(n){return/^[-+]?[0-9]+$/.test(String(n))}function Ke(n,e){return typeof n=="string"&&(n=n.replace(new RegExp(e.groupSymbol,"g"),"").replace(e.decimalSymbol,".")),(typeof n=="number"||typeof n=="string"&&n!=="")&&!isNaN(Number(n))}function pt(n,e){if(typeof n=="object"||n==="")return!1;if(Ke(n,e))return!0;let s=e,t=new RegExp("^"+(s.currencyPrefix?"\\"+s.currencyPrefix+"?":"")+"[-+]?"+(s.currencyPrefix?"\\"+s.currencyPrefix+"?":"")+"[0-9]*[\\"+s.decimalSymbol+"]?[0-9]+"+(s.currencySuffix?"\\"+s.currencySuffix+"?":"")+"$","i");return typeof n=="string"&&(n=n.replace(new RegExp(s.groupSymbol,"g"),"")),t.test(String(n))}function mt(n){return/^(0x)?[0-9a-fA-F]+$/.test(String(n))}function Le(n){return/^[a-zA-Z0-9_-]+$/.test(String(n))}function gt(n){return/^[a-zA-Z0-9._%\-+]+@[а-яА-Яa-zA-Z0-9.-]+\.[а-яА-Яa-zA-Z]+$/.test(String(n))}function yt(n){return new RegExp("^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$").test(String(n))}function ke(n){if(n==null||Object.prototype.toString.call(n)!=="[object Object]")return!1;if(n.constructor===void 0)return!0;let e=Object.getPrototypeOf(n);return e===null||e===Object.prototype}function Je(n){if(typeof n!="string")return null;n=n.trim().toUpperCase(),n[0]==="#"&&(n=n.substr(1));let e={r:0,g:0,b:0,a:1};if(n.length===3){let s=n[0]??"0",t=n[1]??"0",i=n[2]??"0";e={r:parseInt(s+s,16),g:parseInt(t+t,16),b:parseInt(i+i,16),a:1}}else if(n.length===6)e={r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:1};else if(n.length===8)e={r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:Math.round(parseInt(n.substr(6,2),16)/255*100)/100};else if(n.length>4&&n.substr(0,4)==="RGB("){let s=n.replace("RGB","").replace(/\(/g,"").replace(/\)/g,"").split(",");e={r:parseInt(s[0]??"0",10),g:parseInt(s[1]??"0",10),b:parseInt(s[2]??"0",10),a:1}}else if(n.length>5&&n.substr(0,5)==="RGBA("){let s=n.replace("RGBA","").replace(/\(/g,"").replace(/\)/g,"").split(",");e={r:parseInt(s[0]??"0",10),g:parseInt(s[1]??"0",10),b:parseInt(s[2]??"0",10),a:parseFloat(s[3]??"1")}}else return null;return e}function Ze(n,e){let s=i(n),t=i(e);return(Math.max(s,t)+.05)/(Math.min(s,t)+.05);function i(o){let{r:l,g:a,b:r}=Je(o)??{r:0,g:0,b:0,a:1},c=2.2,d=l/255,u=a/255,h=r/255,f=d<=.03928?d/12.92:Math.pow((d+.055)/1.055,c),m=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,c),y=h<=.03928?h/12.92:Math.pow((h+.055)/1.055,c);return .2126*f+.7152*m+.0722*y}}function bt(n,e){return Ze(n,e).toFixed(2)}function xt(n,e,s,t){let i,o,l;typeof n=="object"&&n!==null&&(e=n.s,s=n.v,t=n.a,n=n.h),n=n/360,e=e/100,s=s/100;let a=Math.floor(n*6),r=n*6-a,c=s*(1-e),d=s*(1-r*e),u=s*(1-(1-r)*e);switch(a%6){case 0:i=s,o=u,l=c;break;case 1:i=d,o=s,l=c;break;case 2:i=c,o=s,l=u;break;case 3:i=c,o=d,l=s;break;case 4:i=u,o=c,l=s;break;case 5:i=s,o=c,l=d;break}return{r:Math.round((i??0)*255),g:Math.round((o??0)*255),b:Math.round((l??0)*255),a:t??1}}function vt(n,e,s,t){typeof n=="object"&&n!==null&&(e=n.g,s=n.b,t=n.a,n=n.r);let i=Math.max(n,e,s),o=Math.min(n,e,s),l=i-o,a,r=i===0?0:l/i,c=i/255;switch(i){case o:a=0;break;case n:a=e-s+l*(e<s?6:0),a/=6*l;break;case e:a=s-n+l*2,a/=6*l;break;case s:a=n-e+l*4,a/=6*l;break}return{h:Math.round((a??0)*360),s:Math.round(r*100),v:Math.round(c*100),a:t??1}}function Ce(n,e){let s=Object.assign({functions:!0,elements:!0,events:!0,exclude:[],parent:""},e??{});if(Array.isArray(n)){let t=Array.from(n);return t.forEach((i,o)=>{t[o]=Ce(i,{functions:s.functions,elements:s.elements,events:s.events,exclude:s.exclude,parent:s.parent+"[]"})}),t}else if(ke(n)){let t={};return Object.assign(t,n),Array.isArray(s.exclude)&&s.exclude.forEach(i=>{delete t[i]}),Object.keys(t).forEach(i=>{typeof s.exclude=="function"&&s.exclude(i,{obj:n,parent:s.parent})?t[i]=void 0:t[i]=Ce(t[i],{functions:s.functions,elements:s.elements,events:s.events,exclude:s.exclude,parent:s.parent+(s.parent?".":"")+i}),t[i]===void 0&&delete t[i]}),t}else return n instanceof Function&&!s.functions||n instanceof Node&&!s.elements||n instanceof Event&&!s.events?void 0:n}function te(n,e,...s){if(Array.isArray(n))if(Array.isArray(e))n.splice(0,n.length),e.forEach(t=>{n.push(Ce(t))});else throw new Error("Arrays can be extended with arrays only");else{if(n instanceof Node||n instanceof Event)throw new Error("HTML elmenents and events cannot be extended");if(n&&typeof n=="object"&&e!=null){if(typeof e!="object")throw new Error("Object can be extended with other objects only.");Object.keys(e).forEach(t=>{if(n[t]!=null&&typeof n[t]=="object"&&e[t]!=null&&typeof e[t]=="object"){let i=Ce(e[t]);n[t]instanceof Node||n[t]instanceof Event?n[t]=i:(Array.isArray(n[t])&&ke(i)&&(n[t]={}),te(n[t],i))}else n[t]=Ce(e[t])})}else if(e!=null)throw new Error("Object is not extendable, only {} or [] can be extended.")}if(s.length>0)for(let t=0;t<s.length;t++)te(n,s[t]);return n}function Tt(n,e){let s=0,t=0,i=1,o=0,l=0,a=String.alphabet;function r(u,h,f){if(f){for(s=h;f=r(u,s),f<76&&f>65;)++s;return+u.slice(h-1,s)}let m=a?a.indexOf(u.charAt(h)):-1;return m>-1?m+76:(m=u.charCodeAt(h)||0,m<45||m>127?m:m<46?65:m<48?m-1:m<58?m+18:m<65?m-11:m<91?m+11:m<97?m-37:m<123?m+5:m-63)}let c=""+n,d=""+e;if(c!=d){for(;i;)if(t=r(c,o++),i=r(d,l++),t<76&&i<76&&t>66&&i>66&&(t=r(c,o,o),i=r(d,l,o=s),l=s),t!=i)return t<i?-1:1}return 0}function Ae(n,e){let s;try{s=n;let t=String(e).split(".");for(let i=0;i<t.length;i++)s=s[t[i]??""]}catch{s=void 0}return s}function et(n,e={}){if(Array.isArray(n))return n.forEach((s,t)=>{if(typeof s=="string"||typeof s=="number")n[t]={id:s,text:String(s)};else if(s!=null){if(e.itemMap!=null){let i=Ae(s,e.itemMap.id);e.itemMap.id!=null&&i!=null&&(s.id=i),i=Ae(s,e.itemMap.text),e.itemMap.text!=null&&i&&(s.text=i)}s.caption!=null&&s.text==null&&(s.text=s.caption),s.text!=null&&s.id==null&&(s.id=s.text),s.text==null&&s.id!=null&&(s.text=s.id)}else n[t]={id:null,text:"null"}}),n;if(typeof n=="function"){let s=n(n,e);return et(s,e)}else if(typeof n=="object"&&n!==null){let s=n;return Object.keys(s).map(t=>({id:t,text:String(s[t]??"")}))}}function tt(n,e=""){let s="";return Object.keys(n).forEach(t=>{s!=""&&(s+="&"),typeof n[t]=="object"?s+=tt(n[t],e+t+(e?"]":"")+"["):s+=`${e}${t}${e?"]":""}=${n[t]}`}),s}function wt(n,e,s,t){let i=s?.dataType??t,o=e.body;switch(e.method=String(e.method).toUpperCase(),i){case"RESTFULL":case"RESTFULJSON":{["POST","PUT","DELETE"].includes(String(e.method))&&(e.headers["Content-Type"]="application/json"),String(e.method)=="GET"&&(i=="RESTFULLJSON"&&(o={request:o}),l());break}case"HTTP":case"HTTPJSON":case"JSON":{String(e.method)=="GET"?((i=="JSON"||i==="HTTPJSON")&&(o={request:o}),l()):(e.headers["Content-Type"]="application/json",e.method="POST");break}default:typeof i=="function"?e=i(n,e,s):console.log(`ERROR: Unsupported dataType "${i}". Supported types are JSON (default), HTTP, RESTFULL. For backward compatibility HTTPJSON is same as JSON. RESTULFLJSON will encode GET request as JSON.`)}return e.body!=null&&(e.body=typeof e.body=="string"?e.body:JSON.stringify(e.body)),e;function l(){let a=o;Object.keys(a).forEach(r=>{let c=a[r];typeof c=="object"&&(c=JSON.stringify(c)),n.searchParams.append(r,String(c??""))}),delete e.body}}function _t(n){let e=[],s=n.replace(/\/\(/g,"(?:/").replace(/\+/g,"__plus__").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,(t,i,o,l,a,r)=>(e.push({name:l,optional:!!r}),i=i||"",""+(r?"":i)+"(?:"+(r?i:"")+(o||"")+(a||o&&"([^/.]+?)"||"([^/]+?)")+")"+(r||""))).replace(/([\/.])/g,"\\$1").replace(/__plus__/g,"(.+)").replace(/\*/g,"(.*)");return{path:new RegExp("^"+s+"$","i"),keys:e}}function kt(n,e=250){let s;return(...t)=>{clearTimeout(s),s=setTimeout(()=>{n(...t)},e)}}async function Ct(n=0){return new Promise(e=>{setTimeout(()=>e(),n)})}function Fe(n){if(n==null)return n;switch(typeof n){case"number":break;case"string":n=String(n).replace(/(?:\r\n|\r|\n)/g," ").replace(/\s\s+/g," ").trim();break;case"object":if(Array.isArray(n)){let e=te([],n);return e.forEach((s,t)=>{e[t]=Fe(s)}),e}else{let e=te({},n);return Object.keys(e).forEach(s=>{e[s]=Fe(e[s])}),e}}return n}function He(n){if(n==null)return n;switch(typeof n){case"number":break;case"string":n=String(n).replace(/<(?:[^>=]|='[^']*'|="[^"]*"|=[^'"][^\s>]*)*>/ig,"");break;case"object":if(Array.isArray(n)){let e=te([],n);return e.forEach((s,t)=>{e[t]=He(s)}),e}else{let e=te({},n);return Object.keys(e).forEach(s=>{e[s]=He(e[s])}),e}}return n}function Se(n){if(n==null)return n;switch(typeof n){case"number":break;case"string":n=String(n).replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""");break;case"object":if(Array.isArray(n)){let e=te([],n);return e.forEach((s,t)=>{e[t]=Se(s)}),e}else{let e=te({},n);return Object.keys(e).forEach(s=>{e[s]=Se(e[s])}),e}}return n}function Ne(n){if(n==null)return n;switch(typeof n){case"number":break;case"string":n=String(n).replace(/>/g,">").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&");break;case"object":if(Array.isArray(n)){let e=te([],n);return e.forEach((s,t)=>{e[t]=Ne(s)}),e}else{let e=te({},n);return Object.keys(e).forEach(s=>{e[s]=Ne(e[s])}),e}}return n}function Et(n){if(n===""||n==null)return"";let e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\w-]/g;return(n+"").replace(e,(s,t)=>t?s==="\0"?"\uFFFD":s.slice(0,-1)+"\\"+s.charCodeAt(s.length-1).toString(16)+" ":"\\"+s)}function St(n){if(n===""||n==null)return"";let e=/\\[\da-fA-F]{1,6}[\x20\t\r\n\f]?|\\([^\r\n\f])/g;return n.replace(e,(s,t)=>{let i=parseInt("0x"+s.slice(1),16)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320))})}function Rt(n){let e=new TextEncoder().encode(n),s="";for(let t of e)s+=String.fromCharCode(t);return btoa(s)}function $t(n){let e=atob(n),s=new Uint8Array(e.length);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);return new TextDecoder().decode(s)}async function Mt(n){let e=new TextEncoder().encode(n);return crypto.subtle.digest("SHA-256",e).then(s=>Array.from(new Uint8Array(s)).map(i=>i.toString(16).padStart(2,"0")).join(""))}function Dt(n,e){return typeof n!="string"||!e||typeof e!="object"?n:n.replace(/\${([^}]+)?}/g,function(s,t){return e[t]||t})}var Ri=j;function It(n,e){let s=new RegExp(`<${e.tag}[^>]*class=["']${e.class.replace(/-/g,"\\-")}["'][^>]*>([\\s\\S]*?)<\\/${e.tag}>`,"ig");if(typeof n=="string")for(;n.indexOf(`<${e.tag} class="${e.class}"`)!==-1;)n=n.replace(s,"$1");else for(;n.innerHTML.indexOf(`<${e.tag} class="${e.class}"`)!==-1;)n.innerHTML=n.innerHTML.replace(s,"$1")}function Pe(n,e,s,t){let i=t.wholeWord;typeof e!="string"&&(e=String(e)),e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace(/&/g,"&").replace(/</g,">").replace(/>/g,"<");let o=new RegExp((i?"\\b":"")+e+(i?"\\b":"")+"(?![^<]*>)","i"+(t.onlyFirst?"":"g"));return n=n.replace(o,s)}function Ot(n,e,s={onlyFirst:!1,wholeWord:!1,isRegex:!1}){s.tag??="span",s.class??="tsg-marker",s.raplace=i=>`<${s.tag} class="${s.class}">${i}</${s.tag}>`;let t=s.isRegex||!1;return Array.isArray(e)||(e!=null&&e!==""?e=[e]:e=[]),typeof n=="string"?(It(n,s),e.forEach(i=>{if(t)try{let o="i"+(s.onlyFirst?"":"g"),l=new RegExp(i,o);n=n.replace(l,s.raplace)}catch(o){console.error("Invalid regular expression:",o),n=Pe(n,i,s.raplace,s)}else n=Pe(n,i,s.raplace,s)})):Ri(n).each(i=>{It(i,s),t?e.forEach(o=>{try{let d=function(u){if(u.nodeType===3)c.push(u);else if(u.nodeType===1&&u.tagName!=="SCRIPT"&&u.tagName!=="STYLE")for(let h=0;h<u.childNodes.length;h++)d(u.childNodes[h])};var l=d;let a="i";s.onlyFirst||(a+="g"),s.wholeWord&&(o="\b"+o+"\b");let r=new RegExp(o,a),c=[];d(i),c.forEach(u=>{let h=u.nodeValue,f=[],m;if(s.onlyFirst)m=r.exec(h),m&&f.push({index:m.index,text:m[0]});else for(;(m=r.exec(h))!==null;)f.push({index:m.index,text:m[0]});if(f.length>0){let y=u.parentNode,x=document.createDocumentFragment(),b=0;f.forEach(g=>{g.index>b&&x.appendChild(document.createTextNode(h.substring(b,g.index)));let v=document.createElement(s.tag);v.className=s.class,v.appendChild(document.createTextNode(g.text)),x.appendChild(v),b=g.index+g.text.length}),b<h.length&&x.appendChild(document.createTextNode(h.substring(b))),y.replaceChild(x,u)}})}catch(a){console.error("Invalid regular expression:",a),i.innerHTML=Pe(i.innerHTML,o,s.raplace,s)}}):e.forEach(o=>{i.innerHTML=Pe(i.innerHTML,o,s.raplace,s)})}),n}var se={};function je(n){return n==null?(console.log('ERROR: Property "name" is required but not supplied.'),!1):se[n]!=null?(console.log(`ERROR: Object named "${n}" is already registered as TsUi.${n}.`),!1):Le(n)?!0:(console.log('ERROR: Property "name" has to be alpha-numeric (a-z, 0-9, dash and underscore).'),!1)}var ve=j;function zt(n,e,s){return new Promise(t=>{let i=e??{},o="";typeof n=="object"?(i=n,o=String(i.text??"")):o=String(n??""),i.where??=document.body,i.timeout??=15e3,typeof s.tmpSlot.notify_resolve=="function"&&(s.tmpSlot.notify_resolve(),ve(s.tmpSlot.notify_where).find("#tsg-notify").remove()),s.tmpSlot.notify_resolve=t,s.tmpSlot.notify_where=i.where,clearTimeout(s.tmpSlot.notify_timer);let l=i.where;if(o){if(typeof i.actions=="object"){let r={};Object.keys(i.actions).forEach(c=>{r[c]=`<a class="tsg-notify-link" value="${c}">${c}</a>`}),o=s.execTemplate(o,r)}let a=`
|
|
3
3
|
<div id="tsg-notify" style="${l==document.body?"position: fixed":""}">
|
|
4
4
|
<div class="${i.class??""} ${i.error?"tsg-notify-error":""} ${i.success?"tsg-notify-success":""}">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<label>${t.label} </label>
|
|
26
26
|
<input id="TsPrompt" class="tsg-input" ${t.attrs??""}
|
|
27
27
|
data-keydown="keydown|event" data-keyup="change|event">
|
|
28
|
-
</div>`),s.normButtons(t,{ok:s.lang("Ok"),cancel:s.lang("Cancel")});let i=s.message(n,t);return i&&(i.change=function(o){return i.self?.on?.("change.prom",o),i},i.action(o=>{o.detail?.self?.close?.()}).then(o=>{let l=o.detail;(l?.self).input=G(l?.box).find("#TsPrompt").get(0),G(l?.box).find("#TsPrompt").on("keydown",a=>{a.keyCode==13&&a.shiftKey===!1&&a.preventDefault()}).on("keyup",a=>{let r=l?.self,c=r?.trigger?.("change",{value:a.target.value,input:a.target,originalEvent:a});a.keyCode==13&&a.shiftKey===!1&&r?.action?.("Ok",a),c?.finish?.()})})),i}var K=j;function Ht(n,e,s,t){return new Promise((i,o)=>{let l=getComputedStyle(n),a=parseInt(l.width),r=parseInt(l.height),c=.5;if(!n||!e){console.log("ERROR: Cannot do transition when one of the divs is null");return}switch(n.parentNode.style.cssText+="perspective: 900px; overflow: hidden;",n.style.cssText+="; position: absolute; z-index: 1019; backface-visibility: hidden",e.style.cssText+="; position: absolute; z-index: 1020; backface-visibility: hidden",s){case"slide-left":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d("+a+"px, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(-"+a+"px, 0, 0)"},1);break;case"slide-right":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(-"+a+"px, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0px, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d("+a+"px, 0, 0)"},1);break;case"slide-down":n.style.cssText+="overflow: hidden; z-index: 1; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; z-index: 0; transform: translate3d(0, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(0, "+r+"px, 0)"},1);break;case"slide-up":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(0, "+r+"px, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)"},1);break;case"flip-left":n.style.cssText+="overflow: hidden; transform: rotateY(0deg)",e.style.cssText+="overflow: hidden; transform: rotateY(-180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateY(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateY(180deg)"},1);break;case"flip-right":n.style.cssText+="overflow: hidden; transform: rotateY(0deg)",e.style.cssText+="overflow: hidden; transform: rotateY(180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateY(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateY(-180deg)"},1);break;case"flip-down":n.style.cssText+="overflow: hidden; transform: rotateX(0deg)",e.style.cssText+="overflow: hidden; transform: rotateX(180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateX(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateX(-180deg)"},1);break;case"flip-up":n.style.cssText+="overflow: hidden; transform: rotateX(0deg)",e.style.cssText+="overflow: hidden; transform: rotateX(-180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateX(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateX(180deg)"},1);break;case"pop-in":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); transform: scale(.8); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: scale(1); opacity: 1;",n.style.cssText+="transition: "+c+"s;"},1);break;case"pop-out":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); transform: scale(1); opacity: 1;",e.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; opacity: 1;",n.style.cssText+="transition: "+c+"s; transform: scale(1.7); opacity: 0;"},1);break;default:n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; translate3d(0, 0, 0); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; opacity: 1;",n.style.cssText+="transition: "+c+"s"},1);break}setTimeout(()=>{s==="slide-down"&&(K(n).css("z-index","1019"),K(e).css("z-index","1020")),e&&K(e).css({opacity:"1"}).css({transition:"",transform:""}),n&&K(n).css({opacity:"1"}).css({transition:"",transform:""}),typeof t=="function"&&t(),i()},c*1e3)})}function Nt(n,e={},...s){if(n==null)return;let t=typeof e=="string"?{msg:e}:{...e};s[0]!=null&&(t.spinner=s[0]),t=te({spinner:!1},t);let i=n;n?.[0]instanceof Node&&(i=Array.isArray(n)?n:n.get()),!t.msg&&t.msg!==0&&(t.msg=""),nt(i);let o=K(i).get(0),l=o.scrollWidth,r=`height: ${o.scrollHeight}px; width: ${l}px`;o.tagName=="BODY"&&(r="position: fixed; right: 0; bottom: 0;"),K(i).prepend(`<div class="tsg-lock" style="${r}"></div><div class="tsg-lock-msg"></div>`);let c=K(i).find(".tsg-lock"),d=K(i).find(".tsg-lock-msg");t.msg||d.css({"background-color":"transparent","background-image":"none",border:"0px","box-shadow":"none"}),t.spinner===!0&&(t.msg=`<div class="tsg-spinner" ${t.msg?"":'style="width: 35px; height: 35px"'}></div>`+t.msg),t.msg?d.html(String(t.msg)).css("display","block"):d.remove(),t.opacity!=null&&c.css("opacity",String(t.opacity)),c.css({display:"block"}),t.bgColor&&c.css({"background-color":t.bgColor});let h=getComputedStyle(c.get(0)).opacity??.15;c.on("mousedown",function(){typeof t.onClick=="function"?t.onClick():c.css({transition:".2s",opacity:String(Number(h)*1.5)})}).on("mouseup",function(){typeof t.onClick!="function"&&c.css({transition:".2s",opacity:String(h)})}).on("mousewheel",function(f){f&&(f.stopPropagation(),f.preventDefault())})}function nt(n,e){if(n==null)return;clearTimeout(n._prevUnlock);let t=n;if(n?.[0]instanceof Node&&(t=Array.isArray(n)?n:n.get()),re(e)&&(e??0)>0){K(t).find(".tsg-lock").css({transition:(e??0)/1e3+"s",opacity:0});let i=K(t).get(0);clearTimeout(i._prevUnlock),i._prevUnlock=setTimeout(()=>{K(t).find(".tsg-lock").remove()},e),K(t).find(".tsg-lock-msg").remove()}else K(t).find(".tsg-lock").remove(),K(t).find(".tsg-lock-msg").remove()}function Pt(n,e){let s=K(n),t=0;if(s.length>0){let i=getComputedStyle(s[0]);switch(e){case"width":t=parseFloat(i.width),i.width==="auto"&&(t=0);break;case"height":t=parseFloat(i.height),i.height==="auto"&&(t=0);break;default:t=parseFloat(String(i[e]??""))||0;break}}return t}function jt(n,e,s){let t=K("body > #_tmp_width");t.length===0&&(K("body").append('<div id="_tmp_width" style="position: absolute; top: -9000px;"></div>'),t=K("body > #_tmp_width")),s===void 0&&n.trim().startsWith("<")&&n.trim().endsWith(">")&&(s=!0),t.html(s?n:Se(n??"")).attr("style",`position: absolute; top: -9000px; ${e||""}`);let i=t[0].clientWidth,o=t[0].clientHeight;return t.html(""),{width:i,height:o}}function Ut(n,e){let s=n;if(s?.length==0)return;let t=n;s?.[0]instanceof Node&&(t=Array.isArray(n)?n:n.get()),K(t).each(i=>{let o=K(i).data();Object.keys(o).forEach(l=>{if(["click","dblclick","mouseenter","mouseleave","mouseover","mouseout","mousedown","mousemove","mouseup","contextmenu","focus","focusin","focusout","blur","input","change","keydown","keyup","keypress"].indexOf(String(l).toLowerCase())==-1)return;let r=Array.isArray(o[l])?o[l]:[o[l]];typeof o[l]=="string"&&(r=o[l].split("|").map(d=>{let u=d;d==="true"&&(u=!0),d==="false"&&(u=!1),d==="undefined"&&(u=void 0),d==="null"&&(u=null),typeof u=="string"&&parseFloat(u)==u&&(u=parseFloat(u));let h=["'",'"',"`"];return typeof u=="string"&&h.includes(u[0]??"")&&h.includes(u[u.length-1]??"")&&(u=u.substring(1,u.length-1)),u}));let c=String(r[0]);r=r.slice(1),K(i).off(l+".TsUtils-bind").on(l+".TsUtils-bind",function(d){switch(c){case"alert":alert(r[0]);break;case"stop":d.stopPropagation();break;case"prevent":d.preventDefault();break;case"stopPrevent":return d.stopPropagation(),d.preventDefault(),!1;break;default:if(e[c]==null)throw new Error(`Cannot dispatch event as the method "${c}" does not exist.`);e[c](...r.map((u,h)=>{switch(String(u).toLowerCase()){case"event":return d;case"this":return this;default:return u}}))}})})})}function it(n,e,s,t){if(!n)return!1;let i="Invalid Date",o,l,a;if(e==null&&(e=t.dateFormat),n instanceof Date)a=n.getFullYear(),o=n.getMonth()+1,l=n.getDate();else if(typeof n=="number"||typeof n=="string"&&parseInt(n)==n&&parseInt(n)>0){let u=new Date(parseInt(String(n)));a=u.getFullYear(),o=u.getMonth()+1,l=u.getDate()}else{let u=String(n);if(new RegExp("mon","ig").test(e)){e=e.replace(/month/ig,"m").replace(/mon/ig,"m").replace(/dd/ig,"d").replace(/[, ]/ig,"/").replace(/\/\//g,"/").toLowerCase(),u=u.replace(/[, ]/ig,"/").replace(/\/\//g,"/").toLowerCase();for(let m=0,y=t.fullmonths.length;m<y;m++){let x=t.fullmonths[m]??"";u=u.replace(new RegExp(x,"ig"),String(m+1)).replace(new RegExp(x.substr(0,3),"ig"),String(m+1))}}let h=u.replace(/-/g,"/").replace(/\./g,"/").toLowerCase().split("/"),f=e.replace(/-/g,"/").replace(/\./g,"/").toLowerCase();f==="mm/dd/yyyy"&&(o=h[0],l=h[1],a=h[2]),f==="m/d/yyyy"&&(o=h[0],l=h[1],a=h[2]),f==="dd/mm/yyyy"&&(o=h[1],l=h[0],a=h[2]),f==="d/m/yyyy"&&(o=h[1],l=h[0],a=h[2]),f==="yyyy/dd/mm"&&(o=h[2],l=h[1],a=h[0]),f==="yyyy/d/m"&&(o=h[2],l=h[1],a=h[0]),f==="yyyy/mm/dd"&&(o=h[1],l=h[2],a=h[0]),f==="yyyy/m/d"&&(o=h[1],l=h[2],a=h[0]),f==="mm/dd/yy"&&(o=h[0],l=h[1],a=h[2]),f==="m/d/yy"&&(o=h[0],l=h[1],a=parseInt(h[2]??"0")+1900),f==="dd/mm/yy"&&(o=h[1],l=h[0],a=parseInt(h[2]??"0")+1900),f==="d/m/yy"&&(o=h[1],l=h[0],a=parseInt(h[2]??"0")+1900),f==="yy/dd/mm"&&(o=h[2],l=h[1],a=parseInt(h[0]??"0")+1900),f==="yy/d/m"&&(o=h[2],l=h[1],a=parseInt(h[0]??"0")+1900),f==="yy/mm/dd"&&(o=h[1],l=h[2],a=parseInt(h[0]??"0")+1900),f==="yy/m/d"&&(o=h[1],l=h[2],a=parseInt(h[0]??"0")+1900)}if(!re(a)||!re(o)||!re(l))return!1;let r=+(a??0),c=+(o??0),d=+(l??0);return i=new Date(r,c-1,d),i.setFullYear(r),c==null||String(i)==="Invalid Date"||i.getMonth()+1!==c||i.getDate()!==d||i.getFullYear()!==r?!1:s===!0?i:!0}function De(n,e){if(n==null)return!1;let s,t=String(n).toUpperCase(),i=t.indexOf("AM")>=0,o=t.indexOf("PM")>=0,l=o||i;l?s=12:s=24,t=t.replace("AM","").replace("PM","").trim();let a=t.split(":"),r=a[0]??"",c=a[1]??"",d=a[2]??"",u=parseInt(r||"0"),h=parseInt(c||"0"),f=parseInt(d||"0");return(!l||a.length!==1)&&a.length!==2&&a.length!==3||r===""||u<0||u>s||!re(r)||r.length>2||a.length>1&&(c===""||h<0||h>59||!re(c)||c.length!==2)||a.length>2&&(d===""||f<0||f>59||!re(d)||d.length!==2)||!l&&s===u&&(h!==0||f!==0)||l&&a.length===1&&u===0?!1:e===!0?(o&&u!==12&&(u+=12),i&&u===12&&(u+=12),{hours:u,minutes:h,seconds:f}):!0}function Gt(n,e,s,t){if(n instanceof Date)return s!==!0?!0:n;let i=parseInt(String(n));if(i===n)return i<0?!1:s!==!0?!0:new Date(i);let o=String(n),l=o.indexOf(" ");if(l<0)return o.indexOf("T")<0||String(new Date(o))=="Invalid Date"?!1:s!==!0?!0:new Date(o);{e==null&&(e=t.datetimeFormat);let a=e.split("|"),r=[o.substr(0,l),o.substr(l).trim()];a[0]!=null&&(a[0]=a[0].trim()),a[1]&&(a[1]=a[1].trim());let c=it(r[0],a[0],!0,t),d=De(r[1],!0);if(c!==!1&&d!==!1){if(s!==!0)return!0;let u=c,h=d;return u.setHours(h.hours),u.setMinutes(h.minutes),u.setSeconds(h.seconds),u}else return!1}}function Bt(n){let e;if(n===""||n==null||(n instanceof Date?e=n:typeof n=="number"||typeof n=="string"&&parseInt(n)==n&&parseInt(n)>0?e=new Date(parseInt(String(n))):e=new Date(String(n)),String(e)==="Invalid Date"))return"";let t=(new Date().getTime()-e.getTime())/1e3,i=0,o="";return t<0?(i=0,o="sec"):t<60?(i=Math.floor(t),o="sec",t<0&&(i=0,o="sec")):t<3600?(i=Math.floor(t/60),o="min"):t<1440*60?(i=Math.floor(t/60/60),o="hour"):t<720*60*60?(i=Math.floor(t/24/60/60),o="day"):t<365*24*60*60?(i=Math.floor(t/30/24/60/60*10)/10,o="month"):t<365*4*24*60*60?(i=Math.floor(t/365/24/60/60*10)/10,o="year"):t>=365*4*24*60*60&&(i=Math.floor(t/365.25/24/60/60*10)/10,o="year"),i+" "+o+(i>1?"s":"")}function Qt(n){let e="";return n<100?e="< 0.01 sec":n<1e3?e=Math.floor(n/10)/100+" sec":n<1e4?e=Math.floor(n/100)/10+" sec":n<6e4?e=Math.floor(n/1e3)+" secs":n<36e5?e=Math.floor(n/6e4)+" mins":n<864e5?e=Math.floor(n/36e5*10)/10+" hours":n<2628e6?e=Math.floor(n/864e5*10)/10+" days":n<31536e6?e=Math.floor(n/2628e6*10)/10+" months":e=Math.floor(n/31536e5)/10+" years",e}function ot(n,e,s){if(e||(e=s.dateFormat),n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),String(t)==="Invalid Date")return"";let i=t.getFullYear(),o=t.getMonth(),l=t.getDate();return e.toLowerCase().replace("month",s.fullmonths[o]??"").replace("mon",s.shortmonths[o]??"").replace(/yyyy/g,("000"+i).slice(-4)).replace(/yyy/g,("000"+i).slice(-4)).replace(/yy/g,("0"+i).slice(-2)).replace(/(^|[^a-z$])y/g,"$1"+i).replace(/mm/g,("0"+(o+1)).slice(-2)).replace(/dd/g,("0"+l).slice(-2)).replace(/th/g,l==1?"st":"th").replace(/th/g,l==2?"nd":"th").replace(/th/g,l==3?"rd":"th").replace(/(^|[^a-z$])m/g,"$1"+(o+1)).replace(/(^|[^a-z$])d/g,"$1"+l)}function lt(n,e,s){if(e||(e=s.timeFormat),n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),De(n)){let f=De(n,!0);t=new Date,t.setHours(f.hours),t.setMinutes(f.minutes)}if(String(t)==="Invalid Date")return"";e=="h12"&&(e="hh:mi pm");let i="am",o=t.getHours(),l=t.getHours(),a=t.getMinutes(),r=t.getSeconds();a<10&&(a="0"+a),r<10&&(r="0"+r),(e.indexOf("am")!==-1||e.indexOf("pm")!==-1)&&(o>=12&&(i="pm"),o>12&&(o=o-12),o===0&&(o=12));let c=String(o),d=String(a),u=String(r),h=String(l);return e.toLowerCase().replace("am",i).replace("pm",i).replace("hhh",Number(o)<10?"0"+c:c).replace("hh24",l<10?"0"+h:h).replace("h24",h).replace("hh",c).replace("mm",d).replace("mi",d).replace("ss",u).replace(/(^|[^a-z$])h/g,"$1"+c).replace(/(^|[^a-z$])m/g,"$1"+d).replace(/(^|[^a-z$])s/g,"$1"+u)}function Vt(n,e,s){let t;return n===""||n==null||typeof n=="object"&&!n.getMonth?"":(typeof e!="string"?t=[s.dateFormat,s.timeFormat]:(t=e.split("|"),t[0]!=null&&(t[0]=t[0].trim()),t[1]=t.length>1?(t[1]??"").trim():s.timeFormat),t[1]==="h12"&&(t[1]="h:m pm"),t[1]==="h24"&&(t[1]="h24:m"),ot(n,t[0],s)+" "+lt(n,t[1],s))}function qt(n,e,s){if(n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),String(t)==="Invalid Date")return"";let i=e.shortmonths,o=new Date,l=new Date;l.setTime(l.getTime()-864e5);let a=i[t.getMonth()]+" "+t.getDate()+", "+t.getFullYear(),r=i[o.getMonth()]+" "+o.getDate()+", "+o.getFullYear(),c=i[l.getMonth()]+" "+l.getDate()+", "+l.getFullYear(),d=t.getHours()-(t.getHours()>12?12:0)+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()+" "+(t.getHours()>=12?"pm":"am"),u=t.getHours()-(t.getHours()>12?12:0)+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()+":"+(t.getSeconds()<10?"0":"")+t.getSeconds()+" "+(t.getHours()>=12?"pm":"am"),h=a;return a===r&&(h=d),a===c&&(h=s.lang("Yesterday")),'<span title="'+a+" "+u+'">'+h+"</span>"}async function at(n,e,s,t,i){if(Array.isArray(n)){let l=i.extend({},t,{phrases:{}}),a=n,r=[],c={};return a.forEach((u,h)=>{u.length===5&&(u="locale/"+u.toLowerCase()+".json",a[h]=u),r.push(at(u,!0,!1,l,i))}),(await Promise.allSettled(r)).forEach(u=>{u.status==="fulfilled"&&u.value.kind==="load"&&(c[u.value.file]=u.value.data)}),a.forEach(u=>{l=i.extend({},l,c[u]??{})}),{kind:"void",settings:l}}if(n||(n="en-us"),typeof n=="object")return{kind:"merge",settings:i.extend({},t,_e,n)};let o=n;o.length===5&&(o="locale/"+o.toLowerCase()+".json");try{let a=await(await i.fetch(o,{method:"GET"})).json();if(s!==!0)if(e){let r=i.extend({},t,a);return{kind:"load",file:o,data:a,settings:r}}else{let r=i.extend({},t,_e,{phrases:{}},a);return{kind:"load",file:o,data:a,settings:r}}return{kind:"load",file:o,data:a}}catch(l){throw console.log("ERROR: Cannot load locale "+o),l}}var Ee=j,rt=class{version;tmp;settings;i18nCompare;hasLocalStorage;isMac;isMobile;isIOS;isAndroid;isSafari;isFirefox;formatters;constructor(){this.version="2.0.x",this.tmp={},this.settings=this.extend({},{dataType:"JSON",dateStartYear:1950,dateEndYear:2030,macButtonOrder:!1,warnNoPhrase:!1},_e,{phrases:null}),this.i18nCompare=Intl.Collator().compare,this.hasLocalStorage=e(),this.isMac=/Mac/i.test(navigator.platform),this.isMobile=/(iphone|ipod|mobile|android)/i.test(navigator.userAgent),this.isIOS=/(iphone|ipod|ipad)/i.test(navigator.platform),this.isAndroid=/(android)/i.test(navigator.userAgent),this.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this.isFirefox=/(Firefox)/i.test(navigator.userAgent),this.formatters={number(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;return parseInt(String(o))>20&&(o=20),parseInt(String(o))<0&&(o=0),i==null||i===""?"":p.formatNumber(parseFloat(String(i)),o,!0)},float(s,t){return p.formatters.number?.(s,t)??""},int(s,t){return p.formatters.number?.(s,t)??""},money(s,t){t==null&&(t=s);let{value:i}=t;if(i==null||i==="")return"";let o=p.formatNumber(Number(i),p.settings.currencyPrecision,!0);return(p.settings.currencyPrefix||"")+o+(p.settings.currencySuffix||"")},currency(s,t){return p.formatters.money?.(s,t)??""},percent(s,t){t==null&&(t=s);let{value:i,params:o}=t;return i==null||i===""?"":p.formatNumber(i,o||1)+"%"},size(s,t){t==null&&(t=s);let{value:i}=t;return i==null||i===""?"":String(p.formatSize(parseInt(String(i))))},date(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.dateFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatDate(l instanceof Date?l:void 0,o)+"</span>"},datetime(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatDateTime(l instanceof Date?l:void 0,o)+"</span>"},time(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.timeFormat),o==="h12"&&(o="hh:mi pm"),o==="h24"&&(o="h24:mi"),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatTime(i,o)+"</span>"},timestamp(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),l instanceof Date?l.toString():""},gmt(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),l instanceof Date?l.toUTCString():""},age(s,t){t==null&&(t=s);let{value:i,params:o}=t;if(i==null||i===0||i==="")return"";let l=p.isDateTime(i,null,!0);return l===!1&&(l=p.isDate(i,null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.age(i)+(o?" "+o:"")+"</span>"},interval(s,t){t==null&&(t=s);let{value:i,params:o}=t;return i==null||i===0||i===""?"":p.interval(Number(i))+(o?" "+o:"")},toggle(s,t){t==null&&(t=s);let{value:i}=t;return i?p.lang("Yes"):""},password(s,t){t==null&&(t=s);let{value:i}=t,o="";if(!i)return o;let l=String(i);for(let a=0;a<l.length;a++)o+="*";return o}};return;function e(){let s="w2ui_test";try{return localStorage.setItem(s,s),localStorage.removeItem(s),!0}catch{return!1}}}isBin(e){return ht(e)}isInt(e){return re(e)}isFloat(e){return Ke(e,this.settings)}isMoney(e){return pt(e,this.settings)}isHex(e){return mt(e)}isAlphaNumeric(e){return Le(e)}isEmail(e){return gt(e)}isIpAddress(e){return yt(e)}isDate(e,s,t){return it(e,s,t,this.settings)}isTime(e,s){return De(e,s)}isDateTime(e,s,t){return Gt(e,s,t,this.settings)}age(e){return Bt(e)}interval(e){return Qt(e)}date(e){return qt(e,this.settings,{lang:this.lang.bind(this)})}formatSize(e){if(!this.isFloat(e)||e==="")return"";let s=parseFloat(String(e));if(s===0)return 0;let t=["Bt","KB","MB","GB","TB","PB","EB","ZB"],i=parseInt(String(Math.floor(Math.log(s)/Math.log(1024))));return(Math.floor(s/Math.pow(1024,i)*10)/10).toFixed(i===0?0:1)+" "+(t[i]||"??")}formatNumber(e,s,t){if(e==null||e===""||typeof e=="object")return"";let i={minimumFractionDigits:s!=null?parseInt(String(s)):void 0,maximumFractionDigits:s!=null?parseInt(String(s)):void 0,useGrouping:!!t};return(s==null||Number(s)<0)&&(i.minimumFractionDigits=0,i.maximumFractionDigits=20),parseFloat(String(e)).toLocaleString(this.settings.locale,i)}formatDate(e,s){return ot(e,s,this.settings)}formatTime(e,s){return lt(e,s,this.settings)}formatDateTime(e,s){return Vt(e,s,this.settings)}stripSpaces(e){return Fe(e)}stripTags(e){return He(e)}encodeTags(e){return Se(e)}decodeTags(e){return Ne(e)}escapeId(e){return Et(e)}unescapeId(e){return St(e)}base64encode(e){return Rt(e)}base64decode(e){return $t(e)}sha256(e){return Mt(e)}transition(e,s,t,i){return Ht(e,s,t,i)}lock(e,s={},...t){return Nt(e,s,...t)}unlock(e,s){return nt(e,s)}_msgDeps(){return{extend:te,bindEvents:(e,s)=>this.bindEvents(e,s),lock:(e,s)=>this.lock(e,s),unlock:(e,s)=>this.unlock(e,s),ownerName:this.name,self:this}}_confirmDeps(){return{extend:te,normButtons:(e,s)=>Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings}),message:(e,s)=>this.message(e,s),settings:this.settings,lang:this.lang.bind(this)}}_promptDeps(){return{extend:te,normButtons:(e,s)=>Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings}),message:(e,s)=>this.message(e,s),settings:this.settings,lang:this.lang.bind(this)}}message(e,s){return st(e,s,this._msgDeps())}alert(e,s){return Lt(e,s,this._msgDeps())}confirm(e,s){return At(e,s,this._confirmDeps())}prompt(e,s){return Ft(e,s,this._promptDeps())}normButtons(e,s){return Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings})}notify(e,s){return zt(e,s,{execTemplate:this.execTemplate.bind(this),tmpSlot:this.tmp})}getSize(e,s){return Pt(e,s)}getStrDimentions(e,s,t){return jt(e,s,t)}getStrWidth(e,s,t){return this.getStrDimentions(e,s,t).width}getStrHeight(e,s,t){return this.getStrDimentions(e,s,t).height}execTemplate(e,s){return Dt(e,s)}marker(e,s,t){return Ot(e,s,t)}lang(e,s){if(!e||this.settings.phrases==null||typeof e!="string"||"<=>=".includes(e))return this.execTemplate(e,s);let t=this.settings.phrases[e];return t==null?(t=e,this.settings.warnNoPhrase&&(this.settings.missing||(this.settings.missing={}),this.settings.missing[e]="---",this.settings.phrases[e]="---",console.log(`Missing translation for "%c${e}%c", see %c TsUtils.settings.phrases %c with value "---"`,"color: orange","","color: #999",""))):t==="---"&&!this.settings.warnNoPhrase&&(t=e),t==="---"&&(t=`<span ${this.tooltip(e)}>---</span>`),this.execTemplate(t,s)}locale(e,s,t){let i={extend:this.extend.bind(this),fetch:globalThis.fetch.bind(globalThis)};return at(e,s,t,this.settings,i).then(o=>(o.settings&&(this.settings=o.settings),o.kind==="load"?{file:o.file,data:o.data}:void 0))}scrollBarSize(){return this.tmp.scrollBarSize?this.tmp.scrollBarSize:(Ee("body").append(`
|
|
28
|
+
</div>`),s.normButtons(t,{ok:s.lang("Ok"),cancel:s.lang("Cancel")});let i=s.message(n,t);return i&&(i.change=function(o){return i.self?.on?.("change.prom",o),i},i.action(o=>{o.detail?.self?.close?.()}).then(o=>{let l=o.detail;(l?.self).input=G(l?.box).find("#TsPrompt").get(0),G(l?.box).find("#TsPrompt").on("keydown",a=>{a.keyCode==13&&a.shiftKey===!1&&a.preventDefault()}).on("keyup",a=>{let r=l?.self,c=r?.trigger?.("change",{value:a.target.value,input:a.target,originalEvent:a});a.keyCode==13&&a.shiftKey===!1&&r?.action?.("Ok",a),c?.finish?.()})})),i}var K=j;function Ht(n,e,s,t){return new Promise((i,o)=>{let l=getComputedStyle(n),a=parseInt(l.width),r=parseInt(l.height),c=.5;if(!n||!e){console.log("ERROR: Cannot do transition when one of the divs is null");return}switch(n.parentNode.style.cssText+="perspective: 900px; overflow: hidden;",n.style.cssText+="; position: absolute; z-index: 1019; backface-visibility: hidden",e.style.cssText+="; position: absolute; z-index: 1020; backface-visibility: hidden",s){case"slide-left":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d("+a+"px, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(-"+a+"px, 0, 0)"},1);break;case"slide-right":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(-"+a+"px, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0px, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d("+a+"px, 0, 0)"},1);break;case"slide-down":n.style.cssText+="overflow: hidden; z-index: 1; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; z-index: 0; transform: translate3d(0, 0, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(0, "+r+"px, 0)"},1);break;case"slide-up":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(0, "+r+"px, 0)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)",n.style.cssText+="transition: "+c+"s; transform: translate3d(0, 0, 0)"},1);break;case"flip-left":n.style.cssText+="overflow: hidden; transform: rotateY(0deg)",e.style.cssText+="overflow: hidden; transform: rotateY(-180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateY(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateY(180deg)"},1);break;case"flip-right":n.style.cssText+="overflow: hidden; transform: rotateY(0deg)",e.style.cssText+="overflow: hidden; transform: rotateY(180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateY(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateY(-180deg)"},1);break;case"flip-down":n.style.cssText+="overflow: hidden; transform: rotateX(0deg)",e.style.cssText+="overflow: hidden; transform: rotateX(180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateX(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateX(-180deg)"},1);break;case"flip-up":n.style.cssText+="overflow: hidden; transform: rotateX(0deg)",e.style.cssText+="overflow: hidden; transform: rotateX(-180deg)",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: rotateX(0deg)",n.style.cssText+="transition: "+c+"s; transform: rotateX(180deg)"},1);break;case"pop-in":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); transform: scale(.8); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; transform: scale(1); opacity: 1;",n.style.cssText+="transition: "+c+"s;"},1);break;case"pop-out":n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); transform: scale(1); opacity: 1;",e.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; opacity: 1;",n.style.cssText+="transition: "+c+"s; transform: scale(1.7); opacity: 0;"},1);break;default:n.style.cssText+="overflow: hidden; transform: translate3d(0, 0, 0)",e.style.cssText+="overflow: hidden; translate3d(0, 0, 0); opacity: 0;",K(e).show(),setTimeout(()=>{e.style.cssText+="transition: "+c+"s; opacity: 1;",n.style.cssText+="transition: "+c+"s"},1);break}setTimeout(()=>{s==="slide-down"&&(K(n).css("z-index","1019"),K(e).css("z-index","1020")),e&&K(e).css({opacity:"1"}).css({transition:"",transform:""}),n&&K(n).css({opacity:"1"}).css({transition:"",transform:""}),typeof t=="function"&&t(),i()},c*1e3)})}function Nt(n,e={},...s){if(n==null)return;let t=typeof e=="string"?{msg:e}:{...e};s[0]!=null&&(t.spinner=s[0]),t=te({spinner:!1},t);let i=n;n?.[0]instanceof Node&&(i=Array.isArray(n)?n:n.get()),!t.msg&&t.msg!==0&&(t.msg=""),nt(i);let o=K(i).get(0),l=o.scrollWidth,r=`height: ${o.scrollHeight}px; width: ${l}px`;o.tagName=="BODY"&&(r="position: fixed; right: 0; bottom: 0;"),K(i).prepend(`<div class="tsg-lock" style="${r}"></div><div class="tsg-lock-msg"></div>`);let c=K(i).find(".tsg-lock"),d=K(i).find(".tsg-lock-msg");t.msg||d.css({"background-color":"transparent","background-image":"none",border:"0px","box-shadow":"none"}),t.spinner===!0&&(t.msg=`<div class="tsg-spinner" ${t.msg?"":'style="width: 35px; height: 35px"'}></div>`+t.msg),t.msg?d.html(String(t.msg)).css("display","block"):d.remove(),t.opacity!=null&&c.css("opacity",String(t.opacity)),c.css({display:"block"}),t.bgColor&&c.css({"background-color":t.bgColor});let h=getComputedStyle(c.get(0)).opacity??.15;c.on("mousedown",function(){typeof t.onClick=="function"?t.onClick():c.css({transition:".2s",opacity:String(Number(h)*1.5)})}).on("mouseup",function(){typeof t.onClick!="function"&&c.css({transition:".2s",opacity:String(h)})}).on("mousewheel",function(f){f&&(f.stopPropagation(),f.preventDefault())})}function nt(n,e){if(n==null)return;clearTimeout(n._prevUnlock);let t=n;if(n?.[0]instanceof Node&&(t=Array.isArray(n)?n:n.get()),re(e)&&(e??0)>0){K(t).find(".tsg-lock").css({transition:(e??0)/1e3+"s",opacity:0});let i=K(t).get(0);clearTimeout(i._prevUnlock),i._prevUnlock=setTimeout(()=>{K(t).find(".tsg-lock").remove()},e),K(t).find(".tsg-lock-msg").remove()}else K(t).find(".tsg-lock").remove(),K(t).find(".tsg-lock-msg").remove()}function Pt(n,e){let s=K(n),t=0;if(s.length>0){let i=getComputedStyle(s[0]);switch(e){case"width":t=parseFloat(i.width),i.width==="auto"&&(t=0);break;case"height":t=parseFloat(i.height),i.height==="auto"&&(t=0);break;default:t=parseFloat(String(i[e]??""))||0;break}}return t}function jt(n,e,s){let t=K("body > #_tmp_width");t.length===0&&(K("body").append('<div id="_tmp_width" style="position: absolute; top: -9000px;"></div>'),t=K("body > #_tmp_width")),s===void 0&&n.trim().startsWith("<")&&n.trim().endsWith(">")&&(s=!0),t.html(s?n:Se(n??"")).attr("style",`position: absolute; top: -9000px; ${e||""}`);let i=t[0].clientWidth,o=t[0].clientHeight;return t.html(""),{width:i,height:o}}function Ut(n,e){let s=n;if(s?.length==0)return;let t=n;s?.[0]instanceof Node&&(t=Array.isArray(n)?n:n.get()),K(t).each(i=>{let o=K(i).data();Object.keys(o).forEach(l=>{if(["click","dblclick","mouseenter","mouseleave","mouseover","mouseout","mousedown","mousemove","mouseup","contextmenu","focus","focusin","focusout","blur","input","change","keydown","keyup","keypress"].indexOf(String(l).toLowerCase())==-1)return;let r=Array.isArray(o[l])?o[l]:[o[l]];typeof o[l]=="string"&&(r=o[l].split("|").map(d=>{let u=d;d==="true"&&(u=!0),d==="false"&&(u=!1),d==="undefined"&&(u=void 0),d==="null"&&(u=null),typeof u=="string"&&parseFloat(u)==u&&(u=parseFloat(u));let h=["'",'"',"`"];return typeof u=="string"&&h.includes(u[0]??"")&&h.includes(u[u.length-1]??"")&&(u=u.substring(1,u.length-1)),u}));let c=String(r[0]);r=r.slice(1),K(i).off(l+".TsUtils-bind").on(l+".TsUtils-bind",function(d){switch(c){case"alert":alert(r[0]);break;case"stop":d.stopPropagation();break;case"prevent":d.preventDefault();break;case"stopPrevent":return d.stopPropagation(),d.preventDefault(),!1;break;default:if(e[c]==null)throw new Error(`Cannot dispatch event as the method "${c}" does not exist.`);e[c](...r.map((u,h)=>{switch(String(u).toLowerCase()){case"event":return d;case"this":return this;default:return u}}))}})})})}function it(n,e,s,t){if(!n)return!1;let i="Invalid Date",o,l,a;if(e==null&&(e=t.dateFormat),n instanceof Date)a=n.getFullYear(),o=n.getMonth()+1,l=n.getDate();else if(typeof n=="number"||typeof n=="string"&&parseInt(n)==n&&parseInt(n)>0){let u=new Date(parseInt(String(n)));a=u.getFullYear(),o=u.getMonth()+1,l=u.getDate()}else{let u=String(n);if(new RegExp("mon","ig").test(e)){e=e.replace(/month/ig,"m").replace(/mon/ig,"m").replace(/dd/ig,"d").replace(/[, ]/ig,"/").replace(/\/\//g,"/").toLowerCase(),u=u.replace(/[, ]/ig,"/").replace(/\/\//g,"/").toLowerCase();for(let m=0,y=t.fullmonths.length;m<y;m++){let x=t.fullmonths[m]??"";u=u.replace(new RegExp(x,"ig"),String(m+1)).replace(new RegExp(x.substr(0,3),"ig"),String(m+1))}}let h=u.replace(/-/g,"/").replace(/\./g,"/").toLowerCase().split("/"),f=e.replace(/-/g,"/").replace(/\./g,"/").toLowerCase();f==="mm/dd/yyyy"&&(o=h[0],l=h[1],a=h[2]),f==="m/d/yyyy"&&(o=h[0],l=h[1],a=h[2]),f==="dd/mm/yyyy"&&(o=h[1],l=h[0],a=h[2]),f==="d/m/yyyy"&&(o=h[1],l=h[0],a=h[2]),f==="yyyy/dd/mm"&&(o=h[2],l=h[1],a=h[0]),f==="yyyy/d/m"&&(o=h[2],l=h[1],a=h[0]),f==="yyyy/mm/dd"&&(o=h[1],l=h[2],a=h[0]),f==="yyyy/m/d"&&(o=h[1],l=h[2],a=h[0]),f==="mm/dd/yy"&&(o=h[0],l=h[1],a=h[2]),f==="m/d/yy"&&(o=h[0],l=h[1],a=parseInt(h[2]??"0")+1900),f==="dd/mm/yy"&&(o=h[1],l=h[0],a=parseInt(h[2]??"0")+1900),f==="d/m/yy"&&(o=h[1],l=h[0],a=parseInt(h[2]??"0")+1900),f==="yy/dd/mm"&&(o=h[2],l=h[1],a=parseInt(h[0]??"0")+1900),f==="yy/d/m"&&(o=h[2],l=h[1],a=parseInt(h[0]??"0")+1900),f==="yy/mm/dd"&&(o=h[1],l=h[2],a=parseInt(h[0]??"0")+1900),f==="yy/m/d"&&(o=h[1],l=h[2],a=parseInt(h[0]??"0")+1900)}if(!re(a)||!re(o)||!re(l))return!1;let r=+(a??0),c=+(o??0),d=+(l??0);return i=new Date(r,c-1,d),i.setFullYear(r),c==null||String(i)==="Invalid Date"||i.getMonth()+1!==c||i.getDate()!==d||i.getFullYear()!==r?!1:s===!0?i:!0}function De(n,e){if(n==null)return!1;let s,t=String(n).toUpperCase(),i=t.indexOf("AM")>=0,o=t.indexOf("PM")>=0,l=o||i;l?s=12:s=24,t=t.replace("AM","").replace("PM","").trim();let a=t.split(":"),r=a[0]??"",c=a[1]??"",d=a[2]??"",u=parseInt(r||"0"),h=parseInt(c||"0"),f=parseInt(d||"0");return(!l||a.length!==1)&&a.length!==2&&a.length!==3||r===""||u<0||u>s||!re(r)||r.length>2||a.length>1&&(c===""||h<0||h>59||!re(c)||c.length!==2)||a.length>2&&(d===""||f<0||f>59||!re(d)||d.length!==2)||!l&&s===u&&(h!==0||f!==0)||l&&a.length===1&&u===0?!1:e===!0?(o&&u!==12&&(u+=12),i&&u===12&&(u+=12),{hours:u,minutes:h,seconds:f}):!0}function Gt(n,e,s,t){if(n instanceof Date)return s!==!0?!0:n;let i=parseInt(String(n));if(i===n)return i<0?!1:s!==!0?!0:new Date(i);let o=String(n),l=o.indexOf(" ");if(l<0)return o.indexOf("T")<0||String(new Date(o))=="Invalid Date"?!1:s!==!0?!0:new Date(o);{e==null&&(e=t.datetimeFormat);let a=e.split("|"),r=[o.substr(0,l),o.substr(l).trim()];a[0]!=null&&(a[0]=a[0].trim()),a[1]&&(a[1]=a[1].trim());let c=it(r[0],a[0],!0,t),d=De(r[1],!0);if(c!==!1&&d!==!1){if(s!==!0)return!0;let u=c,h=d;return u.setHours(h.hours),u.setMinutes(h.minutes),u.setSeconds(h.seconds),u}else return!1}}function Bt(n){let e;if(n===""||n==null||(n instanceof Date?e=n:typeof n=="number"||typeof n=="string"&&parseInt(n)==n&&parseInt(n)>0?e=new Date(parseInt(String(n))):e=new Date(String(n)),String(e)==="Invalid Date"))return"";let t=(new Date().getTime()-e.getTime())/1e3,i=0,o="";return t<0?(i=0,o="sec"):t<60?(i=Math.floor(t),o="sec",t<0&&(i=0,o="sec")):t<3600?(i=Math.floor(t/60),o="min"):t<1440*60?(i=Math.floor(t/60/60),o="hour"):t<720*60*60?(i=Math.floor(t/24/60/60),o="day"):t<365*24*60*60?(i=Math.floor(t/30/24/60/60*10)/10,o="month"):t<365*4*24*60*60?(i=Math.floor(t/365/24/60/60*10)/10,o="year"):t>=365*4*24*60*60&&(i=Math.floor(t/365.25/24/60/60*10)/10,o="year"),i+" "+o+(i>1?"s":"")}function Qt(n){let e="";return n<100?e="< 0.01 sec":n<1e3?e=Math.floor(n/10)/100+" sec":n<1e4?e=Math.floor(n/100)/10+" sec":n<6e4?e=Math.floor(n/1e3)+" secs":n<36e5?e=Math.floor(n/6e4)+" mins":n<864e5?e=Math.floor(n/36e5*10)/10+" hours":n<2628e6?e=Math.floor(n/864e5*10)/10+" days":n<31536e6?e=Math.floor(n/2628e6*10)/10+" months":e=Math.floor(n/31536e5)/10+" years",e}function ot(n,e,s){if(e||(e=s.dateFormat),n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),String(t)==="Invalid Date")return"";let i=t.getFullYear(),o=t.getMonth(),l=t.getDate();return e.toLowerCase().replace("month",s.fullmonths[o]??"").replace("mon",s.shortmonths[o]??"").replace(/yyyy/g,("000"+i).slice(-4)).replace(/yyy/g,("000"+i).slice(-4)).replace(/yy/g,("0"+i).slice(-2)).replace(/(^|[^a-z$])y/g,"$1"+i).replace(/mm/g,("0"+(o+1)).slice(-2)).replace(/dd/g,("0"+l).slice(-2)).replace(/th/g,l==1?"st":"th").replace(/th/g,l==2?"nd":"th").replace(/th/g,l==3?"rd":"th").replace(/(^|[^a-z$])m/g,"$1"+(o+1)).replace(/(^|[^a-z$])d/g,"$1"+l)}function lt(n,e,s){if(e||(e=s.timeFormat),n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),De(n)){let f=De(n,!0);t=new Date,t.setHours(f.hours),t.setMinutes(f.minutes)}if(String(t)==="Invalid Date")return"";e=="h12"&&(e="hh:mi pm");let i="am",o=t.getHours(),l=t.getHours(),a=t.getMinutes(),r=t.getSeconds();a<10&&(a="0"+a),r<10&&(r="0"+r),(e.indexOf("am")!==-1||e.indexOf("pm")!==-1)&&(o>=12&&(i="pm"),o>12&&(o=o-12),o===0&&(o=12));let c=String(o),d=String(a),u=String(r),h=String(l);return e.toLowerCase().replace("am",i).replace("pm",i).replace("hhh",Number(o)<10?"0"+c:c).replace("hh24",l<10?"0"+h:h).replace("h24",h).replace("hh",c).replace("mm",d).replace("mi",d).replace("ss",u).replace(/(^|[^a-z$])h/g,"$1"+c).replace(/(^|[^a-z$])m/g,"$1"+d).replace(/(^|[^a-z$])s/g,"$1"+u)}function Vt(n,e,s){let t;return n===""||n==null||typeof n=="object"&&!n.getMonth?"":(typeof e!="string"?t=[s.dateFormat,s.timeFormat]:(t=e.split("|"),t[0]!=null&&(t[0]=t[0].trim()),t[1]=t.length>1?(t[1]??"").trim():s.timeFormat),t[1]==="h12"&&(t[1]="h:m pm"),t[1]==="h24"&&(t[1]="h24:m"),ot(n,t[0],s)+" "+lt(n,t[1],s))}function qt(n,e,s){if(n===""||n==null||typeof n=="object"&&!n.getMonth)return"";let t=new Date(n);if(re(n)&&(t=new Date(Number(n))),String(t)==="Invalid Date")return"";let i=e.shortmonths,o=new Date,l=new Date;l.setTime(l.getTime()-864e5);let a=i[t.getMonth()]+" "+t.getDate()+", "+t.getFullYear(),r=i[o.getMonth()]+" "+o.getDate()+", "+o.getFullYear(),c=i[l.getMonth()]+" "+l.getDate()+", "+l.getFullYear(),d=t.getHours()-(t.getHours()>12?12:0)+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()+" "+(t.getHours()>=12?"pm":"am"),u=t.getHours()-(t.getHours()>12?12:0)+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()+":"+(t.getSeconds()<10?"0":"")+t.getSeconds()+" "+(t.getHours()>=12?"pm":"am"),h=a;return a===r&&(h=d),a===c&&(h=s.lang("Yesterday")),'<span title="'+a+" "+u+'">'+h+"</span>"}async function at(n,e,s,t,i){if(Array.isArray(n)){let l=i.extend({},{...t,phrases:{}}),a=n.map(u=>u.length===5?"locale/"+u.toLowerCase()+".json":u),r=[],c={};return a.forEach(u=>{r.push(at(u,!0,!1,l,i))}),(await Promise.allSettled(r)).forEach(u=>{u.status==="fulfilled"&&u.value.kind==="load"&&(c[u.value.file]=u.value.data)}),a.forEach(u=>{l=i.extend({},l,c[u]??{})}),{kind:"void",settings:l}}if(n||(n="en-us"),typeof n=="object")return{kind:"merge",settings:i.extend({},t,_e,n)};let o=n;o.length===5&&(o="locale/"+o.toLowerCase()+".json");try{let a=await(await i.fetch(o,{method:"GET"})).json();if(s!==!0)if(e){let r=i.extend({},t,a);return{kind:"load",file:o,data:a,settings:r}}else{let r={...t,phrases:{}},c=i.extend({},r,_e,a);return{kind:"load",file:o,data:a,settings:c}}return{kind:"load",file:o,data:a}}catch(l){throw console.log("ERROR: Cannot load locale "+o),l}}var Ee=j,rt=class{version;tmp;settings;i18nCompare;hasLocalStorage;isMac;isMobile;isIOS;isAndroid;isSafari;isFirefox;formatters;constructor(){this.version="2.0.x",this.tmp={},this.settings=this.extend({},{dataType:"JSON",dateStartYear:1950,dateEndYear:2030,macButtonOrder:!1,warnNoPhrase:!1},_e,{phrases:null}),this.i18nCompare=Intl.Collator().compare,this.hasLocalStorage=e(),this.isMac=/Mac/i.test(navigator.platform),this.isMobile=/(iphone|ipod|mobile|android)/i.test(navigator.userAgent),this.isIOS=/(iphone|ipod|ipad)/i.test(navigator.platform),this.isAndroid=/(android)/i.test(navigator.userAgent),this.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this.isFirefox=/(Firefox)/i.test(navigator.userAgent),this.formatters={number(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;return parseInt(String(o))>20&&(o=20),parseInt(String(o))<0&&(o=0),i==null||i===""?"":p.formatNumber(parseFloat(String(i)),o,!0)},float(s,t){return p.formatters.number?.(s,t)??""},int(s,t){return p.formatters.number?.(s,t)??""},money(s,t){t==null&&(t=s);let{value:i}=t;if(i==null||i==="")return"";let o=p.formatNumber(Number(i),p.settings.currencyPrecision,!0);return(p.settings.currencyPrefix||"")+o+(p.settings.currencySuffix||"")},currency(s,t){return p.formatters.money?.(s,t)??""},percent(s,t){t==null&&(t=s);let{value:i,params:o}=t;return i==null||i===""?"":p.formatNumber(i,o||1)+"%"},size(s,t){t==null&&(t=s);let{value:i}=t;return i==null||i===""?"":String(p.formatSize(parseInt(String(i))))},date(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.dateFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatDate(l instanceof Date?l:void 0,o)+"</span>"},datetime(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatDateTime(l instanceof Date?l:void 0,o)+"</span>"},time(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.timeFormat),o==="h12"&&(o="hh:mi pm"),o==="h24"&&(o="h24:mi"),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.formatTime(i,o)+"</span>"},timestamp(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),l instanceof Date?l.toString():""},gmt(s,t){t==null&&(t=s);let{value:i}=t,o=t.params;if(o===""&&(o=p.settings.datetimeFormat),i==null||i===0||i==="")return"";let l=p.isDateTime(i,o??null,!0);return l===!1&&(l=p.isDate(i,o??null,!0)),l instanceof Date?l.toUTCString():""},age(s,t){t==null&&(t=s);let{value:i,params:o}=t;if(i==null||i===0||i==="")return"";let l=p.isDateTime(i,null,!0);return l===!1&&(l=p.isDate(i,null,!0)),'<span title="'+(l instanceof Date?l:"")+'">'+p.age(i)+(o?" "+o:"")+"</span>"},interval(s,t){t==null&&(t=s);let{value:i,params:o}=t;return i==null||i===0||i===""?"":p.interval(Number(i))+(o?" "+o:"")},toggle(s,t){t==null&&(t=s);let{value:i}=t;return i?p.lang("Yes"):""},password(s,t){t==null&&(t=s);let{value:i}=t,o="";if(!i)return o;let l=String(i);for(let a=0;a<l.length;a++)o+="*";return o}};return;function e(){let s="w2ui_test";try{return localStorage.setItem(s,s),localStorage.removeItem(s),!0}catch{return!1}}}isBin(e){return ht(e)}isInt(e){return re(e)}isFloat(e){return Ke(e,this.settings)}isMoney(e){return pt(e,this.settings)}isHex(e){return mt(e)}isAlphaNumeric(e){return Le(e)}isEmail(e){return gt(e)}isIpAddress(e){return yt(e)}isDate(e,s,t){return it(e,s,t,this.settings)}isTime(e,s){return De(e,s)}isDateTime(e,s,t){return Gt(e,s,t,this.settings)}age(e){return Bt(e)}interval(e){return Qt(e)}date(e){return qt(e,this.settings,{lang:this.lang.bind(this)})}formatSize(e){if(!this.isFloat(e)||e==="")return"";let s=parseFloat(String(e));if(s===0)return 0;let t=["Bt","KB","MB","GB","TB","PB","EB","ZB"],i=parseInt(String(Math.floor(Math.log(s)/Math.log(1024))));return(Math.floor(s/Math.pow(1024,i)*10)/10).toFixed(i===0?0:1)+" "+(t[i]||"??")}formatNumber(e,s,t){if(e==null||e===""||typeof e=="object")return"";let i={minimumFractionDigits:s!=null?parseInt(String(s)):void 0,maximumFractionDigits:s!=null?parseInt(String(s)):void 0,useGrouping:!!t};return(s==null||Number(s)<0)&&(i.minimumFractionDigits=0,i.maximumFractionDigits=20),parseFloat(String(e)).toLocaleString(this.settings.locale,i)}formatDate(e,s){return ot(e,s,this.settings)}formatTime(e,s){return lt(e,s,this.settings)}formatDateTime(e,s){return Vt(e,s,this.settings)}stripSpaces(e){return Fe(e)}stripTags(e){return He(e)}encodeTags(e){return Se(e)}decodeTags(e){return Ne(e)}escapeId(e){return Et(e)}unescapeId(e){return St(e)}base64encode(e){return Rt(e)}base64decode(e){return $t(e)}sha256(e){return Mt(e)}transition(e,s,t,i){return Ht(e,s,t,i)}lock(e,s={},...t){return Nt(e,s,...t)}unlock(e,s){return nt(e,s)}_msgDeps(){return{extend:te,bindEvents:(e,s)=>this.bindEvents(e,s),lock:(e,s)=>this.lock(e,s),unlock:(e,s)=>this.unlock(e,s),ownerName:this.name,self:this}}_confirmDeps(){return{extend:te,normButtons:(e,s)=>Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings}),message:(e,s)=>this.message(e,s),settings:this.settings,lang:this.lang.bind(this)}}_promptDeps(){return{extend:te,normButtons:(e,s)=>Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings}),message:(e,s)=>this.message(e,s),settings:this.settings,lang:this.lang.bind(this)}}message(e,s){return st(e,s,this._msgDeps())}alert(e,s){return Lt(e,s,this._msgDeps())}confirm(e,s){return At(e,s,this._confirmDeps())}prompt(e,s){return Ft(e,s,this._promptDeps())}normButtons(e,s){return Ue(e,s,{extend:te,lang:this.lang.bind(this),settings:this.settings})}notify(e,s){return zt(e,s,{execTemplate:this.execTemplate.bind(this),tmpSlot:this.tmp})}getSize(e,s){return Pt(e,s)}getStrDimentions(e,s,t){return jt(e,s,t)}getStrWidth(e,s,t){return this.getStrDimentions(e,s,t).width}getStrHeight(e,s,t){return this.getStrDimentions(e,s,t).height}execTemplate(e,s){return Dt(e,s)}marker(e,s,t){return Ot(e,s,t)}lang(e,s){if(!e||this.settings.phrases==null||typeof e!="string"||"<=>=".includes(e))return this.execTemplate(e,s);let t=this.settings.phrases[e];return t==null?(t=e,this.settings.warnNoPhrase&&(this.settings.missing||(this.settings.missing={}),this.settings.missing[e]="---",this.settings.phrases[e]="---",console.log(`Missing translation for "%c${e}%c", see %c TsUtils.settings.phrases %c with value "---"`,"color: orange","","color: #999",""))):t==="---"&&!this.settings.warnNoPhrase&&(t=e),t==="---"&&(t=`<span ${this.tooltip(e)}>---</span>`),this.execTemplate(t,s)}locale(e,s,t){let i={extend:this.extend.bind(this),fetch:globalThis.fetch.bind(globalThis)};return at(e,s,t,this.settings,i).then(o=>(o.settings&&(this.settings=o.settings),o.kind==="load"?{file:o.file,data:o.data}:void 0))}scrollBarSize(){return this.tmp.scrollBarSize?this.tmp.scrollBarSize:(Ee("body").append(`
|
|
29
29
|
<div id="_scrollbar_width" style="position: absolute; top: -300px; width: 100px; height: 100px; overflow-y: scroll;">
|
|
30
30
|
<div style="height: 120px">1</div>
|
|
31
31
|
</div>
|