oswilno/crates/web-assets/assets/build.js.map

8 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-08-01 16:29:03 +02:00
{
"version": 3,
"sources": ["elements/oswilno-price.js"],
"sourcesContent": ["customElements.define(class extends HTMLElement {\n\tconstructor() {\n\t\tconst shadow = this.createShadowRoot({ open: true });\n\t}\n\tconnectedCallback() {\n\t\tlet shadow = this.shadowRoot;\n\t\tlet price = parseInt(this.getAttribute('price'));\n\t\tif (isNaN(price)) price = 0;\n\t\tconst multiplier = parseInt(this.getAttribute('multiplier'));\n\t\tlet major = price;\n\t\tlet minor = 0;\n\t\tif (!isNaN(multiplier)) {\n\t\t\tmajor = Math.floor(price / multiplier);\n\t\t\tminor = price % multiplier;\n\t\t}\n\t\tshadow.innerHTML = `<style>:host{display:block;}</style><div>${major}.${minor >= 10 ? minor : minor + '0'}</div>`;\n\t}\n}, 'oswilno-price');\n"],
"mappings": "MAAA,eAAe,OAAO,cAAc,WAAY,CAC/C,aAAc,CACb,IAAMA,EAAS,KAAK,iBAAiB,CAAE,KAAM,EAAK,CAAC,CACpD,CACA,mBAAoB,CACnB,IAAIA,EAAS,KAAK,WACdC,EAAQ,SAAS,KAAK,aAAa,OAAO,CAAC,EAC3C,MAAMA,CAAK,IAAGA,EAAQ,GAC1B,IAAMC,EAAa,SAAS,KAAK,aAAa,YAAY,CAAC,EACvDC,EAAQF,EACRG,EAAQ,EACP,MAAMF,CAAU,IACpBC,EAAQ,KAAK,MAAMF,EAAQC,CAAU,EACrCE,EAAQH,EAAQC,GAEjBF,EAAO,UAAY,4CAA4CG,CAAK,IAAIC,GAAS,GAAKA,EAAQA,EAAQ,GAAG,QAC1G,CACD,EAAG,eAAe",
"names": ["shadow", "price", "multiplier", "major", "minor"]
}