2024-07-19 17:21:14 +03:00
|
|
|
(()=>{var Zt=Object.create;var ye=Object.defineProperty,er=Object.defineProperties,tr=Object.getOwnPropertyDescriptor,rr=Object.getOwnPropertyDescriptors,nr=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,or=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable;var qe=(e,t,r)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K=(e,t)=>{for(var r in t||(t={}))Re.call(t,r)&&qe(e,r,t[r]);if(Le)for(var r of Le(t))ar.call(t,r)&&qe(e,r,t[r]);return e},Z=(e,t)=>er(e,rr(t));var ir=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var cr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nr(t))!Re.call(e,o)&&o!==r&&ye(e,o,{get:()=>t[o],enumerable:!(n=tr(t,o))||n.enumerable});return e};var sr=(e,t,r)=>(r=e!=null?Zt(or(e)):{},cr(t||!e||!e.__esModule?ye(r,"default",{value:e,enumerable:!0}):r,e));var Gt=ir((Ne,He)=>{(function(e,t){typeof Ne=="object"&&typeof He<"u"?He.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.currency=t())})(Ne,function(){function e(a,i){if(!(this instanceof e))return new e(a,i);i=Object.assign({},r,i);var s=Math.pow(10,i.precision);this.intValue=a=t(a,i),this.value=a/s,i.increment=i.increment||1/s,i.groups=i.useVedic?o:n,this.s=i,this.p=s}function t(a,i){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0,u=i.decimal,d=i.errorOnInvalid,_=i.fromCents,c=Math.pow(10,i.precision),m=a instanceof e;if(m&&_)return a.intValue;if(typeof a=="number"||m)u=m?a.value:a;else if(typeof a=="string")d=new RegExp("[^-\\d"+u+"]","g"),u=new RegExp("\\"+u,"g"),u=(u=a.replace(/\((.*)\)/,"-$1").replace(d,"").replace(u,"."))||0;else{if(d)throw Error("Invalid Input");u=0}return _||(u=(u*c).toFixed(4)),s?Math.round(u):u}var r={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:function(a,i){var s=i.pattern,u=i.negativePattern,d=i.symbol,_=i.separator,c=i.decimal;i=i.groups;var m=(""+a).replace(/^-/,"").split("."),f=m[0];return m=m[1],(0<=a.value?s:u).replace("!",d).replace("#",f.replace(i,"$1"+_)+(m?c+m:""))},fromCents:!1},n=/(\d)(?=(\d{3})+\b)/g,o=/(\d)(?=(\d\d)+\d\b)/g;return e.prototype={add:function(a){var i=this.s,s=this.p;return e((this.intValue+t(a,i))/(i.fromCents?1:s),i)},subtract:function(a){var i=this.s,s=this.p;return e((this.intValue-t(a,i))/(i.fromCents?1:s),i)},multiply:function(a){var i=this.s;return e(this.intValue*a/(i.fromCents?1:Math.pow(10,i.precision)),i)},divide:function(a){var i=this.s;return e(this.intValue/t(a,i,!1),i)},distribute:function(a){var i=this.intValue,s=this.p,u=this.s,d=[],_=Math[0<=i?"floor":"ceil"](i/a),c=Math.abs(i-_*a);for(s=u.fromCents?1:s;a!==0;a--){var m=e(_/s,u);0<c--&&(m=m[0<=i?"add":"subtract"](1/s)),d.push(m)}return d},dollars:function(){return~~this.value},cents:function(){return~~(this.intValue%this.p)},format:function(a){var i=this.s;return typeof a=="function"?a(this,i):i.format(this,Object.assign({},i,a))},toString:function(){var a=this.s,i=a.increment;return(Math.round(this.intValue/this.p/i)*i).toFixed(a.precision)},toJSON:function(){return this.value}},e})});globalThis.l=(...e)=>console.log("KOBOPRICE",...e);var ge="KOBOPRICE",Ae=()=>{localStorage.getItem(ge)||we({books:{},rates:null})},ee=()=>JSON.parse(localStorage.getItem(ge)),we=e=>localStorage.setItem(ge,JSON.stringify(e)),Ve=()=>ee().rates,je=e=>we(Z(K({},ee()),{rates:e})),Ue=e=>ee().books[e],Be=(e,t)=>{let r=ee();r.books[t]=e,we(r)};var ae,w,ze,ur,R,Qe,Je,ve,Ce,be,xe,dr,z={},Ke=[],fr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pe=Array.isArray;function I(e,t){for(var r in t)e[r]=t[r];return e}function Ze(e){var t=e.parentNode;t&&t.removeChild(e)}function S(e,t,r){var n,o,a,i={};for(a in t)a=="key"?n=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ae.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return re(e,i,n,o,null)}function re(e,t,r,n,o){var a={type:e,props:t,key:r,ref:n,__k:null,_
|