Files

1 line
74 KiB
JavaScript
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
if(function(){"use strict";function x(t){return t.split("").reverse().join("")}function g(t,e){return t.substring(0,e.length)===e}function n(t,e,i){if((t[e]||t[i])&&t[e]===t[i])throw new Error(e)}function S(t){return"number"==typeof t&&isFinite(t)}function i(t,e,i,r,o,n,s,a,l,c,h,p){var u,d,f,g,v,m,b=p,w="",y="";return n&&(p=n(p)),!!S(p)&&(!1!==t&&0===parseFloat(p.toFixed(t))&&(p=0),p<0&&(u=!0,p=Math.abs(p)),!1!==t&&(g=p,v=t,m=Math.pow(10,v),p=(Math.round(g*m)/m).toFixed(v)),-1!==(p=p.toString()).indexOf(".")?(f=(d=p.split("."))[0],i&&(w=i+d[1])):f=p,e&&(f=x((f=x(f).match(/.{1,3}/g)).join(x(e)))),u&&a&&(y+=a),r&&(y+=r),u&&l&&(y+=l),y+=f,y+=w,o&&(y+=o),c&&(y=c(y,b)),y)}function r(t,e,i,r,o,n,s,a,l,c,h,p){var u,d,f="";return h&&(p=h(p)),!(!p||"string"!=typeof p)&&(a&&g(p,a)&&(p=p.replace(a,""),u=!0),r&&g(p,r)&&(p=p.replace(r,"")),l&&g(p,l)&&(p=p.replace(l,""),u=!0),o&&(d=o,p.slice(-1*d.length)===d)&&(p=p.slice(0,-1*o.length)),e&&(p=p.split(e).join("")),i&&(p=p.replace(i,".")),u&&(f+="-"),""!==(f=(f+=p).replace(/[^0-9\.\-.]/g,""))&&(f=Number(f),s&&(f=s(f)),!!S(f)&&f))}function o(t,e,i){var r,o=[];for(r=0;r<s.length;r+=1)o.push(t[s[r]]);return o.push(i),e.apply("",o)}var s=["decimals","thousand","mark","prefix","postfix","encoder","decoder","negativeBefore","negative","edit","undo"];window.wNumb=function t(e){return this instanceof t?void("object"==typeof e&&(e=function(t){var e,i,r,o={};for(e=0;e<s.length;e+=1)if(void 0===(r=t[i=s[e]]))o[i]="negative"!==i||o.negativeBefore?"mark"===i&&"."!==o.thousand&&".":"-";else if("decimals"===i){if(!(0<=r&&r<8))throw new Error(i);o[i]=r}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof r)throw new Error(i);o[i]=r}else{if("string"!=typeof r)throw new Error(i);o[i]=r}return n(o,"mark","thousand"),n(o,"prefix","negative"),n(o,"prefix","negativeBefore"),o}(e),this.to=function(t){return o(e,i,t)},this.from=function(t){return o(e,r,t)})):new t(e)}}(),function(s){"use strict";function i(t){return t instanceof s||s.zepto&&s.zepto.isZ(t)}function n(i,r,t){var o=this,n=!1;if(this.changeHandler=function(t){var e=o.formatInstance.from(s(this).val());return!1===e||isNaN(e)?(s(this).val(o.lastSetValue),!1):void o.changeHandlerMethod.call("",t,e)},this.el=!1,this.formatInstance=t,s.each(e,function(t,e){return!(n=e.call(o,i,r))}),!n)throw new RangeError("(Link) Invalid Link.")}function a(t){this.items=[],this.elements=[],this.origin=t}var e=[function(t,e){return"string"==typeof t&&0===t.indexOf("-inline-")?(this.method=e||"html",this.target=this.el=s(t.replace("-inline-","")||"<div/>"),!0):void 0},function(t){if("string"==typeof t&&0!==t.indexOf("-")){this.method="val";var e=document.createElement("input");return e.name=t,e.type="hidden",this.target=this.el=s(e),!0}},function(t){return"function"==typeof t?(this.target=!1,this.method=t,!0):void 0},function(t,e){return i(t)&&!e?(t.is("input, select, textarea")?(this.method="val",this.target=t.on("change.liblink",this.changeHandler)):(this.target=t,this.method="html"),!0):void 0},function(t,e){return i(t)&&("function"==typeof e||"string"==typeof e&&t[e])?(this.method=e,this.target=t,!0):void 0}];n.prototype.set=function(t){var e=Array.prototype.slice.call(arguments).slice(1);this.lastSetValue=this.formatInstance.to(t),e.unshift(this.lastSetValue),("function"==typeof this.method?this.method:this.target[this.method]).apply(this.target,e)},a.prototype.push=function(t,e){this.items.push(t),e&&this.elements.push(e)},a.prototype.reconfirm=function(t){var e;for(e=0;e<this.elements.length;e+=1)this.origin.LinkConfirm(t,this.elements[e])},a.prototype.remove=function(){var t;for(t=0;t<this.items.length;t+=1)this.items[t].target.off(".liblink");for(t=0;t<this.elements.length;t+=1)this.elements[t].remove()},a.prototype.change=function(t){if(this.origin.LinkIsEmitting)return!1;this.origin.LinkIsEmitting=!0;var e,i=Array.prototype.slice.call(arguments,1);for(i.unshift(t),e=0;e<this.items.length;e+=1)this.items[e].set.apply(this.items[e],i);this.origin.LinkIsEmitting=!1},s.fn.Link=function(r){var o=this;if(!1===r)return o.each(functio