@psdk/device-webusb 0.5.4 → 0.5.5

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["../../../frame/father/build/device/adapter/connected_device.js","../../../frame/father/build/device/adapter/index.js","../../../frame/father/build/device/adapter/types.js","../../../frame/father/build/father/PSDK.js","../../../frame/father/build/father/args/arg.js","../../../frame/father/build/father/args/common/easy.js","../../../frame/father/build/father/args/common/raw.js","../../../frame/father/build/father/args/index.js","../../../frame/father/build/father/command/index.js","../../../frame/father/build/father/command/print/command.js","../../../frame/father/build/father/command/print/command_clause.js","../../../frame/father/build/father/command/print/commander.js","../../../frame/father/build/father/command/single/appendat.js","../../../frame/father/build/father/command/single/binary_command.js","../../../frame/father/build/father/command/single/single_command.js","../../../frame/father/build/father/device/write_operation.js","../../../frame/father/build/father/index.js","../../../frame/father/build/father/types/hex_output.js","../../../frame/father/build/father/types/index.js","../../../frame/father/build/father/types/lifecycle.js","../../../frame/father/build/father/types/psdk_const.js","../../../frame/father/build/father/types/write.js","../../../frame/father/build/index.js","../../../frame/father/build/toolkit/base64.js","../../../frame/father/build/toolkit/byte.js","../../../frame/father/build/toolkit/checker.js","../../../frame/father/build/toolkit/gbk.js","../../../frame/father/build/toolkit/index.js","../../../frame/father/build/toolkit/pcollection.js","../../../frame/father/build/toolkit/pimage.js","../../../frame/father/build/toolkit/pvariable.js","../webpack/bootstrap","../webpack/runtime/compat",".././build/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FakeConnectedDevice = void 0;\n/**\n * Connected device\n */\nconst types_1 = require(\"./types\");\nconst father_1 = require(\"../../father\");\n/**\n * Fake connected device\n */\nclass FakeConnectedDevice {\n origin() {\n return \"FAKE-DEVICE\";\n }\n connectionState() {\n return types_1.ConnectionState.CONNECTED;\n }\n deviceName() {\n return \"FAKE-DEVICE\";\n }\n async disconnect() {\n }\n canRead() {\n return true;\n }\n async read(options) {\n return father_1.PsdkConst.EMPTY_BYTES;\n }\n async write(data) {\n console.log('WRITE: ', data);\n }\n flush() {\n }\n}\nexports.FakeConnectedDevice = FakeConnectedDevice;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./connected_device\"), exports);\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadOptions = exports.WroteReporter = exports.ConnectionState = void 0;\n/**\n * Connection state\n */\nvar ConnectionState;\n(function (ConnectionState) {\n /**\n * connected\n */\n ConnectionState[\"CONNECTED\"] = \"CONNECTED\";\n /**\n * disconnect\n */\n ConnectionState[\"DISCONNECTED\"] = \"DISCONNECTED\";\n})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));\n/**\n * Wrote reporter\n */\nclass WroteReporter {\n ok;\n binary;\n controlExit;\n exception;\n constructor(\n /**\n * Wrote is ok\n */\n ok, \n /**\n * Wrote data\n */\n binary, \n /**\n * control exit\n */\n controlExit, \n /**\n * exception\n */\n exception) {\n this.ok = ok;\n this.binary = binary;\n this.controlExit = controlExit;\n this.exception = exception;\n }\n}\nexports.WroteReporter = WroteReporter;\n/**\n * Read options\n */\nclass ReadOptions {\n timeout;\n constructor(options) {\n this.timeout = options?.timeout;\n }\n}\nexports.ReadOptions = ReadOptions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PSDK = void 0;\nconst types_1 = require(\"./types\");\nconst write_operation_1 = require(\"./device/write_operation\");\nclass PSDK {\n /**\n * sdk version\n */\n sversion() {\n return '0.2.67';\n }\n /**\n * authors\n */\n authors() {\n return types_1.PsdkConst.DEF_AUTHORS;\n }\n /**\n * Push raw command\n * @param raw raw\n */\n raw(raw) {\n this.commander().pushArg(raw);\n return this;\n }\n /**\n * Put variable\n * @param name name\n * @param value value\n */\n variable(name, value) {\n this.commander().variable(name, value);\n return this;\n }\n /**\n * get command\n */\n command() {\n return this.commander().command();\n }\n /**\n * Clear command\n */\n clear() {\n this.commander().clear();\n return this;\n }\n /**\n * Write data to device\n */\n async write(options) {\n const connectedDevice = this.connectedDevice();\n if (!connectedDevice)\n throw Error('It\\'s seems you missing to set connectedDevice');\n options = options ?? types_1.WriteOptions.def();\n const command = this.command();\n const binary = command.binary();\n const operation = new write_operation_1.DataWriteOperation(options, binary, connectedDevice);\n const reporter = await operation.write();\n this.clear();\n return reporter;\n }\n /**\n * Newline command\n */\n newline() {\n this.commander().newline();\n return this;\n }\n /**\n * Push command\n * @param command\n */\n push(command) {\n this.commander().pushArg(command);\n return this;\n }\n}\nexports.PSDK = PSDK;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BasicArg = void 0;\nconst types_1 = require(\"../types\");\nclass BasicArg {\n newline() {\n return types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n }\n}\nexports.BasicArg = BasicArg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OnlyTextHeaderArg = exports.OnlyBinaryHeaderArg = exports.EasyArg = void 0;\nconst arg_1 = require(\"../arg\");\nconst command_1 = require(\"../../command\");\n/**\n * Easy argument abstract class\n */\nclass EasyArg extends arg_1.BasicArg {\n prependClauses;\n appendClauses;\n constructor() {\n super();\n this.prependClauses = [];\n this.appendClauses = [];\n }\n /**\n * Append another argument for this clause\n * @param arg\n */\n append(arg) {\n this.appendClauses.push(...arg.clauses());\n return this;\n }\n /**\n * Prepend another argument for this clause\n * @param arg\n */\n prepend(arg) {\n this.prependClauses.push(...arg.clauses());\n return this;\n }\n /**\n * Get current command clauses\n */\n clauses() {\n const clause = this.clause();\n const currentClauses = [];\n if (clause.type !== command_1.ClauseType.NONE) {\n currentClauses.push(clause);\n if (this.newline()) {\n currentClauses.push(command_1.CommandClause.newline());\n }\n }\n return [\n ...this.prependClauses,\n ...currentClauses,\n ...this.appendClauses,\n ];\n }\n clear() {\n this.prependClauses.splice(0, this.prependClauses.length);\n this.appendClauses.splice(0, this.appendClauses.length);\n }\n}\nexports.EasyArg = EasyArg;\nclass OnlyBinaryHeaderArg extends EasyArg {\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n return command_1.CommandClause.binary(this.header());\n }\n newline() {\n return false;\n }\n}\nexports.OnlyBinaryHeaderArg = OnlyBinaryHeaderArg;\nclass OnlyTextHeaderArg extends EasyArg {\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n return command_1.CommandClause.text(this.header());\n }\n}\nexports.OnlyTextHeaderArg = OnlyTextHeaderArg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RawMode = exports.Raw = void 0;\nconst easy_1 = require(\"./easy\");\nconst command_1 = require(\"../../command\");\nconst types_1 = require(\"../../types\");\nclass Raw extends easy_1.EasyArg {\n _mode;\n _text;\n _charset;\n _binary;\n _newline = types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n constructor() {\n super();\n }\n static text(text, options) {\n const raw = new Raw();\n raw._mode = RawMode.TEXT;\n raw._text = text;\n raw._charset = options?.charset ?? types_1.PsdkConst.DEF_CHARSET;\n raw._newline = options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n return raw;\n }\n static binary(binary, options) {\n const raw = new Raw();\n raw._mode = RawMode.BINARY;\n raw._binary = binary;\n raw._charset = options?.charset ?? types_1.PsdkConst.DEF_CHARSET;\n raw._newline = options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n return raw;\n }\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n let clause;\n switch (this._mode) {\n case RawMode.TEXT:\n clause = command_1.CommandClause.text(this._text, this._charset);\n break;\n case RawMode.BINARY:\n clause = command_1.CommandClause.binary(this._binary);\n break;\n default:\n clause = command_1.CommandClause.none();\n break;\n }\n return clause;\n }\n header() {\n return types_1.PsdkConst.EMPTY_BYTES;\n }\n newline() {\n return this._newline;\n }\n}\nexports.Raw = Raw;\nvar RawMode;\n(function (RawMode) {\n RawMode[\"BINARY\"] = \"BINARY\";\n RawMode[\"TEXT\"] = \"TEXT\";\n})(RawMode || (exports.RawMode = RawMode = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./arg\"), exports);\n__exportStar(require(\"./common/easy\"), exports);\n__exportStar(require(\"./common/raw\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./print/command\"), exports);\n__exportStar(require(\"./print/commander\"), exports);\n__exportStar(require(\"./print/command_clause\"), exports);\n__exportStar(require(\"./single/appendat\"), exports);\n__exportStar(require(\"./single/binary_command\"), exports);\n__exportStar(require(\"./single/single_command\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultCommand = exports.BasicCommand = void 0;\n/**\n * All printer sdk command interface\n */\nconst types_1 = require(\"../../types\");\nconst base64_1 = require(\"../../../toolkit/base64\");\nconst command_clause_1 = require(\"./command_clause\");\nconst toolkit_1 = require(\"../../../toolkit\");\nclass BasicCommand {\n base64() {\n return base64_1.Base64.fromUint8Array(this.binary());\n }\n}\nexports.BasicCommand = BasicCommand;\nclass DefaultCommand extends BasicCommand {\n bytes;\n constructor(clauses, variable) {\n super();\n let bytes = [];\n for (const clause of clauses) {\n switch (clause.type) {\n case command_clause_1.ClauseType.TEXT:\n const t = toolkit_1.PVariableKit.replace(clause.text, variable);\n //# use gbk encoding\n // const t_buffer = iconv.encode(t, clause.charset ?? PsdkConst.DEF_CHARSET);\n const t_buffer = toolkit_1.FastGBK.encode(t);\n const t_binary = Array.prototype.slice.call(t_buffer, 0);\n bytes = bytes.concat(t_binary);\n //# use utf8 encoding\n // const t_binary = ByteKit.textToU8A(t)\n // const array = Array.from(t_binary)\n // bytes.push(...array);\n break;\n case command_clause_1.ClauseType.NEWLINE:\n case command_clause_1.ClauseType.BINARY:\n const b = Array.from(clause.binary ?? types_1.PsdkConst.EMPTY_BYTES);\n bytes = bytes.concat(b);\n break;\n }\n }\n this.bytes = new Uint8Array(bytes);\n }\n binary() {\n return this.bytes;\n }\n hex(output) {\n return (output ?? types_1.HexOutput.def()).format(this.binary());\n }\n string(charset) {\n // const buffer = Array.from(this.binary());\n // @ts-ignore\n // return iconv.decode(buffer, charset ?? PsdkConst.DEF_CHARSET);\n // return gbkDecoder.decode(this.binary());\n return toolkit_1.FastGBK.decode(this.binary());\n }\n}\nexports.DefaultCommand = DefaultCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CommandClause = exports.ClauseType = void 0;\nconst types_1 = require(\"../../types\");\nvar ClauseType;\n(function (ClauseType) {\n ClauseType[\"TEXT\"] = \"TEXT\";\n ClauseType[\"BINARY\"] = \"BINARY\";\n ClauseType[\"NEWLINE\"] = \"NEWLINE\";\n ClauseType[\"NONE\"] = \"NONE\";\n})(ClauseType || (exports.ClauseType = ClauseType = {}));\nclass CommandClause {\n /**\n * Clause type\n * @private\n */\n _type;\n /**\n * Text command\n * @private\n */\n _text;\n /**\n * Charset\n * @private\n */\n _charset;\n /**\n * Binary command\n * @private\n */\n _binary;\n constructor(type, text, charset, binary) {\n this._type = type;\n this._text = text;\n this._charset = charset;\n this._binary = binary;\n }\n static text(command, charset = types_1.PsdkConst.DEF_CHARSET) {\n return new CommandClause(ClauseType.TEXT, command, charset, undefined);\n }\n static binary(binary) {\n return new CommandClause(ClauseType.BINARY, undefined, undefined, binary);\n }\n static newline() {\n return new CommandClause(ClauseType.NEWLINE, undefined, undefined, types_1.PsdkConst.DEF_NEWLINE_BINARY);\n }\n static none() {\n return new CommandClause(ClauseType.NONE, undefined, undefined, undefined);\n }\n get type() {\n return this._type;\n }\n get text() {\n return this._text;\n }\n get charset() {\n return this._charset;\n }\n get binary() {\n return this._binary;\n }\n}\nexports.CommandClause = CommandClause;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Commander = void 0;\nconst command_clause_1 = require(\"./command_clause\");\nconst types_1 = require(\"../../types\");\nconst command_1 = require(\"./command\");\n/**\n * Command builder\n */\nclass Commander {\n /**\n * Command clauses\n * @private\n */\n clauses;\n _variable;\n constructor() {\n this.clauses = [];\n this._variable = new Map();\n }\n /**\n * Make a commander\n */\n static make() {\n return new Commander();\n }\n /**\n * Push a text command\n * @param command command\n * @param options Options: { newline: newline, charset: charset }\n */\n pushText(command, options) {\n if (command.startsWith(types_1.PsdkConst.CRLF)) {\n command = command.substring(2);\n }\n const clause = command_clause_1.CommandClause.text(command, options?.charset ?? types_1.PsdkConst.DEF_CHARSET);\n return this.pushClause(clause, options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE);\n }\n /**\n * Push binary command\n * @param command Command\n * @param newline Add new line for this command\n */\n pushBinary(command, newline) {\n const clause = command_clause_1.CommandClause.binary(command);\n return this.pushClause(clause, newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE);\n }\n /**\n * Push clause\n * @param clause Command clause object\n * @param newline Add new line for this command\n */\n pushClause(clause, newline) {\n this.clauses.push(clause);\n if (newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE) {\n this.clauses.push(command_clause_1.CommandClause.newline());\n }\n return this;\n }\n /**\n * Push multiple clause\n * @param clauses\n */\n pushClauses(clauses) {\n clauses.forEach(item => this.pushClause(item, false));\n return this;\n }\n /**\n * Push arg\n * @param arg arg\n */\n pushArg(arg) {\n this.pushClauses(arg.clauses());\n return this;\n }\n /**\n * Add newline\n */\n newline() {\n const clause = command_clause_1.CommandClause.newline();\n return this.pushClause(clause, false);\n }\n /**\n * Add a new variable\n * @param name name\n * @param value value\n */\n variable(name, value) {\n this._variable.set(name, value);\n return this;\n }\n /**\n * Clear all commands\n */\n clear() {\n this.clauses.splice(0, this.clauses.length);\n this._variable.clear();\n return this;\n }\n /**\n * Get command\n */\n command() {\n return new command_1.DefaultCommand(this.clauses, this._variable);\n }\n}\nexports.Commander = Commander;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextAppendat = exports.Appendat = void 0;\nconst toolkit_1 = require(\"../../../toolkit\");\nclass Appendat {\n _argument;\n _condition;\n _callback;\n constructor(argument, condition, callback) {\n this._argument = argument;\n this._condition = condition;\n this._callback = callback;\n }\n get condition() {\n return this._condition;\n }\n callback(callback) {\n this._callback = callback;\n return this;\n }\n quote() {\n return this;\n }\n argument() {\n if (!toolkit_1.Checker.truthy(this._callback))\n return this._argument;\n if (!toolkit_1.Checker.truthy(this._argument))\n return undefined;\n return this._callback.callback(this._argument);\n }\n}\nexports.Appendat = Appendat;\nclass TextAppendat extends Appendat {\n _quote;\n constructor(argument, condition, callback) {\n super(argument, condition ?? true, callback);\n this._quote = false;\n }\n /**\n * Create new text appendat\n * @param argument argument\n * @param options options: { condition: condition for this arg, callback: value callback }\n */\n static create(argument, options) {\n return new TextAppendat(argument, options?.condition ?? true, new class {\n callback(data) {\n const cb = options?.callback;\n if (cb) {\n return cb(data);\n }\n return data;\n }\n });\n }\n callback(callback) {\n super.callback(callback);\n return this;\n }\n quote() {\n this._quote = true;\n return this;\n }\n argument() {\n const arg = super.argument();\n if (!toolkit_1.Checker.truthy(arg))\n return this._quote ? '\"\"' : '';\n if (this._quote) {\n return `\"${arg}\"`;\n }\n return arg;\n }\n}\nexports.TextAppendat = TextAppendat;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryCommand = void 0;\nconst command_clause_1 = require(\"../print/command_clause\");\n// import * as iconv from 'iconv-lite';\nconst toolkit_1 = require(\"../../../toolkit\");\nclass BinaryCommand {\n binary;\n constructor(binary) {\n this.binary = binary ?? [];\n }\n static make() {\n return new BinaryCommand();\n }\n static with(u8a) {\n const b = Array.from(u8a);\n return new BinaryCommand(b);\n }\n appendNumber(num) {\n this.binary.push(num);\n return this;\n }\n appendText(text, charset) {\n // const encoding = (charset ?? PsdkConst.DEF_CHARSET).toLowerCase();\n // const binary = iconv.encode(text, encoding);\n const binary = toolkit_1.FastGBK.encode(text);\n this.binary.push(...binary);\n return this;\n }\n appendU8A(u8a) {\n const b = Array.from(u8a);\n this.binary = this.binary.concat(b);\n return this;\n }\n output() {\n return new Uint8Array(this.binary);\n }\n clause() {\n const output = this.output();\n return command_clause_1.CommandClause.binary(output);\n }\n}\nexports.BinaryCommand = BinaryCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TSPLCommand = exports.CPCLCommand = exports.SingleCommand = void 0;\n/**\n * Single Command\n */\nconst appendat_1 = require(\"./appendat\");\nconst command_clause_1 = require(\"../print/command_clause\");\nconst toolkit_1 = require(\"../../../toolkit/\");\nclass SingleCommand {\n /**\n * arguments\n * @private\n */\n _arguments;\n _symbolAfterHeader;\n _symbolBetweenArguments;\n _header;\n _charset;\n constructor(symbolAfterHeader, symbolBetweenArguments, charset) {\n this._arguments = [];\n this._symbolAfterHeader = symbolAfterHeader;\n this._symbolBetweenArguments = symbolBetweenArguments;\n this._charset = charset;\n }\n get getHeader() {\n return this._header;\n }\n get symbolAfterHeader() {\n return this._symbolAfterHeader;\n }\n get symbolBetweenArguments() {\n return this._symbolBetweenArguments;\n }\n header(header) {\n this._header = header;\n return this;\n }\n get charset() {\n return this._charset;\n }\n append(appendat) {\n if (!appendat.condition)\n return this;\n const argument = appendat.argument();\n if (!toolkit_1.Checker.truthy(argument))\n return this;\n this._arguments.push(argument);\n return this;\n }\n arguments() {\n return this._arguments;\n }\n}\nexports.SingleCommand = SingleCommand;\nclass BasicStringSingleCommand extends SingleCommand {\n constructor(symbolAfterHeader, symbolBetweenArguments, charset) {\n super(symbolAfterHeader, symbolBetweenArguments, charset);\n }\n append(appendat) {\n const argument = appendat.argument();\n if (!toolkit_1.Checker.truthy(argument))\n return this;\n super.append(appendat);\n return this;\n }\n appendText(text) {\n return this.append(appendat_1.TextAppendat.create(text ?? '', {}));\n }\n appendNumber(num) {\n if (isNaN(num))\n return this;\n return this.append(appendat_1.TextAppendat.create((num ?? '').toString(), {}));\n }\n output() {\n let ret = '';\n if (toolkit_1.Checker.truthy(super.getHeader)) {\n ret += super.getHeader;\n ret += super.symbolAfterHeader;\n }\n const args = super.arguments();\n const len = args.length;\n let seq = 0;\n for (const arg of args) {\n seq += 1;\n if (!toolkit_1.Checker.truthy(arg))\n continue;\n ret += arg;\n if (seq < len) {\n ret += super.symbolBetweenArguments;\n }\n }\n return ret;\n }\n clause() {\n const output = this.output();\n if (!toolkit_1.Checker.truthy(output)) {\n return command_clause_1.CommandClause.none();\n }\n return command_clause_1.CommandClause.text(output, super.charset);\n }\n}\nclass CPCLCommand extends BasicStringSingleCommand {\n constructor(header, charset) {\n super(' ', ' ', charset);\n super.header(header);\n }\n static with(header, charset) {\n return new CPCLCommand(header, charset);\n }\n append(appendat) {\n super.append(appendat);\n return this;\n }\n appendText(text) {\n super.appendText(text);\n return this;\n }\n appendNumber(num) {\n super.appendNumber(num);\n return this;\n }\n}\nexports.CPCLCommand = CPCLCommand;\nclass TSPLCommand extends BasicStringSingleCommand {\n constructor(header, charset) {\n super(' ', ',', charset);\n super.header(header);\n }\n static with(header, charset) {\n return new TSPLCommand(header, charset);\n }\n append(appendat) {\n super.append(appendat);\n return this;\n }\n appendText(text) {\n super.appendText(text);\n return this;\n }\n appendNumber(num) {\n super.appendNumber(num);\n return this;\n }\n}\nexports.TSPLCommand = TSPLCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataWriteOperation = void 0;\n/**\n * Data write operation\n */\nconst types_1 = require(\"../types\");\nconst adapter_1 = require(\"../../device/adapter\");\nconst toolkit_1 = require(\"../../toolkit\");\nclass DataWriteOperation {\n options;\n binary;\n connectedDevice;\n constructor(\n /**\n * Write options\n * @private\n */\n options, \n /**\n * Write binary\n * @private\n */\n binary, \n /**\n * Connected device\n * @private\n */\n connectedDevice) {\n this.options = options;\n this.binary = binary;\n this.connectedDevice = connectedDevice;\n }\n async write() {\n if (!this.options.enableChunkWrite) {\n const reporter = await this.writData(this.binary);\n this.doCallback(reporter, this.binary, 1, 1);\n return reporter;\n }\n const writeData = Array.from(this.binary);\n const parts = toolkit_1.CollectionKit.split(writeData, this.options.chunkSize);\n const totalTimes = parts.length;\n let currentTimes = 0;\n for (const part of parts) {\n currentTimes += 1;\n const partBinary = new Uint8Array(part);\n const reporter = await this.writData(partBinary);\n const control = this.doCallback(reporter, partBinary, currentTimes, totalTimes);\n if (control == types_1.WriteControl.STOP) {\n reporter.controlExit = true;\n return reporter;\n }\n if (!reporter.ok) {\n return reporter;\n }\n }\n return new adapter_1.WroteReporter(true, this.binary, false);\n }\n doCallback(reporter, binary, currentTimes, totalTimes) {\n const callback = this.options.callback;\n if (!callback)\n return types_1.WriteControl.CONTINUE;\n const dataWrote = new types_1.DataWrote(binary, currentTimes, totalTimes);\n if (reporter.ok) {\n return callback.success(dataWrote);\n }\n if (callback.failed) {\n callback.failed(dataWrote, reporter.exception);\n }\n else {\n console.log('no custom failed callback, full exception: ', reporter.exception);\n }\n return types_1.WriteControl.STOP;\n }\n async writData(binary) {\n try {\n await this.connectedDevice.write(binary);\n return new adapter_1.WroteReporter(true, binary, false);\n }\n catch (e) {\n return new adapter_1.WroteReporter(false, binary, false, e);\n }\n }\n}\nexports.DataWriteOperation = DataWriteOperation;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./args\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./command\"), exports);\n__exportStar(require(\"./PSDK\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HexOutput = void 0;\nconst DEF_MAX_LENGTH_OF_LINE = 32;\n/**\n * hex output\n */\nclass HexOutput {\n enableFormat;\n spacing;\n maxLengthOfLine;\n // private format: boolean;\n //\n // private spacing: boolean;\n //\n // private maxLengthOfLine: number = DEF_MAX_LENGTH_OF_LINE;\n constructor(\n /**\n * Is format\n */\n enableFormat, \n /**\n * Enable spacing between byte\n */\n spacing, \n /**\n * Max length of line\n */\n maxLengthOfLine = DEF_MAX_LENGTH_OF_LINE) {\n this.enableFormat = enableFormat;\n this.spacing = spacing;\n this.maxLengthOfLine = maxLengthOfLine;\n }\n static def() {\n return new HexOutput(false, false, DEF_MAX_LENGTH_OF_LINE);\n }\n static simple(format = true) {\n return new HexOutput(format, true, DEF_MAX_LENGTH_OF_LINE);\n }\n static formatWithMaxLength(maxLengthOfLine) {\n return new HexOutput(true, true, maxLengthOfLine);\n }\n /**\n * Format binary\n */\n format(binary) {\n // const hex = toHex(binary);\n const hex = Array.from(binary, function (byte) {\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n }).join('');\n if (!this.enableFormat) {\n return hex;\n }\n let fmted = '';\n const textLength = hex.length;\n let lineIndex = 0;\n for (let ix = 0; ix < textLength; ix++) {\n const seq = ix + 1;\n const v = hex[ix];\n fmted += v;\n if (seq % 2 == 0 && this.spacing) {\n if (seq < textLength) {\n if (lineIndex + 1 < this.maxLengthOfLine) {\n fmted += ' ';\n }\n lineIndex += 1;\n }\n }\n if (lineIndex >= this.maxLengthOfLine) {\n fmted += '\\n';\n lineIndex = 0;\n }\n }\n return fmted;\n }\n}\nexports.HexOutput = HexOutput;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./psdk_const\"), exports);\n__exportStar(require(\"./hex_output\"), exports);\n__exportStar(require(\"./write\"), exports);\n__exportStar(require(\"./lifecycle\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Lifecycle = void 0;\nclass Lifecycle {\n connectedDevice;\n constructor(\n /**\n * Connected device\n */\n connectedDevice) {\n this.connectedDevice = connectedDevice;\n }\n}\nexports.Lifecycle = Lifecycle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PsdkConst = void 0;\nconst toolkit_1 = require(\"../../toolkit\");\nconst CR = '\\r';\nconst LF = '\\n';\nconst CRLF = `${CR}${LF}`;\n/**\n * constants\n */\nexports.PsdkConst = {\n DEF_CHARSET: 'gbk',\n CR,\n LF,\n CRLF,\n QUOTE: '\"',\n DEF_NEWLINE_BINARY: toolkit_1.ByteKit.textToU8A(CRLF),\n DEF_AUTHORS: ['fewensa <osuni@protonmail.com>'],\n DEF_ENABLED_NEWLINE: true,\n DEF_WRITE_CHUNK_SIZE: 512,\n EMPTY_BYTES: new Uint8Array([]),\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WriteControl = exports.DataWrote = exports.DataWrite = exports.IDataWriteCallback = exports.WriteOptions = void 0;\nconst psdk_const_1 = require(\"./psdk_const\");\n/**\n * Write to device options\n */\nclass WriteOptions {\n enableChunkWrite;\n chunkSize;\n callback;\n constructor(\n /**\n * Enable data splitting\n */\n enableChunkWrite = true, \n /**\n * Part size\n */\n chunkSize = psdk_const_1.PsdkConst.DEF_WRITE_CHUNK_SIZE, \n /**\n * Data write callback\n */\n callback) {\n this.enableChunkWrite = enableChunkWrite;\n this.chunkSize = chunkSize;\n this.callback = callback;\n }\n static def() {\n return new WriteOptions(true, psdk_const_1.PsdkConst.DEF_WRITE_CHUNK_SIZE, undefined);\n }\n}\nexports.WriteOptions = WriteOptions;\n/**\n * Data write callback\n */\nclass IDataWriteCallback {\n failed(data, exception) {\n console.error(`Write data failed: ${exception.message}`);\n }\n}\nexports.IDataWriteCallback = IDataWriteCallback;\n/**\n * Data write\n */\nclass DataWrite {\n binary;\n currentTimes;\n totalTimes;\n constructor(\n /**\n * Wrote binary\n */\n binary, \n /**\n * Write current times\n */\n currentTimes, \n /**\n * Write total times\n */\n totalTimes) {\n this.binary = binary;\n this.currentTimes = currentTimes;\n this.totalTimes = totalTimes;\n }\n}\nexports.DataWrite = DataWrite;\n/**\n * Data wrote\n */\nclass DataWrote extends DataWrite {\n}\nexports.DataWrote = DataWrote;\n/**\n * Write control\n */\nvar WriteControl;\n(function (WriteControl) {\n WriteControl[\"CONTINUE\"] = \"CONTINUE\";\n WriteControl[\"STOP\"] = \"STOP\";\n})(WriteControl || (exports.WriteControl = WriteControl = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./device/adapter\"), exports);\n__exportStar(require(\"./father\"), exports);\n__exportStar(require(\"./toolkit\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Base64 = exports.extendBuiltins = exports.extendUint8Array = exports.extendString = exports.toUint8Array = exports.fromUint8Array = exports.isValid = exports.decode = exports.btou = exports.encodeURL = exports.encodeURI = exports.encode = exports.utob = exports.toBase64 = exports.fromBase64 = exports.btoaPolyfill = exports.btoa = exports.atobPolyfill = exports.atob = exports.VERSION = exports.version = void 0;\n// https://github.com/dankogai/js-base64/blob/main/base64.ts\n/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\nexports.version = version;\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nexports.VERSION = VERSION;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\nexports.btoaPolyfill = btoaPolyfill;\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nexports.btoa = _btoa;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\nexports.fromUint8Array = fromUint8Array;\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\nexports.utob = utob;\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\nexports.toBase64 = encode;\nexports.encode = encode;\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\nexports.encodeURI = encodeURI;\nexports.encodeURL = encodeURI;\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\nexports.btou = btou;\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\nexports.atobPolyfill = atobPolyfill;\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\nexports.atob = _atob;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\nexports.toUint8Array = toUint8Array;\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\nexports.fromBase64 = decode;\nexports.decode = decode;\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\nexports.isValid = isValid;\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\nexports.extendString = extendString;\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\nexports.extendUint8Array = extendUint8Array;\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nexports.extendBuiltins = extendBuiltins;\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\nexports.Base64 = gBase64;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ByteKit = void 0;\nconst checker_1 = require(\"./checker\");\n/**\n * Byte kit\n */\nclass ByteKit {\n /**\n * Text to byte\n * @param text text\n */\n static textToU8A(text) {\n if (!checker_1.Checker.truthy(text))\n return new Uint8Array([]);\n let bytes = [];\n let len, c;\n len = text.length;\n for (let i = 0; i < len; i++) {\n c = text.charCodeAt(i);\n if (c >= 0x010000 && c <= 0x10FFFF) {\n bytes.push(((c >> 18) & 0x07) | 0xF0);\n bytes.push(((c >> 12) & 0x3F) | 0x80);\n bytes.push(((c >> 6) & 0x3F) | 0x80);\n bytes.push((c & 0x3F) | 0x80);\n }\n else if (c >= 0x000800 && c <= 0x00FFFF) {\n bytes.push(((c >> 12) & 0x0F) | 0xE0);\n bytes.push(((c >> 6) & 0x3F) | 0x80);\n bytes.push((c & 0x3F) | 0x80);\n }\n else if (c >= 0x000080 && c <= 0x0007FF) {\n bytes.push(((c >> 6) & 0x1F) | 0xC0);\n bytes.push((c & 0x3F) | 0x80);\n }\n else {\n bytes.push(c & 0xFF);\n }\n }\n return new Uint8Array(bytes);\n }\n}\nexports.ByteKit = ByteKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Checker = void 0;\nclass Checker {\n static truthy(value) {\n if (value === undefined)\n return false;\n if (value === null)\n return false;\n if (value === '')\n return false;\n const t = typeof value;\n switch (t) {\n case 'number':\n if (isNaN(value))\n return false;\n break;\n case 'bigint':\n default:\n return true;\n }\n }\n static empty(value) {\n if (!Checker.truthy(value))\n return true;\n return value.length === 0;\n }\n}\nexports.Checker = Checker;\n","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FastGBK = void 0;\n// https://github.com/EtherDream/str2gbk/blob/main/index.js\nlet table;\nfunction initGbkTable() {\n // https://en.wikipedia.org/wiki/GBK_(character_encoding)#Encoding\n const ranges = [\n [0xA1, 0xA9, 0xA1, 0xFE],\n [0xB0, 0xF7, 0xA1, 0xFE],\n [0x81, 0xA0, 0x40, 0xFE],\n [0xAA, 0xFE, 0x40, 0xA0],\n [0xA8, 0xA9, 0x40, 0xA0],\n [0xAA, 0xAF, 0xA1, 0xFE],\n [0xF8, 0xFE, 0xA1, 0xFE],\n [0xA1, 0xA7, 0x40, 0xA0],\n ];\n const codes = new Uint16Array(23940);\n let i = 0;\n for (const [b1Begin, b1End, b2Begin, b2End] of ranges) {\n for (let b2 = b2Begin; b2 <= b2End; b2++) {\n if (b2 !== 0x7F) {\n for (let b1 = b1Begin; b1 <= b1End; b1++) {\n codes[i++] = b2 << 8 | b1;\n }\n }\n }\n }\n table = new Uint16Array(65536);\n table.fill(0xFFFF);\n const str = new TextDecoder('gbk').decode(codes);\n for (let i = 0; i < str.length; i++) {\n table[str.charCodeAt(i)] = codes[i];\n }\n}\n// const NodeJsBufAlloc = typeof Buffer === 'function' && Buffer.allocUnsafe\n//\n// const defaultOnAlloc = NodeJsBufAlloc\n// ? (len) => NodeJsBufAlloc(len)\n// : (len) => new Uint8Array(len)\nconst defaultOnAlloc = (len) => new Uint8Array(len);\nconst defaultOnError = () => 63; // '?'\nconst gbkDecoder = new TextDecoder('gbk');\nclass FastGBK {\n static decode(buffer) {\n return gbkDecoder.decode(buffer);\n }\n static encode(text, options) {\n if (!table) {\n initGbkTable();\n }\n const onAlloc = options?.onAlloc ?? defaultOnAlloc;\n const onError = options?.onError ?? defaultOnError;\n const buf = onAlloc(text.length * 2);\n let n = 0;\n for (let i = 0; i < text.length; i++) {\n const code = text.charCodeAt(i);\n if (code < 0x80) {\n buf[n++] = code;\n continue;\n }\n const gbk = table[code];\n if (gbk !== 0xFFFF) {\n buf[n++] = gbk;\n buf[n++] = gbk >> 8;\n }\n else if (code === 8364) {\n // 8364 == '€'.charCodeAt(0)\n // Code Page 936 has a single-byte euro sign at 0x80\n buf[n++] = 0x80;\n }\n else {\n const ret = onError(i, text);\n if (ret === -1) {\n break;\n }\n if (ret > 0xFF) {\n buf[n++] = ret;\n buf[n++] = ret >> 8;\n }\n else {\n buf[n++] = ret;\n }\n }\n }\n return buf.subarray(0, n);\n }\n}\nexports.FastGBK = FastGBK;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./byte\"), exports);\n__exportStar(require(\"./pvariable\"), exports);\n__exportStar(require(\"./pcollection\"), exports);\n__exportStar(require(\"./pimage\"), exports);\n__exportStar(require(\"./checker\"), exports);\n__exportStar(require(\"./gbk\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CollectionKit = void 0;\nconst checker_1 = require(\"./checker\");\n/**\n * Collection kit\n */\nclass CollectionKit {\n /**\n * Split array\n *\n * @param colls collections\n * @param size The size of result array\n * @return List\n */\n static split(colls, size) {\n if (checker_1.Checker.empty(colls))\n return [];\n if (size <= 0)\n throw new Error('The size must > 0');\n const rets = [];\n let items = [];\n for (const coll of colls) {\n items.push(coll);\n if (size == items.length) {\n rets.push(items);\n items = [];\n }\n }\n if (0 != items.length)\n rets.push(items);\n return rets;\n }\n /**\n * Part array\n *\n * @param colls collections\n * @param parts Part length\n * @return List\n */\n static parts(colls, parts) {\n if (checker_1.Checker.empty(colls)) {\n return [];\n }\n if (parts <= 0)\n throw new Error('The parts length must > 0');\n if (colls.length <= parts) {\n return [colls];\n }\n const rets = [];\n let items = [];\n const pnum = Math.floor(colls.length / parts);\n for (const coll of colls) {\n items.push(coll);\n if (items.length == pnum) {\n rets.push(items);\n if (rets.length < parts)\n items = [];\n }\n }\n return rets;\n }\n}\nexports.CollectionKit = CollectionKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImageKit = void 0;\n/**\n * Image kit\n */\nclass ImageKit {\n /**\n * process image\n * @param canvas canvas\n * @param width width\n * @param height height\n */\n static processImage(canvas, width, height) {\n const ctx = canvas.getContext('2d');\n let eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1));\n let currentHeight = 0;\n let index = 0;\n const area = height * eWidth;\n const bytes = []; // the bytes length is equals `area`\n for (let b1 = 0; b1 < area; b1++) {\n bytes[b1] = 0;\n }\n const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n while (currentHeight < height) {\n // let rowData = []; // the row data length is image height\n let eightBitIndex = 0;\n for (let x = 0; x < width; x++) {\n eightBitIndex++;\n if (eightBitIndex > 8) {\n eightBitIndex = 1;\n index++;\n }\n const n = 1 << 8 - eightBitIndex;\n // const pixel = ctx.getImageData(x, currentHeight, 1, 1);\n const pixels = ImageKit.fastExtractPixel(imgData, x, currentHeight, 1, 1);\n const pixel = pixels[0];\n // const rgba = pixel.data;\n const red = pixel[0];\n const green = pixel[1];\n const blue = pixel[2];\n if ((red + green + blue) / 3 < 128) {\n bytes[index] = (bytes[index] | n);\n }\n }\n index = eWidth * (currentHeight + 1);\n currentHeight += 1;\n }\n return new Uint8Array(bytes);\n }\n static fastExtractPixel(imageData, x, y, w, h) {\n let i, j;\n let result = [];\n let r, g, b, a;\n const data = imageData.data;\n for (j = 0; j < h; j++) {\n let idx = (x + (y + j) * imageData.width) * 4; // get left most byte index for row at y + j\n for (i = 0; i < w; i++) {\n r = data[idx++];\n g = data[idx++];\n b = data[idx++];\n a = data[idx++];\n // do the processing\n result.push([r, g, b, a]);\n }\n }\n return result;\n }\n}\nexports.ImageKit = ImageKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PVariableKit = void 0;\nconst checker_1 = require(\"./checker\");\nclass PVariableKit {\n /**\n * Replace variable\n * @param text text\n * @param variable variable\n */\n static replace(text, variable) {\n if (!checker_1.Checker.truthy(text))\n return text;\n if (!checker_1.Checker.truthy(variable))\n return text;\n if (text.indexOf('{{') < 0 && text.indexOf('}}') < 0)\n return text;\n const regx = /[\\\\]?\\{\\{(?<varx>.*?)}}/gm;\n const tmpMark = '__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__';\n while (true) {\n const match = regx.exec(text);\n if (match == null)\n break;\n const originDefined = match[0];\n const originVarx = originDefined.replace('{{', '')\n .replace('}}', '');\n const varName = originVarx.trim();\n const varValue = variable.get(varName) ?? '';\n if (originDefined.startsWith('\\\\')) {\n const tmpDefined = originDefined.replace('\\\\{{', tmpMark);\n text = text.replace(originDefined, tmpDefined);\n continue;\n }\n text = text.replace(originDefined, varValue);\n }\n text = text.replace(new RegExp(tmpMark, 'g'), '{{');\n return text;\n }\n}\nexports.PVariableKit = PVariableKit;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeviceFilter = exports.WebusbReadOptions = exports.Webusb = void 0;\nconst frame_father_1 = require(\"@psdk/frame-father\");\nclass Webusb {\n filters;\n configuration;\n interface;\n readEndpoint;\n writeEndpoint;\n inputReadEndpoint;\n inputWriteEndpoint;\n state;\n device;\n constructor(options) {\n if (options.filters.length == 0) {\n throw new Error('Missing filters');\n }\n this.filters = options.filters;\n this.configuration = options.configuration ?? 1;\n this.interface = options.interface ?? 0;\n this.state = frame_father_1.ConnectionState.DISCONNECTED;\n this.inputReadEndpoint = options.readEndpoint ?? 2;\n this.inputWriteEndpoint = options.writeEndpoint ?? 2;\n }\n static withFilter(filter) {\n return this.withFilters([filter]);\n }\n static withFilters(filters) {\n return new Webusb({ filters });\n }\n async connect() {\n // @ts-ignore\n if (!navigator.usb) {\n throw new Error('Your browser not support webusb');\n }\n // @ts-ignore\n const device = await navigator.usb.requestDevice({\n filters: this.filters,\n });\n if (!device)\n throw new Error('Failed to get device');\n await device.open();\n await device.selectConfiguration(this.configuration);\n await device.claimInterface(device.configuration.interfaces[this.interface].interfaceNumber);\n const alternates = device.configuration.interfaces[0].alternates[0];\n const inEndpoints = alternates.endpoints.filter(endpoint => endpoint.direction === 'in');\n const outEndpoints = alternates.endpoints.filter(endpoint => endpoint.direction === 'out');\n this.readEndpoint = inEndpoints && inEndpoints.length ? inEndpoints[0].endpointNumber : this.inputReadEndpoint;\n this.writeEndpoint = outEndpoints && outEndpoints.length ? outEndpoints[0].endpointNumber : this.inputWriteEndpoint;\n this.state = frame_father_1.ConnectionState.CONNECTED;\n // @ts-ignore\n navigator.usb.addEventListener('connect', e => {\n this.state = frame_father_1.ConnectionState.CONNECTED;\n });\n // @ts-ignore\n navigator.usb.addEventListener('disconnect', e => {\n this.state = frame_father_1.ConnectionState.DISCONNECTED;\n });\n this.device = device;\n return await this.connectedDevice();\n }\n async connectedDevice() {\n const _device = () => this.device;\n const _connectionState = () => this.state;\n const _readEndpoint = () => this.readEndpoint;\n const _writeEndpoint = () => this.writeEndpoint;\n return new class {\n origin() {\n return _device();\n }\n connectionState() {\n const device = _device();\n if (!device.opened) {\n return frame_father_1.ConnectionState.DISCONNECTED;\n }\n return _connectionState();\n }\n deviceName() {\n const device = _device();\n return device.productName;\n }\n async disconnect() {\n // todo: disconnect webusb\n }\n canRead() {\n return true;\n }\n async read(options) {\n const device = _device();\n const _options = options ?? WebusbReadOptions.def();\n const result = await device.transferIn(_readEndpoint(), _options.readLength);\n const { status, data } = result;\n if (status != 'ok') {\n throw new Error(`[${status}]: Failed to read data. about status code you can read this https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult`);\n }\n const arrs = [];\n const len = data.byteLength;\n for (let i = 0; i < len; i++) {\n arrs.push(data.getUint8(i));\n }\n return new Uint8Array(arrs);\n }\n async write(data) {\n const device = _device();\n await device.transferOut(_writeEndpoint(), data);\n }\n flush() {\n }\n };\n }\n}\nexports.Webusb = Webusb;\nclass WebusbReadOptions extends frame_father_1.ReadOptions {\n _length;\n constructor(options) {\n super(options);\n this._length = options?.length ?? 1024;\n }\n static def() {\n return new WebusbReadOptions();\n }\n get readLength() {\n return this._length;\n }\n}\nexports.WebusbReadOptions = WebusbReadOptions;\nclass DeviceFilter {\n vendorId;\n productId;\n constructor(options) {\n this.vendorId = options.vendorId;\n this.productId = options.productId;\n }\n}\nexports.DeviceFilter = DeviceFilter;\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","names":["Object","defineProperty","exports","value","FakeConnectedDevice","types_1","__webpack_require__","father_1","origin","connectionState","ConnectionState","CONNECTED","deviceName","disconnect","canRead","read","options","PsdkConst","EMPTY_BYTES","write","data","console","log","flush","__createBinding","this","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","__exportStar","p","prototype","hasOwnProperty","call","ReadOptions","WroteReporter","ok","binary","controlExit","exception","constructor","timeout","PSDK","write_operation_1","sversion","authors","DEF_AUTHORS","raw","commander","pushArg","variable","name","command","clear","connectedDevice","Error","WriteOptions","def","operation","DataWriteOperation","reporter","newline","push","BasicArg","DEF_ENABLED_NEWLINE","OnlyTextHeaderArg","OnlyBinaryHeaderArg","EasyArg","arg_1","command_1","prependClauses","appendClauses","super","append","arg","clauses","prepend","clause","currentClauses","type","ClauseType","NONE","CommandClause","splice","length","header","text","RawMode","Raw","easy_1","_mode","_text","_charset","_binary","_newline","TEXT","charset","DEF_CHARSET","BINARY","none","DefaultCommand","BasicCommand","base64_1","command_clause_1","toolkit_1","base64","Base64","fromUint8Array","bytes","t","PVariableKit","replace","t_buffer","FastGBK","encode","t_binary","Array","slice","concat","NEWLINE","b","from","Uint8Array","hex","output","HexOutput","format","string","decode","_type","DEF_NEWLINE_BINARY","Commander","_variable","Map","make","pushText","startsWith","CRLF","substring","pushClause","pushBinary","pushClauses","forEach","item","set","TextAppendat","Appendat","_argument","_condition","_callback","argument","condition","callback","quote","Checker","truthy","_quote","cb","BinaryCommand","u8a","appendNumber","num","appendText","appendU8A","TSPLCommand","CPCLCommand","SingleCommand","appendat_1","_arguments","_symbolAfterHeader","_symbolBetweenArguments","_header","symbolAfterHeader","symbolBetweenArguments","getHeader","appendat","arguments","BasicStringSingleCommand","isNaN","toString","ret","args","len","seq","adapter_1","enableChunkWrite","writData","doCallback","writeData","parts","CollectionKit","split","chunkSize","totalTimes","currentTimes","part","partBinary","control","WriteControl","STOP","CONTINUE","dataWrote","DataWrote","success","failed","e","DEF_MAX_LENGTH_OF_LINE","enableFormat","spacing","maxLengthOfLine","simple","formatWithMaxLength","byte","join","fmted","textLength","lineIndex","ix","v","Lifecycle","CR","LF","QUOTE","ByteKit","textToU8A","DEF_WRITE_CHUNK_SIZE","DataWrite","IDataWriteCallback","psdk_const_1","error","message","extendBuiltins","extendUint8Array","extendString","toUint8Array","isValid","btou","encodeURL","encodeURI","utob","toBase64","fromBase64","btoaPolyfill","btoa","atobPolyfill","atob","VERSION","version","_hasBuffer","Buffer","_TD","TextDecoder","_TE","TextEncoder","b64ch","b64chs","b64tab","a","tab","c","i","b64re","_fromCC","String","fromCharCode","bind","_U8Afrom","it","_mkUriSafe","src","m0","_tidyB64","s","bin","u32","c0","c1","c2","asc","pad","charCodeAt","TypeError","_btoa","_fromUint8Array","maxargs","strs","l","apply","subarray","urlsafe","cb_utob","cc","re_utob","u","_encode","re_btou","cb_btou","cccc","cp","offset","test","u24","r1","r2","charAt","_atob","_toUint8Array","map","_unURI","_decode","_noEnum","_add","body","gBase64","checker_1","empty","table","initGbkTable","ranges","codes","Uint16Array","b1Begin","b1End","b2Begin","b2End","b2","b1","fill","str","defaultOnAlloc","defaultOnError","gbkDecoder","buffer","onAlloc","onError","buf","n","code","gbk","colls","size","rets","items","coll","pnum","Math","floor","ImageKit","processImage","canvas","width","height","ctx","getContext","eWidth","currentHeight","index","area","imgData","getImageData","eightBitIndex","x","pixels","fastExtractPixel","pixel","red","green","blue","imageData","y","w","h","j","result","r","g","idx","indexOf","regx","tmpMark","match","exec","originDefined","originVarx","varName","trim","varValue","tmpDefined","RegExp","__webpack_module_cache__","moduleId","cachedModule","module","threw","__webpack_modules__","ab","__dirname","DeviceFilter","WebusbReadOptions","Webusb","frame_father_1","filters","configuration","interface","readEndpoint","writeEndpoint","inputReadEndpoint","inputWriteEndpoint","state","device","DISCONNECTED","withFilter","filter","withFilters","connect","navigator","usb","requestDevice","open","selectConfiguration","claimInterface","interfaces","interfaceNumber","alternates","inEndpoints","endpoints","endpoint","direction","outEndpoints","endpointNumber","addEventListener","_device","_connectionState","_readEndpoint","_writeEndpoint","opened","productName","_options","transferIn","readLength","status","arrs","byteLength","getUint8","transferOut","_length","vendorId","productId"],"sources":["../../../frame/father/build/device/adapter/connected_device.js","../../../frame/father/build/device/adapter/index.js","../../../frame/father/build/device/adapter/types.js","../../../frame/father/build/father/PSDK.js","../../../frame/father/build/father/args/arg.js","../../../frame/father/build/father/args/common/easy.js","../../../frame/father/build/father/args/common/raw.js","../../../frame/father/build/father/args/index.js","../../../frame/father/build/father/command/index.js","../../../frame/father/build/father/command/print/command.js","../../../frame/father/build/father/command/print/command_clause.js","../../../frame/father/build/father/command/print/commander.js","../../../frame/father/build/father/command/single/appendat.js","../../../frame/father/build/father/command/single/binary_command.js","../../../frame/father/build/father/command/single/single_command.js","../../../frame/father/build/father/device/write_operation.js","../../../frame/father/build/father/index.js","../../../frame/father/build/father/types/hex_output.js","../../../frame/father/build/father/types/index.js","../../../frame/father/build/father/types/lifecycle.js","../../../frame/father/build/father/types/psdk_const.js","../../../frame/father/build/father/types/write.js","../../../frame/father/build/index.js","../../../frame/father/build/toolkit/base64.js","../../../frame/father/build/toolkit/byte.js","../../../frame/father/build/toolkit/checker.js","../../../frame/father/build/toolkit/gbk.js","../../../frame/father/build/toolkit/index.js","../../../frame/father/build/toolkit/pcollection.js","../../../frame/father/build/toolkit/pimage.js","../../../frame/father/build/toolkit/pvariable.js","../webpack/bootstrap","../webpack/runtime/compat",".././build/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FakeConnectedDevice = void 0;\n/**\n * Connected device\n */\nconst types_1 = require(\"./types\");\nconst father_1 = require(\"../../father\");\n/**\n * Fake connected device\n */\nclass FakeConnectedDevice {\n origin() {\n return \"FAKE-DEVICE\";\n }\n connectionState() {\n return types_1.ConnectionState.CONNECTED;\n }\n deviceName() {\n return \"FAKE-DEVICE\";\n }\n async disconnect() {\n }\n canRead() {\n return true;\n }\n async read(options) {\n return father_1.PsdkConst.EMPTY_BYTES;\n }\n async write(data) {\n console.log('WRITE: ', data);\n }\n flush() {\n }\n}\nexports.FakeConnectedDevice = FakeConnectedDevice;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./connected_device\"), exports);\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadOptions = exports.WroteReporter = exports.ConnectionState = void 0;\n/**\n * Connection state\n */\nvar ConnectionState;\n(function (ConnectionState) {\n /**\n * connected\n */\n ConnectionState[\"CONNECTED\"] = \"CONNECTED\";\n /**\n * disconnect\n */\n ConnectionState[\"DISCONNECTED\"] = \"DISCONNECTED\";\n})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));\n/**\n * Wrote reporter\n */\nclass WroteReporter {\n ok;\n binary;\n controlExit;\n exception;\n constructor(\n /**\n * Wrote is ok\n */\n ok, \n /**\n * Wrote data\n */\n binary, \n /**\n * control exit\n */\n controlExit, \n /**\n * exception\n */\n exception) {\n this.ok = ok;\n this.binary = binary;\n this.controlExit = controlExit;\n this.exception = exception;\n }\n}\nexports.WroteReporter = WroteReporter;\n/**\n * Read options\n */\nclass ReadOptions {\n timeout;\n constructor(options) {\n this.timeout = options?.timeout;\n }\n}\nexports.ReadOptions = ReadOptions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PSDK = void 0;\nconst types_1 = require(\"./types\");\nconst write_operation_1 = require(\"./device/write_operation\");\nclass PSDK {\n /**\n * sdk version\n */\n sversion() {\n return '0.2.67';\n }\n /**\n * authors\n */\n authors() {\n return types_1.PsdkConst.DEF_AUTHORS;\n }\n /**\n * Push raw command\n * @param raw raw\n */\n raw(raw) {\n this.commander().pushArg(raw);\n return this;\n }\n /**\n * Put variable\n * @param name name\n * @param value value\n */\n variable(name, value) {\n this.commander().variable(name, value);\n return this;\n }\n /**\n * get command\n */\n command() {\n return this.commander().command();\n }\n /**\n * Clear command\n */\n clear() {\n this.commander().clear();\n return this;\n }\n /**\n * Write data to device\n */\n async write(options) {\n const connectedDevice = this.connectedDevice();\n if (!connectedDevice)\n throw Error('It\\'s seems you missing to set connectedDevice');\n options = options ?? types_1.WriteOptions.def();\n const command = this.command();\n const binary = command.binary();\n const operation = new write_operation_1.DataWriteOperation(options, binary, connectedDevice);\n const reporter = await operation.write();\n this.clear();\n return reporter;\n }\n /**\n * Newline command\n */\n newline() {\n this.commander().newline();\n return this;\n }\n /**\n * Push command\n * @param command\n */\n push(command) {\n this.commander().pushArg(command);\n return this;\n }\n}\nexports.PSDK = PSDK;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BasicArg = void 0;\nconst types_1 = require(\"../types\");\nclass BasicArg {\n newline() {\n return types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n }\n}\nexports.BasicArg = BasicArg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OnlyTextHeaderArg = exports.OnlyBinaryHeaderArg = exports.EasyArg = void 0;\nconst arg_1 = require(\"../arg\");\nconst command_1 = require(\"../../command\");\n/**\n * Easy argument abstract class\n */\nclass EasyArg extends arg_1.BasicArg {\n prependClauses;\n appendClauses;\n constructor() {\n super();\n this.prependClauses = [];\n this.appendClauses = [];\n }\n /**\n * Append another argument for this clause\n * @param arg\n */\n append(arg) {\n this.appendClauses.push(...arg.clauses());\n return this;\n }\n /**\n * Prepend another argument for this clause\n * @param arg\n */\n prepend(arg) {\n this.prependClauses.push(...arg.clauses());\n return this;\n }\n /**\n * Get current command clauses\n */\n clauses() {\n const clause = this.clause();\n const currentClauses = [];\n if (clause.type !== command_1.ClauseType.NONE) {\n currentClauses.push(clause);\n if (this.newline()) {\n currentClauses.push(command_1.CommandClause.newline());\n }\n }\n return [\n ...this.prependClauses,\n ...currentClauses,\n ...this.appendClauses,\n ];\n }\n clear() {\n this.prependClauses.splice(0, this.prependClauses.length);\n this.appendClauses.splice(0, this.appendClauses.length);\n }\n}\nexports.EasyArg = EasyArg;\nclass OnlyBinaryHeaderArg extends EasyArg {\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n return command_1.CommandClause.binary(this.header());\n }\n newline() {\n return false;\n }\n}\nexports.OnlyBinaryHeaderArg = OnlyBinaryHeaderArg;\nclass OnlyTextHeaderArg extends EasyArg {\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n return command_1.CommandClause.text(this.header());\n }\n}\nexports.OnlyTextHeaderArg = OnlyTextHeaderArg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RawMode = exports.Raw = void 0;\nconst easy_1 = require(\"./easy\");\nconst command_1 = require(\"../../command\");\nconst types_1 = require(\"../../types\");\nclass Raw extends easy_1.EasyArg {\n _mode;\n _text;\n _charset;\n _binary;\n _newline = types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n constructor() {\n super();\n }\n static text(text, options) {\n const raw = new Raw();\n raw._mode = RawMode.TEXT;\n raw._text = text;\n raw._charset = options?.charset ?? types_1.PsdkConst.DEF_CHARSET;\n raw._newline = options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n return raw;\n }\n static binary(binary, options) {\n const raw = new Raw();\n raw._mode = RawMode.BINARY;\n raw._binary = binary;\n raw._charset = options?.charset ?? types_1.PsdkConst.DEF_CHARSET;\n raw._newline = options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE;\n return raw;\n }\n append(arg) {\n super.append(arg);\n return this;\n }\n prepend(arg) {\n super.prepend(arg);\n return this;\n }\n clause() {\n let clause;\n switch (this._mode) {\n case RawMode.TEXT:\n clause = command_1.CommandClause.text(this._text, this._charset);\n break;\n case RawMode.BINARY:\n clause = command_1.CommandClause.binary(this._binary);\n break;\n default:\n clause = command_1.CommandClause.none();\n break;\n }\n return clause;\n }\n header() {\n return types_1.PsdkConst.EMPTY_BYTES;\n }\n newline() {\n return this._newline;\n }\n}\nexports.Raw = Raw;\nvar RawMode;\n(function (RawMode) {\n RawMode[\"BINARY\"] = \"BINARY\";\n RawMode[\"TEXT\"] = \"TEXT\";\n})(RawMode || (exports.RawMode = RawMode = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./arg\"), exports);\n__exportStar(require(\"./common/easy\"), exports);\n__exportStar(require(\"./common/raw\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./print/command\"), exports);\n__exportStar(require(\"./print/commander\"), exports);\n__exportStar(require(\"./print/command_clause\"), exports);\n__exportStar(require(\"./single/appendat\"), exports);\n__exportStar(require(\"./single/binary_command\"), exports);\n__exportStar(require(\"./single/single_command\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultCommand = exports.BasicCommand = void 0;\n/**\n * All printer sdk command interface\n */\nconst types_1 = require(\"../../types\");\nconst base64_1 = require(\"../../../toolkit/base64\");\nconst command_clause_1 = require(\"./command_clause\");\nconst toolkit_1 = require(\"../../../toolkit\");\nclass BasicCommand {\n base64() {\n return base64_1.Base64.fromUint8Array(this.binary());\n }\n}\nexports.BasicCommand = BasicCommand;\nclass DefaultCommand extends BasicCommand {\n bytes;\n constructor(clauses, variable) {\n super();\n let bytes = [];\n for (const clause of clauses) {\n switch (clause.type) {\n case command_clause_1.ClauseType.TEXT:\n const t = toolkit_1.PVariableKit.replace(clause.text, variable);\n //# use gbk encoding\n // const t_buffer = iconv.encode(t, clause.charset ?? PsdkConst.DEF_CHARSET);\n const t_buffer = toolkit_1.FastGBK.encode(t);\n const t_binary = Array.prototype.slice.call(t_buffer, 0);\n bytes = bytes.concat(t_binary);\n //# use utf8 encoding\n // const t_binary = ByteKit.textToU8A(t)\n // const array = Array.from(t_binary)\n // bytes.push(...array);\n break;\n case command_clause_1.ClauseType.NEWLINE:\n case command_clause_1.ClauseType.BINARY:\n const b = Array.from(clause.binary ?? types_1.PsdkConst.EMPTY_BYTES);\n bytes = bytes.concat(b);\n break;\n }\n }\n this.bytes = new Uint8Array(bytes);\n }\n binary() {\n return this.bytes;\n }\n hex(output) {\n return (output ?? types_1.HexOutput.def()).format(this.binary());\n }\n string(charset) {\n // const buffer = Array.from(this.binary());\n // @ts-ignore\n // return iconv.decode(buffer, charset ?? PsdkConst.DEF_CHARSET);\n // return gbkDecoder.decode(this.binary());\n return toolkit_1.FastGBK.decode(this.binary());\n }\n}\nexports.DefaultCommand = DefaultCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CommandClause = exports.ClauseType = void 0;\nconst types_1 = require(\"../../types\");\nvar ClauseType;\n(function (ClauseType) {\n ClauseType[\"TEXT\"] = \"TEXT\";\n ClauseType[\"BINARY\"] = \"BINARY\";\n ClauseType[\"NEWLINE\"] = \"NEWLINE\";\n ClauseType[\"NONE\"] = \"NONE\";\n})(ClauseType || (exports.ClauseType = ClauseType = {}));\nclass CommandClause {\n /**\n * Clause type\n * @private\n */\n _type;\n /**\n * Text command\n * @private\n */\n _text;\n /**\n * Charset\n * @private\n */\n _charset;\n /**\n * Binary command\n * @private\n */\n _binary;\n constructor(type, text, charset, binary) {\n this._type = type;\n this._text = text;\n this._charset = charset;\n this._binary = binary;\n }\n static text(command, charset = types_1.PsdkConst.DEF_CHARSET) {\n return new CommandClause(ClauseType.TEXT, command, charset, undefined);\n }\n static binary(binary) {\n return new CommandClause(ClauseType.BINARY, undefined, undefined, binary);\n }\n static newline() {\n return new CommandClause(ClauseType.NEWLINE, undefined, undefined, types_1.PsdkConst.DEF_NEWLINE_BINARY);\n }\n static none() {\n return new CommandClause(ClauseType.NONE, undefined, undefined, undefined);\n }\n get type() {\n return this._type;\n }\n get text() {\n return this._text;\n }\n get charset() {\n return this._charset;\n }\n get binary() {\n return this._binary;\n }\n}\nexports.CommandClause = CommandClause;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Commander = void 0;\nconst command_clause_1 = require(\"./command_clause\");\nconst types_1 = require(\"../../types\");\nconst command_1 = require(\"./command\");\n/**\n * Command builder\n */\nclass Commander {\n /**\n * Command clauses\n * @private\n */\n clauses;\n _variable;\n constructor() {\n this.clauses = [];\n this._variable = new Map();\n }\n /**\n * Make a commander\n */\n static make() {\n return new Commander();\n }\n /**\n * Push a text command\n * @param command command\n * @param options Options: { newline: newline, charset: charset }\n */\n pushText(command, options) {\n if (command.startsWith(types_1.PsdkConst.CRLF)) {\n command = command.substring(2);\n }\n const clause = command_clause_1.CommandClause.text(command, options?.charset ?? types_1.PsdkConst.DEF_CHARSET);\n return this.pushClause(clause, options?.newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE);\n }\n /**\n * Push binary command\n * @param command Command\n * @param newline Add new line for this command\n */\n pushBinary(command, newline) {\n const clause = command_clause_1.CommandClause.binary(command);\n return this.pushClause(clause, newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE);\n }\n /**\n * Push clause\n * @param clause Command clause object\n * @param newline Add new line for this command\n */\n pushClause(clause, newline) {\n this.clauses.push(clause);\n if (newline ?? types_1.PsdkConst.DEF_ENABLED_NEWLINE) {\n this.clauses.push(command_clause_1.CommandClause.newline());\n }\n return this;\n }\n /**\n * Push multiple clause\n * @param clauses\n */\n pushClauses(clauses) {\n clauses.forEach(item => this.pushClause(item, false));\n return this;\n }\n /**\n * Push arg\n * @param arg arg\n */\n pushArg(arg) {\n this.pushClauses(arg.clauses());\n return this;\n }\n /**\n * Add newline\n */\n newline() {\n const clause = command_clause_1.CommandClause.newline();\n return this.pushClause(clause, false);\n }\n /**\n * Add a new variable\n * @param name name\n * @param value value\n */\n variable(name, value) {\n this._variable.set(name, value);\n return this;\n }\n /**\n * Clear all commands\n */\n clear() {\n this.clauses.splice(0, this.clauses.length);\n this._variable.clear();\n return this;\n }\n /**\n * Get command\n */\n command() {\n return new command_1.DefaultCommand(this.clauses, this._variable);\n }\n}\nexports.Commander = Commander;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextAppendat = exports.Appendat = void 0;\nconst toolkit_1 = require(\"../../../toolkit\");\nclass Appendat {\n _argument;\n _condition;\n _callback;\n constructor(argument, condition, callback) {\n this._argument = argument;\n this._condition = condition;\n this._callback = callback;\n }\n get condition() {\n return this._condition;\n }\n callback(callback) {\n this._callback = callback;\n return this;\n }\n quote() {\n return this;\n }\n argument() {\n if (!toolkit_1.Checker.truthy(this._callback))\n return this._argument;\n if (!toolkit_1.Checker.truthy(this._argument))\n return undefined;\n return this._callback.callback(this._argument);\n }\n}\nexports.Appendat = Appendat;\nclass TextAppendat extends Appendat {\n _quote;\n constructor(argument, condition, callback) {\n super(argument, condition ?? true, callback);\n this._quote = false;\n }\n /**\n * Create new text appendat\n * @param argument argument\n * @param options options: { condition: condition for this arg, callback: value callback }\n */\n static create(argument, options) {\n return new TextAppendat(argument, options?.condition ?? true, new class {\n callback(data) {\n const cb = options?.callback;\n if (cb) {\n return cb(data);\n }\n return data;\n }\n });\n }\n callback(callback) {\n super.callback(callback);\n return this;\n }\n quote() {\n this._quote = true;\n return this;\n }\n argument() {\n const arg = super.argument();\n if (!toolkit_1.Checker.truthy(arg))\n return this._quote ? '\"\"' : '';\n if (this._quote) {\n return `\"${arg}\"`;\n }\n return arg;\n }\n}\nexports.TextAppendat = TextAppendat;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryCommand = void 0;\nconst command_clause_1 = require(\"../print/command_clause\");\n// import * as iconv from 'iconv-lite';\nconst toolkit_1 = require(\"../../../toolkit\");\nclass BinaryCommand {\n binary;\n constructor(binary) {\n this.binary = binary ?? [];\n }\n static make() {\n return new BinaryCommand();\n }\n static with(u8a) {\n const b = Array.from(u8a);\n return new BinaryCommand(b);\n }\n appendNumber(num) {\n this.binary.push(num);\n return this;\n }\n appendText(text, charset) {\n // const encoding = (charset ?? PsdkConst.DEF_CHARSET).toLowerCase();\n // const binary = iconv.encode(text, encoding);\n const binary = toolkit_1.FastGBK.encode(text);\n this.binary.push(...binary);\n return this;\n }\n appendU8A(u8a) {\n const b = Array.from(u8a);\n this.binary = this.binary.concat(b);\n return this;\n }\n output() {\n return new Uint8Array(this.binary);\n }\n clause() {\n const output = this.output();\n return command_clause_1.CommandClause.binary(output);\n }\n}\nexports.BinaryCommand = BinaryCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TSPLCommand = exports.CPCLCommand = exports.SingleCommand = void 0;\n/**\n * Single Command\n */\nconst appendat_1 = require(\"./appendat\");\nconst command_clause_1 = require(\"../print/command_clause\");\nconst toolkit_1 = require(\"../../../toolkit/\");\nclass SingleCommand {\n /**\n * arguments\n * @private\n */\n _arguments;\n _symbolAfterHeader;\n _symbolBetweenArguments;\n _header;\n _charset;\n constructor(symbolAfterHeader, symbolBetweenArguments, charset) {\n this._arguments = [];\n this._symbolAfterHeader = symbolAfterHeader;\n this._symbolBetweenArguments = symbolBetweenArguments;\n this._charset = charset;\n }\n get getHeader() {\n return this._header;\n }\n get symbolAfterHeader() {\n return this._symbolAfterHeader;\n }\n get symbolBetweenArguments() {\n return this._symbolBetweenArguments;\n }\n header(header) {\n this._header = header;\n return this;\n }\n get charset() {\n return this._charset;\n }\n append(appendat) {\n if (!appendat.condition)\n return this;\n const argument = appendat.argument();\n if (!toolkit_1.Checker.truthy(argument))\n return this;\n this._arguments.push(argument);\n return this;\n }\n arguments() {\n return this._arguments;\n }\n}\nexports.SingleCommand = SingleCommand;\nclass BasicStringSingleCommand extends SingleCommand {\n constructor(symbolAfterHeader, symbolBetweenArguments, charset) {\n super(symbolAfterHeader, symbolBetweenArguments, charset);\n }\n append(appendat) {\n const argument = appendat.argument();\n if (!toolkit_1.Checker.truthy(argument))\n return this;\n super.append(appendat);\n return this;\n }\n appendText(text) {\n return this.append(appendat_1.TextAppendat.create(text ?? '', {}));\n }\n appendNumber(num) {\n if (isNaN(num))\n return this;\n return this.append(appendat_1.TextAppendat.create((num ?? '').toString(), {}));\n }\n output() {\n let ret = '';\n if (toolkit_1.Checker.truthy(super.getHeader)) {\n ret += super.getHeader;\n ret += super.symbolAfterHeader;\n }\n const args = super.arguments();\n const len = args.length;\n let seq = 0;\n for (const arg of args) {\n seq += 1;\n if (!toolkit_1.Checker.truthy(arg))\n continue;\n ret += arg;\n if (seq < len) {\n ret += super.symbolBetweenArguments;\n }\n }\n return ret;\n }\n clause() {\n const output = this.output();\n if (!toolkit_1.Checker.truthy(output)) {\n return command_clause_1.CommandClause.none();\n }\n return command_clause_1.CommandClause.text(output, super.charset);\n }\n}\nclass CPCLCommand extends BasicStringSingleCommand {\n constructor(header, charset) {\n super(' ', ' ', charset);\n super.header(header);\n }\n static with(header, charset) {\n return new CPCLCommand(header, charset);\n }\n append(appendat) {\n super.append(appendat);\n return this;\n }\n appendText(text) {\n super.appendText(text);\n return this;\n }\n appendNumber(num) {\n super.appendNumber(num);\n return this;\n }\n}\nexports.CPCLCommand = CPCLCommand;\nclass TSPLCommand extends BasicStringSingleCommand {\n constructor(header, charset) {\n super(' ', ',', charset);\n super.header(header);\n }\n static with(header, charset) {\n return new TSPLCommand(header, charset);\n }\n append(appendat) {\n super.append(appendat);\n return this;\n }\n appendText(text) {\n super.appendText(text);\n return this;\n }\n appendNumber(num) {\n super.appendNumber(num);\n return this;\n }\n}\nexports.TSPLCommand = TSPLCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataWriteOperation = void 0;\n/**\n * Data write operation\n */\nconst types_1 = require(\"../types\");\nconst adapter_1 = require(\"../../device/adapter\");\nconst toolkit_1 = require(\"../../toolkit\");\nclass DataWriteOperation {\n options;\n binary;\n connectedDevice;\n constructor(\n /**\n * Write options\n * @private\n */\n options, \n /**\n * Write binary\n * @private\n */\n binary, \n /**\n * Connected device\n * @private\n */\n connectedDevice) {\n this.options = options;\n this.binary = binary;\n this.connectedDevice = connectedDevice;\n }\n async write() {\n if (!this.options.enableChunkWrite) {\n const reporter = await this.writData(this.binary);\n this.doCallback(reporter, this.binary, 1, 1);\n return reporter;\n }\n const writeData = Array.from(this.binary);\n const parts = toolkit_1.CollectionKit.split(writeData, this.options.chunkSize);\n const totalTimes = parts.length;\n let currentTimes = 0;\n for (const part of parts) {\n currentTimes += 1;\n const partBinary = new Uint8Array(part);\n const reporter = await this.writData(partBinary);\n const control = this.doCallback(reporter, partBinary, currentTimes, totalTimes);\n if (control == types_1.WriteControl.STOP) {\n reporter.controlExit = true;\n return reporter;\n }\n if (!reporter.ok) {\n return reporter;\n }\n }\n return new adapter_1.WroteReporter(true, this.binary, false);\n }\n doCallback(reporter, binary, currentTimes, totalTimes) {\n const callback = this.options.callback;\n if (!callback)\n return types_1.WriteControl.CONTINUE;\n const dataWrote = new types_1.DataWrote(binary, currentTimes, totalTimes);\n if (reporter.ok) {\n return callback.success(dataWrote);\n }\n if (callback.failed) {\n callback.failed(dataWrote, reporter.exception);\n }\n else {\n console.log('no custom failed callback, full exception: ', reporter.exception);\n }\n return types_1.WriteControl.STOP;\n }\n async writData(binary) {\n try {\n await this.connectedDevice.write(binary);\n return new adapter_1.WroteReporter(true, binary, false);\n }\n catch (e) {\n return new adapter_1.WroteReporter(false, binary, false, e);\n }\n }\n}\nexports.DataWriteOperation = DataWriteOperation;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./args\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./command\"), exports);\n__exportStar(require(\"./PSDK\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HexOutput = void 0;\nconst DEF_MAX_LENGTH_OF_LINE = 32;\n/**\n * hex output\n */\nclass HexOutput {\n enableFormat;\n spacing;\n maxLengthOfLine;\n // private format: boolean;\n //\n // private spacing: boolean;\n //\n // private maxLengthOfLine: number = DEF_MAX_LENGTH_OF_LINE;\n constructor(\n /**\n * Is format\n */\n enableFormat, \n /**\n * Enable spacing between byte\n */\n spacing, \n /**\n * Max length of line\n */\n maxLengthOfLine = DEF_MAX_LENGTH_OF_LINE) {\n this.enableFormat = enableFormat;\n this.spacing = spacing;\n this.maxLengthOfLine = maxLengthOfLine;\n }\n static def() {\n return new HexOutput(false, false, DEF_MAX_LENGTH_OF_LINE);\n }\n static simple(format = true) {\n return new HexOutput(format, true, DEF_MAX_LENGTH_OF_LINE);\n }\n static formatWithMaxLength(maxLengthOfLine) {\n return new HexOutput(true, true, maxLengthOfLine);\n }\n /**\n * Format binary\n */\n format(binary) {\n // const hex = toHex(binary);\n const hex = Array.from(binary, function (byte) {\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n }).join('');\n if (!this.enableFormat) {\n return hex;\n }\n let fmted = '';\n const textLength = hex.length;\n let lineIndex = 0;\n for (let ix = 0; ix < textLength; ix++) {\n const seq = ix + 1;\n const v = hex[ix];\n fmted += v;\n if (seq % 2 == 0 && this.spacing) {\n if (seq < textLength) {\n if (lineIndex + 1 < this.maxLengthOfLine) {\n fmted += ' ';\n }\n lineIndex += 1;\n }\n }\n if (lineIndex >= this.maxLengthOfLine) {\n fmted += '\\n';\n lineIndex = 0;\n }\n }\n return fmted;\n }\n}\nexports.HexOutput = HexOutput;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./psdk_const\"), exports);\n__exportStar(require(\"./hex_output\"), exports);\n__exportStar(require(\"./write\"), exports);\n__exportStar(require(\"./lifecycle\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Lifecycle = void 0;\nclass Lifecycle {\n connectedDevice;\n constructor(\n /**\n * Connected device\n */\n connectedDevice) {\n this.connectedDevice = connectedDevice;\n }\n}\nexports.Lifecycle = Lifecycle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PsdkConst = void 0;\nconst toolkit_1 = require(\"../../toolkit\");\nconst CR = '\\r';\nconst LF = '\\n';\nconst CRLF = `${CR}${LF}`;\n/**\n * constants\n */\nexports.PsdkConst = {\n DEF_CHARSET: 'gbk',\n CR,\n LF,\n CRLF,\n QUOTE: '\"',\n DEF_NEWLINE_BINARY: toolkit_1.ByteKit.textToU8A(CRLF),\n DEF_AUTHORS: ['fewensa <osuni@protonmail.com>'],\n DEF_ENABLED_NEWLINE: true,\n DEF_WRITE_CHUNK_SIZE: 512,\n EMPTY_BYTES: new Uint8Array([]),\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WriteControl = exports.DataWrote = exports.DataWrite = exports.IDataWriteCallback = exports.WriteOptions = void 0;\nconst psdk_const_1 = require(\"./psdk_const\");\n/**\n * Write to device options\n */\nclass WriteOptions {\n enableChunkWrite;\n chunkSize;\n callback;\n constructor(\n /**\n * Enable data splitting\n */\n enableChunkWrite = true, \n /**\n * Part size\n */\n chunkSize = psdk_const_1.PsdkConst.DEF_WRITE_CHUNK_SIZE, \n /**\n * Data write callback\n */\n callback) {\n this.enableChunkWrite = enableChunkWrite;\n this.chunkSize = chunkSize;\n this.callback = callback;\n }\n static def() {\n return new WriteOptions(true, psdk_const_1.PsdkConst.DEF_WRITE_CHUNK_SIZE, undefined);\n }\n}\nexports.WriteOptions = WriteOptions;\n/**\n * Data write callback\n */\nclass IDataWriteCallback {\n failed(data, exception) {\n console.error(`Write data failed: ${exception.message}`);\n }\n}\nexports.IDataWriteCallback = IDataWriteCallback;\n/**\n * Data write\n */\nclass DataWrite {\n binary;\n currentTimes;\n totalTimes;\n constructor(\n /**\n * Wrote binary\n */\n binary, \n /**\n * Write current times\n */\n currentTimes, \n /**\n * Write total times\n */\n totalTimes) {\n this.binary = binary;\n this.currentTimes = currentTimes;\n this.totalTimes = totalTimes;\n }\n}\nexports.DataWrite = DataWrite;\n/**\n * Data wrote\n */\nclass DataWrote extends DataWrite {\n}\nexports.DataWrote = DataWrote;\n/**\n * Write control\n */\nvar WriteControl;\n(function (WriteControl) {\n WriteControl[\"CONTINUE\"] = \"CONTINUE\";\n WriteControl[\"STOP\"] = \"STOP\";\n})(WriteControl || (exports.WriteControl = WriteControl = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./device/adapter\"), exports);\n__exportStar(require(\"./father\"), exports);\n__exportStar(require(\"./toolkit\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Base64 = exports.extendBuiltins = exports.extendUint8Array = exports.extendString = exports.toUint8Array = exports.fromUint8Array = exports.isValid = exports.decode = exports.btou = exports.encodeURL = exports.encodeURI = exports.encode = exports.utob = exports.toBase64 = exports.fromBase64 = exports.btoaPolyfill = exports.btoa = exports.atobPolyfill = exports.atob = exports.VERSION = exports.version = void 0;\n// https://github.com/dankogai/js-base64/blob/main/base64.ts\n/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\nexports.version = version;\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nexports.VERSION = VERSION;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\nexports.btoaPolyfill = btoaPolyfill;\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nexports.btoa = _btoa;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\nexports.fromUint8Array = fromUint8Array;\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\nexports.utob = utob;\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\nexports.toBase64 = encode;\nexports.encode = encode;\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\nexports.encodeURI = encodeURI;\nexports.encodeURL = encodeURI;\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\nexports.btou = btou;\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\nexports.atobPolyfill = atobPolyfill;\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\nexports.atob = _atob;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\nexports.toUint8Array = toUint8Array;\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\nexports.fromBase64 = decode;\nexports.decode = decode;\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\nexports.isValid = isValid;\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\nexports.extendString = extendString;\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\nexports.extendUint8Array = extendUint8Array;\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nexports.extendBuiltins = extendBuiltins;\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\nexports.Base64 = gBase64;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ByteKit = void 0;\nconst checker_1 = require(\"./checker\");\n/**\n * Byte kit\n */\nclass ByteKit {\n /**\n * Text to byte\n * @param text text\n */\n static textToU8A(text) {\n if (!checker_1.Checker.truthy(text))\n return new Uint8Array([]);\n let bytes = [];\n let len, c;\n len = text.length;\n for (let i = 0; i < len; i++) {\n c = text.charCodeAt(i);\n if (c >= 0x010000 && c <= 0x10FFFF) {\n bytes.push(((c >> 18) & 0x07) | 0xF0);\n bytes.push(((c >> 12) & 0x3F) | 0x80);\n bytes.push(((c >> 6) & 0x3F) | 0x80);\n bytes.push((c & 0x3F) | 0x80);\n }\n else if (c >= 0x000800 && c <= 0x00FFFF) {\n bytes.push(((c >> 12) & 0x0F) | 0xE0);\n bytes.push(((c >> 6) & 0x3F) | 0x80);\n bytes.push((c & 0x3F) | 0x80);\n }\n else if (c >= 0x000080 && c <= 0x0007FF) {\n bytes.push(((c >> 6) & 0x1F) | 0xC0);\n bytes.push((c & 0x3F) | 0x80);\n }\n else {\n bytes.push(c & 0xFF);\n }\n }\n return new Uint8Array(bytes);\n }\n}\nexports.ByteKit = ByteKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Checker = void 0;\nclass Checker {\n static truthy(value) {\n if (value === undefined)\n return false;\n if (value === null)\n return false;\n if (value === '')\n return false;\n const t = typeof value;\n switch (t) {\n case 'number':\n if (isNaN(value))\n return false;\n break;\n case 'bigint':\n default:\n return true;\n }\n }\n static empty(value) {\n if (!Checker.truthy(value))\n return true;\n return value.length === 0;\n }\n}\nexports.Checker = Checker;\n","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FastGBK = void 0;\n// https://github.com/EtherDream/str2gbk/blob/main/index.js\nlet table;\nfunction initGbkTable() {\n // https://en.wikipedia.org/wiki/GBK_(character_encoding)#Encoding\n const ranges = [\n [0xA1, 0xA9, 0xA1, 0xFE],\n [0xB0, 0xF7, 0xA1, 0xFE],\n [0x81, 0xA0, 0x40, 0xFE],\n [0xAA, 0xFE, 0x40, 0xA0],\n [0xA8, 0xA9, 0x40, 0xA0],\n [0xAA, 0xAF, 0xA1, 0xFE],\n [0xF8, 0xFE, 0xA1, 0xFE],\n [0xA1, 0xA7, 0x40, 0xA0],\n ];\n const codes = new Uint16Array(23940);\n let i = 0;\n for (const [b1Begin, b1End, b2Begin, b2End] of ranges) {\n for (let b2 = b2Begin; b2 <= b2End; b2++) {\n if (b2 !== 0x7F) {\n for (let b1 = b1Begin; b1 <= b1End; b1++) {\n codes[i++] = b2 << 8 | b1;\n }\n }\n }\n }\n table = new Uint16Array(65536);\n table.fill(0xFFFF);\n const str = new TextDecoder('gbk').decode(codes);\n for (let i = 0; i < str.length; i++) {\n table[str.charCodeAt(i)] = codes[i];\n }\n}\n// const NodeJsBufAlloc = typeof Buffer === 'function' && Buffer.allocUnsafe\n//\n// const defaultOnAlloc = NodeJsBufAlloc\n// ? (len) => NodeJsBufAlloc(len)\n// : (len) => new Uint8Array(len)\nconst defaultOnAlloc = (len) => new Uint8Array(len);\nconst defaultOnError = () => 63; // '?'\nconst gbkDecoder = new TextDecoder('gbk');\nclass FastGBK {\n static decode(buffer) {\n return gbkDecoder.decode(buffer);\n }\n static encode(text, options) {\n if (!table) {\n initGbkTable();\n }\n const onAlloc = options?.onAlloc ?? defaultOnAlloc;\n const onError = options?.onError ?? defaultOnError;\n const buf = onAlloc(text.length * 2);\n let n = 0;\n for (let i = 0; i < text.length; i++) {\n const code = text.charCodeAt(i);\n if (code < 0x80) {\n buf[n++] = code;\n continue;\n }\n const gbk = table[code];\n if (gbk !== 0xFFFF) {\n buf[n++] = gbk;\n buf[n++] = gbk >> 8;\n }\n else if (code === 8364) {\n // 8364 == '€'.charCodeAt(0)\n // Code Page 936 has a single-byte euro sign at 0x80\n buf[n++] = 0x80;\n }\n else {\n const ret = onError(i, text);\n if (ret === -1) {\n break;\n }\n if (ret > 0xFF) {\n buf[n++] = ret;\n buf[n++] = ret >> 8;\n }\n else {\n buf[n++] = ret;\n }\n }\n }\n return buf.subarray(0, n);\n }\n}\nexports.FastGBK = FastGBK;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./byte\"), exports);\n__exportStar(require(\"./pvariable\"), exports);\n__exportStar(require(\"./pcollection\"), exports);\n__exportStar(require(\"./pimage\"), exports);\n__exportStar(require(\"./checker\"), exports);\n__exportStar(require(\"./gbk\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CollectionKit = void 0;\nconst checker_1 = require(\"./checker\");\n/**\n * Collection kit\n */\nclass CollectionKit {\n /**\n * Split array\n *\n * @param colls collections\n * @param size The size of result array\n * @return List\n */\n static split(colls, size) {\n if (checker_1.Checker.empty(colls))\n return [];\n if (size <= 0)\n throw new Error('The size must > 0');\n const rets = [];\n let items = [];\n for (const coll of colls) {\n items.push(coll);\n if (size == items.length) {\n rets.push(items);\n items = [];\n }\n }\n if (0 != items.length)\n rets.push(items);\n return rets;\n }\n /**\n * Part array\n *\n * @param colls collections\n * @param parts Part length\n * @return List\n */\n static parts(colls, parts) {\n if (checker_1.Checker.empty(colls)) {\n return [];\n }\n if (parts <= 0)\n throw new Error('The parts length must > 0');\n if (colls.length <= parts) {\n return [colls];\n }\n const rets = [];\n let items = [];\n const pnum = Math.floor(colls.length / parts);\n for (const coll of colls) {\n items.push(coll);\n if (items.length == pnum) {\n rets.push(items);\n if (rets.length < parts)\n items = [];\n }\n }\n return rets;\n }\n}\nexports.CollectionKit = CollectionKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImageKit = void 0;\n/**\n * Image kit\n */\nclass ImageKit {\n /**\n * process image\n * @param canvas canvas\n * @param width width\n * @param height height\n */\n static processImage(canvas, width, height) {\n const ctx = canvas.getContext('2d');\n let eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1));\n let currentHeight = 0;\n let index = 0;\n const area = height * eWidth;\n const bytes = []; // the bytes length is equals `area`\n for (let b1 = 0; b1 < area; b1++) {\n bytes[b1] = 0;\n }\n const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n while (currentHeight < height) {\n // let rowData = []; // the row data length is image height\n let eightBitIndex = 0;\n for (let x = 0; x < width; x++) {\n eightBitIndex++;\n if (eightBitIndex > 8) {\n eightBitIndex = 1;\n index++;\n }\n const n = 1 << 8 - eightBitIndex;\n // const pixel = ctx.getImageData(x, currentHeight, 1, 1);\n const pixels = ImageKit.fastExtractPixel(imgData, x, currentHeight, 1, 1);\n const pixel = pixels[0];\n // const rgba = pixel.data;\n const red = pixel[0];\n const green = pixel[1];\n const blue = pixel[2];\n if ((red + green + blue) / 3 < 128) {\n bytes[index] = (bytes[index] | n);\n }\n }\n index = eWidth * (currentHeight + 1);\n currentHeight += 1;\n }\n return new Uint8Array(bytes);\n }\n static fastExtractPixel(imageData, x, y, w, h) {\n let i, j;\n let result = [];\n let r, g, b, a;\n const data = imageData.data;\n for (j = 0; j < h; j++) {\n let idx = (x + (y + j) * imageData.width) * 4; // get left most byte index for row at y + j\n for (i = 0; i < w; i++) {\n r = data[idx++];\n g = data[idx++];\n b = data[idx++];\n a = data[idx++];\n // do the processing\n result.push([r, g, b, a]);\n }\n }\n return result;\n }\n}\nexports.ImageKit = ImageKit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PVariableKit = void 0;\nconst checker_1 = require(\"./checker\");\nclass PVariableKit {\n /**\n * Replace variable\n * @param text text\n * @param variable variable\n */\n static replace(text, variable) {\n if (!checker_1.Checker.truthy(text))\n return text;\n if (!checker_1.Checker.truthy(variable))\n return text;\n if (text.indexOf('{{') < 0 && text.indexOf('}}') < 0)\n return text;\n const regx = /[\\\\]?\\{\\{(?<varx>.*?)}}/gm;\n const tmpMark = '__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__';\n while (true) {\n const match = regx.exec(text);\n if (match == null)\n break;\n const originDefined = match[0];\n const originVarx = originDefined.replace('{{', '')\n .replace('}}', '');\n const varName = originVarx.trim();\n const varValue = variable.get(varName) ?? '';\n if (originDefined.startsWith('\\\\')) {\n const tmpDefined = originDefined.replace('\\\\{{', tmpMark);\n text = text.replace(originDefined, tmpDefined);\n continue;\n }\n text = text.replace(originDefined, varValue);\n }\n text = text.replace(new RegExp(tmpMark, 'g'), '{{');\n return text;\n }\n}\nexports.PVariableKit = PVariableKit;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeviceFilter = exports.WebusbReadOptions = exports.Webusb = void 0;\nconst frame_father_1 = require(\"@psdk/frame-father\");\nclass Webusb {\n filters;\n configuration;\n interface;\n readEndpoint;\n writeEndpoint;\n inputReadEndpoint;\n inputWriteEndpoint;\n state;\n device;\n constructor(options) {\n if (options.filters.length == 0) {\n throw new Error('Missing filters');\n }\n this.filters = options.filters;\n this.configuration = options.configuration ?? 1;\n this.interface = options.interface ?? 0;\n this.state = frame_father_1.ConnectionState.DISCONNECTED;\n this.inputReadEndpoint = options.readEndpoint ?? 2;\n this.inputWriteEndpoint = options.writeEndpoint ?? 2;\n }\n static withFilter(filter) {\n return this.withFilters([filter]);\n }\n static withFilters(filters) {\n return new Webusb({ filters });\n }\n async connect() {\n // @ts-ignore\n if (!navigator.usb) {\n throw new Error('Your browser not support webusb');\n }\n // @ts-ignore\n const device = await navigator.usb.requestDevice({\n filters: this.filters,\n });\n if (!device)\n throw new Error('Failed to get device');\n await device.open();\n await device.selectConfiguration(this.configuration);\n await device.claimInterface(device.configuration.interfaces[this.interface].interfaceNumber);\n const alternates = device.configuration.interfaces[0].alternates[0];\n const inEndpoints = alternates.endpoints.filter(endpoint => endpoint.direction === 'in');\n const outEndpoints = alternates.endpoints.filter(endpoint => endpoint.direction === 'out');\n this.readEndpoint = inEndpoints && inEndpoints.length ? inEndpoints[0].endpointNumber : this.inputReadEndpoint;\n this.writeEndpoint = outEndpoints && outEndpoints.length ? outEndpoints[0].endpointNumber : this.inputWriteEndpoint;\n this.state = frame_father_1.ConnectionState.CONNECTED;\n // @ts-ignore\n navigator.usb.addEventListener('connect', e => {\n this.state = frame_father_1.ConnectionState.CONNECTED;\n });\n // @ts-ignore\n navigator.usb.addEventListener('disconnect', e => {\n this.state = frame_father_1.ConnectionState.DISCONNECTED;\n });\n this.device = device;\n return await this.connectedDevice();\n }\n async connectedDevice() {\n const _device = () => this.device;\n const _connectionState = () => this.state;\n const _readEndpoint = () => this.readEndpoint;\n const _writeEndpoint = () => this.writeEndpoint;\n return new class {\n origin() {\n return _device();\n }\n connectionState() {\n const device = _device();\n if (!device.opened) {\n return frame_father_1.ConnectionState.DISCONNECTED;\n }\n return _connectionState();\n }\n deviceName() {\n const device = _device();\n return device.productName;\n }\n async disconnect() {\n // todo: disconnect webusb\n }\n canRead() {\n return true;\n }\n async read(options) {\n const device = _device();\n const _options = options ?? WebusbReadOptions.def();\n const result = await device.transferIn(_readEndpoint(), _options.readLength);\n const { status, data } = result;\n if (status != 'ok') {\n throw new Error(`[${status}]: Failed to read data. about status code you can read this https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult`);\n }\n const arrs = [];\n const len = data.byteLength;\n for (let i = 0; i < len; i++) {\n arrs.push(data.getUint8(i));\n }\n return new Uint8Array(arrs);\n }\n async write(data) {\n const device = _device();\n await device.transferOut(_writeEndpoint(), data);\n }\n flush() {\n }\n };\n }\n}\nexports.Webusb = Webusb;\nclass WebusbReadOptions extends frame_father_1.ReadOptions {\n _length;\n constructor(options) {\n super(options);\n this._length = options?.length ?? 1024;\n }\n static def() {\n return new WebusbReadOptions();\n }\n get readLength() {\n return this._length;\n }\n}\nexports.WebusbReadOptions = WebusbReadOptions;\nclass DeviceFilter {\n vendorId;\n productId;\n constructor(options) {\n this.vendorId = options.vendorId;\n this.productId = options.productId;\n }\n}\nexports.DeviceFilter = DeviceFilter;\n"],"mappings":"wCACAA,OAAAC,eAAAC,EAAA,cAAAC,MAAA,OACAD,EAAAE,yBAAA,EAIA,MAAAC,EAAAC,EAAA,KACA,MAAAC,EAAAD,EAAA,KAIA,MAAAF,oBACA,MAAAI,GACA,mBACA,CACA,eAAAC,GACA,OAAAJ,EAAAK,gBAAAC,SACA,CACA,UAAAC,GACA,mBACA,CACA,gBAAAC,GACA,CACA,OAAAC,GACA,WACA,CACA,UAAAC,CAAAC,GACA,OAAAT,EAAAU,UAAAC,WACA,CACA,WAAAC,CAAAC,GACAC,QAAAC,IAAA,UAAAF,EACA,CACA,KAAAG,GACA,EAEArB,EA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WAAAhb,CAAAC,GACA,MAAA+Y,EAAAsB,gBACAtB,EAAAmC,YAAAV,iBAAAxa,EACA,CACA,KAAAG,GACA,EAEA,EAEArB,EAAAuZ,cACA,MAAAD,0BAAAE,EAAA9W,YACA2Z,QACA,WAAArZ,CAAAlC,GACAkE,MAAAlE,GACAS,KAAA8a,QAAAvb,GAAA8E,QAAA,IACA,CACA,UAAA3B,GACA,WAAAqV,iBACA,CACA,cAAAyC,GACA,OAAAxa,KAAA8a,OACA,EAEArc,EAAAsZ,oCACA,MAAAD,aACAiD,SACAC,UACA,WAAAvZ,CAAAlC,GACAS,KAAA+a,SAAAxb,EAAAwb,SACA/a,KAAAgb,UAAAzb,EAAAyb,SACA,EAEAvc,EAAAqZ,yB"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@psdk/device-webusb",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "psdk",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "package": "tsc && ncc build --source-map build/index.js -o dist",
9
+ "package": "tsc && ncc build --source-map build/index.js -m -C -o dist",
10
10
  "test": "jest",
11
11
  "docs": "npx typedoc --out dist/docs index.ts"
12
12
  },
@@ -21,12 +21,12 @@
21
21
  "typescript": "^5.5.3"
22
22
  },
23
23
  "dependencies": {
24
- "@psdk/frame-father": "0.5.4"
24
+ "@psdk/frame-father": "0.5.5"
25
25
  },
26
26
  "files": [
27
27
  "dist",
28
28
  "build",
29
29
  "!build/browser/psdk*"
30
30
  ],
31
- "gitHead": "eff8374dc7cf4ef2c8247371578979ea40480c3b"
31
+ "gitHead": "c99a41c63cdc1a56daea1d69f436421d24398c6b"
32
32
  }