import{__require as r}from"./function-call.mjs";import{__require as t}from"./function-uncurry-this.mjs";import{__require as e}from"./iterator-create-proxy.mjs";import{__require as i}from"./iterator-close-all.mjs";var o,n;function s(){if(n)return o;n=1;var s=r(),u=t(),a=e(),h=i(),f=TypeError,d=u([].slice),l=u([].push),p="Iterator is exhausted",v="throw",c=a(function(){var r=this.iterCount;if(r){for(var t,e,i=this.openIters,o=this.iters,n=this.padding,u=this.mode,a=this.finishResults,d=[],c=0;c<r;c++){var m=o[c];if(null===m)t=n[c];else{try{e=(t=s(m.next,m.iterator)).done,t=t.value}catch(r){return i[c]=void 0,h(i,v,r)}if(e){if(i[c]=void 0,this.openItersCount--,"shortest"===u)return this.done=!0,h(i,"normal",void 0);if("strict"===u){if(c)return h(i,v,new f(p));for(var _,I,C=1;C<r;C++){try{I=(_=s(o[C].next,o[C].iterator)).done,_=_.value}catch(r){return i[C]=void 0,h(i,v,_)}if(!I)return h(i,v,new f(p));i[C]=void 0,this.openItersCount--}return void(this.done=!0)}if(!this.openItersCount)return void(this.done=!0);o[c]=null,t=n[c]}}l(d,t)}return a?a(d):d}this.done=!0});return o=function(r,t,e,i){var o=r.length;return new c({iters:r,iterCount:o,openIters:d(r,0),openItersCount:o,mode:t,padding:e,finishResults:i})}}export{s as __require};