{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-markus/src/client/reactive/when.js"],"names":["when","condition","params","exp","asAExpr","Promise","resolve","onBecomeTrue","dispose"],"mappings":";;;;;;;;;;;;;;6BACwBA,qC;;;;;;;;AADxB;AACe,eAASA,IAAT,CAAcC,SAAd,EAAyB,GAAGC,MAA5B,EAAoC;AACjD,cAAMC,MAAMF,UAAUG,OAAV,EAAZ;AACA,eAAO,IAAIC,OAAJ,CAAYC,WAAW;AAC5BH,cAAII,YAAJ,CAAiB,MAAM;AACrBJ,gBAAIK,OAAJ;AACAF;AACD,WAHD;AAID,SALM,CAAP;AAMD;;yBARuBN,I","file":"when.js","sourcesContent":["// #TODO: use params to provide them to the given aexpr\nexport default function when(condition, ...params) {\n  const exp = condition.asAExpr();\n  return new Promise(resolve => {\n    exp.onBecomeTrue(() => {\n      exp.dispose();\n      resolve();\n    });\n  });\n}\n"]}