/**
 * Minified by jsDelivr using Terser v5.19.2.
 * Original file: /npm/codepoint-iterator@1.1.1/esm/mod.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
export async function*asCodePointsIterator(t){const o=new TextDecoder("utf-8"),e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():Symbol.iterator in t?t[Symbol.iterator]():t;for(;;){const t=await e.next();if(t.done)break;const n=t.value,r=o.decode(n,{stream:!0});let a=0;const s=r.length;for(;a<s;){const t=r.codePointAt(a);if(void 0===t)break;yield t,a+=t>65535?2:1}}o.decode(new Uint8Array)}export async function asCodePointsArray(t){const o=[],e=new TextDecoder("utf-8");for await(const n of t){const t=e.decode(n,{stream:!0});let r=0;const a=t.length;for(;r<a;){const e=t.codePointAt(r);if(void 0===e)break;o.push(e),e>65535?r+=2:r++}}return e.decode(new Uint8Array),o}export async function asCodePointsCallback(t,o){const e=new TextDecoder("utf-8"),n=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():Symbol.iterator in t?t[Symbol.iterator]():t;for(;;){const t=await n.next();if(t.done)break;const r=t.value,a=e.decode(r,{stream:!0});let s=0;const c=a.length;for(;s<c;){const t=a.codePointAt(s);if(void 0===t)break;o(t),t>65535?s+=2:s++}}e.decode(new Uint8Array)}export default asCodePointsIterator;export*from"./iterable.js";export*from"./byte_methods.js";export*from"./constants.js";
//# sourceMappingURL=/sm/d1edeae4e71ace6c53cfcda7899cc4c7622a69f9635422c04994fa8073a46d14.map