UNPKG

986 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../neon-core/lib/consts.js","webpack:///../neon-core/lib/logging.js","webpack:///../neon-core/lib/helper.js","webpack:///../neon-core/lib/rpc/Protocol.js","webpack:///../neon-core/lib/rpc/Network.js","webpack:////home/circleci/repo/node_modules/bignumber.js/bignumber.mjs","webpack:///../neon-core/lib/u/Fixed8.js","webpack:///../neon-core/lib/u/convert.js","webpack:///../neon-core/lib/u/misc.js","webpack:///../neon-core/lib/u/hash.js","webpack:///../neon-core/lib/u/StringStream.js","webpack:///../neon-core/lib/u/random.js","webpack:///../neon-core/lib/u/index.js","webpack:///../neon-core/lib/tx/txAttrUsage.js","webpack:///../neon-core/lib/tx/components/TransactionAttribute.js","webpack:///../neon-core/lib/tx/components/TransactionInput.js","webpack:///../neon-core/lib/wallet/verify.js","webpack:///../neon-core/lib/wallet/signing.js","webpack:///../neon-core/lib/wallet/core.js","webpack:///../neon-core/lib/sc/ContractParam.js","webpack:///../neon-core/lib/sc/OpCode.js","webpack:///../neon-core/lib/sc/ScriptBuilder.js","webpack:///../neon-core/lib/sc/core.js","webpack:///../neon-core/lib/sc/StackItem.js","webpack:///../neon-core/lib/sc/index.js","webpack:///../neon-core/lib/wallet/multisig.js","webpack:///../neon-core/lib/wallet/nep2.js","webpack:///../neon-core/lib/wallet/Account.js","webpack:///../neon-core/lib/tx/strategy.js","webpack:///../neon-core/lib/tx/calculate.js","webpack:///../neon-core/lib/tx/transaction/main.js","webpack:///../neon-core/lib/tx/transaction/BaseTransaction.js","webpack:///../neon-core/lib/wallet/components/Coin.js","webpack:///../neon-core/lib/wallet/components/AssetBalance.js","webpack:///../neon-core/lib/wallet/Balance.js","webpack:///../neon-core/lib/wallet/components/ClaimItem.js","webpack:///../neon-core/lib/wallet/Claims.js","webpack:///../neon-core/lib/wallet/components/index.js","webpack:///../neon-core/lib/wallet/Wallet.js","webpack:///../neon-core/lib/wallet/index.js","webpack:///../neon-core/lib/tx/components/TransactionOutput.js","webpack:///../neon-core/lib/tx/components/Witness.js","webpack:///../neon-core/lib/tx/components/StateDescriptor.js","webpack:///../neon-core/lib/tx/components/index.js","webpack:///../neon-core/lib/tx/transaction/ClaimTransaction.js","webpack:///../neon-core/lib/tx/transaction/ContractTransaction.js","webpack:///../neon-core/lib/tx/transaction/InvocationTransaction.js","webpack:///../neon-core/lib/tx/transaction/TransactionType.js","webpack:///../neon-core/lib/tx/transaction/StateTransaction.js","webpack:///../neon-core/lib/tx/transaction/MinerTransaction.js","webpack:///../neon-core/lib/tx/transaction/EnrollmentTransaction.js","webpack:///../neon-core/lib/tx/transaction/IssueTransaction.js","webpack:///../neon-core/lib/tx/transaction/RegisterTransaction.js","webpack:///../neon-core/lib/tx/transaction/PublishTransaction.js","webpack:///../neon-core/lib/tx/transaction/Transaction.js","webpack:///../neon-core/lib/tx/transaction/index.js","webpack:///../neon-core/lib/tx/index.js","webpack:///../neon-core/lib/settings.js","webpack:///../neon-core/lib/rpc/Query.js","webpack:///../neon-core/lib/rpc/RPCClient.js","webpack:///../neon-core/lib/rpc/parse.js","webpack:///../neon-core/lib/rpc/index.js","webpack:///../neon-core/lib/index.js","webpack:////home/circleci/repo/node_modules/axios/index.js","webpack:////home/circleci/repo/node_modules/axios/lib/utils.js","webpack:////home/circleci/repo/node_modules/bn.js/lib/bn.js","webpack:////home/circleci/repo/node_modules/crypto-js/core.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/utils.js","webpack:////home/circleci/repo/node_modules/bs58/index.js","webpack:////home/circleci/repo/node_modules/minimalistic-assert/index.js","webpack:///external \"buffer\"","webpack:////home/circleci/repo/node_modules/crypto-js/sha256.js","webpack:////home/circleci/repo/node_modules/loglevel/lib/loglevel.js","webpack:///external \"util\"","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/common.js","webpack:////home/circleci/repo/node_modules/crypto-js/enc-hex.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curve/index.js","webpack:////home/circleci/repo/node_modules/inherits/inherits.js","webpack:////home/circleci/repo/node_modules/bs58check/index.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/buildURL.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/createError.js","webpack:///external \"crypto\"","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash.js","webpack:////home/circleci/repo/node_modules/crypto-js/cipher-core.js","webpack:////home/circleci/repo/node_modules/loglevel-plugin-prefix/lib/loglevel-plugin-prefix.js","webpack:////home/circleci/repo/node_modules/wif/index.js","webpack:////home/circleci/repo/node_modules/crypto-js/aes.js","webpack:////home/circleci/repo/node_modules/scrypt-js/scrypt.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/bind.js","webpack:////home/circleci/repo/node_modules/axios/lib/cancel/isCancel.js","webpack:////home/circleci/repo/node_modules/axios/lib/defaults.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/settle.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/enhanceError.js","webpack:///external \"http\"","webpack:///external \"https\"","webpack:////home/circleci/repo/node_modules/follow-redirects/index.js","webpack:///external \"url\"","webpack:////home/circleci/repo/node_modules/follow-redirects/node_modules/debug/src/debug.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/mergeConfig.js","webpack:////home/circleci/repo/node_modules/axios/lib/cancel/Cancel.js","webpack:////home/circleci/repo/node_modules/safe-buffer/index.js","webpack:////home/circleci/repo/node_modules/minimalistic-crypto-utils/lib/utils.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/common.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/256.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/512.js","webpack:////home/circleci/repo/node_modules/crypto-js/evpkdf.js","webpack:////home/circleci/repo/node_modules/crypto-js/ripemd160.js","webpack:////home/circleci/repo/node_modules/secure-random/lib/secure-random.js","webpack:////home/circleci/repo/node_modules/crypto-js/enc-latin1.js","webpack:////home/circleci/repo/node_modules/crypto-js/mode-ecb.js","webpack:////home/circleci/repo/node_modules/crypto-js/pad-nopadding.js","webpack:///./src/index.ts","webpack:////home/circleci/repo/node_modules/axios/lib/axios.js","webpack:////home/circleci/repo/node_modules/axios/node_modules/is-buffer/index.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/Axios.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/InterceptorManager.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/dispatchRequest.js","webpack:////home/circleci/repo/node_modules/axios/lib/core/transformData.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack:////home/circleci/repo/node_modules/axios/lib/adapters/http.js","webpack:///external \"assert\"","webpack:///external \"stream\"","webpack:////home/circleci/repo/node_modules/follow-redirects/node_modules/debug/src/index.js","webpack:////home/circleci/repo/node_modules/follow-redirects/node_modules/debug/src/browser.js","webpack:////home/circleci/repo/node_modules/follow-redirects/node_modules/ms/index.js","webpack:////home/circleci/repo/node_modules/follow-redirects/node_modules/debug/src/node.js","webpack:///external \"tty\"","webpack:////home/circleci/repo/node_modules/supports-color/index.js","webpack:///external \"os\"","webpack:////home/circleci/repo/node_modules/has-flag/index.js","webpack:///external \"zlib\"","webpack:////home/circleci/repo/node_modules/axios/lib/adapters/xhr.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/parseHeaders.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/cookies.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/combineURLs.js","webpack:////home/circleci/repo/node_modules/axios/lib/cancel/CancelToken.js","webpack:////home/circleci/repo/node_modules/axios/lib/helpers/spread.js","webpack:////home/circleci/repo/node_modules/base-x/index.js","webpack:////home/circleci/repo/node_modules/create-hash/index.js","webpack:////home/circleci/repo/node_modules/bs58check/base.js","webpack:///(webpack)/buildin/module.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/utils.js","webpack:////home/circleci/repo/node_modules/brorand/index.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curve/base.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curve/short.js","webpack:////home/circleci/repo/node_modules/inherits/inherits_browser.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curve/mont.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curve/edwards.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/curves.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/1.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/224.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/sha/384.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/ripemd.js","webpack:////home/circleci/repo/node_modules/hash.js/lib/hash/hmac.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/ec/index.js","webpack:////home/circleci/repo/node_modules/hmac-drbg/lib/hmac-drbg.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/ec/key.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/ec/signature.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/eddsa/index.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/eddsa/key.js","webpack:////home/circleci/repo/node_modules/elliptic/lib/elliptic/eddsa/signature.js","webpack:////home/circleci/repo/node_modules/crypto-js/enc-base64.js","webpack:////home/circleci/repo/node_modules/crypto-js/md5.js","webpack:////home/circleci/repo/node_modules/crypto-js/sha1.js","webpack:////home/circleci/repo/node_modules/crypto-js/hmac.js","webpack:///./src/networks.ts","webpack:///../neon-api/lib/provider/neoCli/core.js","webpack:///../neon-api/lib/provider/neoCli/class.js","webpack:///../neon-api/lib/provider/neoCli/index.js","webpack:///../neon-api/lib/settings.js","webpack:///../neon-api/lib/provider/common.js","webpack:///../neon-api/lib/provider/neonDB/core.js","webpack:///../neon-api/lib/provider/neonDB/class.js","webpack:///../neon-api/lib/provider/neonDB/index.js","webpack:///../neon-api/lib/provider/neoscan/core.js","webpack:///../neon-api/lib/provider/neoscan/class.js","webpack:///../neon-api/lib/provider/neoscan/index.js","webpack:///../neon-api/lib/funcs/common.js","webpack:///../neon-api/lib/funcs/create.js","webpack:///../neon-api/lib/funcs/sign.js","webpack:///../neon-api/lib/funcs/fill.js","webpack:///../neon-api/lib/funcs/mint.js","webpack:///../neon-api/lib/funcs/send.js","webpack:///../neon-api/lib/funcs/smartcontract.js","webpack:///../neon-api/lib/funcs/main.js","webpack:///../neon-api/lib/funcs/index.js","webpack:///../neon-api/lib/plugin.js","webpack:///../neon-api/lib/index.js","webpack:///../neon-nep5/lib/abi.js","webpack:///../neon-nep5/lib/main.js","webpack:///../neon-nep5/lib/plugin.js","webpack:///../neon-nep5/lib/index.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClFO;AACA;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACA;AACA;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;ACrFgC;AACY;AAC5C,gCAAM,KAAK,kBAAQ;AACnB,kBAAQ;AACD;AACP,gBAAgB,kBAAQ;AACxB,mBAAmB,kBAAQ;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,eAAe,GAAG,KAAK,KAAK,IAAI,MAAM;AACtC;AACe;AACf,cAAc,kBAAQ;AACtB,IAAI,gCAAM,WAAW,aAAa;AAClC;AACA,CAAC,EAAC;AACK,eAAe,kBAAQ;AAC9B,mC;;ACrBO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;ACvD2C;AACD;AACV;AAChC,YAAY,OAAM;AAClB;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,iBAAQ;AACrB,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,yCAAyC,0CAA0C,cAAc;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa,yDAAyD;AAClF;AACA;AACe,kEAAQ,EAAC;AACxB,oC;;AChDsE;AACtC;AACE;AAClC,MAAM,WAAG,GAAG,OAAM;AAClB;AACA;AACA;AACA;AACA;AACO,MAAM,eAAO;AACpB,2BAA2B;AAC3B;AACA,6CAA6C,uDAAuD;AACpG,4BAA4B,YAAQ;AACpC;AACA,qCAAqC,iDAAiD;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,YAAY,0BAA0B;AACtC,YAAY,aAAa,8BAA8B;AACvD;AACA;AACe,+DAAO,EAAC;AACvB,mC;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;;;AAGZ;AACA;AACA;AACA;AACA;AACA,+BAA+B,wDAAwD;AACvF;;;AAGA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;AAGA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ,wBAAwB;AAChC,UAAU,OAAO;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,2DAA2D,EAAE;AAC7D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA,KAAK;;AAEL,kCAAkC,mDAAmD,GAAG,EAAE;AAC1F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,qFAAqF,EAAE;AACvF;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe,0BAA0B;;AAEzC;AACA,0BAA0B,8BAA8B;;AAExD;;AAEA;AACA;;AAEA,mFAAmF,EAAE;AACrF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,SAAS;AACxC;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA,cAAc,KAAK;AACnB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;AAGA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC,yBAAyB,OAAO;AAChC,yBAAyB,gBAAgB;AACzC,yBAAyB,gBAAgB;AACzC,yBAAyB,QAAQ;AACjC,yBAAyB,OAAO;AAChC,4BAA4B,OAAO;AACnC,yBAAyB,OAAO;AAChC;AACA,yBAAyB,OAAO;AAChC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,yCAAyC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,2BAA2B,OAAO;AAClC,8CAA8C,mDAAmD,GAAG,EAAE;AACtG;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,OAAO;AACjC,6CAA6C,mDAAmD,GAAG,EAAE;AACrG;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA,8CAA8C,mDAAmD,GAAG,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA,kBAAkB,gBAAgB;AAClC;AACA,qCAAqC,kEAAkE,GAAG,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B,yDAAyD,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA,wBAAwB,OAAO;AAC/B,2CAA2C,mDAAmD,GAAG,EAAE;AACnG;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,OAAO;AACjC,6CAA6C,mDAAmD,GAAG,EAAE;AACrG;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB,qDAAqD,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;AACrB,iDAAiD,EAAE;AACnD;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA,OAAO;;AAEP,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,GAAG;AAC3F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2CAA2C;AAC/D,oBAAoB;AACpB,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,gBAAgB,OAAO;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;;AAEA,gBAAgB,OAAO;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,YAAY;;AAExB;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,YAAY;;AAEjC;AACA,6BAA6B,SAAS;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,SAAS;AACrB,+BAA+B,QAAQ;;AAEvC;;AAEA,mBAAmB,gBAAgB;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,cAAc;;AAE1B;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB,qBAAqB;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,UAAU;;AAErC;AACA,6BAA6B,QAAQ;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP,yBAAyB,QAAQ;;AAEjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA,YAAY,uBAAuB;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,uBAAuB;;AAExC;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;;AAEX;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,8BAA8B,SAAS;;AAEvC;;AAEA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;;AAEA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,uCAAuC,KAAK;AAC5C,SAAS;AACT;AACA;AACA;AACA,kBAAkB,KAAK;AACvB;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU,mBAAmB;AAC7B;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,SAAS;;AAEnB;AACA,kBAAkB,SAAS;;AAE3B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,6CAA6C,EAAE;AAC/C,0CAA0C,EAAE,UAAU,EAAE;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,SAAS;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;;AAEA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;;AAEA;AACA,uBAAuB,SAAS;;AAEhC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,EAAE;;AAElB;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA,yBAAyB,SAAS;;AAElC;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,eAAe;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,aAAa;AACrC;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wBAAwB;AAChC,UAAU,wBAAwB;AAClC;AACA,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;AACA,UAAU,EAAE;;AAEZ;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP,qBAAqB;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,GAAG;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,KAAK;AACtB;AACA,KAAK;;AAEL;AACA;;AAEA,qBAAqB,OAAO;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,KAAK;AAC1B;;AAEA;AACA,UAAU,OAAO;;AAEjB;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,YAAY;;AAEtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC,KAAK;;AAErC;AACA;;AAEA,iBAAiB,UAAU;AAC3B;AACA;AACA;;AAEA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,YAAY,KAAK;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,GAAG;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe;AACxB;AACA,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY,aAAa;;AAEzB;AACA,oBAAoB,SAAS;AAC7B;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ,OAAO;AACf;AACA,kCAAkC,mDAAmD,GAAG,EAAE;AAC1F;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,EAAE;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;;AAEX,8CAA8C,IAAI,OAAO,IAAI;AAC7D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC;AACA,kCAAkC,4BAA4B,IAAI,GAAG;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU,EAAE;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,kCAAkC,mDAAmD,GAAG,MAAM;AAC9F;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA,8BAA8B,mDAAmD,GAAG,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,OAAO;AACf;AACA;AACA,UAAU,KAAK;AACf;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,aAAa,OAAO;;AAEpB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,KAAK;AAC3B;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;AACA,4BAA4B,KAAK;AACjC;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;;;AAGO;;AAEQ,uDAAS,EAAC;;;ACxuFK;AACM;AACpC;AACA;AACA;AACA,2BAA2B,SAAE;AAC7B;AACA;AACA,2BAA2B,SAAE;AAC7B;AACA;AACA,6BAA6B,SAAE;AAC/B;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAM,SAAS,SAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,aAAM;AACrC,8DAA8D,aAAM,WAAW,gBAAgB,KAAK;AACpG;AACA,4BAA4B,aAAM;AAClC,iEAAiE,aAAM,WAAW,gBAAgB,KAAK;AACvG;AACA,oCAAoC,aAAM;AAC1C;AACA;AACA;AACA,6FAA6F,WAAW,aAAa,IAAI;AACzH;AACA,oBAAoB,SAAE;AACtB;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM,wBAAwB,SAAE;AACnD;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM,wBAAwB,SAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,aAAM,iBAAiB,aAAM;AAC7B;AACA,aAAM,iBAAiB,aAAM;AACd,0DAAM,EAAC;AACtB,kC;;AC9I8B;AACiB;AAC/C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,4DAA4D,WAAW;AACvE;AACA;AACA,wCAAwC,YAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,IAAI,SAAS;AACb;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,oEAAoE,IAAI;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,6DAA6D,WAAW;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,mEAAmE,WAAW;AAC9E;AACA;AACA,kFAAkF,IAAI;AACtF;AACA;AACA,6EAA6E,IAAI;AACjF;AACA;AACA,8EAA8E,IAAI;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA,mFAAmF,KAAK;AACxF;AACA,kBAAkB,QAAM;AACxB,eAAe,QAAM;AACrB;AACA;AACA;AACA;AACA;AACO;AACP,IAAI,SAAS;AACb;AACA;AACA;AACA,WAAW,QAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;ACjKyC;AACzC,gCAAgC,EAAE;AAClC;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,wDAAwD,IAAI;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,+EAA+E,YAAY,OAAO,YAAY;AAC9G;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;;;;ACrE4C;AACA;AACN;AACtC,SAAS,SAAI;AACb,uBAAuB,iBAAW;AAClC;AACA,2BAA2B,iBAAW;AACtC;AACA;AACA;AACA;AACO,SAAS,WAAM;AACtB,WAAW,SAAI,MAAM,gBAAM;AAC3B;AACA;AACA;AACA;AACO,SAAS,cAAS;AACzB,WAAW,SAAI,MAAM,mBAAS;AAC9B;AACA;AACA;AACA;AACO;AACP,gBAAgB,WAAM;AACtB,WAAW,cAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qBAAqB,WAAM;AAC3B,WAAW,WAAM;AACjB;AACA;AACA;AACA;AACA,gC;;ACxCoC;AACpC;AACA;AACA;AACA;AACO,MAAM,yBAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO,GAAG,QAAQ,GAAG,MAAM;AAC7C;AACA;AACe,4EAAY,EAAC;AAC5B,wC;;;;;;ACvGyC;AACzC;AACA;AACA;AACA;AACO;AACP,WAAW,uBAAY;AACvB;AACA,kC;;ACRuB;AACG;AACH;AACE;AACM;AACN;AACzB,iC;;ACNA;AACA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACpB,2DAAW,EAAC;AAC3B,uC;;AC9CkE;AACrB;AAC7C;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B,mBAAmB,WAAW;AAC9B;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,yCAAoB;AACjC;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,MAAM,aAAa,aAAa;AACnF;AACA,mBAAmB,yCAAoB,EAAE,cAAc;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA,mBAAmB,aAAa;AAChC;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,6GAAoB,EAAC;AACpC,gD;;ACtFkE;AAClE;AACA;AACA;AACA;AACO,MAAM,iCAAgB;AAC7B;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA,yBAAyB,UAAU;AACnC,mCAAmC,UAAU;AAC7C,mBAAmB,iCAAgB,EAAE,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU,kBAAkB,UAAU,CAAC,aAAa;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,iGAAgB,EAAC;AAChC,4C;;;;;;;;;;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC0B;AACsC;AAC8B;AAC9F;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,uBAAuB,YAAY,CAAC,cAAM;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,uBAAuB,YAAY,CAAC,cAAM;AAC1C,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,yBAAyB,GAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACO;AACP;AACA,4BAA4B,YAAY,CAAC,cAAM;AAC/C,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;AClIuB;AACa;AACN;AACuC;AACvB;AACvC,kBAAkB,cAAE;AAC3B;AACA;AACA;AACA;AACA;AACA,kBAAkB,YAAE;AACpB,kBAAkB,YAAE;AACpB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACO;AACP,QAAQ,KAAK;AACb,qBAAqB,oBAAoB;AACzC;AACA,oBAAoB,WAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,SAAS,WAAW;AACpB;AACA;AACA,SAAS,WAAW;AACpB,oBAAoB,qBAAqB;AACzC;AACA;AACA,wBAAwB,WAAM;AAC9B;AACA;AACA;AACA,mC;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC0B;AACM;AACV;AACmB;AACuC;AAC9B;AACV;AACxC;AACA;AACA;AACA;AACA;AACO;AACP,0CAA0C,YAAY;AACtD;AACA,sBAAsB,YAAY;AAClC;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,4BAA4B,0BAAM;AAClC,oBAAoB,KAAK;AACzB;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAY,CAAC,aAAG;AAC3B;AACA;AACA;AACA;AACO;AACP,WAAW,aAAG,aAAa,0BAAM;AACjC;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6BAA6B,0BAAM;AACnC,oBAAoB,KAAK;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU,CAAC,OAAO;AAC7B;AACA;AACA;AACA;AACO;AACP,iBAAiB,UAAU;AAC3B,wBAAwB,OAAO,CAAC,YAAY;AAC5C,WAAW,cAAM,QAAQ,0BAAM,MAAM,YAAY;AACjD;AACA;AACA;AACA;AACO;AACP,iBAAiB,YAAY,CAAC,cAAM;AACpC,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,IAAI;AACf;AACA;AACA;AACA;AACO;AACP,WAAW,YAAY,CAAC,mBAAmB;AAC3C;AACA,gC;;AC5H0C;AACsB;AACzD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,2BAAa;AAC1B;AACA;AACA;AACA;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;AACA,iEAAiE,aAAa;AAC9E;AACA,YAAY,SAAS;AACrB,oBAAoB,wBAAwB;AAC5C;AACA;AACA,8EAA8E,aAAa;AAC3F;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAAa,8BAA8B,UAAU,CAAC,wBAAwB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAM;AACtC,oCAAoC,aAAM;AAC1C;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA,uBAAuB,2BAAa;AACpC;AACA;AACA,uBAAuB,2BAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,gFAAa,EAAC;AACtB;AACP;AACA;AACA;AACA,sBAAsB,2BAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,yC;;AC9JO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACV,oDAAM,EAAC;AACtB,kC;;ACrHuB;AAC2E;AACZ;AACxD;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;AACA;AACA;AACA;AACA;AACA,2DAA2D,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,2BAAa,SAAS,yBAAY;AAC/C;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,aAAa;AACtC,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA,yBAAyB,SAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAM,SAAS,SAAM;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C,+CAA+C,gBAAa;AAC5D;AACA;AACA;AACA;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,SAAS;AACjB;AACA;AACA;AACA,uCAAuC,SAAM,YAAY,SAAM,UAAU,UAAU;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA,8CAA8C,SAAM;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,SAAS;AACjB;AACA,oBAAoB,SAAM;AAC1B,wBAAwB,aAAa;AACrC;AACA;AACA;AACA,sBAAsB,SAAM;AAC5B,wBAAwB,aAAa;AACrC;AACA;AACA;AACA,sBAAsB,SAAM;AAC5B,wBAAwB,aAAa;AACrC;AACA;AACA;AACA,sBAAsB,SAAM;AAC5B,wBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAE;AACzB;AACA,6BAA6B,SAAM;AACnC;AACA;AACA,6BAA6B,SAAM;AACnC;AACA;AACA,6BAA6B,SAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC,wCAAwC,aAAa;AACrD,iBAAiB,iBAAiB;AAClC,+CAA+C,SAAM,SAAS,SAAM;AACpE,iBAAiB,iBAAiB;AAClC;AACA,iBAAiB,iBAAiB;AAClC;AACA,iBAAiB,iBAAiB;AAClC;AACA,iBAAiB,iBAAiB;AAClC,wCAAwC,UAAU;AAClD;AACA,mEAAmE,WAAW;AAC9E;AACA;AACA;AACe,gFAAa,EAAC;AAC7B,yC;;ACtRqC;AACO;AAC5C;AACA;AACA;AACO;AACP,mBAAmB,gBAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C,kBAAkB,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mBAAmB,gBAAa;AAChC,gBAAgB,aAAa;AAC7B,kBAAkB,aAAa;AAC/B,kBAAkB,aAAa;AAC/B,kBAAkB,aAAa;AAC/B,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;ACrCoC;AAC7B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,mBAAS;AACtB;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA,yBAAyB,mBAAS,EAAE,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,mBAAS;AAC7D;AACA;AACA;AACA,6BAA6B,mBAAS;AACtC,+BAA+B,mBAAS;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACe,oEAAS,EAAC;AACzB,qC;;AC/HgC;AACT;AACS;AACJ;AACH;AACzB,iC;;ACL8C;AACE;AACT;AAChC;AACP;AACA;AACA;AACA,mBAAmB,2BAAa;AAChC;AACA;AACA,aAAa,WAAW;AACxB,+BAA+B,EAAE;AACjC;AACA;AACA,KAAK;AACL;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mBAAmB,yBAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,mBAAmB,yBAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACkC;AACF;AACY;AACM;AACT;AACO;AACV;AACF;AAC6B;AAChC;AACW;AACZ;AAChC;AACA,YAAY,oBAAc;AAC1B,SAAS,iBAAW;AACpB;AACA,qBAAqB,OAAO,kBAAO,WAAW,uBAAS;AACvD,MAAM,QAAG,GAAG,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACO,mDAAmD,cAAc;AACxE;AACA,eAAe,UAAU;AACzB,4BAA4B,cAAO;AACnC;AACA,yBAAyB,gBAAM;AAC/B,4BAA4B,gBAAM;AAClC;AACA;AACA,QAAQ,gBAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,MAAM;AAClC,kCAAkC,aAAG;AACrC,kCAAkC,UAAU;AAC5C,oBAAoB,QAAQ;AAC5B;AACA;AACA,qCAAqC,mBAAS;AAC9C,gBAAgB,QAAG,uCAAuC,aAAa;AACvE;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,yDAAyD,cAAc;AAC9E;AACA,eAAe,UAAU;AACzB,0BAA0B,YAAY,CAAC,mBAAS;AAChD;AACA;AACA,QAAQ,gBAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,aAAG;AACrC,mCAAmC,MAAM;AACzC,oCAAoC,cAAO;AAC3C,uCAAuC,gBAAM,CAAC,gBAAM;AACpD;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAG,gCAAgC,aAAa;AAChE;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,gC;;ACtGwB;AAC6C;AACrC;AACW;AACZ;AACkC;AACvB;AACmD;AAC7F,MAAM,WAAG,GAAG,OAAM;AAClB,gBAAgB,uBAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACO,MAAM,eAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mCAAmC;AACtE,mBAAmB,eAAO;AAC1B;AACA;AACA;AACA,sCAAsC,EAAE;AACxC;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,EAAE,wBAAwB;AAClE;AACA,+BAA+B,kBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,EAAE,wBAAwB;AAC1E;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA,iBAAiB,WAAW;AAC5B,8BAA8B,mBAAwB;AACtD;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA,iBAAiB,KAAK;AACtB,+BAA+B,oBAAyB;AACxD;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA,uDAAuD,IAAI;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAyB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA+B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qBAA0B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wBAA6B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,cAAc;AACpD;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,cAAc;AACpD;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,kCAAuC;AAC9E;AACA,gBAAgB,WAAG,8CAA8C,aAAa;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU,CAAC,OAAO;AACjC;AACA;AACe,kEAAO,EAAC;AACvB,mC;;AChT8B;AAC9B;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA,0BAA0B,aAAM;AAChC;AACA;AACA;AACA;AACA,kFAAkF,uBAAuB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,YAAY;AACZ;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;ACvE6C;AACf;AACqC;AACA;AACrB;AAC9C;AACO,iCAAiC,gBAAgB;AACxD;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACO;AACP;AACA,wFAAwF,aAAM;AAC9F;AACA;AACA;AACA,wBAAwB,mCAAiB;AACzC;AACA;AACA,wBAAwB,wBAAwB;AAChD,SAAS;AACT;AACA;AACA;AACA,mBAAmB,iCAAgB;AACnC;AACA;AACA,SAAS;AACT,KAAK;AACL,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,2BAA2B,aAAM;AACjC;AACA;AACA,yBAAyB,mCAAiB;AAC1C,qBAAqB,QAAQ;AAC7B;AACA,wBAAwB,wBAAwB;AAChD,SAAS;AACT;AACA;AACA;AACA;AACA,4BAA4B,MAAM;AAClC;AACA,iEAAiE,YAAY;AAC7E;AACA;AACA;AACA,4CAA4C,MAAM,UAAU,SAAS,uBAAuB,kBAAkB,gCAAgC;AAC9I;AACA,2CAA2C,yBAAY;AACvD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG,yBAAyB;AACjC;AACA;AACA,qC;;ACpFqC;AAC8D;AAC5F;AACP;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACO;AACP,WAAW,UAAU;AACrB;AACO,oCAAoC;AAC3C;AACA,8BAA8B,2BAA2B;AACzD;AACO,uCAAuC;AAC9C;AACA,0BAA0B,8BAA8B;AACxD;AACO;AACP,0CAA0C,yCAAoB;AAC9D,8BAA8B,aAAa;AAC3C;AACO;AACP,sCAAsC,iCAAgB;AACtD,8BAA8B,SAAS;AACvC;AACO;AACP,uCAAuC,mCAAiB;AACxD,8BAA8B,UAAU;AACxC;AACO;AACP,uCAAuC,eAAO;AAC9C,8BAA8B,UAAU;AACxC;AACA,gC;;ACrC0C;AACP;AACiD;AACvC;AACE;AACoD;AAC1D;AACC;AAC1C,MAAM,mBAAG,GAAG,OAAM;AACX,MAAM,+BAAe;AAC5B,uBAAuB;AACvB;AACA,qCAAqC,UAAU;AAC/C;AACA,yCAAyC,yCAAoB;AAC7D;AACA;AACA,qCAAqC,iCAAgB;AACrD;AACA;AACA,sCAAsC,mCAAiB;AACvD;AACA;AACA,sCAAsC,eAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU,CAAC,OAAO;AACjC;AACA;AACA,8BAA8B,mCAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mCAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yCAAoB,EAAE,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC,iCAAiC,WAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB,GAAG,eAAe,4BAA4B,aAAM;AACpF;AACA;AACA,QAAQ,mBAAG,sEAAsE,gBAAgB;AACjG;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,aAAa;AAC5B;AACA,eAAe,gBAAgB;AAC/B,eAAe,gBAAgB;AAC/B,eAAe,gBAAgB;AAC/B;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA,yBAAyB,eAAO;AAChC;AACA,0BAA0B,IAAI;AAC9B,QAAQ,mBAAG,0CAA0C,aAAa;AAClE,wBAAwB,eAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,+FAAe,EAAC;AAC/B,2C;;AC1IoC;AACpC;AACA;AACA;AACO,MAAM,SAAI;AACjB,6BAA6B;AAC7B;AACA;AACA,yBAAyB,QAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,6DAAI,EAAC;AACpB,gC;;ACxBsD;AAClB;AACV;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,yBAAY;AACzB,2BAA2B;AAC3B;AACA,6CAA6C,eAAI;AACjD;AACA,iEAAiE,eAAI;AACrE;AACA,iDAAiD,eAAI;AACrD;AACA;AACA;AACA,iEAAiE,QAAM;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC,YAAY,sBAAsB;AAClC,YAAY,sBAAsB;AAClC;AACA;AACe,qFAAY,EAAC;AAC5B,wC;;ACtCA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACmC;AACJ;AACK;AACgC;AACnC;AACoB;AAChB;AACrC;AACA;AACA,+BAA+B,WAAK;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,uBAAY;AAC/B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,eAAO;AACpB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAM;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAAe,QAAQ,uBAAW;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA,6BAA6B,eAAI,EAAE,4CAA4C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACe,kEAAO,EAAC;AACvB,mC;;ACrOoC;AACpC;AACA;AACA;AACA;AACO,MAAM,mBAAS;AACtB,kCAAkC;AAClC,yBAAyB,QAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,4EAAS,EAAC;AACzB,qC;;AClCwB;AACuB;AAC/C,MAAM,cAAO,GAAG,uBAAI;AACpB;AACA;AACA;AACO,MAAM,aAAM;AACnB,2BAA2B;AAC3B;AACA;AACA,iEAAiE,oBAAS;AAC1E;AACA;AACA;AACA;AACA,KAAK,cAAO;AACZ;AACA,sBAAsB,OAAO,IAAI,QAAQ,KAAK,mBAAmB;AACjE,SAAS;AACT,0BAA0B,SAAS,KAAK,aAAa,KAAK,oCAAoC;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,+DAAM,EAAC;AACtB,kC;;ACxC+B;AACH;AACL;AACvB,iC;;ACHA,IAAI,cAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC2D;AAC3B;AACI;AACpC,MAAM,UAAG,GAAG,OAAM;AAClB;AACA;AACA;AACO,MAAM,aAAM;AACnB,sBAAsB,cAAc;AACpC;AACA,sCAAsC,cAAc;AACpD,sCAAsC,EAAE,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,UAAG,6BAA6B,UAAU;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAO;AACrC,uBAAuB,eAAO;AAC9B;AACA;AACA;AACA;AACA,YAAY,UAAG,wBAAwB,QAAQ,aAAa,UAAU;AACtE;AACA;AACA,YAAY,UAAG,2CAA2C,UAAU;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAS;AACxB;AACA,0EAA0E,MAAM;AAChF;AACA;AACA,yFAAyF,MAAM;AAC/F;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA,QAAQ,UAAG,sBAAsB,qBAAqB,yBAAyB,UAAU;AACzF;AACA;AACA;AACe,+DAAM,EAAC;AACtB,kC;;AC/J0B;AACA;AACD;AACF;AACA;AACE;AACC;AACG;AACJ;AACE;AAC3B,iC;;ACVwC;AACmB;AACH;AACxD;AACA;AACA;AACA;AACO,MAAM,mCAAiB;AAC9B;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA,wBAAwB,UAAU;AAClC,sBAAsB,aAAM;AAC5B,2BAA2B,UAAU;AACrC,mBAAmB,mCAAiB,EAAE,6BAA6B;AACnE;AACA;AACA,wBAAwB,QAAQ;AAChC,2BAA2B,wBAAwB;AACnD,mBAAmB,mCAAiB,EAAE,6BAA6B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,aAAM;AAC/B;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,oGAAiB,EAAC;AACjC,6C;;AClDwE;AACqH;AAC7L;AACA;AACA;AACA;AACA;AACO,MAAM,eAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAO,EAAE,uCAAuC;AACnE;AACA;AACA;AACA,mCAAmC,kCAAkC;AACrE,mBAAmB,eAAO,EAAE,uCAAuC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D;AACA;AACA;AACA,6DAA6D,MAAM;AACnE;AACA,gEAAgE,QAAQ;AACxE;AACA;AACA;AACA,wCAAwC,eAAO;AAC/C,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA,wCAAwC,iCAAiC;AACzE;AACA;AACA;AACA;AACA,SAAS;AACT,iCAAiC,yCAAyC;AAC1E;AACA;AACA,iEAAiE,iBAAiB,WAAW,iBAAiB;AAC9G;AACA,mBAAmB,eAAO;AAC1B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU,CAAC,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU,CAAC,OAAO;AAC7C;AACA;AACe,sEAAO,EAAC;AACvB,mC;;ACpHgG;AACzF;AACP;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAK;AAChC;AACA;AACA;AACO,MAAM,+BAAe;AAC5B;AACA,uBAAuB,yBAAY;AACnC;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;AACA,mBAAmB,+BAAe,EAAE,0BAA0B;AAC9D;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B,eAAe,UAAU;AACzB;AACA,yBAAyB,aAAa;AACtC,eAAe,UAAU;AACzB;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,8FAAe,EAAC;AAC/B,2C;;AC/DuC;AACJ;AACC;AACV;AACQ;AAClC,iC;;ACLoD;AACnB;AACuB;AACY;AAChB;AACV;AAC1C;AACA;AACA;AACA;AACA;AACO,MAAM,iCAAgB,SAAS,+BAAe;AACrD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,QAAQ;AACzD;AACA;AACA,kEAAkE,iCAAgB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC,4BAA4B,iCAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,aAAM;AACrB;AACA,gBAAgB,mCAAiB;AACjC,yBAAyB,QAAQ;AACjC;AACA,4BAA4B,wBAAwB;AACpD,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,iCAAgB,EAAE,kBAAkB;AACvD;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAM,aAAM;AACrB,8BAA8B,mCAAiB;AAC/C,qBAAqB,QAAQ;AAC7B;AACA,wBAAwB,wBAAwB;AAChD,SAAS;AACT,gDAAgD,iCAAgB;AAChE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA,6BAA6B,iCAAgB;AAC7C;AACA;AACA,iCAAiC,iCAAgB;AACjD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,kGAAgB,EAAC;AAChC,4C;;ACzFgD;AAChD;AACA;AACA;AACO,MAAM,uCAAmB,SAAS,2BAAe;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uCAAmB;AAChD;AACA;AACA,iCAAiC,uCAAmB;AACpD;AACA;AACe,2GAAmB,EAAC;AACnC,+C;;AChC0C;AACe;AACL;AACpD;AACA;AACA;AACA;AACO,MAAM,2CAAqB,SAAS,+BAAe;AAC1D,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,aAAa;AAC9D;AACA;AACA,uBAAuB,aAAM;AAC7B;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C,kCAAkC,cAAc;AAChD;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,2CAAqB;AAClD;AACA;AACA,iCAAiC,2CAAqB;AACtD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,iHAAqB,EAAC;AACrC,iD;;ACnDO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC5B,+EAAe,EAAC;AAC/B,2C;;ACb0C;AACL;AACW;AACI;AACJ;AAChD;AACA;AACA;AACA;AACO,MAAM,iCAAgB,SAAS,+BAAe;AACrD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,QAAQ;AACzD,oBAAoB,2BAAe;AACnC;AACA,2CAA2C,+BAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC,iCAAiC,+BAAe;AAChD;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iCAAgB;AAC7C;AACA;AACA,iCAAiC,iCAAgB;AACjD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,kGAAgB,EAAC;AAChC,4C;;ACtD0C;AACU;AACA;AAC7C,MAAM,iCAAgB,SAAS,+BAAe;AACrD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC,kCAAkC,QAAQ;AAC1C;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,6BAA6B,iCAAgB;AAC7C;AACA;AACA,iCAAiC,iCAAgB;AACjD;AACA;AACe,kGAAgB,EAAC;AAChC,4C;;ACvC0C;AACI;AACiC;AAC3B;AACJ;AACzC,MAAM,2CAAqB,SAAS,+BAAe;AAC1D,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,aAAa;AAC9D,oBAAoB,2BAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gBAAgB;AACtD;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C,kCAAkC,YAAY;AAC9C;AACA;AACA,gBAAgB;AAChB;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,6BAA6B,2CAAqB;AAClD;AACA;AACA,iCAAiC,2CAAqB;AACtD;AACA;AACe,iHAAqB,EAAC;AACrC,iD;;AC7D0C;AACc;AACJ;AACJ;AACzC,MAAM,iCAAgB,SAAS,+BAAe;AACrD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,QAAQ;AACzD,oBAAoB,2BAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ,sBAAsB,QAAQ;AACxF;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iCAAgB;AAC7C;AACA;AACA,iCAAiC,iCAAgB;AACjD;AACA;AACe,kGAAgB,EAAC;AAChC,4C;;ACtCsE;AAC4C;AACnC;AAC3B;AACJ;AACzC,MAAM,uCAAmB,SAAS,+BAAe;AACxD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,WAAW;AAC5D,oBAAoB,2BAAe;AACnC;AACA;AACA,0BAA0B,aAAM;AAChC;AACA;AACA;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C,qBAAqB,aAAa;AAClC,uBAAuB,UAAU;AACjC,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC,+BAA+B,UAAU;AACzC;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA,kBAAkB,aAAa;AAC/B,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B;AACA,eAAe,aAAa;AAC5B,eAAe,mBAAmB;AAClC,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,6BAA6B,uCAAmB;AAChD;AACA;AACA,iCAAiC,uCAAmB;AACpD;AACA;AACe,2GAAmB,EAAC;AACnC,+C;;ACtG0C;AACsD;AAC5C;AACJ;AACzC,MAAM,qCAAkB,SAAS,+BAAe;AACvD,wBAAwB;AACxB,6BAA6B,UAAU,UAAU,UAAU;AAC3D,oBAAoB,2BAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,WAAW;AACvF;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,4EAA4E,WAAW;AACvF;AACA;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC,4BAA4B,aAAa;AACzC,uBAAuB,aAAa;AACpC,sBAAsB,aAAa;AACnC,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA,eAAe,UAAU;AACzB,eAAe,YAAY;AAC3B;AACA,mBAAmB,aAAa;AAChC;AACA,eAAe,UAAU;AACzB,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B,eAAe,UAAU;AACzB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAkB;AAC/C;AACA;AACA,iCAAiC,qCAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACe,wGAAkB,EAAC;AAClC,8C;;ACrHuC;AACa;AACE;AACM;AACI;AACV;AACA;AACU;AACV;AACM;AACF;AACuF;AACjJ;AACA;AACA;AACA,mBAAmB,iCAAgB;AACnC;AACA,mBAAmB,iCAAgB;AACnC;AACA,mBAAmB,iCAAgB;AACnC;AACA,mBAAmB,2CAAqB;AACxC;AACA,mBAAmB,uCAAmB;AACtC;AACA,mBAAmB,uCAAmB;AACtC;AACA,mBAAmB,qCAAkB;AACrC;AACA,mBAAmB,2CAAqB;AACxC;AACA,mBAAmB,iCAAgB;AACnC;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAW,SAAS,+BAAe;AAChD;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uBAAuB,yBAAY;AACnC,oBAAoB,eAAe;AACnC;AACA,gBAAgB,kBAAkB;AAClC;AACA,gBAAgB,qBAAqB;AACrC,gBAAgB,iBAAiB;AACjC,gBAAgB,kBAAkB;AAClC;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,mFAAW,EAAC;AAC3B,uC;;ACtFkC;AACJ;AACK;AACG;AACE;AACL;AACA;AACA;AACG;AACJ;AACM;AACH;AACrC,iC;;ACZ6B;AACC;AACH;AACG;AAC2B;AACzD,iC;;ACLkD;AAC3C;AAC+B;AAC/B;AACP;AACA;AACA;AACA,oC;;ACPA,IAAI,aAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC0B;AACc;AACC;AACT;AACM;AAC8B;AACpE,MAAM,SAAG,GAAG,OAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACO,uCAAuC;AAC9C,WAAW,aAAS;AACpB,qCAAqC,EAAE,WAAW;AAClD;AACA,sBAAsB,qCAAqC;AAC3D,qBAAqB,OAAO;AAC5B,SAAS;AACT,+BAA+B,eAAK;AACpC;AACA,KAAK;AACL;AACA;AACA;AACA;AACO,MAAM,WAAK;AAClB;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,+BAAe;AACjE;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAK;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,EAAE,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,eAAe,aAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,IAAI,IAAI,uBAAuB;AAClE;AACA;AACA,gBAAgB,SAAG,eAAe,gBAAgB;AAClD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB;AACA;AACe,yDAAK,EAAC;AACrB,iC;;ACzVA,IAAI,iBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACkE;AAClC;AACM;AACuB;AACjC;AAC5B,MAAM,aAAG,GAAG,OAAM;AAClB;AACA;AACA;AACA;AACO,MAAM,mBAAS;AACtB;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C,oBAAoB,WAAW;AAC/B,uBAAuB,WAAW;AAClC;AACA,yBAAyB,WAAW;AACpC,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,0BAA0B,SAAK;AAC/B;AACA,4DAA4D,UAAU,OAAO,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,uBAAuB,OAAO;AAC9B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,aAAG,cAAc,SAAS,mBAAmB,iBAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAK;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,iBAAiB,SAAS;AAC1B,0DAA0D,KAAK;AAC/D;AACA,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,gBAAgB;AAChC;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB;AACA,oDAAoD,SAAK;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAS;AACxB,gDAAgD,SAAK;AACrD,uBAAuB,aAAM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,wBAAwB,eAAO;AAC/B;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,SAAI;AACxE;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,qEAAS,EAAC;AACzB,qC;;ACxX6C;AAC7C;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,wEAAwE,YAAY,WAAW,oBAAoB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,aAAa;AACxB;AACA;AACA;AACA;AACO;AACP,WAAW,aAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,UAAU;AACvD;AACA,KAAK;AACL;AACA,iC;;ACvD0B;AACC;AACH;AACI;AACJ;AACxB,iC;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkC;AACG;AACR;AACF;AACY;AACZ;AACF;AACU;AACyB;AAC5D,iC;;;;;;ACTA,iBAAiB,mBAAO,CAAC,EAAa,E;;;;;;;ACAzB;;AAEb,WAAW,mBAAO,CAAC,EAAgB;AACnC,eAAe,mBAAO,CAAC,EAAW;;AAElC;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,2BAA2B;AAC3B;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gCAAgC;AAChC,KAAK;AACL;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7UA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,mBAAO,CAAC,CAAQ;AAC7B,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,sBAAsB;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;AACA,KAAK;AACL,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA;;AAEA,YAAY,eAAe;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,gBAAgB;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,UAAU,6BAA6B;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,YAAY,cAAc;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,UAAU,6BAA6B;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,OAAO;AAC1B;;AAEA;AACA;;AAEA,qBAAqB,OAAO;AAC5B;AACA;;AAEA,uBAAuB,OAAO;AAC9B;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,GAAG;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,WAAW;AAC9B;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;;AAEA,kCAAkC;AAClC,sCAAsC;AACtC;;AAEA;AACA,qBAAqB,OAAO;AAC5B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA,6BAA6B,cAAc;AAC3C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,QAAQ;AACvC;AACA;;AAEA,iBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,+CAA+C;AAClE;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,yBAAyB;AACnC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,cAAc;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,QAAQ;AAC/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC,QAAQ;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,QAAQ;AACzC;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,MAA6B;;;;;;;;ACl2GhC,CAAC;AACD,KAAK,IAA2B;AAChC;AACA;AACA;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,oCAAoC,YAAY;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA,MAAM;;AAEN;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU;;AAEV;;AAEA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;;ACvvBY;;AAEb;;AAEA,mBAAmB,mBAAO,CAAC,EAAiB;AAC5C,iBAAiB,mBAAO,CAAC,EAAkB;AAC3C,gBAAgB,mBAAO,CAAC,EAAS;AACjC,iBAAiB,mBAAO,CAAC,EAAkB;AAC3C,kBAAkB,mBAAO,CAAC,EAAmB;;AAE7C;AACA,cAAc,mBAAO,CAAC,EAAe;AACrC,iBAAiB,mBAAO,CAAC,GAAkB;;;;;;;;ACZ9B;;AAEb,aAAa,mBAAO,CAAC,CAAqB;AAC1C,eAAe,mBAAO,CAAC,EAAU;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACrRA,YAAY,mBAAO,CAAC,EAAQ;AAC5B;;AAEA;;;;;;;ACHA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACVA,mC;;;;;;ACAA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;ACtMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAA0C;AAClD,QAAQ,oCAAO,UAAU;AAAA;AAAA;AAAA;AAAA,oGAAC;AAC1B,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,qEAAqE;AACrE,WAAW;AACX;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;ACzPD,iC;;;;;;;ACAa;;AAEb,YAAY,mBAAO,CAAC,CAAS;AAC7B,aAAa,mBAAO,CAAC,CAAqB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;;AAEA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,oBAAoB;AACnC;AACA;;AAEA;AACA;;;;;;;AC3FA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;;AAEA,CAAC,G;;;;;;;ACjBY;;AAEb;;AAEA,aAAa,mBAAO,CAAC,EAAQ;AAC7B,cAAc,mBAAO,CAAC,EAAS;AAC/B,aAAa,mBAAO,CAAC,EAAQ;AAC7B,gBAAgB,mBAAO,CAAC,EAAW;;;;;;;ACPnC;AACA,aAAa,mBAAO,CAAC,EAAM;AAC3B;AACA;AACA,CAAC;AACD,mBAAmB,mBAAO,CAAC,EAAuB;AAClD;;;;;;;;ACNY;;AAEZ,iBAAiB,mBAAO,CAAC,EAAa;AACtC,oBAAoB,mBAAO,CAAC,EAAQ;;AAEpC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACXa;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACtEa;;AAEb,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA,mC;;;;;;ACAA;;AAEA,aAAa,mBAAO,CAAC,CAAc;AACnC,cAAc,mBAAO,CAAC,EAAe;AACrC,WAAW,mBAAO,CAAC,EAAY;AAC/B,cAAc,mBAAO,CAAC,EAAe;AACrC,YAAY,mBAAO,CAAC,EAAa;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACdA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ,GAAG,mBAAO,CAAC,EAAU;AAC1E;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA,8EAA8E,kBAAkB;AAChG;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA,8EAA8E,kBAAkB;AAChG;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA,wGAAwG,kBAAkB;AAC1H;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU;;AAEV;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,MAAM;;AAEN;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA,uBAAuB,KAAK;AAC5B,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA,MAAM;;AAEN;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B,mBAAmB,UAAU;AAC7B,mBAAmB,UAAU;AAC7B,mBAAmB,UAAU;AAC7B,mBAAmB,OAAO;AAC1B,mBAAmB,KAAK;AACxB,mBAAmB,QAAQ;AAC3B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,yCAAyC,qCAAqC;AAC9E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,iBAAiB;AACrC,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,iHAAiH,SAAS;AAC1H,iHAAiH,0CAA0C;AAC3J;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,oBAAoB;AACxC,oBAAoB,UAAU;AAC9B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA,sHAAsH,0CAA0C;AAChK,mHAAmH,0CAA0C;AAC7J;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,4BAA4B;;AAElE;AACA;AACA;;AAEA;AACA,yCAAyC,+BAA+B;AACxE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,IAAI;AAC3B;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,iBAAiB;AACrC,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH,kCAAkC;AAC3J;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,oBAAoB;AACxC,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA,8HAA8H,kCAAkC;AAChK,2HAA2H,kCAAkC;AAC7J;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN,EAAE;;;AAGF,CAAC,G;;;;;;AC/2BD;AACA,MAAM,IAA0C;AAChD,IAAI,oCAAO,OAAO;AAAA;AAAA;AAAA;AAAA,oGAAC;AACnB,GAAG,MAAM,EAIN;AACH,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,gDAAgD,EAAE,IAAI,EAAE,IAAI,EAAE;AAC9D,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;ACpJD,gBAAgB,mBAAO,CAAC,EAAW;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9DA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ,GAAG,mBAAO,CAAC,GAAc,GAAG,mBAAO,CAAC,GAAO,GAAG,mBAAO,CAAC,EAAU,GAAG,mBAAO,CAAC,EAAe;AAC/I;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,mBAAmB;AACtD;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;;ACvOY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,cAAc,OAAO,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,QAAQ;AAC3B,mBAAmB,qBAAqB;AACxC,mBAAmB,iBAAiB;AACpC,8BAA8B,cAAc;;AAE5C;AACA,mBAAmB,QAAQ;AAC3B,mBAAmB,qBAAqB;;AAExC;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA,mBAAmB,OAAO;AAC1B;AACA;;AAEA,mBAAmB,OAAO;AAC1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC,4CAA4C,cAAc;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,oCAAoC;AACpE;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,qCAAqC;;AAE7D;AACA;AACA;;AAEA;;AAEA,6CAA6C,yCAAyC;;AAEtF,sCAAsC,gCAAgC;AACtE,sCAAsC,gCAAgC;;AAEtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,oCAAoC;AACpC,qCAAqC;;AAErC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mCAAmC;AACnC;;AAEA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,OAAO;AAC7C;;AAEA,gDAAgD;;AAEhD,8BAA8B;AAC9B;;AAEA;;AAEA;;AAEA;AACA;AACA,wCAAwC,eAAe;AACvD,mCAAmC,WAAW,OAAO;AACrD;AACA,0DAA0D;AAC1D;;AAEA,sCAAsC,OAAO;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;AAC3B;;AAEA;;AAEA;;AAEA;AACA;AACA,wCAAwC,eAAe;AACvD,mCAAmC,WAAW,OAAO;AACrD,sDAAsD;AACtD;AACA,oDAAoD;AACpD,0DAA0D;AAC1D;;AAEA,sCAAsC,OAAO;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA,gDAAgD;;AAEhD,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,QAAQ,IAA+B;AACvC;;AAEA;AACA;AACA;AACA,KAAK,MAAM,EAYN;;AAEL,CAAC;;;;;;;;ACrcY;;AAEb;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;;;;;;;;ACJa;;AAEb,YAAY,mBAAO,CAAC,CAAS;AAC7B,0BAA0B,mBAAO,CAAC,EAA+B;;AAEjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,EAAiB;AACvC,GAAG;AACH;AACA,cAAc,mBAAO,CAAC,EAAgB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,OAAO,YAAY;AACnB;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;;;;;;;ACjGa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;;AAEzC;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBa;;AAEb;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA,iC;;;;;;ACAA,kC;;;;;;ACAA,UAAU,mBAAO,CAAC,EAAK;AACvB,WAAW,mBAAO,CAAC,EAAM;AACzB,YAAY,mBAAO,CAAC,EAAO;AAC3B,aAAa,mBAAO,CAAC,EAAQ;AAC7B,eAAe,mBAAO,CAAC,EAAQ;AAC/B,YAAY,mBAAO,CAAC,EAAO;;AAE3B;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iCAAiC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,sBAAsB,uCAAuC,EAAE;AAC/D,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,uBAAuB,2BAA2B;AAClD;;;;;;;ACjUA,gC;;;;;;;ACCA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,EAAI;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa,SAAS;AACtB,4BAA4B;AAC5B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChOa;;AAEb,YAAY,mBAAO,CAAC,CAAU;;AAE9B;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;AClDa;;AAEb;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;AACA,aAAa,mBAAO,CAAC,CAAQ;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Da;;AAEb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA,GAAG;AACH,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDa;;AAEb,YAAY,mBAAO,CAAC,CAAU;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChDa;;AAEb,YAAY,mBAAO,CAAC,CAAU;AAC9B,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAU;AAClC,aAAa,mBAAO,CAAC,CAAqB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,QAAQ;AACzB;AACA,QAAQ,cAAc;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGa;;AAEb,YAAY,mBAAO,CAAC,CAAU;AAC9B,aAAa,mBAAO,CAAC,EAAW;AAChC,aAAa,mBAAO,CAAC,CAAqB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,QAAQ;AACzB;AACA,QAAQ,cAAc;AACtB,8CAA8C;AAC9C;AACA,0BAA0B;AAC1B;AACA,gDAAgD;AAChD;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACzUA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ,GAAG,mBAAO,CAAC,GAAQ,GAAG,mBAAO,CAAC,GAAQ;AAC3F;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,uDAAuD,aAAa;AACpE,uDAAuD,+BAA+B;AACtF;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,gBAAgB,iBAAiB;AACjC,gBAAgB,OAAO;AACvB;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,aAAa;AACpE,uDAAuD,+BAA+B;AACtF;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;ACnID,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;;AAEA;;AAEA;AACA;;AAEA,kdAAkd,+BAA+B;AACjf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;;AAEA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,OAAO;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA,MAAM;;;AAGN;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;AC1QD;AACA;;AAEA;AACA,IAAI,IAA2C,GAAG;AAClD,EAAE,iCAAO,EAAE,mCAAE;AACb;AACA,GAAG;AAAA,oGAAC;AACJ,CAAC,MAAM,EAIN;AACD;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,mBAAO,CAAC,EAAQ;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW,OAAO;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,wBAAwB,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,cAAc;AAChD;;AAEA;AACA,kCAAkC,mBAAmB;AACrD;;AAEA;AACA,kCAAkC,eAAe;AACjD;;;AAGA,CAAC;;;;;;;AC7ED,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;;AAEA,CAAC,G;;;;;;ACjBD,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ,GAAG,mBAAO,CAAC,EAAe;AAC/E;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;ACvCD,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ,GAAG,mBAAO,CAAC,EAAe;AAC/E;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;;AAGA;;AAEA,CAAC,G;;;;;;;AC7BY;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,mCAAmC,mBAAO,CAAC,GAAsB;AACjE,8BAA8B,mBAAO,CAAC,CAAuB;AAC7D,oCAAoC,mBAAO,CAAC,GAAuB;AACnE;AACA;AACA;AACA,mCAAmC,mBAAO,CAAC,GAAY;AACvD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC1Ha;;AAEb,YAAY,mBAAO,CAAC,CAAS;AAC7B,WAAW,mBAAO,CAAC,EAAgB;AACnC,YAAY,mBAAO,CAAC,EAAc;AAClC,kBAAkB,mBAAO,CAAC,EAAoB;AAC9C,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe,mBAAO,CAAC,EAAiB;AACxC,oBAAoB,mBAAO,CAAC,EAAsB;AAClD,iBAAiB,mBAAO,CAAC,EAAmB;;AAE5C;AACA;AACA;AACA;AACA,eAAe,mBAAO,CAAC,EAAkB;;AAEzC;;AAEA;AACA;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb,YAAY,mBAAO,CAAC,CAAY;AAChC,eAAe,mBAAO,CAAC,EAAqB;AAC5C,yBAAyB,mBAAO,CAAC,EAAsB;AACvD,sBAAsB,mBAAO,CAAC,EAAmB;AACjD,kBAAkB,mBAAO,CAAC,EAAe;;AAEzC;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;;;;;;;;ACrFa;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACnDa;;AAEb,YAAY,mBAAO,CAAC,CAAY;AAChC,oBAAoB,mBAAO,CAAC,EAAiB;AAC7C,eAAe,mBAAO,CAAC,EAAoB;AAC3C,eAAe,mBAAO,CAAC,EAAa;AACpC,oBAAoB,mBAAO,CAAC,EAA4B;AACxD,kBAAkB,mBAAO,CAAC,EAA0B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;ACrFa;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,MAAM;AACjB,WAAW,eAAe;AAC1B,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;ACnBa;;AAEb,YAAY,mBAAO,CAAC,CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACXa;;AAEb,YAAY,mBAAO,CAAC,CAAY;AAChC,aAAa,mBAAO,CAAC,EAAkB;AACvC,eAAe,mBAAO,CAAC,EAAuB;AAC9C,WAAW,mBAAO,CAAC,EAAM;AACzB,YAAY,mBAAO,CAAC,EAAO;AAC3B,iBAAiB,mBAAO,CAAC,EAAkB;AAC3C,kBAAkB,mBAAO,CAAC,EAAkB;AAC5C,UAAU,mBAAO,CAAC,EAAK;AACvB,WAAW,mBAAO,CAAC,EAAM;AACzB,UAAU,mBAAO,CAAC,EAAsB;AACxC,kBAAkB,mBAAO,CAAC,EAAqB;AAC/C,mBAAmB,mBAAO,CAAC,EAAsB;;AAEjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,GAAG;AACH;;;;;;;AClRA,mC;;;;;;ACAA,mC;;;;;;ACAA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAO,CAAC,EAAc;AACzC,CAAC;AACD,mBAAmB,mBAAO,CAAC,EAAW;AACtC;;;;;;;ACTA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,mBAAO,CAAC,EAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;AClMA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvJA;AACA;AACA;;AAEA,UAAU,mBAAO,CAAC,EAAK;AACvB,WAAW,mBAAO,CAAC,EAAM;;AAEzB;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,mBAAO,CAAC,EAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAsB,mBAAO,CAAC,EAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB;;AAEpE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,IAAI;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iDAAiD,EAAE;AACnD,sCAAsC;;AAEtC;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACzLA,gC;;;;;;;ACAa;AACb,WAAW,mBAAO,CAAC,EAAI;AACvB,gBAAgB,mBAAO,CAAC,EAAU;;AAElC,OAAO,IAAI;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,GAAG;AACpC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACzIA,+B;;;;;;;ACAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACPA,iC;;;;;;;;;;;;;ACAa;;AAEb,YAAY,mBAAO,CAAC,CAAY;AAChC,aAAa,mBAAO,CAAC,EAAkB;AACvC,eAAe,mBAAO,CAAC,EAAuB;AAC9C,mBAAmB,mBAAO,CAAC,EAA2B;AACtD,sBAAsB,mBAAO,CAAC,EAA8B;AAC5D,kBAAkB,mBAAO,CAAC,EAAqB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,EAAsB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;AC7Ka;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;ACpDa;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;ACnEa;;AAEb,YAAY,mBAAO,CAAC,CAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;AAC1C,SAAS;;AAET;AACA,4DAA4D,wBAAwB;AACpF;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,kCAAkC;AAClC,+BAA+B,aAAa,EAAE;AAC9C;AACA;AACA,KAAK;AACL;;;;;;;;ACpDa;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACba;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACba;;AAEb,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;AACA;AACA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;;AAEpC;AACA;;AAEA;AACA;;AAEA,iBAAiB,qBAAqB;AACtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,4CAA4C;AACzE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,WAAW;;AAErB;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6BAA6B,4CAA4C;AACzE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrJA,iBAAiB,mBAAO,CAAC,EAAQ;;;;;;;;ACArB;;AAEZ,aAAa,mBAAO,CAAC,CAAM;AAC3B,aAAa,mBAAO,CAAC,EAAa;;AAElC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;ACrBa;;AAEb;AACA,SAAS,mBAAO,CAAC,CAAO;AACxB,gBAAgB,mBAAO,CAAC,CAAqB;AAC7C,eAAe,mBAAO,CAAC,EAA2B;;AAElD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACtHA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,mBAAO,CAAC,EAAQ;AACjC;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;AChEa;;AAEb,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,QAAQ;AAC3B;;AAEA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,WAAW;AAC5B,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;;;;;;;;ACtXa;;AAEb,YAAY,mBAAO,CAAC,EAAU;AAC9B,eAAe,mBAAO,CAAC,CAAgB;AACvC,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,EAAU;AACjC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK,eAAe;AACpB,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACx6BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBa;;AAEb,YAAY,mBAAO,CAAC,EAAU;AAC9B,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,EAAU;AACjC;;AAEA,eAAe,mBAAO,CAAC,CAAgB;AACvC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf,uCAAuC;AACvC,eAAe;;AAEf,qBAAqB,iBAAiB;AACtC;;AAEA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;ACnLa;;AAEb,YAAY,mBAAO,CAAC,EAAU;AAC9B,eAAe,mBAAO,CAAC,CAAgB;AACvC,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,EAAU;AACjC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChba;;AAEb;;AAEA,WAAW,mBAAO,CAAC,EAAS;AAC5B,eAAe,mBAAO,CAAC,CAAa;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,QAAQ,mBAAO,CAAC,EAAyB;AACzC,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AC5MY;;AAEb,eAAe,mBAAO,CAAC,EAAS;AAChC,iBAAiB,mBAAO,CAAC,EAAW;AACpC,iBAAiB,mBAAO,CAAC,EAAW;AACpC,iBAAiB,mBAAO,CAAC,EAAW;AACpC,iBAAiB,mBAAO,CAAC,EAAW;;;;;;;;ACNvB;;AAEb,YAAY,mBAAO,CAAC,CAAU;AAC9B,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAU;;AAElC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,QAAQ;AACzB;;AAEA,OAAO,cAAc;AACrB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEa;;AAEb,YAAY,mBAAO,CAAC,CAAU;AAC9B,aAAa,mBAAO,CAAC,EAAO;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5Ba;;AAEb,YAAY,mBAAO,CAAC,CAAU;;AAE9B,aAAa,mBAAO,CAAC,EAAO;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCa;;AAEb,YAAY,mBAAO,CAAC,CAAS;AAC7B,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjJa;;AAEb,YAAY,mBAAO,CAAC,CAAS;AAC7B,aAAa,mBAAO,CAAC,CAAqB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,oBAAoB;AAC9C;;AAEA,aAAa,gBAAgB;AAC7B;AACA;;AAEA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3wBa;;AAEb,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,GAAW;AAClC,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;;AAEA,cAAc,mBAAO,CAAC,GAAO;AAC7B,gBAAgB,mBAAO,CAAC,GAAa;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,2CAA2C;AACrE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC/Oa;;AAEb,WAAW,mBAAO,CAAC,EAAS;AAC5B,YAAY,mBAAO,CAAC,EAA2B;AAC/C,aAAa,mBAAO,CAAC,CAAqB;;AAE1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AChHa;;AAEb,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;;AAEZ,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;ACtHa;;AAEb,SAAS,mBAAO,CAAC,CAAO;;AAExB,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtIa;;AAEb,WAAW,mBAAO,CAAC,EAAS;AAC5B,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;AACA;AACA,cAAc,mBAAO,CAAC,GAAO;AAC7B,gBAAgB,mBAAO,CAAC,GAAa;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,UAAU,aAAa;AACvB,UAAU,qBAAqB;AAC/B,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iCAAiC;AAC9D;;AAEA;AACA,UAAU,MAAM;AAChB,UAAU,uBAAuB;AACjC,UAAU,2BAA2B;AACrC,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACrHa;;AAEb,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,UAAU,MAAM;AAChB,UAAU,OAAO;AACjB;AACA,UAAU,YAAY;AACtB,UAAU,MAAM;AAChB,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,WAAW;AACxC;;AAEA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb,SAAS,mBAAO,CAAC,CAAO;AACxB,eAAe,mBAAO,CAAC,CAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,UAAU,MAAM;AAChB,UAAU,oBAAoB;AAC9B,UAAU,mBAAmB;AAC7B,UAAU,gBAAgB;AAC1B,UAAU,aAAa;AACvB,UAAU,aAAa;AACvB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACjEA,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA;;AAEA;;AAEA,gCAAgC,sCAAsC;AACtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,UAAU;;AAEV;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;ACtID,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,OAAO;AACnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;AC3QD,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,gBAAgB,iBAAiB;AACjC;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA,CAAC,G;;;;;;ACrJD,CAAC;AACD,KAAK,IAA2B;AAChC;AACA,qCAAqC,mBAAO,CAAC,CAAQ;AACrD;AACA,MAAM,EAOJ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;;AAEV;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN,EAAE;;;AAGF,CAAC,G;;;;;;;AC9IY;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjGA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACkE;AACxC;AAC1B,YAAY,cAAO;AACnB,iBAAiB,YAAK;AACtB;AACA,4CAA4C,SAAS,IAAI,YAAY;AACrE;AACO;AACP;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,+BAA+B,eAAK,2BAA2B,aAAa,2CAA2C;AACvH;AACA;AACA;AACA;AACA,wBAAwB,aAAM;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ,eAAe,IAAI;AACrE;AACA,KAAK;AACL;AACO;AACP;AACA,+BAA+B,eAAK,2BAA2B,aAAa,4CAA4C;AACxH;AACA;AACA;AACA;AACA,mBAAmB,aAAM;AACzB;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACO;AACP;AACA,+BAA+B,eAAK,2BAA2B,aAAa,4CAA4C;AACxH;AACA;AACA;AACA;AACA,mBAAmB,QAAC;AACpB,KAAK;AACL;AACA,gC;;ACzFqD;AACa;AAClE,MAAM,SAAG,GAAG,cAAO;AACZ,MAAM,YAAM;AACnB;AACA,yBAAyB,SAAS;AAClC;AACA;AACA;AACA,uBAAuB,UAAG;AAC1B,QAAQ,SAAG,kCAAkC,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,6DAAM,EAAC;AACtB,iC;;AChC8C;AACvB;AACvB,iC;;ACFO;AACP;AACA;AACO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACe,yDAAQ,EAAC;AACxB,oC;;ACXA,IAAI,cAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC4C;AACrC;AACP;AACA;AACO;AACP,WAAW,cAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP,WAAW,cAAS;AACpB,0CAA0C,UAAG;AAC7C;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;ACtCA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC2D;AACjC;AACoC;AACmB;AACjF,MAAM,QAAG,GAAG,cAAO;AACnB;AACA;AACA;AACA;AACA;AACO,SAAS,mBAAc;AAC9B,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA;AACA;AACA,wBAAwB,qCAAqC;AAC7D,YAAY,QAAgB;AAC5B,oBAAoB,eAAe;AACnC;AACA,0BAA0B,uBAAuB;AACjD,8BAA8B,UAAU;AACxC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAU;AAC1B,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,wBAAwB,aAAM,UAAU,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,QAAG,+BAA+B,QAAQ,eAAe,IAAI;AACrE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAS;AACzB,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA;AACA;AACA,2BAA2B,QAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ,QAAG,8BAA8B,QAAQ,eAAe,IAAI;AACpE,mBAAmB,aAAM;AACzB;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,sBAAiB;AACjC,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,QAAQ,QAAG,8EAA8E,QAAQ,eAAe,IAAI;AACpH,mBAAmB,QAAC;AACpB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,QAAQ,QAAG,+BAA+B,QAAQ,eAAe,IAAI;AACrE;AACA;AACA;AACA,6BAA6B,QAAC;AAC9B,6BAA6B,QAAC;AAC9B,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,KAAK;AACL;AACA,gC;;AClIA,IAAI,aAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC+D;AACqD;AACpH,MAAM,gBAAG,GAAG,cAAO;AACZ,MAAM,YAAM;AACnB;AACA;AACA;AACA,YAAY,eAAQ,kBAAkB,eAAQ;AAC9C,uBAAuB,eAAQ;AAC/B;AACA;AACA;AACA;AACA,QAAQ,gBAAG,kCAAkC,SAAS;AACtD;AACA;AACA,yBAAyB,SAAS;AAClC;AACA;AACA,eAAe,aAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,mBAAc;AACnD,2BAA2B,UAAG;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA,eAAe,eAAU;AACzB;AACA;AACA,eAAe,cAAS;AACxB;AACA;AACA,eAAe,sBAAiB;AAChC;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACe,6DAAM,EAAC;AACtB,iC;;AC5D8C;AACvB;AACvB,iC;;ACFA,IAAI,oBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACkE;AACvB;AACjB;AACuD;AACjF,MAAM,gBAAG,GAAG,cAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8CAA8C,QAAC;AAC/C;AACA;AACA,8CAA8C,QAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iCAAiC;AACzD;AACA;AACA,wBAAwB,iCAAiC;AACzD;AACA,sCAAsC,YAAK;AAC3C,sCAAsC,YAAK;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2BAAc;AAC9B,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,YAAY,QAAiB;AAC7B,oBAAoB,eAAe;AACnC;AACA,0BAA0B,uBAAuB;AACjD,8BAA8B,UAAU;AACxC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uBAAU;AAC1B,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA;AACA,uBAAuB,aAAM,UAAU,oBAAoB;AAC3D;AACA,wBAAwB,aAAM;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAG,+BAA+B,QAAQ,gBAAgB,IAAI;AACtE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,sBAAS;AACzB,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA;AACA,uBAAuB,aAAM,SAAS,wBAAwB;AAC9D;AACA;AACA,QAAQ,gBAAG,8BAA8B,QAAQ,gBAAgB,IAAI;AACrE,mBAAmB,aAAM;AACzB;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,8BAAiB;AACjC,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,QAAQ,gBAAG,8EAA8E,QAAQ,gBAAgB,IAAI;AACrH,mBAAmB,QAAC;AACpB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAS;AACzB,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,2BAA2B;AACvC;AACO,SAAS,0BAAqB;AACrC,WAAW,oBAAS;AACpB,+BAA+B,eAAK;AACpC;AACA,QAAQ,gBAAG,+BAA+B,QAAQ,gBAAgB,IAAI;AACtE;AACA,KAAK;AACL;AACA,gC;;AC7KA,IAAI,qBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC+D;AACqD;AACpH,MAAM,iBAAG,GAAG,cAAO;AACZ,MAAM,aAAO;AACpB;AACA;AACA;AACA,YAAY,eAAQ,kBAAkB,eAAQ;AAC9C,uBAAuB,eAAQ;AAC/B;AACA;AACA;AACA;AACA,QAAQ,iBAAG,mCAAmC,SAAS;AACvD;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA,eAAe,qBAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,2BAAc;AACnD,2BAA2B,UAAG;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA,eAAe,uBAAU;AACzB;AACA;AACA,eAAe,sBAAS;AACxB;AACA;AACA,eAAe,8BAAiB;AAChC;AACA;AACA,eAAe,cAAS;AACxB;AACA;AACA,eAAe,0BAAqB;AACpC;AACA;AACe,+DAAO,EAAC;AACvB,iC;;ACzD8C;AACvB;AACvB,iC;;ACFA,IAAI,oBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC2D;AAC3D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,4DAA4D,KAAK;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,oBAAS;AACpB;AACA,mCAAmC,SAAE,qBAAqB,QAAC,YAAY,aAAM;AAC7E;AACA,wDAAwD,QAAC,cAAc,QAAC;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,oBAAS;AACpB,oCAAoC,UAAG;AACvC,eAAe,aAAa;AAC5B,4BAA4B,SAAE;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,kC;;ACzEA,IAAI,cAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC0D;AACjB;AAClC;AACP,WAAW,cAAS;AACpB,QAAQ,aAAa;AACrB,wBAAwB,SAAE;AAC1B;AACA;AACA,KAAK;AACL;AACO;AACP,WAAW,cAAS;AACpB,QAAQ,aAAa;AACrB,wBAAwB,SAAE,oCAAoC,0BAA0B;AACxF;AACA;AACA,KAAK;AACL;AACO;AACP,WAAW,cAAS;AACpB,QAAQ,aAAa;AACrB;AACA,cAAc,SAAE;AAChB;AACA,wBAAwB,SAAE;AAC1B;AACA;AACA;AACA,SAAS;AACT,kDAAkD,aAAM;AACxD;AACA,KAAK;AACL;AACO;AACP,WAAW,cAAS;AACpB;AACA,gBAAgB,SAAE;AAClB,sBAAsB,SAAE;AACxB,qBAAqB,QAAC;AACtB;AACA,uBAAuB,QAAC;AACxB,aAAa;AACb;AACA,wBAAwB,SAAE,mBAAmB,cAAc;AAC3D;AACA,KAAK;AACL;AACA,kC;;ACvDA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACmD;AACV;AACzC;AACA,6BAA6B,SAAE;AAC/B;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,QAAQ,aAAa;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP,uBAAuB,aAAM;AAC7B,oCAAoC,YAAS;AAC7C,oBAAoB,aAAM;AAC1B,wBAAwB,SAAE;AAC1B;AACA,KAAK;AACL;AACA,gC;;ACzCA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC+C;AACH;AAC5C;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,wCAAwC,aAAM;AAC9C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,uCAAuC,aAAM;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,gC;;ACzEA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC8C;AACsB;AACpE;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACO;AACP,WAAW,YAAS;AACpB;AACA;AACA;AACA,mCAAmC,SAAE,qBAAqB,QAAC;AAC3D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACO;AACP,WAAW,YAAS;AACpB;AACA;AACA;AACA,kCAAkC,wCAAwC;AAC1E;AACA;AACA;AACA,KAAK;AACL;AACA,gC;;ACzCA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACqD;AACZ;AACzC,MAAM,QAAG,GAAG,cAAO;AACnB;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACO;AACP,WAAW,YAAS;AACpB,QAAQ,aAAa;AACrB,+BAA+B,UAAG;AAClC;AACA;AACA;AACA;AACA,YAAY,QAAG,iCAAiC,uBAAuB,IAAI,sBAAsB;AACjG;AACA,sCAAsC,WAAW;AACjD,KAAK;AACL;AACO;AACP,WAAW,YAAS;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,gC;;ACrCA,IAAI,qBAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AAC8C;AACsB;AACpE;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,qBAAS;AACpB;AACA;AACA;AACA,+BAA+B,SAAE,qBAAqB,QAAC;AACvD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,qBAAS;AACpB;AACA;AACA;AACA,8BAA8B,wCAAwC;AACtE;AACA;AACA,KAAK;AACL;AACA,yC;;ACvCA,IAAI,YAAS,IAAI,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACmE;AACU;AACiB;AACf;AACH;AAC1B;AAClB;AACiF;AACjH,MAAM,QAAG,GAAG,cAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,eAAe,mBAAmB;AAClC,kBAAkB,OAAO;AACzB,kBAAkB,WAAW;AAC7B,kBAAkB,gBAAgB;AAClC,kBAAkB,sCAAsC;AACxD,kBAAkB,MAAM;AACxB,kBAAkB,sCAAsC;AACxD,kBAAkB,MAAM;AACxB,kBAAkB,gBAAgB;AAClC;AACA,yBAAyB,WAAW;AACpC,YAAY,QAAG,iCAAiC,YAAY;AAC5D;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,eAAe,mBAAmB;AAClC,kBAAkB,OAAO;AACzB,kBAAkB,UAAU;AAC5B,kBAAkB,aAAa;AAC/B,kBAAkB,sCAAsC;AACxD,kBAAkB,MAAM;AACxB,kBAAkB,sCAAsC;AACxD,kBAAkB,MAAM;AACxB;AACA,yBAAyB,WAAW;AACpC,YAAY,QAAG,gCAAgC,YAAY;AAC3D;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,eAAe,mBAAmB;AAClC,kBAAkB,OAAO;AACzB,kBAAkB,WAAW;AAC7B,kBAAkB,kBAAkB;AACpC,kBAAkB,sCAAsC;AACxD,kBAAkB,wBAAwB;AAC1C,kBAAkB,oCAAoC;AACtD,kBAAkB,MAAM;AACxB,kBAAkB,sCAAsC;AACxD,kBAAkB,wBAAwB;AAC1C,kBAAkB,MAAM;AACxB,kBAAkB,gBAAgB;AAClC;AACA,yBAAyB,WAAW;AACpC,YAAY,QAAG,gCAAgC,YAAY;AAC3D;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,YAAS;AACpB,eAAe,mBAAmB;AAClC,kBAAkB,OAAO;AACzB,kBAAkB,WAAW;AAC7B,kBAAkB,aAAa;AAC/B,kBAAkB,sCAAsC;AACxD,kBAAkB,oCAAoC;AACtD,kBAAkB,MAAM;AACxB,kBAAkB,sCAAsC;AACxD,kBAAkB,MAAM;AACxB,kBAAkB,gBAAgB;AAClC;AACA,yBAAyB,WAAW;AACpC,YAAY,QAAG,iCAAiC,YAAY;AAC5D;AACA,SAAS;AACT,KAAK;AACL;AACO;AACP,qBAAqB,aAAM;AAC3B;AACA,mBAAmB,SAAE;AACrB,qBAAqB,YAAK;AAC1B;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,gC;;ACjIyB;AACA;AACF;AACA;AACA;AACA;AACS;AACT;AACvB,iC;;ACR4C;AACA;AACE;AACX;AACX;AACxB,kC;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AACiB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,sCAAsC,YAAW;AACjD,2BAA2B,aAAa,MAAM,sBAAM,EAAE;AACtD;AACe,wFAAM,EAAC;AACG;AACzB,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBsD;AACtD;AACA,WAAW,QAAC,YAAY,aAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAI;AACpB,qBAAqB,SAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAM;AACtB,qBAAqB,SAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAQ;AACxB,qBAAqB,SAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAW;AAC3B,qBAAqB,SAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qBAAqB,SAAE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,qBAAqB,SAAE;AACvB;AACA;AACA,gCAAgC,QAAC;AACjC;AACA;AACA;AACA,YAAY,SAAE;AACd;AACA;AACA;AACA,+B;;AC/EA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;AACoE;AACvC;AAC7B,YAAY,cAAO;AACnB,uBAAuB,UAAG,aAAa,UAAG,eAAe,UAAG,eAAe,UAAG,gBAAgB,UAAG;AACjG,iCAAiC,UAAG,aAAa,UAAG,eAAe,UAAG,eAAe,UAAG,gBAAgB,UAAG,eAAe,UAAG;AAC7H;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,uBAAuB,SAAE;AACzB,QAAQ,YAAY;AACpB,QAAQ,SAAa;AACrB;AACA;AACA,8BAA8B,UAAG;AACjC,6BAA6B,UAAG;AAChC,mBAAmB,UAAG;AACtB;AACA;AACA;AACA;AACA,uDAAuD,YAAY;AACnE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA,+BAA+B,QAAC,YAAY,aAAM;AAClD,uBAAuB,SAAE;AACzB;AACA;AACA;AACA;AACA,SAAS;AACT,0BAA0B,UAAG;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA,mCAAmC,UAAG;AACtC,qCAAqC,UAAG;AACxC,wCAAwC,UAAG;AAC3C;AACA;AACA;AACA;AACA,+EAA+E,UAAU;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,YAAY;AACpE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,uBAAuB,SAAE;AACzB,QAAQ,QAAQ;AAChB,QAAQ,UAAU;AAClB,QAAQ,YAAY;AACpB,QAAQ,eAAe;AACvB;AACA,YAAY,SAAa;AACzB;AACA;AACA;AACA,8BAA8B,UAAG;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,2BAA2B,SAAE;AAC7B;AACA;AACA,2CAA2C,QAAC,YAAY,aAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,8BAA8B,UAAG;AACjC;AACA;AACA,2BAA2B,6BAA6B;AACxD,6BAA6B,UAAG;AAChC,+BAA+B,UAAG;AAClC,iCAAiC,UAAG;AACpC,oCAAoC,UAAG;AACvC;AACA,uDAAuD,UAAG;AAC1D;AACA;AACA,sBAAsB,UAAG;AACzB;AACA,2DAA2D,UAAG;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,YAAY;AAC7D;AACA;AACA,KAAK;AACL;AACA,gC;;ACxL6B;AACmD;AACT;AACvE,kC;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAiC;AACjC;AACA,2BAA2B,aAAa,CAAC,4BAAI,EAAE;AAC/C;AACe,yFAAM,EAAC;AACG;AACzB,iC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 50);\n","export const ADDR_VERSION = \"17\";\nexport const ASSETS = {\n NEO: \"NEO\",\n c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b: \"NEO\",\n GAS: \"GAS\",\n \"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7\": \"GAS\"\n};\nexport const ASSET_ID = {\n NEO: \"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b\",\n GAS: \"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7\"\n};\nexport const ASSET_TYPE = {\n CreditFlag: 0x40,\n DutyFlag: 0x80,\n GoverningToken: 0x00,\n UtilityToken: 0x01,\n Currency: 0x08,\n Share: 0x90,\n Invoice: 0x98,\n Token: 0x60 // (= CreditFlag | 0x20)\n};\nexport const CONTRACTS = {\n RPX: \"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9\",\n TEST_RPX: \"5b7074e873973a6ed3708862f219a6fbf4d1c411\",\n TEST_LWTF: \"d7678dd97c000be3f33e9362e673101bac4ca654\",\n TEST_NXT: \"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214\",\n TEST_RHTT4: \"f9572c5b119a6b5775a6af07f1cef5d310038f55\"\n};\nexport const DEFAULT_RPC = {\n MAIN: \"https://seed11.ngd.network:10331\",\n TEST: \"https://seed11.ngd.network:20331\"\n};\nexport const DEFAULT_REQ = {\n jsonrpc: \"2.0\",\n method: \"getblockcount\",\n params: [],\n id: 1234\n};\nexport const DEFAULT_SCRYPT = {\n n: 16384,\n r: 8,\n p: 8,\n size: 64\n};\nexport const DEFAULT_SYSFEE = {\n enrollmentTransaction: 1000,\n issueTransaction: 500,\n publishTransaction: 500,\n registerTransaction: 10000\n};\nexport const DEFAULT_WALLET = {\n name: \"myWallet\",\n version: \"1.0\",\n scrypt: DEFAULT_SCRYPT,\n extra: null\n};\nexport const DEFAULT_ACCOUNT_CONTRACT = {\n script: \"\",\n parameters: [\n {\n name: \"signature\",\n type: \"Signature\"\n }\n ],\n deployed: false\n};\nexport const NEO_NETWORK = {\n MAIN: \"MainNet\",\n TEST: \"TestNet\"\n};\n// specified by nep2, same as bip38\nexport const NEP_HEADER = \"0142\";\nexport const NEP_FLAG = \"e0\";\nexport const RPC_VERSION = \"2.3.2\";\nexport const TX_VERSION = {\n CLAIM: 0,\n CONTRACT: 0,\n INVOCATION: 1,\n ISSUE: 0,\n STATE: 0,\n MINER: 0,\n ENROLLMENT: 0,\n PUBLISH: 0,\n REGISTER: 0\n};\n//# sourceMappingURL=consts.js.map","import loglevel from \"loglevel\";\nimport prefix from \"loglevel-plugin-prefix\";\nprefix.reg(loglevel);\nloglevel.setDefaultLevel(\"silent\");\nexport function setAll(lvl) {\n Object.keys(loglevel.getLoggers()).map(key => {\n const lg = loglevel.getLogger(key);\n lg.setLevel(lvl);\n });\n}\nconst fn = (level, name, timestamp) => {\n const ts = timestamp ? timestamp : new Date().toUTCString();\n level = level.toUpperCase();\n return `[${ts}] (${name}) ${level}: `;\n};\nexport default (label) => {\n const l = loglevel.getLogger(label);\n prefix.apply(l, { format: fn });\n return l;\n};\nexport const logger = loglevel;\n//# sourceMappingURL=logging.js.map","export function compareNeonObjectArray(arr1, arr2 = []) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (const c of arr1) {\n if (!arr2.find(cl => c.equals(c))) {\n return false;\n }\n }\n return true;\n}\nexport function compareObject(current, other) {\n const keys = Object.keys(current);\n const otherKeys = Object.keys(other);\n if (keys.length !== otherKeys.length) {\n return false;\n }\n for (const key of keys) {\n if (other[key] !== undefined && current[key] === other[key]) {\n continue;\n }\n return false;\n }\n return true;\n}\nexport function compareUnsortedPlainArrays(current, other) {\n if (!Array.isArray(current) ||\n !Array.isArray(other) ||\n current.length !== other.length) {\n return false;\n }\n for (let i = 0; i < current.length; i++) {\n if (current[i] !== other[i]) {\n return false;\n }\n }\n return true;\n}\nexport function compareArray(current, other) {\n if (current.length !== other.length) {\n return false;\n }\n for (let i = 0; i < current.length; i++) {\n if (typeof current[i] === \"object\" && typeof other[i] === \"object\") {\n const objectEquality = compareObject(current[i], other[i]);\n if (!objectEquality) {\n return false;\n }\n }\n if (current[i] !== other[i]) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=helper.js.map","import { DEFAULT_SYSFEE } from \"../consts\";\nimport { compareObject } from \"../helper\";\nimport logger from \"../logging\";\nconst log = logger(\"protocol\");\nfunction compareArrays(current, other) {\n if (current.length !== other.length) {\n return false;\n }\n for (let i = 0; i < current.length; i++) {\n if (current[i] !== other[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Model of the protocol configuration file used by the C# implementation.\n */\nexport class Protocol {\n constructor(config = {}) {\n this.magic = config.magic || config.Magic || 0;\n this.addressVersion = config.addressVersion || config.AddressVersion || 23;\n this.standbyValidators =\n config.standbyValidators || config.StandbyValidators || [];\n this.seedList = config.seedList || config.SeedList || [];\n this.systemFee = Object.assign({}, config.systemFee || config.SystemFee || DEFAULT_SYSFEE);\n }\n get [Symbol.toStringTag]() {\n return \"Protocol\";\n }\n export() {\n return {\n Magic: this.magic,\n AddressVersion: this.addressVersion,\n StandbyValidators: this.standbyValidators,\n SeedList: this.seedList,\n SystemFee: this.systemFee\n };\n }\n equals(other) {\n return (this.magic === (other.magic || other.Magic) &&\n this.addressVersion === (other.addressVersion || other.AddressVersion) &&\n compareArrays(this.seedList, other.seedList || other.SeedList || []) &&\n compareArrays(this.standbyValidators, other.standbyValidators || other.StandbyValidators || []) &&\n compareObject(this.systemFee, other.systemFee || other.SystemFee || {}));\n }\n}\nexport default Protocol;\n//# sourceMappingURL=Protocol.js.map","import { compareObject, compareUnsortedPlainArrays } from \"../helper\";\nimport logger from \"../logging\";\nimport Protocol from \"./Protocol\";\nconst log = logger(\"protocol\");\n/**\n * Network interface representing a NEO blockchain network.\n * This inherits from the network.protocol file used in the C# implementation and adds in additional configurations.\n * @param config NetworkLike JS object\n */\nexport class Network {\n constructor(config = {}, name = null) {\n this.name = config.Name || config.name || name || \"RandomNet\";\n const protocolLike = Object.assign({}, config.protocol || config.ProtocolConfiguration || {});\n this.protocol = new Protocol(protocolLike);\n this.nodes = config.Nodes || config.nodes || [];\n this.extra = Object.assign({}, config.ExtraConfiguration || config.extra || {});\n }\n /**\n * Exports the class as a JSON format.\n */\n export() {\n return {\n ProtocolConfiguration: this.protocol.export(),\n Name: this.name,\n ExtraConfiguration: this.extra,\n Nodes: this.nodes\n };\n }\n equals(other) {\n return (this.name === other.name &&\n this.protocol.equals(other.protocol || {}) &&\n compareUnsortedPlainArrays(this.nodes, other.nodes || []) &&\n compareObject(this.extra, other.extra || {}));\n }\n}\nexport default Network;\n//# sourceMappingURL=Network.js.map","/*\r\n * bignumber.js v7.2.1\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2018 Michael Mclaughlin <M8ch88l@gmail.com>\r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative |\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\nvar isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n/*\r\n * Create and return a BigNumber constructor.\r\n */\r\nfunction clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n decimalSeparator: '.',\r\n groupSeparator: ',',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n fractionGroupSize: 0\r\n },\r\n\r\n // The alphabet used for base conversion.\r\n // It must be at least 2 characters long, with no '.' or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * n {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of n. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(n, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof BigNumber)) {\r\n\r\n // Don't throw on constructor call without new (#81).\r\n // '[BigNumber Error] Constructor call without new: {n}'\r\n //throw Error(bignumberError + ' Constructor call without new: ' + n);\r\n return new BigNumber(n, b);\r\n }\r\n\r\n if (b == null) {\r\n\r\n // Duplicate.\r\n if (n instanceof BigNumber) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = (n = n.c) ? n.slice() : n;\r\n return;\r\n }\r\n\r\n isNum = typeof n == 'number';\r\n\r\n if (isNum && n * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / n < 0 ? (n = -n, -1) : 1;\r\n\r\n // Faster path for integers.\r\n if (n === ~~n) {\r\n for (e = 0, i = n; i >= 10; i /= 10, e++);\r\n x.e = e;\r\n x.c = [n];\r\n return;\r\n }\r\n\r\n str = n + '';\r\n } else {\r\n if (!isNumeric.test(str = n + '')) return parseNumeric(x, str, isNum);\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = n + '';\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10) {\r\n x = new BigNumber(n instanceof BigNumber ? n : str);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n isNum = typeof n == 'number';\r\n\r\n if (isNum) {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (n * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / n < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + n);\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, n + '', isNum, b);\r\n }\r\n }\r\n\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n str = str.slice(i, ++len);\r\n\r\n if (str) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (n > MAX_SAFE_INTEGER || n !== mathfloor(n))) {\r\n throw Error\r\n (tooManyDigits + (x.s * n));\r\n }\r\n\r\n e = e - i - 1;\r\n\r\n // Overflow?\r\n if (e > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * decimalSeparator {string}\r\n * groupSeparator {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * fractionGroupSize {number}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (isArray(v)) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (isArray(v)) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if only one character, or contains '.' or a repeated character.\r\n if (typeof v == 'string' && !/^.$|\\.|(.).*\\1/.test(v)) {\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * v {any}\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n return v instanceof BigNumber || v && v._isBigNumber === true || false;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, P.lt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, P.gt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0))\r\n : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && ne <= TO_EXP_NEG\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin(args, method) {\r\n var m, n,\r\n i = 0;\r\n\r\n if (isArray(args[0])) args = args[0];\r\n m = new BigNumber(args[0]);\r\n\r\n for (; ++i < args.length;) {\r\n n = new BigNumber(args[i]);\r\n\r\n // If any number is NaN, return NaN.\r\n if (!n.s) {\r\n m = n;\r\n break;\r\n } else if (method.call(m, n)) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n x.c = x.e = null;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.c = x.e = x.s = null;\r\n }\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[d - j - 1] % 10 | 0;\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + n);\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+x.valueOf(), nIsBig ? 2 - isOdd(n) : +n));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n nIsOdd = isOdd(n);\r\n } else {\r\n nIsOdd = n % 2;\r\n }\r\n\r\n if (nIsNeg) n.s = 1;\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (nIsBig) {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n if (!n.c[0]) break;\r\n nIsBig = n.e > 14;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n n = mathfloor(n / 2);\r\n if (!n) break;\r\n nIsOdd = n % 2;\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '1e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c ).slice(0, s) === (n =\r\n coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the FORMAT object (see BigNumber.set).\r\n *\r\n * FORMAT = {\r\n * decimalSeparator : '.',\r\n * groupSeparator : ',',\r\n * groupSize : 3,\r\n * secondaryGroupSize : 0,\r\n * fractionGroupSeparator : '\\xA0', // non-breaking space\r\n * fractionGroupSize : 0\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFormat = function (dp, rm) {\r\n var str = this.toFixed(dp, rm);\r\n\r\n if (this.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +FORMAT.groupSize,\r\n g2 = +FORMAT.secondaryGroupSize,\r\n groupSeparator = FORMAT.groupSeparator,\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = this.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n\r\n for (; i < len; i += g1) {\r\n intPart += groupSeparator + intDigits.substr(i, g1);\r\n }\r\n\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + FORMAT.decimalSeparator + ((g2 = +FORMAT.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + FORMAT.fractionGroupSeparator)\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string array representing the value of this BigNumber as a simple fraction with\r\n * an integer numerator and an integer denominator. The denominator will be a positive\r\n * non-zero value less than or equal to the specified maximum denominator. If a maximum\r\n * denominator is not specified, the denominator will be the lowest value necessary to\r\n * represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var arr, d, d0, d1, d2, e, exp, n, n0, n1, q, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + md);\r\n }\r\n }\r\n\r\n if (!xc) return x.toString();\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e *= 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n arr = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1\r\n ? [n1.toString(), d1.toString()]\r\n : [n0.toString(), d0.toString()];\r\n\r\n MAX_EXP = exp;\r\n return arr;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n str = coeffToString(n.c);\r\n\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(str, e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var str,\r\n n = this,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n}\r\n\r\n\r\n// PRIVATE HELPER FUNCTIONS\r\n\r\n\r\nfunction bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n}\r\n\r\n\r\n// Return a coefficient array as a string of base 10 digits.\r\nfunction coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n return r.slice(0, j + 1 || 1);\r\n}\r\n\r\n\r\n// Compare the value of BigNumbers x and y.\r\nfunction compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n}\r\n\r\n\r\n/*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\nfunction intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== (n < 0 ? mathceil(n) : mathfloor(n))) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + n);\r\n }\r\n}\r\n\r\n\r\nfunction isArray(obj) {\r\n return Object.prototype.toString.call(obj) == '[object Array]';\r\n}\r\n\r\n\r\n// Assumes finite n.\r\nfunction isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n}\r\n\r\n\r\nfunction toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n}\r\n\r\n\r\nfunction toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n}\r\n\r\n\r\n// EXPORTS\r\n\r\n\r\nexport var BigNumber = clone();\r\n\r\nexport default BigNumber;\r\n","import BN from \"bignumber.js\";\nimport { reverseHex } from \"./misc\";\nconst DECIMALS = 100000000;\n// This is the maximum hex integer 0x7fffffffffffffff (= 9223372036854775807)\n// that can be converted to Fixed8 by dividing by the 10^8.\nconst MAX_FIXED8_HEX = new BN(2).pow(63).minus(1);\n// This is the minimum hex integer 0x8000000000000000 (= -9223372036854775808)\n// that can be converted to Fixed8 by dividing by the 10^8.\nconst MIN_FIXED8_HEX = new BN(2).pow(63).negated();\n// Total number of Fixed8 available. This includes negative and positive\n// Fixed8 numbers.\nconst TOTAL_FIXED8_HEX = new BN(2).pow(64);\n/**\n * A fixed point notation used widely in the NEO system for representing decimals.\n * It is basically a hexideciaml integer that is divided by the 10^8.\n * Supports up to 8 decimals and is 8 bytes long.\n * @extends BN\n */\nexport class Fixed8 extends BN {\n constructor(input, base = 10) {\n if (!input) {\n input = \"0\";\n }\n if (typeof input === \"number\") {\n input = input.toFixed(8);\n }\n super(input, base);\n if (this.isGreaterThan(Fixed8.MAX_VALUE)) {\n throw new Error(`expected input to be less than ${Fixed8.MAX_VALUE}. Got input = ${this}`);\n }\n if (this.isLessThan(Fixed8.MIN_VALUE)) {\n throw new Error(`expected input to be greater than ${Fixed8.MIN_VALUE}. Got input = ${this}`);\n }\n Object.setPrototypeOf(this, Fixed8.prototype);\n }\n static fromHex(hex) {\n if (hex.length > 16) {\n throw new Error(`expected hex string to have length less or equal than 16: got ${hex.length} for hex = ${hex}`);\n }\n let n = new BN(hex, 16);\n if (n.isGreaterThan(MAX_FIXED8_HEX)) {\n // convert n to two complement\n n = n.minus(TOTAL_FIXED8_HEX);\n }\n n = n.div(DECIMALS);\n return new Fixed8(n, 10);\n }\n static fromReverseHex(hex) {\n return this.fromHex(reverseHex(hex));\n }\n toHex() {\n let hexstring = \"\";\n const num = this.toRawNumber();\n hexstring = num.isLessThan(0)\n ? TOTAL_FIXED8_HEX.plus(num).toString(16) // convert num to two complement\n : num.toString(16);\n return \"0\".repeat(16 - hexstring.length) + hexstring;\n }\n toReverseHex() {\n return reverseHex(this.toHex());\n }\n /**\n * Returns a raw number represetation of Fixed8.\n */\n toRawNumber() {\n return super.times(DECIMALS);\n }\n /**\n * Returns a Fixed8 whose value is rounded upwards to the next whole number.\n */\n ceil() {\n return new Fixed8(super.decimalPlaces(0, BN.ROUND_CEIL));\n }\n /**\n * Returns a Fixed8 whose value is rounded downwards to the previous whole number.\n */\n floor() {\n return new Fixed8(super.decimalPlaces(0, BN.ROUND_FLOOR));\n }\n /**\n * Returns true if the value is equivalent.\n */\n equals(other) {\n return super.eq(other);\n }\n /**\n * Returns a Fixed8 rounded to the nearest dp decimal places according to rounding mode rm.\n * If dp is null, round to whole number.\n * If rm is null, round according to default rounding mode.\n * @param dp\n * @param rm\n * @return {Fixed8}\n */\n round(dp = 0, rm) {\n return new Fixed8(super.decimalPlaces(dp, rm));\n }\n /**\n * Returns a Fixed8 whose value is the value of this Fixed8 divided by `n`\n * @alias div\n */\n dividedBy(n, base) {\n return new Fixed8(super.dividedBy(n, base));\n }\n div(n, base) {\n return this.dividedBy(n, base);\n }\n /**\n * Returns a Fixed8 whose value is the value of this Fixed8 multipled by `n`\n * @alias mul\n */\n times(n, base) {\n return new Fixed8(super.times(n, base));\n }\n mul(n, base) {\n return this.times(n, base);\n }\n /**\n * Returns a Fixed8 whose value is the value of this Fixed8 plus `n`\n * @alias add\n */\n plus(n, base) {\n return new Fixed8(super.plus(n, base));\n }\n add(n, base) {\n return this.plus(n, base);\n }\n /**\n * Returns a Fixed8 whose value is the value of this Fixed8 minus `n`\n * @alias sub\n */\n minus(n, base) {\n return new Fixed8(super.minus(n, base));\n }\n sub(n, base) {\n return this.minus(n, base);\n }\n}\n// The maximum Fixed8 is obtained by dividing 0x7fffffffffffffff (= 9223372036854775807) with 10^8.\nFixed8.MAX_VALUE = new Fixed8(MAX_FIXED8_HEX.div(DECIMALS));\n// The minimum Fixed8 is obtained by dividing 0x8000000000000000 (= -9223372036854775808) with 10^8.\nFixed8.MIN_VALUE = new Fixed8(MIN_FIXED8_HEX.div(DECIMALS));\nexport default Fixed8;\n//# sourceMappingURL=Fixed8.js.map","import Fixed8 from \"./Fixed8\";\nimport { ensureHex, reverseHex } from \"./misc\";\n/**\n * @param buf ArrayBuffer\n * @returns ASCII string\n */\nexport function ab2str(buf) {\n return String.fromCharCode.apply(null, Array.from(new Uint8Array(buf)));\n}\n/**\n * @param str ASCII string\n * @returns\n */\nexport function str2ab(str) {\n if (typeof str !== \"string\") {\n throw new Error(`str2ab expected a string but got ${typeof str} instead.`);\n }\n const result = new Uint8Array(str.length);\n for (let i = 0, strLen = str.length; i < strLen; i++) {\n result[i] = str.charCodeAt(i);\n }\n return result;\n}\n/**\n * @param str HEX string\n * @returns\n */\nexport function hexstring2ab(str) {\n ensureHex(str);\n if (!str.length) {\n return new Uint8Array(0);\n }\n const iters = str.length / 2;\n const result = new Uint8Array(iters);\n for (let i = 0; i < iters; i++) {\n result[i] = parseInt(str.substring(0, 2), 16);\n str = str.substring(2);\n }\n return result;\n}\n/**\n * @param arr\n * @returns HEX string\n */\nexport function ab2hexstring(arr) {\n if (typeof arr !== \"object\") {\n throw new Error(`ab2hexstring expects an array. Input was ${arr}`);\n }\n let result = \"\";\n const intArray = new Uint8Array(arr);\n for (const i of intArray) {\n let str = i.toString(16);\n str = str.length === 0 ? \"00\" : str.length === 1 ? \"0\" + str : str;\n result += str;\n }\n return result;\n}\n/**\n * @param str ASCII string\n * @returns HEX string\n */\nexport function str2hexstring(str) {\n return ab2hexstring(str2ab(str));\n}\n/**\n * @param hexstring HEX string\n * @returns ASCII string\n */\nexport function hexstring2str(hexstring) {\n return ab2str(hexstring2ab(hexstring));\n}\n/**\n * convert an integer to big endian hex and add leading zeros\n * @param num Integer.\n */\nexport function int2hex(num) {\n if (typeof num !== \"number\") {\n throw new Error(`int2hex expected a number but got ${typeof num} instead.`);\n }\n const h = num.toString(16);\n return h.length % 2 ? \"0\" + h : h;\n}\n/**\n * Converts a number to a big endian hexstring of a suitable size, optionally little endian\n * @param num A positive integer.\n * @param size The required size in bytes, eg 1 for Uint8, 2 for Uint16. Defaults to 1.\n * @param littleEndian Encode the hex in little endian form\n */\nexport function num2hexstring(num, size = 1, littleEndian = false) {\n if (typeof num !== \"number\") {\n throw new Error(`num2hexstring expected a number but got ${typeof num} instead.`);\n }\n if (num < 0) {\n throw new RangeError(`num2hexstring expected a positive integer but got ${num} instead.`);\n }\n if (size % 1 !== 0) {\n throw new Error(`num2hexstring expected a positive integer but got ${num} instead.`);\n }\n if (!Number.isSafeInteger(num)) {\n throw new RangeError(`num2hexstring expected a safe integer but got ${num} instead.`);\n }\n size = size * 2;\n let hexstring = num.toString(16);\n hexstring =\n hexstring.length % size === 0\n ? hexstring\n : (\"0\".repeat(size) + hexstring).substring(hexstring.length);\n if (littleEndian) {\n hexstring = reverseHex(hexstring);\n }\n return hexstring;\n}\n/**\n * Converts a number to a Fixed8 format hex string\n * @param num\n * @param size output size in bytes\n * @return number in Fixed8 representation.\n */\nexport function num2fixed8(num, size = 8) {\n if (typeof num !== \"number\") {\n throw new Error(`num2fixed8 expected a number but got ${typeof num} instead.`);\n }\n if (size % 1 !== 0) {\n throw new Error(`num2fixed expected an integer for argument size but got ${size} instead.`);\n }\n const i = new Fixed8(num);\n return new Fixed8(num).toReverseHex().slice(0, size * 2);\n}\n/**\n * Converts a Fixed8 hex string to its original number\n * @param fixed8hex number in Fixed8 representation\n */\nexport function fixed82num(fixed8hex) {\n ensureHex(fixed8hex);\n if (fixed8hex === \"\") {\n return 0;\n }\n return Fixed8.fromReverseHex(fixed8hex).toNumber();\n}\n/**\n * Converts a number to a variable length Int. Used for array length header\n * @param num\n * @returns hexstring of int.\n */\nexport function num2VarInt(num) {\n if (num < 0xfd) {\n return num2hexstring(num);\n }\n else if (num <= 0xffff) {\n // uint16\n return \"fd\" + num2hexstring(num, 2, true);\n }\n else if (num <= 0xffffffff) {\n // uint32\n return \"fe\" + num2hexstring(num, 4, true);\n }\n else {\n // uint64\n return \"ff\" + num2hexstring(num, 8, true);\n }\n}\n//# sourceMappingURL=convert.js.map","import { ab2hexstring } from \"./convert\";\nconst hexRegex = /^([0-9A-Fa-f]{2})*$/;\n/**\n * Checks if input is a hexstring. Empty string is considered a hexstring.\n */\nexport function isHex(str) {\n try {\n return hexRegex.test(str);\n }\n catch (err) {\n return false;\n }\n}\n/**\n * Throws an error if input is not hexstring.\n */\nexport function ensureHex(str) {\n if (!isHex(str)) {\n throw new Error(`Expected a hexstring but got ${str}`);\n }\n}\n/**\n * XORs two hexstrings\n * @param str1 HEX string\n * @param str2 HEX string\n * @returns XOR output as a HEX string\n */\nexport function hexXor(str1, str2) {\n ensureHex(str1);\n ensureHex(str2);\n if (str1.length !== str2.length) {\n throw new Error(`strings are disparate lengths. Inputs are of length ${str1.length} and ${str2.length}`);\n }\n const result = [];\n for (let i = 0; i < str1.length; i += 2) {\n result.push(\n // tslint:disable-next-line:no-bitwise\n parseInt(str1.substr(i, 2), 16) ^ parseInt(str2.substr(i, 2), 16));\n }\n return ab2hexstring(result);\n}\n/**\n * Reverses an array.\n * @example\n * reverseArray('abcd') = 'cdba'\n */\nexport function reverseArray(arr) {\n if (typeof arr !== \"object\" || !arr.length) {\n throw new Error(\"reverseArray expects an array\");\n }\n const result = new Array(arr.length);\n for (let i = 0; i < arr.length; i++) {\n result[i] = arr[arr.length - 1 - i];\n }\n return result;\n}\n/**\n * Reverses a HEX string, treating 2 chars as a byte.\n * @example\n * reverseHex('abcdef') = 'efcdab'\n */\nexport function reverseHex(hex) {\n ensureHex(hex);\n let out = \"\";\n for (let i = hex.length - 2; i >= 0; i -= 2) {\n out += hex.substr(i, 2);\n }\n return out;\n}\n//# sourceMappingURL=misc.js.map","import hexEncoding from \"crypto-js/enc-hex\";\nimport RIPEMD160 from \"crypto-js/ripemd160\";\nimport SHA256 from \"crypto-js/sha256\";\nfunction hash(hex, hashingFunction) {\n const hexEncoded = hexEncoding.parse(hex);\n const result = hashingFunction(hexEncoded);\n return result.toString(hexEncoding);\n}\n/**\n * Performs a single SHA256.\n */\nexport function sha256(hex) {\n return hash(hex, SHA256);\n}\n/**\n * Performs a single RIPEMD160.\n */\nexport function ripemd160(hex) {\n return hash(hex, RIPEMD160);\n}\n/**\n * Performs a SHA256 followed by a RIPEMD160.\n */\nexport function hash160(hex) {\n const sha = sha256(hex);\n return ripemd160(sha);\n // const hexEncoded = safeParseHex(hex);\n // const ProgramSha256 = SHA256(hexEncoded);\n // return RIPEMD160(ProgramSha256.toString()).toString();\n}\n/**\n * Performs 2 SHA256.\n */\nexport function hash256(hex) {\n const firstSha = sha256(hex);\n return sha256(firstSha);\n // const hexEncoded = safeParseHex(hex);\n // const ProgramSha256 = SHA256(hexEncoded);\n // return SHA256(ProgramSha256).toString();\n}\n//# sourceMappingURL=hash.js.map","import { reverseHex } from \"./misc\";\n/**\n * A simple string stream that allows user to read a string byte by byte using read().\n * @param str - The string to read as a stream.\n */\nexport class StringStream {\n /**\n * Initializes the stream with given string and pointer at position 0.\n */\n constructor(str = \"\") {\n this.str = str;\n this.pter = 0;\n }\n /**\n * Checks if reached the end of the stream. Does not mean stream is actually empty (this.str is not empty).\n * @example\n * const ss = new StringStream(\"01020304\");\n * ss.isEmpty(); // false\n * ss.pter = 3;\n * ss.isEmpty(); // true\n */\n isEmpty() {\n return this.pter >= this.str.length;\n }\n /**\n * Peek at the next bytes on the string. May return less than intended bytes if reaching end of stream.\n * @example\n * const ss = new StringStream(\"0102\");\n * ss.peek(); // \"01\"\n * ss.peek(5); // \"0102\"\n */\n peek(bytes = 1) {\n if (this.isEmpty()) {\n return \"\";\n }\n return this.str.substr(this.pter, bytes * 2);\n }\n /**\n * Reads some bytes off the stream.\n * @param bytes Number of bytes to read\n * @example\n * const ss = new StringStream(\"01020304\");\n * ss.read(); // \"01\"\n * ss.read(2); // \"0203\"\n */\n read(bytes = 1) {\n if (this.isEmpty()) {\n throw new Error(\"Reached the end of the stream!\");\n }\n const out = this.str.substr(this.pter, bytes * 2);\n this.pter += bytes * 2;\n return out;\n }\n /**\n * Reads some bytes off the stream.\n * A variable-length integer is first read off the stream and then bytes equal to the integer is read off and returned.\n */\n readVarBytes() {\n return this.read(this.readVarInt());\n }\n /**\n * Reads an integer of variable bytelength. May consume up to 9 bytes.\n * The first byte read indicates if more bytes need to be read off.\n */\n readVarInt() {\n let len = parseInt(this.read(1), 16);\n if (len === 0xfd) {\n len = parseInt(reverseHex(this.read(2)), 16);\n }\n else if (len === 0xfe) {\n len = parseInt(reverseHex(this.read(4)), 16);\n }\n else if (len === 0xff) {\n len = parseInt(reverseHex(this.read(8)), 16);\n }\n return len;\n }\n /**\n * Resets the pointer to start of string.\n * @example\n * const ss = new StringStream(\"010203\");\n * ss.read(); //\"01\"\n * ss.reset();\n * ss.read(); // \"01\"\n */\n reset() {\n this.pter = 0;\n }\n /**\n * Returns a printable string of the characters around the pointer.\n * Used for debugging.\n */\n context() {\n const before = this.pter > 10\n ? this.str.slice(this.pter - 10, this.pter)\n : this.str.slice(0, this.pter);\n const current = this.read(1);\n const after = this.peek(5);\n this.pter -= 2;\n return `${before}|${current}|${after}`;\n }\n}\nexport default StringStream;\n//# sourceMappingURL=StringStream.js.map","import secureRandom from \"secure-random\";\n/**\n * Generates a arrayBuffer filled with random bits.\n * @param length Length of buffer.\n */\nexport const generateRandomArray = (length) => {\n return secureRandom(length);\n};\n//# sourceMappingURL=random.js.map","export * from \"./misc\";\nexport * from \"./convert\";\nexport * from \"./hash\";\nexport * from \"./Fixed8\";\nexport * from \"./StringStream\";\nexport * from \"./random\";\n//# sourceMappingURL=index.js.map","/**\n * Enum for TransactionAttributeUsage\n * @enum {number}\n */\nexport var TxAttrUsage;\n(function (TxAttrUsage) {\n TxAttrUsage[TxAttrUsage[\"ContractHash\"] = 0] = \"ContractHash\";\n TxAttrUsage[TxAttrUsage[\"ECDH02\"] = 2] = \"ECDH02\";\n TxAttrUsage[TxAttrUsage[\"ECDH03\"] = 3] = \"ECDH03\";\n TxAttrUsage[TxAttrUsage[\"Script\"] = 32] = \"Script\";\n TxAttrUsage[TxAttrUsage[\"Vote\"] = 48] = \"Vote\";\n TxAttrUsage[TxAttrUsage[\"DescriptionUrl\"] = 129] = \"DescriptionUrl\";\n TxAttrUsage[TxAttrUsage[\"Description\"] = 144] = \"Description\";\n TxAttrUsage[TxAttrUsage[\"Hash1\"] = 161] = \"Hash1\";\n TxAttrUsage[TxAttrUsage[\"Hash2\"] = 162] = \"Hash2\";\n TxAttrUsage[TxAttrUsage[\"Hash3\"] = 163] = \"Hash3\";\n TxAttrUsage[TxAttrUsage[\"Hash4\"] = 164] = \"Hash4\";\n TxAttrUsage[TxAttrUsage[\"Hash5\"] = 165] = \"Hash5\";\n TxAttrUsage[TxAttrUsage[\"Hash6\"] = 166] = \"Hash6\";\n TxAttrUsage[TxAttrUsage[\"Hash7\"] = 167] = \"Hash7\";\n TxAttrUsage[TxAttrUsage[\"Hash8\"] = 168] = \"Hash8\";\n TxAttrUsage[TxAttrUsage[\"Hash9\"] = 169] = \"Hash9\";\n TxAttrUsage[TxAttrUsage[\"Hash10\"] = 170] = \"Hash10\";\n TxAttrUsage[TxAttrUsage[\"Hash11\"] = 171] = \"Hash11\";\n TxAttrUsage[TxAttrUsage[\"Hash12\"] = 172] = \"Hash12\";\n TxAttrUsage[TxAttrUsage[\"Hash13\"] = 173] = \"Hash13\";\n TxAttrUsage[TxAttrUsage[\"Hash14\"] = 174] = \"Hash14\";\n TxAttrUsage[TxAttrUsage[\"Hash15\"] = 175] = \"Hash15\";\n TxAttrUsage[TxAttrUsage[\"Remark\"] = 240] = \"Remark\";\n TxAttrUsage[TxAttrUsage[\"Remark1\"] = 241] = \"Remark1\";\n TxAttrUsage[TxAttrUsage[\"Remark2\"] = 242] = \"Remark2\";\n TxAttrUsage[TxAttrUsage[\"Remark3\"] = 243] = \"Remark3\";\n TxAttrUsage[TxAttrUsage[\"Remark4\"] = 244] = \"Remark4\";\n TxAttrUsage[TxAttrUsage[\"Remark5\"] = 245] = \"Remark5\";\n TxAttrUsage[TxAttrUsage[\"Remark6\"] = 246] = \"Remark6\";\n TxAttrUsage[TxAttrUsage[\"Remark7\"] = 247] = \"Remark7\";\n TxAttrUsage[TxAttrUsage[\"Remark8\"] = 248] = \"Remark8\";\n TxAttrUsage[TxAttrUsage[\"Remark9\"] = 249] = \"Remark9\";\n TxAttrUsage[TxAttrUsage[\"Remark10\"] = 250] = \"Remark10\";\n TxAttrUsage[TxAttrUsage[\"Remark11\"] = 251] = \"Remark11\";\n TxAttrUsage[TxAttrUsage[\"Remark12\"] = 252] = \"Remark12\";\n TxAttrUsage[TxAttrUsage[\"Remark13\"] = 253] = \"Remark13\";\n TxAttrUsage[TxAttrUsage[\"Remark14\"] = 254] = \"Remark14\";\n TxAttrUsage[TxAttrUsage[\"Remark15\"] = 255] = \"Remark15\";\n})(TxAttrUsage || (TxAttrUsage = {}));\nexport default TxAttrUsage;\n//# sourceMappingURL=txAttrUsage.js.map","import { num2hexstring, num2VarInt, StringStream } from \"../../u\";\nimport { TxAttrUsage } from \"../txAttrUsage\";\nconst maxTransactionAttributeSize = 65535;\nfunction toTxAttrUsage(type) {\n if (typeof type === \"string\") {\n if (type in TxAttrUsage) {\n return TxAttrUsage[type];\n }\n throw new Error(`${type} not found in TxAttrUsage!`);\n }\n return type;\n}\n/**\n * An attribute that is used to decorate the transaction.\n * Used for appending additional information to the transaction.\n *\n * For example, a remark is attached as an attribute.\n */\nexport class TransactionAttribute {\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this.fromStream(ss);\n }\n static fromStream(ss) {\n const usage = parseInt(ss.read(1), 16);\n let data;\n if (usage === 0x00 || usage === 0x30 || (usage >= 0xa1 && usage <= 0xaf)) {\n data = ss.read(32);\n }\n else if (usage === 0x02 || usage === 0x03) {\n data = num2hexstring(usage) + ss.read(32);\n }\n else if (usage === 0x20) {\n data = ss.read(20);\n }\n else if (usage === 0x81) {\n data = ss.read(parseInt(ss.read(1), 16));\n }\n else if (usage === 0x90 || usage >= 0xf0) {\n data = ss.readVarBytes();\n }\n else {\n throw new Error(`Unknown usage type: ${usage}. Context: ${ss.context()}`);\n }\n return new TransactionAttribute({ usage, data });\n }\n constructor(obj) {\n if (!obj || obj.usage === undefined || obj.data === undefined) {\n throw new Error(\"TransactionAttribute requires usage and data fields\");\n }\n this.usage = toTxAttrUsage(obj.usage);\n this.data = obj.data;\n }\n get [Symbol.toStringTag]() {\n return \"TransactionAttribute\";\n }\n serialize() {\n if (this.data.length > maxTransactionAttributeSize) {\n throw new Error(`Data size too big!`);\n }\n let out = num2hexstring(this.usage);\n if (this.usage === 0x81) {\n out += num2hexstring(this.data.length / 2);\n }\n else if (this.usage === 0x90 || this.usage >= 0xf0) {\n out += num2VarInt(this.data.length / 2);\n }\n if (this.usage === 0x02 || this.usage === 0x03) {\n out += this.data.substr(2, 64);\n }\n else {\n out += this.data;\n }\n return out;\n }\n export() {\n return {\n usage: this.usage,\n data: this.data\n };\n }\n equals(other) {\n return (this.usage === toTxAttrUsage(other.usage) && this.data === other.data);\n }\n}\nexport default TransactionAttribute;\n//# sourceMappingURL=TransactionAttribute.js.map","import { num2hexstring, reverseHex, StringStream } from \"../../u\";\n/**\n * A reference to a TransactionOutput in another confirmed transaction.\n * This is used to denote UTXO that will be spent in this transaction.\n */\nexport class TransactionInput {\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this.fromStream(ss);\n }\n static fromStream(ss) {\n const prevHash = reverseHex(ss.read(32));\n const prevIndex = parseInt(reverseHex(ss.read(2)), 16);\n return new TransactionInput({ prevHash, prevIndex });\n }\n constructor(obj) {\n if (!obj || obj.prevHash === undefined || obj.prevIndex === undefined) {\n throw new Error(\"TransactionInput requires prevHash and prevIndex fields\");\n }\n this.prevHash = obj.prevHash;\n this.prevIndex = obj.prevIndex;\n }\n serialize() {\n return (reverseHex(this.prevHash) + reverseHex(num2hexstring(this.prevIndex, 2)));\n }\n export() {\n return {\n prevHash: this.prevHash,\n prevIndex: this.prevIndex\n };\n }\n equals(other) {\n return (this.prevHash === other.prevHash && this.prevIndex === other.prevIndex);\n }\n}\nexport default TransactionInput;\n//# sourceMappingURL=TransactionInput.js.map","/**\n * Verification methods on the various key formats.\n * Useful for identification and ensuring key is valid.\n *\n * Methods are named as is<Format> where:\n * <Format> is the key format to check.\n *\n * All methods take in Big-Endian strings and return boolean.\n */\nimport base58 from \"bs58\";\nimport { ab2hexstring, hash256, isHex, reverseHex } from \"../u\";\nimport { getAddressFromScriptHash, getPublicKeyEncoded, getPublicKeyUnencoded } from \"./core\";\n/**\n * Verifies a NEP2. This merely verifies the format. It is unable to verify if it is has been tampered with.\n */\nexport function isNEP2(nep2) {\n try {\n if (nep2.length !== 58) {\n return false;\n }\n const hexStr = ab2hexstring(base58.decode(nep2));\n if (!hexStr || hexStr.length !== 86) {\n return false;\n }\n if (hexStr.substr(0, 2) !== \"01\") {\n return false;\n }\n if (hexStr.substr(2, 2) !== \"42\") {\n return false;\n }\n if (hexStr.substr(4, 2) !== \"e0\") {\n return false;\n }\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Verifies a WIF using its checksum.\n */\nexport function isWIF(wif) {\n try {\n if (wif.length !== 52) {\n return false;\n }\n const hexStr = ab2hexstring(base58.decode(wif));\n const shaChecksum = hash256(hexStr.substr(0, hexStr.length - 8)).substr(0, 8);\n return shaChecksum === hexStr.substr(hexStr.length - 8, 8);\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Checks if hexstring is a valid Private Key. Any hexstring of 64 chars is a valid private key.\n */\nexport function isPrivateKey(key) {\n return /^[0-9A-Fa-f]{64}$/.test(key);\n}\n/**\n * Checks if hexstring is a valid Public Key. Accepts both encoded and unencoded forms.\n * @param key\n * @param encoded Optional parameter to specify for a specific form. If this is omitted, this function will return true for both forms. If this parameter is provided, this function will only return true for the specific form.\n */\nexport function isPublicKey(key, encoded) {\n try {\n let encodedKey;\n switch (key.substr(0, 2)) {\n case \"04\":\n if (encoded === true) {\n return false;\n }\n // Encode key\n encodedKey = getPublicKeyEncoded(key);\n break;\n case \"02\":\n case \"03\":\n if (encoded === false) {\n return false;\n }\n encodedKey = key;\n break;\n default:\n return false;\n }\n const unencoded = getPublicKeyUnencoded(encodedKey);\n const tail = parseInt(unencoded.substr(unencoded.length - 2, 2), 16);\n if (encodedKey.substr(0, 2) === \"02\" && tail % 2 === 0) {\n return true;\n }\n if (encodedKey.substr(0, 2) === \"03\" && tail % 2 === 1) {\n return true;\n }\n return false;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Verifies if string is a scripthash. Any 20 byte hexstring is a valid scriptHash.\n */\nexport function isScriptHash(scriptHash) {\n return isHex(scriptHash) && scriptHash.length === 40;\n}\n/**\n * Verifies an address using its checksum.\n */\nexport function isAddress(address) {\n try {\n const programHash = ab2hexstring(base58.decode(address));\n const shaChecksum = hash256(programHash.slice(0, 42)).substr(0, 8);\n // We use the checksum to verify the address\n if (shaChecksum !== programHash.substr(42, 8)) {\n return false;\n }\n // As other chains use similar checksum methods, we need to attempt to transform the programHash back into the address\n const scriptHash = reverseHex(programHash.slice(2, 42));\n if (getAddressFromScriptHash(scriptHash) !== address) {\n // address is not valid Neo address, could be btc, ltc etc.\n return false;\n }\n return true;\n }\n catch (e) {\n return false;\n }\n}\n//# sourceMappingURL=verify.js.map","import BN from \"bn.js\";\nimport { ec as EC } from \"elliptic\";\nimport { sha256 } from \"../u\";\nimport { getPrivateKeyFromWIF, getPublicKeyUnencoded } from \"./core\";\nimport { isPublicKey, isWIF } from \"./verify\";\nexport const curve = new EC(\"p256\");\n/**\n * Converts signatureHex to a signature object with r & s.\n */\nfunction getSignatureFromHex(signatureHex) {\n const signatureBuffer = Buffer.from(signatureHex, \"hex\");\n const r = new BN(signatureBuffer.slice(0, 32).toString(\"hex\"), 16, \"be\");\n const s = new BN(signatureBuffer.slice(32).toString(\"hex\"), 16, \"be\");\n return { r, s };\n}\n/**\n * Generates a ECDSA signature from a hexstring using the given private key.\n * @param hex Hexstring to hash.\n * @param privateKey Hexstring or WIF format.\n */\nexport function sign(hex, privateKey) {\n if (isWIF(privateKey)) {\n privateKey = getPrivateKeyFromWIF(privateKey);\n }\n const msgHash = sha256(hex);\n const msgHashHex = Buffer.from(msgHash, \"hex\");\n const privateKeyBuffer = Buffer.from(privateKey, \"hex\");\n const sig = curve.sign(msgHashHex, privateKeyBuffer);\n return sig.r.toString(\"hex\", 32) + sig.s.toString(\"hex\", 32);\n}\n/**\n * Verifies that the message, signature and signing key matches.\n * @param hex Message that was signed.\n * @param sig ECDSA signature.\n * @param publicKey encoded/unencoded public key of the signing key.\n */\nexport function verify(hex, sig, publicKey) {\n if (!isPublicKey(publicKey)) {\n throw new Error(\"Invalid public key\");\n }\n if (!isPublicKey(publicKey, true)) {\n publicKey = getPublicKeyUnencoded(publicKey);\n }\n const sigObj = getSignatureFromHex(sig);\n const messageHash = sha256(hex);\n const publicKeyBuffer = Buffer.from(publicKey, \"hex\");\n return curve.verify(messageHash, sigObj, publicKeyBuffer, \"hex\");\n}\n//# sourceMappingURL=signing.js.map","/**\n * @file Core methods for manipulating keys\n * NEP2 <=> WIF <=> Private => Public => ScriptHash <=> Address\n * Keys are arranged in order of derivation.\n * Arrows determine the direction.\n *\n * NEP2 methods are found within NEP2 standard.\n * All methods take in Big-Endian strings and return Big-Endian strings.\n */\nimport base58 from \"bs58\";\nimport { Buffer } from \"buffer\";\nimport WIF from \"wif\";\nimport { ADDR_VERSION } from \"../consts\";\nimport { ab2hexstring, hash160, hash256, hexstring2ab, reverseHex } from \"../u\";\nimport { generateRandomArray } from \"../u/random\";\nimport { curve, sign } from \"./signing\";\n/**\n * Encodes a public key.\n * @param unencodedKey unencoded public key\n * @return encoded public key\n */\nexport function getPublicKeyEncoded(unencodedKey) {\n const publicKeyArray = new Uint8Array(hexstring2ab(unencodedKey));\n if (publicKeyArray[64] % 2 === 1) {\n return \"03\" + ab2hexstring(publicKeyArray.slice(1, 33));\n }\n else {\n return \"02\" + ab2hexstring(publicKeyArray.slice(1, 33));\n }\n}\n/**\n * Unencodes a public key.\n * @param publicKey Encoded public key\n * @return decoded public key\n */\nexport function getPublicKeyUnencoded(publicKey) {\n const publicKeyBuffer = Buffer.from(publicKey, \"hex\");\n const keyPair = curve.keyFromPublic(publicKeyBuffer, \"hex\");\n return keyPair.getPublic().encode(\"hex\", false);\n}\n/**\n * Converts a WIF to private key.\n */\nexport function getPrivateKeyFromWIF(wif) {\n return ab2hexstring(WIF.decode(wif, 128).privateKey);\n}\n/**\n * Converts a private key to WIF.\n */\nexport function getWIFFromPrivateKey(privateKey) {\n return WIF.encode(128, Buffer.from(privateKey, \"hex\"), true);\n}\n/**\n * Converts a private key to public key.\n * @param privateKey\n * @param encode Returns the encoded form if true.\n */\nexport function getPublicKeyFromPrivateKey(privateKey, encode = true) {\n const privateKeyBuffer = Buffer.from(privateKey, \"hex\");\n const keypair = curve.keyFromPrivate(privateKeyBuffer, \"hex\");\n const unencodedPubKey = keypair.getPublic().encode(\"hex\", false);\n if (encode) {\n const tail = parseInt(unencodedPubKey.substr(64 * 2, 2), 16);\n if (tail % 2 === 1) {\n return \"03\" + unencodedPubKey.substr(2, 64);\n }\n else {\n return \"02\" + unencodedPubKey.substr(2, 64);\n }\n }\n else {\n return unencodedPubKey;\n }\n}\n/**\n * Converts a public key to verification script form.\n * VerificationScript serves a very niche purpose.\n * It is attached as part of the signature when signing a transaction.\n * Thus, the name 'scriptHash' instead of 'keyHash' is because we are hashing the verificationScript and not the PublicKey.\n */\nexport const getVerificationScriptFromPublicKey = (publicKey) => {\n return \"21\" + publicKey + \"ac\";\n};\n/**\n * Converts a public key to scripthash.\n */\nexport const getScriptHashFromPublicKey = (publicKey) => {\n // if unencoded\n if (publicKey.substring(0, 2) === \"04\") {\n publicKey = getPublicKeyEncoded(publicKey);\n }\n const verificationScript = getVerificationScriptFromPublicKey(publicKey);\n return reverseHex(hash160(verificationScript));\n};\n/**\n * Converts a scripthash to address.\n */\nexport const getAddressFromScriptHash = (scriptHash) => {\n scriptHash = reverseHex(scriptHash);\n const shaChecksum = hash256(ADDR_VERSION + scriptHash).substr(0, 8);\n return base58.encode(Buffer.from(ADDR_VERSION + scriptHash + shaChecksum, \"hex\"));\n};\n/**\n * Converts an address to scripthash.\n */\nexport const getScriptHashFromAddress = (address) => {\n const hash = ab2hexstring(base58.decode(address));\n return reverseHex(hash.substr(2, 40));\n};\n/**\n * Generates a signature of the transaction based on given private key.\n * @param tx Serialized unsigned transaction.\n * @param privateKey Private Key.\n * @return Signature. Does not include tx.\n */\nexport const generateSignature = (tx, privateKey) => {\n return sign(tx, privateKey);\n};\n/**\n * Generates a random private key.\n */\nexport const generatePrivateKey = () => {\n return ab2hexstring(generateRandomArray(32));\n};\n//# sourceMappingURL=core.js.map","import { Fixed8, reverseHex } from \"../u\";\nimport { getScriptHashFromAddress, isAddress } from \"../wallet\";\nexport var ContractParamType;\n(function (ContractParamType) {\n ContractParamType[ContractParamType[\"Signature\"] = 0] = \"Signature\";\n ContractParamType[ContractParamType[\"Boolean\"] = 1] = \"Boolean\";\n ContractParamType[ContractParamType[\"Integer\"] = 2] = \"Integer\";\n ContractParamType[ContractParamType[\"Hash160\"] = 3] = \"Hash160\";\n ContractParamType[ContractParamType[\"Hash256\"] = 4] = \"Hash256\";\n ContractParamType[ContractParamType[\"ByteArray\"] = 5] = \"ByteArray\";\n ContractParamType[ContractParamType[\"PublicKey\"] = 6] = \"PublicKey\";\n ContractParamType[ContractParamType[\"String\"] = 7] = \"String\";\n ContractParamType[ContractParamType[\"Array\"] = 16] = \"Array\";\n ContractParamType[ContractParamType[\"InteropInterface\"] = 240] = \"InteropInterface\";\n ContractParamType[ContractParamType[\"Void\"] = 255] = \"Void\";\n})(ContractParamType || (ContractParamType = {}));\nfunction toContractParamType(type) {\n if (typeof type === \"string\") {\n if (type in ContractParamType) {\n return ContractParamType[type];\n }\n throw new Error(`${type} not found in ContractParamType!`);\n }\n return type;\n}\n/**\n * Contract input parameters.\n * These are mainly used as parameters to pass in for RPC test invokes.\n */\nexport class ContractParam {\n /**\n * Creates a String ContractParam.\n */\n static string(value) {\n return new ContractParam(ContractParamType.String, value);\n }\n /**\n * Creates a Boolean ContractParam. Does basic checks to convert value into a boolean.\n */\n static boolean(value) {\n return new ContractParam(ContractParamType.Boolean, !!value);\n }\n /**\n * Creates a Hash160 ContractParam. This is used for containing a scriptHash. Do not reverse the input if using this format.\n * @param {string} value - A 40 character long hexstring. Automatically converts an address to scripthash if provided.\n * @return {ContractParam}\n */\n static hash160(value) {\n if (typeof value !== \"string\") {\n throw new Error(`hash160 expected a string but got ${typeof value} instead.`);\n }\n if (isAddress(value)) {\n value = getScriptHashFromAddress(value);\n }\n if (value.length !== 40) {\n throw new Error(`hash160 expected a 40 character string but got ${value.length} chars instead.`);\n }\n return new ContractParam(ContractParamType.Hash160, value);\n }\n /**\n * Creates an Integer ContractParam. This is converted into an BigInteger in NeoVM.\n * @param {string | number } value - A value that can be parsed to an BigInteger. Numbers or numeric strings are accepted.\n * @example\n * ContractParam.integer(128)\n * ContractParam.integer(\"128\")\n */\n static integer(value) {\n const num = typeof value === \"string\"\n ? value.split(\".\")[0]\n : Math.round(value).toString();\n return new ContractParam(ContractParamType.Integer, num);\n }\n /**\n * Creates a ByteArray ContractParam.\n * @param value\n * @param format The format that this value represents. Different formats are parsed differently.\n * @param args Additional arguments such as decimal precision\n */\n static byteArray(value, format, ...args) {\n if (format) {\n format = format.toLowerCase();\n }\n if (format === \"address\") {\n return new ContractParam(ContractParamType.ByteArray, reverseHex(getScriptHashFromAddress(value)));\n }\n else if (format === \"fixed8\") {\n let decimals = 8;\n if (args.length === 1) {\n decimals = args[0];\n }\n if (!isFinite(value)) {\n throw new Error(`Input should be number!`);\n }\n const divisor = new Fixed8(Math.pow(10, 8 - decimals));\n const fixed8Value = new Fixed8(value);\n const adjustedValue = fixed8Value.times(Math.pow(10, decimals));\n const modValue = adjustedValue.mod(1);\n if (!modValue.isZero()) {\n throw new Error(`wrong precision: expected ${decimals}`);\n }\n value = fixed8Value.div(divisor);\n return new ContractParam(ContractParamType.ByteArray, value.toReverseHex().slice(0, 16));\n }\n else {\n return new ContractParam(ContractParamType.ByteArray, value);\n }\n }\n /**\n * Creates an Array ContractParam.\n * @param params params to be encapsulated in an array.\n */\n static array(...params) {\n return new ContractParam(ContractParamType.Array, params);\n }\n constructor(type, value) {\n if (typeof type === \"object\") {\n this.type = toContractParamType(type.type);\n this.value = type.value;\n }\n else if (type !== undefined) {\n this.type = toContractParamType(type);\n this.value = value;\n }\n else {\n throw new Error(\"No constructor arguments provided!\");\n }\n }\n get [Symbol.toStringTag]() {\n return \"ContractParam:\" + ContractParamType[this.type];\n }\n export() {\n const exportedValue = Array.isArray(this.value)\n ? this.value.map(cp => cp.export())\n : this.value;\n return { type: ContractParamType[this.type], value: this.value };\n }\n equal(other) {\n if (this.type === toContractParamType(other.type) &&\n Array.isArray(this.value) &&\n Array.isArray(other.value) &&\n this.value.length === other.value.length) {\n return this.value.every((cp, i) => cp.equal(other.value[i]));\n }\n return false;\n }\n}\nexport default ContractParam;\nexport function likeContractParam(cp) {\n if (cp === null || cp === undefined) {\n return false;\n }\n if (cp instanceof ContractParam) {\n return true;\n }\n return (cp.type in ContractParamType &&\n cp.value !== null &&\n cp.value !== undefined);\n}\n//# sourceMappingURL=ContractParam.js.map","export var OpCode;\n(function (OpCode) {\n OpCode[OpCode[\"PUSH0\"] = 0] = \"PUSH0\";\n OpCode[OpCode[\"PUSHF\"] = 0] = \"PUSHF\";\n OpCode[OpCode[\"PUSHBYTES1\"] = 1] = \"PUSHBYTES1\";\n OpCode[OpCode[\"PUSHBYTES75\"] = 75] = \"PUSHBYTES75\";\n OpCode[OpCode[\"PUSHDATA1\"] = 76] = \"PUSHDATA1\";\n OpCode[OpCode[\"PUSHDATA2\"] = 77] = \"PUSHDATA2\";\n OpCode[OpCode[\"PUSHDATA4\"] = 78] = \"PUSHDATA4\";\n OpCode[OpCode[\"PUSHM1\"] = 79] = \"PUSHM1\";\n OpCode[OpCode[\"PUSH1\"] = 81] = \"PUSH1\";\n OpCode[OpCode[\"PUSHT\"] = 81] = \"PUSHT\";\n OpCode[OpCode[\"PUSH2\"] = 82] = \"PUSH2\";\n OpCode[OpCode[\"PUSH3\"] = 83] = \"PUSH3\";\n OpCode[OpCode[\"PUSH4\"] = 84] = \"PUSH4\";\n OpCode[OpCode[\"PUSH5\"] = 85] = \"PUSH5\";\n OpCode[OpCode[\"PUSH6\"] = 86] = \"PUSH6\";\n OpCode[OpCode[\"PUSH7\"] = 87] = \"PUSH7\";\n OpCode[OpCode[\"PUSH8\"] = 88] = \"PUSH8\";\n OpCode[OpCode[\"PUSH9\"] = 89] = \"PUSH9\";\n OpCode[OpCode[\"PUSH10\"] = 90] = \"PUSH10\";\n OpCode[OpCode[\"PUSH11\"] = 91] = \"PUSH11\";\n OpCode[OpCode[\"PUSH12\"] = 92] = \"PUSH12\";\n OpCode[OpCode[\"PUSH13\"] = 93] = \"PUSH13\";\n OpCode[OpCode[\"PUSH14\"] = 94] = \"PUSH14\";\n OpCode[OpCode[\"PUSH15\"] = 95] = \"PUSH15\";\n OpCode[OpCode[\"PUSH16\"] = 96] = \"PUSH16\";\n OpCode[OpCode[\"NOP\"] = 97] = \"NOP\";\n OpCode[OpCode[\"JMP\"] = 98] = \"JMP\";\n OpCode[OpCode[\"JMPIF\"] = 99] = \"JMPIF\";\n OpCode[OpCode[\"JMPIFNOT\"] = 100] = \"JMPIFNOT\";\n OpCode[OpCode[\"CALL\"] = 101] = \"CALL\";\n OpCode[OpCode[\"RET\"] = 102] = \"RET\";\n OpCode[OpCode[\"APPCALL\"] = 103] = \"APPCALL\";\n OpCode[OpCode[\"SYSCALL\"] = 104] = \"SYSCALL\";\n OpCode[OpCode[\"TAILCALL\"] = 105] = \"TAILCALL\";\n OpCode[OpCode[\"DUPFROMALTSTACK\"] = 106] = \"DUPFROMALTSTACK\";\n OpCode[OpCode[\"TOALTSTACK\"] = 107] = \"TOALTSTACK\";\n OpCode[OpCode[\"FROMALTSTACK\"] = 108] = \"FROMALTSTACK\";\n OpCode[OpCode[\"XDROP\"] = 109] = \"XDROP\";\n OpCode[OpCode[\"XSWAP\"] = 114] = \"XSWAP\";\n OpCode[OpCode[\"XTUCK\"] = 115] = \"XTUCK\";\n OpCode[OpCode[\"DEPTH\"] = 116] = \"DEPTH\";\n OpCode[OpCode[\"DROP\"] = 117] = \"DROP\";\n OpCode[OpCode[\"DUP\"] = 118] = \"DUP\";\n OpCode[OpCode[\"NIP\"] = 119] = \"NIP\";\n OpCode[OpCode[\"OVER\"] = 120] = \"OVER\";\n OpCode[OpCode[\"PICK\"] = 121] = \"PICK\";\n OpCode[OpCode[\"ROLL\"] = 122] = \"ROLL\";\n OpCode[OpCode[\"ROT\"] = 123] = \"ROT\";\n OpCode[OpCode[\"SWAP\"] = 124] = \"SWAP\";\n OpCode[OpCode[\"TUCK\"] = 125] = \"TUCK\";\n OpCode[OpCode[\"CAT\"] = 126] = \"CAT\";\n OpCode[OpCode[\"SUBSTR\"] = 127] = \"SUBSTR\";\n OpCode[OpCode[\"LEFT\"] = 128] = \"LEFT\";\n OpCode[OpCode[\"RIGHT\"] = 129] = \"RIGHT\";\n OpCode[OpCode[\"SIZE\"] = 130] = \"SIZE\";\n OpCode[OpCode[\"INVERT\"] = 131] = \"INVERT\";\n OpCode[OpCode[\"AND\"] = 132] = \"AND\";\n OpCode[OpCode[\"OR\"] = 133] = \"OR\";\n OpCode[OpCode[\"XOR\"] = 134] = \"XOR\";\n OpCode[OpCode[\"EQUAL\"] = 135] = \"EQUAL\";\n OpCode[OpCode[\"INC\"] = 139] = \"INC\";\n OpCode[OpCode[\"DEC\"] = 140] = \"DEC\";\n OpCode[OpCode[\"SIGN\"] = 141] = \"SIGN\";\n OpCode[OpCode[\"NEGATE\"] = 143] = \"NEGATE\";\n OpCode[OpCode[\"ABS\"] = 144] = \"ABS\";\n OpCode[OpCode[\"NOT\"] = 145] = \"NOT\";\n OpCode[OpCode[\"NZ\"] = 146] = \"NZ\";\n OpCode[OpCode[\"ADD\"] = 147] = \"ADD\";\n OpCode[OpCode[\"SUB\"] = 148] = \"SUB\";\n OpCode[OpCode[\"MUL\"] = 149] = \"MUL\";\n OpCode[OpCode[\"DIV\"] = 150] = \"DIV\";\n OpCode[OpCode[\"MOD\"] = 151] = \"MOD\";\n OpCode[OpCode[\"SHL\"] = 152] = \"SHL\";\n OpCode[OpCode[\"SHR\"] = 153] = \"SHR\";\n OpCode[OpCode[\"BOOLAND\"] = 154] = \"BOOLAND\";\n OpCode[OpCode[\"BOOLOR\"] = 155] = \"BOOLOR\";\n OpCode[OpCode[\"NUMEQUAL\"] = 156] = \"NUMEQUAL\";\n OpCode[OpCode[\"NUMNOTEQUAL\"] = 158] = \"NUMNOTEQUAL\";\n OpCode[OpCode[\"LT\"] = 159] = \"LT\";\n OpCode[OpCode[\"GT\"] = 160] = \"GT\";\n OpCode[OpCode[\"LTE\"] = 161] = \"LTE\";\n OpCode[OpCode[\"GTE\"] = 162] = \"GTE\";\n OpCode[OpCode[\"MIN\"] = 163] = \"MIN\";\n OpCode[OpCode[\"MAX\"] = 164] = \"MAX\";\n OpCode[OpCode[\"WITHIN\"] = 165] = \"WITHIN\";\n OpCode[OpCode[\"SHA1\"] = 167] = \"SHA1\";\n OpCode[OpCode[\"SHA256\"] = 168] = \"SHA256\";\n OpCode[OpCode[\"HASH160\"] = 169] = \"HASH160\";\n OpCode[OpCode[\"HASH256\"] = 170] = \"HASH256\";\n OpCode[OpCode[\"CHECKSIG\"] = 172] = \"CHECKSIG\";\n OpCode[OpCode[\"VERIFY\"] = 173] = \"VERIFY\";\n OpCode[OpCode[\"CHECKMULTISIG\"] = 174] = \"CHECKMULTISIG\";\n OpCode[OpCode[\"ARRAYSIZE\"] = 192] = \"ARRAYSIZE\";\n OpCode[OpCode[\"PACK\"] = 193] = \"PACK\";\n OpCode[OpCode[\"UNPACK\"] = 194] = \"UNPACK\";\n OpCode[OpCode[\"PICKITEM\"] = 195] = \"PICKITEM\";\n OpCode[OpCode[\"SETITEM\"] = 196] = \"SETITEM\";\n OpCode[OpCode[\"NEWARRAY\"] = 197] = \"NEWARRAY\";\n OpCode[OpCode[\"NEWSTRUCT\"] = 198] = \"NEWSTRUCT\";\n OpCode[OpCode[\"NEWMAP\"] = 199] = \"NEWMAP\";\n OpCode[OpCode[\"APPEND\"] = 200] = \"APPEND\";\n OpCode[OpCode[\"REVERSE\"] = 201] = \"REVERSE\";\n OpCode[OpCode[\"REMOVE\"] = 202] = \"REMOVE\";\n OpCode[OpCode[\"HASKEY\"] = 203] = \"HASKEY\";\n OpCode[OpCode[\"KEYS\"] = 204] = \"KEYS\";\n OpCode[OpCode[\"VALUES\"] = 205] = \"VALUES\";\n OpCode[OpCode[\"CALL_I\"] = 224] = \"CALL_I\";\n OpCode[OpCode[\"CALL_E\"] = 225] = \"CALL_E\";\n OpCode[OpCode[\"CALL_ED\"] = 226] = \"CALL_ED\";\n OpCode[OpCode[\"CALL_ET\"] = 227] = \"CALL_ET\";\n OpCode[OpCode[\"CALL_EDT\"] = 228] = \"CALL_EDT\";\n OpCode[OpCode[\"THROW\"] = 240] = \"THROW\";\n OpCode[OpCode[\"THROWIFNOT\"] = 241] = \"THROWIFNOT\";\n})(OpCode || (OpCode = {}));\nexport default OpCode;\n//# sourceMappingURL=OpCode.js.map","import BN from \"bn.js\";\nimport { ensureHex, int2hex, num2hexstring, reverseHex, str2hexstring, StringStream } from \"../u\";\nimport ContractParam, { ContractParamType, likeContractParam } from \"./ContractParam\";\nimport OpCode from \"./OpCode\";\nfunction isValidValue(value) {\n if (value) {\n return true;\n }\n else if (value === 0) {\n return true;\n }\n else if (value === \"\") {\n return true;\n }\n return false;\n}\n/**\n * Retrieves a single AppCall from a ScriptBuilder object.\n * Returns ScriptIntents starting from the beginning of the script.\n * This is based off the pointer in the stream.\n * @param sb\n * @returns A single ScriptIntent if available.\n */\nfunction retrieveAppCall(sb) {\n const output = {\n scriptHash: \"\",\n args: []\n };\n while (!sb.isEmpty()) {\n const b = sb.read();\n const n = parseInt(b, 16);\n switch (true) {\n case n === 0:\n output.args.unshift(0);\n break;\n case n < 75:\n output.args.unshift(sb.read(n));\n break;\n case n >= 81 && n <= 96:\n output.args.unshift(n - 80);\n break;\n case n === 193:\n const len = output.args.shift();\n const cache = [];\n for (let i = 0; i < len; i++) {\n cache.unshift(output.args.shift());\n }\n output.args.unshift(cache);\n break;\n case n === 102:\n sb.pter = sb.str.length;\n break;\n case n === 103:\n output.scriptHash = reverseHex(sb.read(20));\n output.useTailCall = false;\n return output;\n case n === 105:\n output.scriptHash = reverseHex(sb.read(20));\n output.useTailCall = true;\n return output;\n case n === 241:\n break;\n default:\n throw new Error(`Encounter unknown byte: ${b}`);\n }\n }\n if (output.scriptHash === \"\") {\n return null;\n }\n return output;\n}\n/**\n * Builds a VM script in hexstring. Used for constructing smart contract method calls.\n * @extends StringStream\n */\nexport class ScriptBuilder extends StringStream {\n /**\n * Appends an Opcode, followed by args\n */\n emit(op, args) {\n this.str += num2hexstring(op);\n if (args) {\n this.str += args;\n }\n return this;\n }\n /**\n * Appends args, operation and scriptHash\n * @param scriptHash Hexstring(BE)\n * @param operation ASCII, defaults to null\n * @param args any\n * @param useTailCall Use TailCall instead of AppCall\n * @return this\n */\n emitAppCall(scriptHash, operation = null, args, useTailCall = false) {\n this.emitPush(args);\n if (operation) {\n let hexOp = \"\";\n for (let i = 0; i < operation.length; i++) {\n hexOp += num2hexstring(operation.charCodeAt(i));\n }\n this.emitPush(hexOp);\n }\n this._emitAppCall(scriptHash, useTailCall);\n return this;\n }\n /**\n * Appends a SysCall\n * @param api api of SysCall\n * @return this\n */\n emitSysCall(api) {\n if (!api) {\n throw new Error(\"Invalid SysCall API\");\n }\n const apiBytes = str2hexstring(api);\n const length = int2hex(apiBytes.length / 2);\n if (length.length !== 2) {\n throw new Error(\"Invalid length for SysCall API\");\n }\n const out = length + apiBytes;\n return this.emit(OpCode.SYSCALL, out);\n }\n /**\n * Appends data depending on type. Used to append params/array lengths.\n * @param data\n * @return this\n */\n emitPush(data) {\n switch (typeof data) {\n case \"boolean\":\n return this.emit(data ? OpCode.PUSHT : OpCode.PUSHF);\n case \"string\":\n return this._emitString(data);\n case \"number\":\n return this._emitNum(data);\n case \"undefined\":\n return this.emitPush(false);\n case \"object\":\n if (Array.isArray(data)) {\n return this._emitArray(data);\n }\n else if (likeContractParam(data)) {\n return this._emitParam(new ContractParam(data));\n }\n else if (data === null) {\n return this.emitPush(false);\n }\n throw new Error(`Unidentified object: ${data}`);\n default:\n throw new Error();\n }\n }\n /**\n * Reverse engineer a script back to its params.\n * A script may have multiple invocations so a list is always returned.\n * @return A list of ScriptIntents[].\n */\n toScriptParams() {\n this.reset();\n const scripts = [];\n while (!this.isEmpty()) {\n const a = retrieveAppCall(this);\n if (a) {\n scripts.push(a);\n }\n }\n return scripts;\n }\n /**\n * Appends a AppCall and scriptHash. Used to end off a script.\n * @param scriptHash Hexstring(BE)\n * @param useTailCall Defaults to false\n */\n _emitAppCall(scriptHash, useTailCall = false) {\n ensureHex(scriptHash);\n if (scriptHash.length !== 40) {\n throw new Error(\"ScriptHash should be 20 bytes long!\");\n }\n return this.emit(useTailCall ? OpCode.TAILCALL : OpCode.APPCALL, reverseHex(scriptHash));\n }\n /**\n * Private method to append an array\n * @private\n */\n _emitArray(arr) {\n for (let i = arr.length - 1; i >= 0; i--) {\n this.emitPush(arr[i]);\n }\n return this.emitPush(arr.length).emit(OpCode.PACK);\n }\n /**\n * Private method to append a hexstring.\n * @private\n * @param hexstring Hexstring(BE)\n * @return this\n */\n _emitString(hexstring) {\n ensureHex(hexstring);\n const size = hexstring.length / 2;\n if (size <= OpCode.PUSHBYTES75) {\n this.str += num2hexstring(size);\n this.str += hexstring;\n }\n else if (size < 0x100) {\n this.emit(OpCode.PUSHDATA1);\n this.str += num2hexstring(size);\n this.str += hexstring;\n }\n else if (size < 0x10000) {\n this.emit(OpCode.PUSHDATA2);\n this.str += num2hexstring(size, 2, true);\n this.str += hexstring;\n }\n else if (size < 0x100000000) {\n this.emit(OpCode.PUSHDATA4);\n this.str += num2hexstring(size, 4, true);\n this.str += hexstring;\n }\n else {\n throw new Error(`String too big to emit!`);\n }\n return this;\n }\n /**\n * Private method to append a number.\n * @private\n * @param num\n * @return this\n */\n _emitNum(num) {\n const bn = new BN(num);\n if (bn.eqn(-1)) {\n return this.emit(OpCode.PUSHM1);\n }\n if (bn.eqn(0)) {\n return this.emit(OpCode.PUSH0);\n }\n if (bn.gtn(0) && bn.lten(16)) {\n return this.emit(OpCode.PUSH1 - 1 + bn.toNumber());\n }\n const msbSet = bn.testn(bn.byteLength() * 8 - 1);\n const hex = bn\n .toTwos(bn.byteLength() * 8)\n .toString(16, bn.byteLength() * 2);\n const paddedHex = !bn.isNeg() && msbSet ? \"00\" + hex : hex;\n return this.emitPush(reverseHex(paddedHex));\n }\n /**\n * Private method to append a ContractParam\n * @private\n */\n _emitParam(param) {\n if (!param.type) {\n throw new Error(\"No type available!\");\n }\n if (!isValidValue(param.value)) {\n throw new Error(\"Invalid value provided!\");\n }\n switch (param.type) {\n case ContractParamType.String:\n return this._emitString(str2hexstring(param.value));\n case ContractParamType.Boolean:\n return this.emit(param.value ? OpCode.PUSHT : OpCode.PUSHF);\n case ContractParamType.Integer:\n return this._emitNum(param.value);\n case ContractParamType.ByteArray:\n return this._emitString(param.value);\n case ContractParamType.Array:\n return this._emitArray(param.value);\n case ContractParamType.Hash160:\n return this._emitString(reverseHex(param.value));\n default:\n throw new Error(`Unaccounted ContractParamType!: ${param.type}`);\n }\n }\n}\nexport default ScriptBuilder;\n//# sourceMappingURL=ScriptBuilder.js.map","import { str2hexstring } from \"../u\";\nimport ScriptBuilder from \"./ScriptBuilder\";\n/**\n * Translates a ScriptIntent / array of ScriptIntents into hexstring.\n */\nexport function createScript(...intents) {\n const sb = new ScriptBuilder();\n for (const scriptIntent of intents) {\n if (typeof scriptIntent === \"string\") {\n sb.str += scriptIntent;\n continue;\n }\n if (!scriptIntent.scriptHash) {\n throw new Error(\"No scriptHash found!\");\n }\n const { scriptHash, operation, args, useTailCall } = Object.assign({ operation: null, args: undefined, useTailCall: false }, scriptIntent);\n sb.emitAppCall(scriptHash, operation, args, useTailCall);\n }\n return sb.str;\n}\n/**\n * Generates script for deploying contract\n */\nexport function generateDeployScript(params) {\n const sb = new ScriptBuilder();\n sb.emitPush(str2hexstring(params.description))\n .emitPush(str2hexstring(params.email))\n .emitPush(str2hexstring(params.author))\n .emitPush(str2hexstring(params.version))\n .emitPush(str2hexstring(params.name))\n .emitPush(params.needsStorage || false)\n .emitPush(params.returnType || \"ff00\")\n .emitPush(params.parameterList)\n .emitPush(params.script)\n .emitSysCall(\"Neo.Contract.Create\");\n return sb;\n}\n//# sourceMappingURL=core.js.map","import { StringStream } from \"../u\";\nexport var StackItemType;\n(function (StackItemType) {\n StackItemType[StackItemType[\"ByteArray\"] = 0] = \"ByteArray\";\n StackItemType[StackItemType[\"Boolean\"] = 1] = \"Boolean\";\n StackItemType[StackItemType[\"Integer\"] = 2] = \"Integer\";\n StackItemType[StackItemType[\"InteropInterface\"] = 4] = \"InteropInterface\";\n StackItemType[StackItemType[\"Array\"] = 128] = \"Array\";\n StackItemType[StackItemType[\"Struct\"] = 129] = \"Struct\";\n StackItemType[StackItemType[\"Map\"] = 130] = \"Map\";\n})(StackItemType || (StackItemType = {}));\nfunction toStackItemType(type) {\n if (typeof type === \"string\") {\n return StackItemType[type];\n }\n return type;\n}\n/**\n * Determine if there's a nested set based on type\n */\nexport function hasChildren(type) {\n if (type === StackItemType.Array ||\n type === StackItemType.Struct ||\n type === StackItemType.Map) {\n return true;\n }\n return false;\n}\nfunction getDefaultValue(type) {\n switch (type) {\n case StackItemType.Array:\n case StackItemType.Struct:\n case StackItemType.Map:\n return [];\n case StackItemType.Boolean:\n return false;\n default:\n return \"\";\n }\n}\n/**\n * Object returned as a result of executing a script in the VM.\n */\nexport class StackItem {\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this._deserialize(ss);\n }\n static _deserialize(ss) {\n const item = new StackItem({ type: parseInt(ss.read(), 16) });\n const l = ss.readVarInt();\n if (l === 0) {\n item.value = getDefaultValue(item.type);\n return item;\n }\n switch (item.type) {\n case StackItemType.Array:\n case StackItemType.Struct:\n item.value = [];\n for (let i = 0; i < l; i++) {\n item.value.push(this._deserialize(ss));\n }\n break;\n case StackItemType.Map:\n item.value = [];\n for (let i = 0; i < l; i++) {\n item.value.push({\n key: this._deserialize(ss),\n value: this._deserialize(ss)\n });\n }\n break;\n case StackItemType.Boolean:\n item.value = parseInt(ss.read(), 16) > 0;\n break;\n default:\n item.value = ss.read(l);\n }\n return item;\n }\n constructor(obj) {\n if (obj.type === undefined) {\n throw new Error(`Invalid type provided: ${obj.type}`);\n }\n this.type = toStackItemType(obj.type);\n if (obj.value === undefined) {\n this.value = getDefaultValue(this.type);\n }\n else if (Array.isArray(obj.value)) {\n if (this.type === StackItemType.Array) {\n this.value = obj.value.map(v => new StackItem(v));\n }\n else if (this.type === StackItemType.Map) {\n this.value = obj.value.map(v => ({\n key: new StackItem(v.key),\n value: new StackItem(v.value)\n }));\n }\n throw new Error(`Encountered array for value but invalid type`);\n }\n else {\n this.value = obj.value;\n }\n }\n export() {\n const type = StackItemType[this.type];\n switch (this.type) {\n case StackItemType.Array:\n case StackItemType.Struct:\n return {\n type,\n value: this.value.map(i => i.export())\n };\n case StackItemType.Map:\n return {\n type,\n value: this.value.map(kv => ({\n key: kv.key.export(),\n value: kv.value.export()\n }))\n };\n default:\n return { type, value: this.value };\n }\n }\n}\nexport default StackItem;\n//# sourceMappingURL=StackItem.js.map","export * from \"./ContractParam\";\nexport * from \"./core\";\nexport * from \"./ScriptBuilder\";\nexport * from \"./StackItem\";\nexport * from \"./OpCode\";\n//# sourceMappingURL=index.js.map","import { OpCode, ScriptBuilder } from \"../sc\";\nimport { reverseHex, StringStream } from \"../u\";\nimport { isPublicKey } from \"./verify\";\nexport function constructMultiSigVerificationScript(signingThreshold, keys) {\n if (signingThreshold > keys.length) {\n throw new Error(\"signingThreshold must be smaller than or equal to number of keys\");\n }\n const ss = new ScriptBuilder();\n ss.emitPush(signingThreshold);\n keys.forEach(k => {\n if (!isPublicKey(k, true)) {\n throw new Error(`${k} is not a valid encoded public key`);\n }\n ss.emitPush(k);\n });\n ss.emitPush(keys.length);\n ss.emit(OpCode.CHECKMULTISIG);\n return ss.str;\n}\n/**\n * Returns the list of public keys found in the verification script.\n * @param verificationScript Verification Script of an Account.\n */\nexport function getPublicKeysFromVerificationScript(verificationScript) {\n const ss = new StringStream(verificationScript);\n const keys = [];\n while (!ss.isEmpty()) {\n const byte = ss.read();\n if (byte === \"21\") {\n keys.push(ss.read(33));\n }\n }\n return keys;\n}\n/**\n * Returns the number of signatures required for signing for a verification Script.\n * @param verificationScript Verification Script of a multi-sig Account.\n */\nexport function getSigningThresholdFromVerificationScript(verificationScript) {\n const checkSigOpCode = verificationScript.slice(verificationScript.length - 2);\n if (checkSigOpCode === \"ac\") {\n return 1;\n }\n else if (checkSigOpCode === \"ae\") {\n const ss = new StringStream(verificationScript);\n const byte = parseInt(ss.peek(), 16);\n if (byte < 80) {\n const hexNum = reverseHex(ss.readVarBytes());\n return parseInt(hexNum, 16);\n }\n else {\n return parseInt(ss.read(), 16) - 80;\n }\n }\n else {\n throw new Error(\"VerificationScript does not call CHECKSIG or CHECKMULTISIG.\");\n }\n}\n/**\n * Extract signatures from invocationScript\n * @param invocationScript InvocationScript of a Witness.\n */\nexport function getSignaturesFromInvocationScript(invocationScript) {\n const ss = new StringStream(invocationScript);\n const sigs = [];\n while (!ss.isEmpty()) {\n const byte = parseInt(ss.peek(), 16);\n if (byte > 80) {\n continue;\n }\n else if (byte === 4 * 16) {\n sigs.push(ss.readVarBytes());\n }\n }\n return sigs;\n}\n//# sourceMappingURL=multisig.js.map","/**\n * NEP2 - Private Key Encryption based on AES.\n * This encrypts your private key with a passphrase, protecting your private key from being stolen and used.\n * It is useful for storing private keys in a JSON file securely or to mask the key before printing it.\n */\nimport bs58check from \"bs58check\"; // This is importable because WIF specifies it as a dependency.\nimport AES from \"crypto-js/aes\";\nimport hexEncoding from \"crypto-js/enc-hex\";\nimport latin1Encoding from \"crypto-js/enc-latin1\";\nimport ECBMode from \"crypto-js/mode-ecb\";\nimport NoPadding from \"crypto-js/pad-nopadding\";\nimport SHA256 from \"crypto-js/sha256\";\nimport asyncScrypt from \"scrypt-js\";\nimport { DEFAULT_SCRYPT, NEP_FLAG, NEP_HEADER } from \"../consts\";\nimport logging from \"../logging\";\nimport { ab2hexstring, hexXor } from \"../u\";\nimport Account from \"./Account\";\nconst enc = {\n Latin1: latin1Encoding,\n Hex: hexEncoding\n};\nconst AES_OPTIONS = { mode: ECBMode, padding: NoPadding };\nconst log = logging(\"wallet\");\n/**\n * Encrypts a WIF key using a given keyphrase under NEP-2 Standard.\n * @param wifKey WIF key to encrypt (52 chars long).\n * @param keyphrase The password will be encoded as UTF-8 and normalized using Unicode Normalization Form C (NFC).\n * @param scryptParams Optional parameters for Scrypt. Defaults to NEP2 specified parameters.\n * @returns The encrypted key in Base58 (Case sensitive).\n */\nexport function encrypt(wifKey, keyphrase, scryptParams = DEFAULT_SCRYPT) {\n return new Promise((resolve, reject) => {\n const { n, r, p } = scryptParams;\n const account = new Account(wifKey);\n // SHA Salt (use the first 4 bytes)\n const firstSha = SHA256(enc.Latin1.parse(account.address));\n const addressHash = SHA256(firstSha)\n .toString()\n .slice(0, 8);\n asyncScrypt(Buffer.from(keyphrase.normalize(\"NFC\"), \"utf8\"), Buffer.from(addressHash, \"hex\"), n, r, p, 64, (error, _, key) => {\n if (error != null) {\n reject(error);\n }\n else if (key) {\n const derived = Buffer.from(key).toString(\"hex\");\n const derived1 = derived.slice(0, 64);\n const derived2 = derived.slice(64);\n // AES Encrypt\n const xor = hexXor(account.privateKey, derived1);\n const encrypted = AES.encrypt(enc.Hex.parse(xor), enc.Hex.parse(derived2), AES_OPTIONS);\n const assembled = NEP_HEADER +\n NEP_FLAG +\n addressHash +\n encrypted.ciphertext.toString();\n const encryptedKey = bs58check.encode(Buffer.from(assembled, \"hex\"));\n log.info(`Successfully encrypted key to ${encryptedKey}`);\n resolve(encryptedKey);\n }\n });\n });\n}\n/**\n * Decrypts an encrypted key using a given keyphrase under NEP-2 Standard.\n * @param encryptedKey The encrypted key (58 chars long).\n * @param keyphrase The password will be encoded as UTF-8 and normalized using Unicode Normalization Form C (NFC).\n * @param scryptParams Parameters for Scrypt. Defaults to NEP2 specified parameters.\n * @returns The decrypted WIF key.\n */\nexport function decrypt(encryptedKey, keyphrase, scryptParams = DEFAULT_SCRYPT) {\n return new Promise((resolve, reject) => {\n const { n, r, p } = scryptParams;\n const assembled = ab2hexstring(bs58check.decode(encryptedKey));\n const addressHash = assembled.substr(6, 8);\n const encrypted = assembled.substr(-64);\n asyncScrypt(Buffer.from(keyphrase.normalize(\"NFC\"), \"utf8\"), Buffer.from(addressHash, \"hex\"), n, r, p, 64, (error, _, key) => {\n if (error != null) {\n reject(error);\n }\n else if (key) {\n const derived = Buffer.from(key).toString(\"hex\");\n const derived1 = derived.slice(0, 64);\n const derived2 = derived.slice(64);\n const ciphertext = {\n ciphertext: enc.Hex.parse(encrypted),\n salt: \"\",\n iv: \"\"\n };\n const decrypted = AES.decrypt(ciphertext, enc.Hex.parse(derived2), AES_OPTIONS);\n const privateKey = hexXor(decrypted.toString(), derived1);\n const account = new Account(privateKey);\n const newAddressHash = SHA256(SHA256(enc.Latin1.parse(account.address)))\n .toString()\n .slice(0, 8);\n if (addressHash !== newAddressHash) {\n reject(new Error(\"Wrong password or scrypt parameters!\"));\n }\n log.info(`Successfully decrypted ${encryptedKey}`);\n resolve(account.WIF);\n }\n });\n });\n}\n//# sourceMappingURL=nep2.js.map","import util from \"util\";\nimport { DEFAULT_ACCOUNT_CONTRACT, DEFAULT_SCRYPT } from \"../consts\";\nimport logger from \"../logging\";\nimport { hash160, reverseHex } from \"../u\";\nimport * as core from \"./core\";\nimport { constructMultiSigVerificationScript } from \"./multisig\";\nimport { decrypt, encrypt } from \"./nep2\";\nimport { isAddress, isNEP2, isPrivateKey, isPublicKey, isScriptHash, isWIF } from \"./verify\";\nconst log = logger(\"wallet\");\nconst inspect = util.inspect.custom;\n/**\n * This allows for simple utilisation and manipulating of keys without need the long access methods.\n *\n * Key formats are derived from each other lazily and stored for future access.\n * If the previous key (one level higher) is not found, it will attempt to generate it or throw an Error if insufficient information was provided (eg. trying to generate private key when only address was given.)\n *\n * NEP2 <=> WIF <=> Private => Public => ScriptHash <=> Address\n *\n * @param str WIF/ Private Key / Public Key / Address or a Wallet Account object.\n * @example\n * const acct = new Account(\"L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g\");\n * acct.address; // \"ALq7AWrhAueN6mJNqk6FHJjnsEoPRytLdW\"\n */\nexport class Account {\n /**\n * Create a multi-sig account from a list of public keys\n * @param signingThreshold Minimum number of signatures required for verification. Must be larger than 0 and less than number of keys provided.\n * @param publicKeys List of public keys to form the account. 2-16 keys allowed. Order is important.\n * @example\n * const threshold = 2;\n * const publicKeys = [\n * \"02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef\",\n * \"031d8e1630ce640966967bc6d95223d21f44304133003140c3b52004dc981349c9\",\n * \"02232ce8d2e2063dce0451131851d47421bfc4fc1da4db116fca5302c0756462fa\"\n * ];\n * const acct = Account.createMultiSig(threshold, publicKeys);\n */\n static createMultiSig(signingThreshold, publicKeys) {\n const verificationScript = constructMultiSigVerificationScript(signingThreshold, publicKeys);\n return new Account({\n contract: {\n script: verificationScript,\n parameters: Array(signingThreshold).map((_, i) => ({\n name: `signature${i}`,\n type: \"Signature\"\n })),\n deployed: false\n }\n });\n }\n // tslint:enables:variable-name\n constructor(str = \"\") {\n this.extra = {};\n this.label = \"\";\n this.isDefault = false;\n this.lock = false;\n this.contract = Object.assign({}, DEFAULT_ACCOUNT_CONTRACT);\n if (!str) {\n this._privateKey = core.generatePrivateKey();\n }\n else if (typeof str === \"object\") {\n this._encrypted = str.key;\n this._address = str.address;\n this.label = str.label || \"\";\n this.extra = str.extra || {};\n this.isDefault = str.isDefault || false;\n this.lock = str.lock || false;\n this.contract =\n str.contract || Object.assign({}, DEFAULT_ACCOUNT_CONTRACT);\n }\n else if (isPrivateKey(str)) {\n this._privateKey = str;\n }\n else if (isPublicKey(str, false)) {\n this._publicKey = core.getPublicKeyEncoded(str);\n }\n else if (isPublicKey(str, true)) {\n this._publicKey = str;\n }\n else if (isScriptHash(str)) {\n this._scriptHash = str;\n }\n else if (isAddress(str)) {\n this._address = str;\n }\n else if (isWIF(str)) {\n this._privateKey = core.getPrivateKeyFromWIF(str);\n this._WIF = str;\n }\n else if (isNEP2(str)) {\n this._encrypted = str;\n }\n else {\n throw new ReferenceError(`Invalid input: ${str}`);\n }\n this._updateContractScript();\n // Attempts to make address the default label of the Account.\n if (!this.label) {\n try {\n this.label = this.address;\n }\n catch (err) {\n this.label = \"\";\n }\n }\n }\n get [Symbol.toStringTag]() {\n return \"Account\";\n }\n [inspect]() {\n return `[Account: ${this.label}]`;\n }\n get isMultiSig() {\n return (this.contract &&\n this.contract.script &&\n this.contract.script.slice(this.contract.script.length - 2) === \"ae\");\n }\n /**\n * Key encrypted according to NEP2 standard.\n * @example 6PYLHmDf6AjF4AsVtosmxHuPYeuyJL3SLuw7J1U8i7HxKAnYNsp61HYRfF\n */\n get encrypted() {\n if (this._encrypted) {\n return this._encrypted;\n }\n else {\n throw new Error(\"No encrypted key found\");\n }\n }\n /**\n * Case sensitive key of 52 characters long.\n * @example L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g\n */\n get WIF() {\n if (this._WIF) {\n return this._WIF;\n }\n else {\n this._WIF = core.getWIFFromPrivateKey(this.privateKey);\n return this._WIF;\n }\n }\n /**\n * Key of 64 hex characters.\n * @example 7d128a6d096f0c14c3a25a2b0c41cf79661bfcb4a8cc95aaaea28bde4d732344\n */\n get privateKey() {\n if (this._privateKey) {\n return this._privateKey;\n }\n else if (this._WIF) {\n this._privateKey = core.getPrivateKeyFromWIF(this._WIF);\n return this._privateKey;\n }\n else if (this._encrypted) {\n throw new ReferenceError(\"Private Key encrypted!\");\n }\n else {\n throw new ReferenceError(\"No Private Key provided!\");\n }\n }\n /**\n * Returns the public key in encoded form. This is the form that is the short version (starts with 02 or 03). If you require the unencoded form, do use the publicKey method instead of this getter.\n * @example 02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef\n */\n get publicKey() {\n if (this._publicKey) {\n return this._publicKey;\n }\n else {\n this._publicKey = core.getPublicKeyFromPrivateKey(this.privateKey);\n return this._publicKey;\n }\n }\n /** Retrieves the Public Key in encoded / unencoded form.\n * @param encoded Encoded or unencoded.\n */\n getPublicKey(encoded = true) {\n return encoded\n ? this.publicKey\n : core.getPublicKeyUnencoded(this.publicKey);\n }\n /**\n * Script hash of the key. This format is usually used in the code instead of address as this is a hexstring.\n */\n get scriptHash() {\n if (this._scriptHash) {\n return this._scriptHash;\n }\n else {\n if (this._address) {\n this._scriptHash = core.getScriptHashFromAddress(this.address);\n return this._scriptHash;\n }\n else if (this.contract.script) {\n this._scriptHash = this._getScriptHashFromVerificationScript();\n return this._scriptHash;\n }\n else {\n this._scriptHash = core.getScriptHashFromPublicKey(this.publicKey);\n return this._scriptHash;\n }\n }\n }\n /**\n * Public address used to receive transactions. Case sensitive.\n * @example ALq7AWrhAueN6mJNqk6FHJjnsEoPRytLdW\n */\n get address() {\n if (this._address) {\n return this._address;\n }\n else {\n this._address = core.getAddressFromScriptHash(this.scriptHash);\n return this._address;\n }\n }\n /**\n * This is the safe way to get a key without it throwing an error.\n */\n tryGet(keyType) {\n switch (keyType) {\n case \"encrypted\":\n return this._encrypted || \"\";\n case \"WIF\":\n return this._WIF || \"\";\n case \"privateKey\":\n return this._privateKey || \"\";\n case \"publicKey\":\n return this._publicKey || \"\";\n case \"scriptHash\":\n return this._scriptHash || \"\";\n case \"address\":\n return this._address || \"\";\n }\n }\n /**\n * Encrypts the current privateKey and return the Account object.\n */\n encrypt(keyphrase, scryptParams = DEFAULT_SCRYPT) {\n return Promise.resolve()\n .then(_ => encrypt(this.privateKey, keyphrase, scryptParams))\n .then(encrypted => {\n this._encrypted = encrypted;\n return this;\n });\n }\n /**\n * Decrypts the encrypted key and return the Account object.\n */\n decrypt(keyphrase, scryptParams = DEFAULT_SCRYPT) {\n return Promise.resolve()\n .then(_ => decrypt(this.encrypted, keyphrase, scryptParams))\n .then(wif => {\n this._WIF = wif;\n this._updateContractScript();\n return this;\n });\n }\n /**\n * Export Account as a WalletAccount object.\n */\n export() {\n let key = \"\";\n if (this._privateKey && !this._encrypted) {\n throw new Error(\"Encrypt private key first!\");\n }\n if (this._encrypted) {\n key = this._encrypted;\n }\n return {\n address: this.address,\n label: this.label,\n isDefault: this.isDefault,\n lock: this.lock,\n key,\n contract: this.contract,\n extra: this.extra\n };\n }\n equals(other) {\n return this.address === other.address;\n }\n /**\n * Attempts to update the contract.script field if public key is available.\n */\n _updateContractScript() {\n try {\n if (this.contract.script === \"\") {\n const publicKey = this.publicKey;\n this.contract.script = core.getVerificationScriptFromPublicKey(publicKey);\n this._scriptHash = this._getScriptHashFromVerificationScript();\n log.debug(`Updated ContractScript for Account: ${this.address}`);\n }\n }\n catch (e) {\n return;\n }\n }\n _getScriptHashFromVerificationScript() {\n return reverseHex(hash160(this.contract.script));\n }\n}\nexport default Account;\n//# sourceMappingURL=Account.js.map","import { Fixed8 } from \"../u\";\n/**\n * Selects inputs from left of array till sum of inputs is equal or larger than requiredAmt.\n * @param {Fixed8} requiredAmt\n * @param {Coin[]} availableInputs\n * @return {Coin[]}\n */\nfunction fillFromLeft(requiredAmt, availableInputs) {\n let selectPointer = 0;\n let selectedAmt = new Fixed8(0);\n // Selected min inputs to satisfy outputs\n while (selectedAmt.lt(requiredAmt)) {\n selectPointer += 1;\n if (selectPointer > availableInputs.length) {\n throw new Error(`Insufficient assets! Reached end of unspent coins! ${availableInputs.length}`);\n }\n selectedAmt = selectedAmt.add(availableInputs[selectPointer - 1].value);\n }\n return availableInputs.slice(0, selectPointer);\n}\n/**\n * Select the coins in order of value, smallest first.\n * @param {AssetBalance} assetBalance\n * @param {Fixed8} requiredAmt\n * @return {Coin[]}\n */\nexport function smallestFirst(assetBalance, requiredAmt) {\n // Ascending order sort\n assetBalance.unspent.sort((a, b) => a.value.sub(b.value).toNumber());\n return fillFromLeft(requiredAmt, assetBalance.unspent);\n}\n/**\n * Select the coins in order of value, biggest first.\n * @param {AssetBalance} assetBalance\n * @param {Fixed8} requiredAmt\n * @return {Coin[]}\n */\nexport function biggestFirst(assetBalance, requiredAmt) {\n // Descending order sort\n assetBalance.unspent.sort((a, b) => b.value.sub(a.value).toNumber());\n return fillFromLeft(requiredAmt, assetBalance.unspent);\n}\n/**\n * Use a balanced approach by selecting a coin that\n * @param {AssetBalance} assetBalance\n * @param {Fixed8} requiredAmt\n * @return {Coin[]}\n */\nexport function balancedApproach(assetBalance, requiredAmt) {\n // Ascending sort first\n assetBalance.unspent.sort((a, b) => a.value.sub(b.value).toNumber());\n // Trim off coins larger than requiredAmt\n const smallCoins = assetBalance.unspent.filter(c => c.value.lte(requiredAmt));\n if (smallCoins.length === 0) {\n return [assetBalance.unspent[0]];\n }\n // Check for naive solution\n const i = smallCoins.findIndex(c => requiredAmt.eq(c.value));\n if (i >= 0) {\n return [smallCoins[i]];\n }\n // Take the largest coin available and fill it up with little pieces\n const bigCoins = assetBalance.unspent.slice(smallCoins.length);\n const selectedInputs = [];\n if (smallCoins.length > 0) {\n selectedInputs.push(smallCoins.pop());\n }\n const remainderAmt = requiredAmt.minus(selectedInputs.length > 0 ? selectedInputs[0].value : 0);\n const remainderInputs = fillFromLeft(remainderAmt, smallCoins.concat(bigCoins));\n return selectedInputs.concat(remainderInputs);\n}\n//# sourceMappingURL=strategy.js.map","import { ASSET_ID, ASSETS } from \"../consts\";\nimport { Fixed8 } from \"../u\";\nimport { AssetBalance, getScriptHashFromAddress } from \"../wallet\";\nimport { TransactionInput, TransactionOutput } from \"./components\";\nimport { balancedApproach } from \"./strategy\";\n//eslint-disable-next-line\nexport let defaultCalculationStrategy = balancedApproach;\n/**\n * Helper function that reduces a list of TransactionOutputs to a object of assetSymbol: amount.\n * This is useful during the calculations as we just need to know much of an asset we need.\n * @param intents List of TransactionOutputs to reduce.\n */\nexport function combineIntents(intents) {\n return intents.reduce((assets, intent) => {\n assets[intent.assetId]\n ? (assets[intent.assetId] = assets[intent.assetId].add(intent.value))\n : (assets[intent.assetId] = intent.value);\n return assets;\n }, {});\n}\nexport function calculateInputsForAsset(assetBalance, requiredAmt, assetId, address, strategy) {\n const selectedInputs = strategy(assetBalance, requiredAmt);\n const selectedAmt = selectedInputs.reduce((prev, curr) => prev.add(curr.value), new Fixed8(0));\n const change = [];\n // Construct change output\n if (selectedAmt.gt(requiredAmt)) {\n change.push(new TransactionOutput({\n assetId,\n value: selectedAmt.sub(requiredAmt),\n scriptHash: getScriptHashFromAddress(address)\n }));\n }\n // Format inputs\n const inputs = selectedInputs.map(input => {\n return new TransactionInput({\n prevHash: input.txid,\n prevIndex: input.index\n });\n });\n return { inputs, change };\n}\n/**\n * Calculate the inputs required given the intents and fees.\n * Fees are various GAS outputs that are not reflected as an TransactionOutput (absorbed by network).\n * This includes network fees, gas fees and transaction fees.\n * The change is automatically attributed to the incoming balance.\n * @param balances Balance of all assets available.\n * @param intents All sending intents.\n * @param fees gasCost required for the transaction.\n * @param strategy Calculation strategy to pick inputs.\n * @return Object with inputs and change.\n */\nexport function calculateInputs(balances, intents = [], fees = 0, strategy) {\n const chosenStrategy = strategy || defaultCalculationStrategy;\n const fixed8Fees = new Fixed8(fees);\n if (fixed8Fees.gt(0)) {\n intents = intents.slice();\n intents.push(new TransactionOutput({\n assetId: ASSET_ID.GAS,\n value: fees,\n scriptHash: getScriptHashFromAddress(balances.address)\n }));\n }\n const requiredAssets = combineIntents(intents);\n const inputsAndChange = Object.keys(requiredAssets).map(assetId => {\n const requiredAmt = requiredAssets[assetId];\n const assetSymbol = ASSETS[assetId];\n if (balances.assetSymbols.indexOf(assetSymbol) === -1) {\n throw new Error(`This balance does not contain any ${assetSymbol}!`);\n }\n const assetBalance = balances.assets[assetSymbol];\n if (assetBalance.balance.lt(requiredAmt)) {\n throw new Error(`Insufficient ${ASSETS[assetId]}! Need ${requiredAmt.toString()} but only found ${assetBalance.balance.toString()}`);\n }\n return calculateInputsForAsset(new AssetBalance(assetBalance), requiredAmt, assetId, balances.address, chosenStrategy);\n });\n const output = inputsAndChange.reduce((prev, curr) => {\n return {\n inputs: prev.inputs.concat(curr.inputs),\n change: prev.change.concat(curr.change)\n };\n }, { inputs: [], change: [] });\n return output;\n}\n//# sourceMappingURL=calculate.js.map","import { num2VarInt } from \"../../u\";\nimport { TransactionAttribute, TransactionInput, TransactionOutput, Witness } from \"../components\";\nexport function deserializeArrayOf(type, ss) {\n const output = [];\n const len = ss.readVarInt();\n for (let i = 0; i < len; i++) {\n output.push(type(ss));\n }\n return output;\n}\nexport function serializeArrayOf(prop) {\n return num2VarInt(prop.length) + prop.map(p => p.serialize()).join(\"\");\n}\nexport function deserializeType(ss, tx = {}) {\n const byte = ss.read();\n return Object.assign(tx, { type: parseInt(byte, 16) });\n}\nexport function deserializeVersion(ss, tx = {}) {\n const byte = ss.read();\n return Object.assign({ version: parseInt(byte, 16) });\n}\nexport function deserializeAttributes(ss, tx) {\n const attributes = deserializeArrayOf(TransactionAttribute.fromStream, ss).map(i => i.export());\n return Object.assign(tx, { attributes });\n}\nexport function deserializeInputs(ss, tx) {\n const inputs = deserializeArrayOf(TransactionInput.fromStream, ss).map(i => i.export());\n return Object.assign(tx, { inputs });\n}\nexport function deserializeOutputs(ss, tx) {\n const outputs = deserializeArrayOf(TransactionOutput.fromStream, ss).map(i => i.export());\n return Object.assign(tx, { outputs });\n}\nexport function deserializeWitnesses(ss, tx) {\n const scripts = deserializeArrayOf(Witness.fromStream, ss).map(i => i.export());\n return Object.assign(tx, { scripts });\n}\n//# sourceMappingURL=main.js.map","import { TX_VERSION } from \"../../consts\";\nimport logger from \"../../logging\";\nimport { Fixed8, hash256, num2hexstring, reverseHex, str2hexstring } from \"../../u\";\nimport { Account, sign } from \"../../wallet\";\nimport { calculateInputs } from \"../calculate\";\nimport { TransactionAttribute, TransactionInput, TransactionOutput, Witness } from \"../components\";\nimport TxAttrUsage from \"../txAttrUsage\";\nimport { serializeArrayOf } from \"./main\";\nconst log = logger(\"tx\");\nexport class BaseTransaction {\n constructor(tx = {}) {\n this.type = 0x00;\n this.version = tx.version || TX_VERSION.CONTRACT;\n this.attributes = Array.isArray(tx.attributes)\n ? tx.attributes.map(a => new TransactionAttribute(a))\n : [];\n this.inputs = Array.isArray(tx.inputs)\n ? tx.inputs.map(a => new TransactionInput(a))\n : [];\n this.outputs = Array.isArray(tx.outputs)\n ? tx.outputs.map(a => new TransactionOutput(a))\n : [];\n this.scripts = Array.isArray(tx.scripts)\n ? tx.scripts.map(a => new Witness(a))\n : [];\n }\n get [Symbol.toStringTag]() {\n return \"Transaction\";\n }\n /**\n * Transaction hash.\n */\n get hash() {\n return reverseHex(hash256(this.serialize(false)));\n }\n addOutput(txOut) {\n this.outputs.push(new TransactionOutput(txOut));\n return this;\n }\n /**\n * Adds a TransactionOutput. TransactionOutput can be given as a TransactionOutput object or as human-friendly values. This is detected by the number of arguments provided.\n * @param symbol The symbol of the asset (eg NEO or GAS).\n * @param value The value to send.\n * @param address The address to send to.\n */\n addIntent(symbol, value, address) {\n this.outputs.push(TransactionOutput.fromIntent(symbol, value, address));\n return this;\n }\n /**\n * Add an attribute.\n * @param usage The usage type. Do refer to txAttrUsage enum values for all available options.\n * @param data The data as hexstring.\n */\n addAttribute(usage, data) {\n if (typeof data !== \"string\") {\n throw new TypeError(\"data should be formatted as string!\");\n }\n this.attributes.push(new TransactionAttribute({ usage, data }));\n return this;\n }\n /**\n * Add a remark.\n * @param remark A remark in ASCII.\n */\n addRemark(remark) {\n const hexRemark = str2hexstring(remark);\n return this.addAttribute(TxAttrUsage.Remark, hexRemark);\n }\n /**\n * Adds an Witness to the Transaction and automatically sorts the witnesses according to scripthash.\n * @param witness The Witness object to add.\n */\n addWitness(witness) {\n if (witness.scriptHash === \"\") {\n throw new Error(\"Please define the scriptHash for this Witness!\");\n }\n this.scripts.push(witness);\n this.scripts = this.scripts.sort((w1, w2) => parseInt(w1.scriptHash, 16) - parseInt(w2.scriptHash, 16));\n return this;\n }\n /**\n * Calculate the inputs required based on existing outputs provided. Also takes into account the fees required through the gas property.\n * @param balance Balance to retrieve inputs from.\n * @param strategy\n * @param fees Additional network fees. Invocation gas and tx fees are already included automatically so this is additional fees for priority on the network.\n */\n calculate(balance, strategy, fees = 0) {\n const { inputs, change } = calculateInputs(balance, this.outputs, new Fixed8(this.fees).add(fees), strategy);\n this.inputs = inputs;\n this.outputs = this.outputs.concat(change);\n log.info(`Calculated the inputs required for Transaction with Balance: ${balance.address}`);\n return this;\n }\n /**\n * Serialize the transaction and return it as a hexstring.\n * @param {boolean} signed - Whether to serialize the signatures. Signing requires it to be serialized without the signatures.\n * @return {string} Hexstring.\n */\n serialize(signed = true) {\n let out = \"\";\n out += num2hexstring(this.type);\n out += num2hexstring(this.version);\n out += this.serializeExclusive();\n out += serializeArrayOf(this.attributes);\n out += serializeArrayOf(this.inputs);\n out += serializeArrayOf(this.outputs);\n if (signed) {\n out += serializeArrayOf(this.scripts);\n }\n return out;\n }\n /**\n * Signs a transaction.\n * @param {Account|string} signer - Account, privateKey or WIF\n * @return {Transaction} this\n */\n sign(signer) {\n if (typeof signer === \"string\") {\n signer = new Account(signer);\n }\n const signature = sign(this.serialize(false), signer.privateKey);\n log.info(`Signed Transaction with Account: ${signer.label}`);\n this.addWitness(Witness.fromSignature(signature, signer.publicKey));\n return this;\n }\n export() {\n return {\n type: this.type,\n version: this.version,\n attributes: this.attributes.map(a => a.export()),\n inputs: this.inputs.map(a => a.export()),\n outputs: this.outputs.map(a => a.export()),\n scripts: this.scripts.map(a => a.export())\n };\n }\n}\nexport default BaseTransaction;\n//# sourceMappingURL=BaseTransaction.js.map","import Fixed8 from \"../../u/Fixed8\";\n/**\n * An alternative form of a TransactionOutput.\n */\nexport class Coin {\n constructor(coinLike = {}) {\n this.index = coinLike.index || 0;\n this.txid = coinLike.txid || \"\";\n this.value = new Fixed8(coinLike.value);\n }\n export() {\n return {\n index: this.index,\n txid: this.txid,\n value: this.value.toNumber()\n };\n }\n equals(other) {\n return (this.index === other.index &&\n this.txid === other.txid &&\n this.value.equals(other.value || 0));\n }\n}\nexport default Coin;\n//# sourceMappingURL=Coin.js.map","import { compareNeonObjectArray } from \"../../helper\";\nimport Fixed8 from \"../../u/Fixed8\";\nimport Coin from \"./Coin\";\n/**\n * Balance of an UTXO asset.\n * We keep track of 3 states: unspent, spent and unconfirmed.\n * Unspent coins are ready to be constructed into transactions.\n * Spent coins have been used once in confirmed transactions and cannot be used anymore. They are kept here for tracking purposes.\n * Unconfirmed coins have been used in transactions but are not confirmed yet. This is a holding state until we confirm that the transactions are mined into blocks.\n */\nexport class AssetBalance {\n constructor(abLike = {}) {\n this.unspent = abLike.unspent\n ? abLike.unspent.map(coin => new Coin(coin))\n : [];\n this.spent = abLike.spent ? abLike.spent.map(coin => new Coin(coin)) : [];\n this.unconfirmed = abLike.unconfirmed\n ? abLike.unconfirmed.map(coin => new Coin(coin))\n : [];\n }\n get balance() {\n return this.unspent.reduce((p, c) => p.add(c.value), new Fixed8(0));\n }\n export() {\n return {\n balance: this.balance.toNumber(),\n unspent: this.unspent.map(c => c.export()),\n spent: this.spent.map(c => c.export()),\n unconfirmed: this.unconfirmed.map(c => c.export())\n };\n }\n equals(other) {\n return (compareNeonObjectArray(this.unspent, other.unspent) &&\n compareNeonObjectArray(this.spent, other.spent) &&\n compareNeonObjectArray(this.unconfirmed, other.unconfirmed));\n }\n}\nexport default AssetBalance;\n//# sourceMappingURL=AssetBalance.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ASSETS } from \"../consts\";\nimport { Query } from \"../rpc\";\nimport { Transaction } from \"../tx\";\nimport { BaseTransaction } from \"../tx/transaction/BaseTransaction\";\nimport Fixed8 from \"../u/Fixed8\";\nimport AssetBalance from \"./components/AssetBalance\";\nimport Coin from \"./components/Coin\";\nfunction verifyCoin(url, c) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield Query.getTxOut(c.txid, c.index).execute(url);\n if (!response.result) {\n return false;\n }\n return c.index === response.result.n && c.value.equals(response.result.value);\n });\n}\n/**\n * Verifies a list of Coins\n * @param url RPC Node to verify against.\n * @param coinArr Coins to verify.\n */\nfunction verifyCoins(url, coinArr) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = coinArr.map(c => verifyCoin(url, c));\n return yield Promise.all(promises);\n });\n}\n/**\n * Verifies an AssetBalance\n * @param url RPC Node to verify against.\n * @param assetBalance AssetBalance to verify.\n */\nfunction verifyAssetBalance(url, assetBalance) {\n return __awaiter(this, void 0, void 0, function* () {\n const newAssetBalance = {\n balance: new Fixed8(0),\n spent: [],\n unspent: [],\n unconfirmed: []\n };\n const validCoins = yield verifyCoins(url, assetBalance.unspent);\n validCoins.forEach((valid, i) => {\n const coin = assetBalance.unspent[i];\n if (valid) {\n newAssetBalance.unspent.push(coin);\n newAssetBalance.balance = newAssetBalance.balance.add(coin.value);\n }\n else {\n newAssetBalance.spent.push(coin);\n }\n });\n return new AssetBalance(newAssetBalance);\n });\n}\nfunction exportAssets(assets) {\n const output = {};\n const keys = Object.keys(assets);\n for (const key of keys) {\n output[key] = assets[key].export();\n }\n return output;\n}\nfunction exportTokens(tokens) {\n const out = {};\n Object.keys(tokens).forEach(symbol => {\n out[symbol] = tokens[symbol].toNumber();\n });\n return out;\n}\n/**\n * Represents a balance available for an Account.\n * Contains balances for both UTXO assets and NEP5 tokens.\n */\nexport class Balance {\n constructor(bal = {}) {\n this.address = bal.address || \"\";\n this.net = bal.net || \"NoNet\";\n this.assetSymbols = [];\n this.assets = {};\n if (typeof bal.assets === \"object\") {\n const keys = Object.keys(bal.assets);\n for (const key of keys) {\n if (typeof bal.assets[key] === \"object\") {\n this.addAsset(key, bal.assets[key]);\n }\n }\n }\n this.tokenSymbols = [];\n this.tokens = {};\n if (typeof bal.tokens === \"object\") {\n const keys = Object.keys(bal.tokens);\n for (const key of keys) {\n this.addToken(key, bal.tokens[key]);\n }\n }\n }\n get [Symbol.toStringTag]() {\n return \"Balance\";\n }\n /**\n * Adds a new asset to this Balance.\n * @param sym The symbol to refer by. This function will force it to upper-case.\n * @param assetBalance The assetBalance if initialized. Default is a zero balance object.\n */\n addAsset(sym, assetBalance) {\n sym = sym.toUpperCase();\n this.assetSymbols.push(sym);\n this.assetSymbols.sort();\n const cleanedAssetBalance = new AssetBalance(assetBalance);\n this.assets[sym] = cleanedAssetBalance;\n return this;\n }\n /**\n * Adds a new NEP-5 Token to this Balance.\n * @param sym - The NEP-5 Token Symbol to refer by.\n * @param tokenBalance - The amount of tokens this account holds.\n */\n addToken(sym, tokenBalance = 0) {\n sym = sym.toUpperCase();\n this.tokenSymbols.push(sym);\n this.tokens[sym] = new Fixed8(tokenBalance);\n return this;\n }\n /**\n * Applies a Transaction to a Balance, removing spent coins and adding new coins. This currently applies only to Assets.\n * @param tx Transaction that has been sent and accepted by Node.\n * @param confirmed If confirmed, new coins will be added to unspent. Else, new coins will be added to unconfirmed property first.\n */\n applyTx(tx, confirmed = false) {\n tx = tx instanceof BaseTransaction ? tx : Transaction.deserialize(tx);\n const symbols = this.assetSymbols;\n // Spend coins\n for (const input of tx.inputs) {\n const findFunc = (el) => el.txid === input.prevHash && el.index === input.prevIndex;\n for (const sym of symbols) {\n const assetBalance = this.assets[sym];\n const ind = assetBalance.unspent.findIndex(findFunc);\n if (ind >= 0) {\n const spentCoin = assetBalance.unspent.splice(ind, 1);\n assetBalance.spent = assetBalance.spent.concat(spentCoin);\n break;\n }\n }\n }\n // Add new coins\n const hash = tx.hash;\n for (let i = 0; i < tx.outputs.length; i++) {\n const output = tx.outputs[i];\n const sym = ASSETS[output.assetId];\n const assetBalance = this.assets[sym];\n if (!assetBalance) {\n this.addAsset(sym);\n }\n const coin = new Coin({ index: i, txid: hash, value: output.value });\n if (confirmed) {\n const findFunc = (el) => el.txid === coin.txid && el.index === coin.index;\n const unconfirmedIndex = assetBalance.unconfirmed.findIndex(findFunc);\n if (unconfirmedIndex >= 0) {\n assetBalance.unconfirmed.splice(unconfirmedIndex, 1);\n }\n if (!assetBalance.unspent) {\n assetBalance.unspent = [];\n }\n assetBalance.unspent.push(coin);\n }\n else {\n if (!assetBalance.unconfirmed) {\n assetBalance.unconfirmed = [];\n }\n assetBalance.unconfirmed.push(coin);\n }\n this.assets[sym] = assetBalance;\n }\n return this;\n }\n /**\n * Informs the Balance that the next block is confirmed, thus moving all unconfirmed transaction to unspent.\n */\n confirm() {\n for (const sym of this.assetSymbols) {\n const assetBalance = this.assets[sym];\n assetBalance.unspent = assetBalance.unspent.concat(assetBalance.unconfirmed);\n assetBalance.unconfirmed = [];\n }\n return this;\n }\n /**\n * Export this class as a plain JS object\n */\n export() {\n return {\n net: this.net,\n address: this.address,\n assetSymbols: this.assetSymbols,\n assets: exportAssets(this.assets),\n tokenSymbols: this.tokenSymbols,\n tokens: exportTokens(this.tokens)\n };\n }\n /**\n * Verifies the coins in balance are unspent. This is an expensive call.\n *\n * Any coins categorised incorrectly are moved to their correct arrays.\n * @param url NEO Node to check against.\n */\n verifyAssets(url) {\n const promises = [];\n const symbols = this.assetSymbols;\n symbols.map(key => {\n const assetBalance = this.assets[key];\n promises.push(verifyAssetBalance(url, assetBalance));\n });\n return Promise.all(promises).then(newBalances => {\n symbols.map((sym, i) => {\n this.assets[sym] = newBalances[i];\n });\n return this;\n });\n }\n}\nexport default Balance;\n//# sourceMappingURL=Balance.js.map","import Fixed8 from \"../../u/Fixed8\";\n/**\n * Contains the information necessary to validate a GAS Claim.\n * It is a reference to a spent coin.\n */\nexport class ClaimItem {\n constructor(claimItemLike = {}) {\n this.claim = new Fixed8(claimItemLike.claim);\n this.txid = claimItemLike.txid || \"\";\n this.index = claimItemLike.index || 0;\n this.value = claimItemLike.value || 0;\n this.start = claimItemLike.start;\n this.end = claimItemLike.end;\n }\n export() {\n return {\n claim: this.claim.toNumber(),\n txid: this.txid,\n index: this.index,\n value: this.value,\n start: this.start,\n end: this.end\n };\n }\n equals(other) {\n return (this.claim.equals(other.claim || 0) &&\n this.txid === other.txid &&\n this.index === other.index &&\n this.value === other.value &&\n this.start === other.start &&\n this.end === other.end);\n }\n}\nexport default ClaimItem;\n//# sourceMappingURL=ClaimItem.js.map","import util from \"util\";\nimport ClaimItem from \"./components/ClaimItem\";\nconst inspect = util.inspect.custom;\n/**\n * Claims object used for claiming GAS.\n */\nexport class Claims {\n constructor(config = {}) {\n this.address = config.address || \"\";\n this.net = config.net || \"NoNet\";\n this.claims = config.claims ? config.claims.map(c => new ClaimItem(c)) : [];\n }\n get [Symbol.toStringTag]() {\n return \"Claims\";\n }\n [inspect]() {\n const claimsDump = this.claims.map(c => {\n return `${c.txid} <${c.index}>: ${c.claim.toString()}`;\n });\n return `[Claims(${this.net}): ${this.address}]\\n${JSON.stringify(claimsDump, null, 2)}`;\n }\n export() {\n return {\n address: this.address,\n net: this.net,\n claims: this.claims.map(c => c.export())\n };\n }\n /**\n * Returns new Claims object that contains part of the total claims starting at start, ending at end.\n */\n slice(start, end) {\n return new Claims({\n address: this.address,\n net: this.net,\n claims: this.claims.slice(start, end)\n });\n }\n}\nexport default Claims;\n//# sourceMappingURL=Claims.js.map","export * from \"./AssetBalance\";\nexport * from \"./ClaimItem\";\nexport * from \"./Coin\";\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { DEFAULT_SCRYPT, DEFAULT_WALLET } from \"../consts\";\nimport logger from \"../logging\";\nimport { Account } from \"./Account\";\nconst log = logger(\"wallet\");\n/**\n * File to store private keys according to the NEP-2 specification.\n */\nexport class Wallet {\n constructor(obj = DEFAULT_WALLET) {\n this.name = obj.name || \"myWallet\";\n this.version = obj.version || DEFAULT_WALLET.version;\n this.scrypt = Object.assign({}, DEFAULT_SCRYPT, obj.scrypt);\n this.accounts = [];\n if (obj.accounts) {\n for (const acct of obj.accounts) {\n this.addAccount(acct);\n }\n }\n this.extra = obj.extra || {};\n log.info(`New Wallet created: ${this.name}`);\n }\n get [Symbol.toStringTag]() {\n return \"Wallet\";\n }\n /**\n * Returns the default Account according to the following rules:\n * 1. First Account where isDefault is true.\n * 2. First Account with a decrypted private key.\n * 3. First Account with an encrypted private key.\n * 4. First Account in the array.\n * Throws error if no accounts available.\n */\n get defaultAccount() {\n if (this.accounts.length === 0) {\n throw new Error(\"No accounts available in this Wallet!\");\n }\n for (const acct of this.accounts) {\n if (acct.isDefault) {\n return acct;\n }\n }\n for (const acct of this.accounts) {\n if (acct.tryGet(\"privateKey\") || acct.tryGet(\"WIF\")) {\n return acct;\n }\n }\n for (const acct of this.accounts) {\n if (acct.encrypted) {\n return acct;\n }\n }\n return this.accounts[0];\n }\n /**\n * Adds an account.\n * @param acct Account or WalletAccount object.\n * @return Index position of Account in array.\n */\n addAccount(acct) {\n const index = this.accounts.length;\n if (!(acct instanceof Account)) {\n acct = new Account(acct);\n }\n this.accounts.push(acct);\n try {\n const address = acct.address;\n log.info(`Added Account: ${address} to Wallet ${this.name}`);\n }\n catch (err) {\n log.warn(`Encrypted account added to Wallet ${this.name}. You will not be able to export this wallet without first decrypting this account`);\n }\n return index;\n }\n /**\n * Attempts to decrypt Account at index in array.\n * @param index Index of Account in array.\n * @param keyphrase keyphrase\n * @return Promise of decryption success/failure.\n */\n decrypt(index, keyphrase) {\n return __awaiter(this, void 0, void 0, function* () {\n if (index < 0) {\n return Promise.reject(`Index cannot be negative! index: ${index}`);\n }\n if (index >= this.accounts.length) {\n return Promise.reject(`Index cannot larger than Accounts array! index: ${index}`);\n }\n yield this.accounts[index].decrypt(keyphrase, this.scrypt);\n return true;\n });\n }\n /**\n * Attempts to decrypt all accounts with keyphrase.\n * @param keyphrase\n * @return Promise of accounts decryption success/failure .\n */\n decryptAll(keyphrase) {\n return Promise.all(this.accounts.map((acct, i) => this.decrypt(i, keyphrase)));\n }\n /**\n * Attempts to encrypt Account at index in array.\n * @param index Index of Account in array.\n * @param keyphrase\n * @return Promise of encryption success/failure.\n */\n encrypt(index, keyphrase) {\n return __awaiter(this, void 0, void 0, function* () {\n if (index < 0) {\n return Promise.reject(\"Index cannot be negative!\");\n }\n if (index >= this.accounts.length) {\n return Promise.reject(\"Index cannot larger than Accounts array!\");\n }\n yield this.accounts[index].encrypt(keyphrase, this.scrypt);\n return true;\n });\n }\n /**\n * Attempts to encrypt all accounts with keyphrase.\n * @param keyphrase\n * @return Promise of accounts encryption success/failure.\n */\n encryptAll(keyphrase) {\n return Promise.all(this.accounts.map((acct, i) => this.encrypt(i, keyphrase)));\n }\n /**\n * Export this class as a JS object.\n */\n export() {\n return {\n name: this.name,\n version: this.version,\n scrypt: this.scrypt,\n accounts: this.accounts.map(acct => acct.export()),\n extra: this.extra\n };\n }\n /**\n * Set Account at index in array to be default account.\n * @param index The index of the Account in accounts array.\n * @return this\n */\n setDefault(index) {\n for (let i = 0; i < this.accounts.length; i++) {\n this.accounts[i].isDefault = i === index;\n }\n log.info(`Set Account: ${this.accounts[index]} as default for Wallet ${this.name}`);\n return this;\n }\n}\nexport default Wallet;\n//# sourceMappingURL=Wallet.js.map","export * from \"./Account\";\nexport * from \"./Balance\";\nexport * from \"./Claims\";\nexport * from \"./core\";\nexport * from \"./nep2\";\nexport * from \"./verify\";\nexport * from \"./signing\";\nexport * from \"./components\";\nexport * from \"./Wallet\";\nexport * from \"./multisig\";\n//# sourceMappingURL=index.js.map","import { ASSET_ID } from \"../../consts\";\nimport { Fixed8, reverseHex, StringStream } from \"../../u\";\nimport { getScriptHashFromAddress } from \"../../wallet\";\n/**\n * UTXO that is constructed in this transaction.\n * This represents a spendable coin in the system.\n */\nexport class TransactionOutput {\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this.fromStream(ss);\n }\n static fromStream(ss) {\n const assetId = reverseHex(ss.read(32));\n const value = Fixed8.fromReverseHex(ss.read(8));\n const scriptHash = reverseHex(ss.read(20));\n return new TransactionOutput({ assetId, value, scriptHash });\n }\n static fromIntent(symbol, value, address) {\n const assetId = ASSET_ID[symbol];\n const scriptHash = getScriptHashFromAddress(address);\n return new TransactionOutput({ assetId, value, scriptHash });\n }\n constructor(obj) {\n if (!obj || !obj.assetId || !obj.value || !obj.scriptHash) {\n throw new Error(\"TransactionOutput requires assetId, value and scriptHash fields\");\n }\n this.assetId = obj.assetId;\n this.value = new Fixed8(obj.value);\n this.scriptHash = obj.scriptHash;\n }\n serialize() {\n return (reverseHex(this.assetId) +\n this.value.toReverseHex() +\n reverseHex(this.scriptHash));\n }\n equals(other) {\n return (this.assetId === other.assetId &&\n this.value.equals(other.value) &&\n this.scriptHash === other.scriptHash);\n }\n export() {\n return {\n assetId: this.assetId,\n value: this.value.toNumber(),\n scriptHash: this.scriptHash\n };\n }\n}\nexport default TransactionOutput;\n//# sourceMappingURL=TransactionOutput.js.map","import { hash160, num2VarInt, reverseHex, StringStream } from \"../../u\";\nimport { getPublicKeysFromVerificationScript, getSignaturesFromInvocationScript, getSigningThresholdFromVerificationScript, getVerificationScriptFromPublicKey, verify } from \"../../wallet\";\n/**\n * A Witness is a section of VM code that is ran during the verification of the transaction.\n *\n * For example, the most common witness is the VM Script that pushes the ECDSA signature into the VM and calling CHECKSIG to prove the authority to spend the TransactionInputs in the transaction.\n */\nexport class Witness {\n constructor(obj) {\n // tslint:disable-next-line:variable-name\n this._scriptHash = \"\";\n if (!obj ||\n obj.invocationScript === undefined ||\n obj.verificationScript === undefined) {\n throw new Error(\"Witness requires invocationScript and verificationScript fields\");\n }\n this.invocationScript = obj.invocationScript;\n this.verificationScript = obj.verificationScript;\n }\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this.fromStream(ss);\n }\n static fromStream(ss) {\n const invocationScript = ss.readVarBytes();\n const verificationScript = ss.readVarBytes();\n return new Witness({ invocationScript, verificationScript });\n }\n static fromSignature(sig, publicKey) {\n const invocationScript = \"40\" + sig;\n const verificationScript = getVerificationScriptFromPublicKey(publicKey);\n return new Witness({ invocationScript, verificationScript });\n }\n /**\n * Builds a multi-sig Witness object.\n * @param tx Hexstring to be signed.\n * @param sigs Unordered list of signatures.\n * @param acctOrVerificationScript Account or verification script. Account needs to be the multi-sig account and not one of the public keys.\n */\n static buildMultiSig(tx, sigs, acctOrVerificationScript) {\n const verificationScript = typeof acctOrVerificationScript === \"string\"\n ? acctOrVerificationScript\n : acctOrVerificationScript.contract.script;\n const publicKeys = getPublicKeysFromVerificationScript(verificationScript);\n const orderedSigs = Array(publicKeys.length).fill(\"\");\n sigs.forEach(element => {\n if (typeof element === \"string\") {\n const position = publicKeys.findIndex(key => verify(tx, element, key));\n if (position === -1) {\n throw new Error(`Invalid signature given: ${element}`);\n }\n orderedSigs[position] = element;\n }\n else if (element instanceof Witness) {\n const keys = getPublicKeysFromVerificationScript(element.verificationScript);\n if (keys.length !== 1) {\n throw new Error(\"Given witness contains more than 1 public key!\");\n }\n const position = publicKeys.indexOf(keys[0]);\n orderedSigs[position] = getSignaturesFromInvocationScript(element.invocationScript)[0];\n }\n else {\n throw new Error(\"Unable to process given signature\");\n }\n });\n const signingThreshold = getSigningThresholdFromVerificationScript(verificationScript);\n const validSigs = orderedSigs.filter(s => s !== \"\");\n if (validSigs.length < signingThreshold) {\n throw new Error(`Insufficient signatures: expected ${signingThreshold} but got ${validSigs.length} instead`);\n }\n return new Witness({\n invocationScript: validSigs\n .slice(0, signingThreshold)\n .map(s => \"40\" + s)\n .join(\"\"),\n verificationScript\n });\n }\n get scriptHash() {\n if (this._scriptHash) {\n return this._scriptHash;\n }\n else if (this.verificationScript) {\n this._scriptHash = reverseHex(hash160(this.verificationScript));\n return this._scriptHash;\n }\n else {\n throw new Error(\"Unable to produce scriptHash from empty verificationScript\");\n }\n }\n set scriptHash(value) {\n if (this.verificationScript) {\n throw new Error(\"Unable to set scriptHash when verificationScript is not empty\");\n }\n this._scriptHash = value;\n }\n serialize() {\n const invoLength = num2VarInt(this.invocationScript.length / 2);\n const veriLength = num2VarInt(this.verificationScript.length / 2);\n return (invoLength + this.invocationScript + veriLength + this.verificationScript);\n }\n export() {\n return {\n invocationScript: this.invocationScript,\n verificationScript: this.verificationScript\n };\n }\n equals(other) {\n return (this.invocationScript === other.invocationScript &&\n this.verificationScript === other.verificationScript);\n }\n generateScriptHash() {\n this._scriptHash = reverseHex(hash160(this.verificationScript));\n }\n}\nexport default Witness;\n//# sourceMappingURL=Witness.js.map","import { hexstring2str, num2hexstring, num2VarInt, str2hexstring, StringStream } from \"../../u\";\nexport var StateType;\n(function (StateType) {\n StateType[StateType[\"Account\"] = 64] = \"Account\";\n StateType[StateType[\"Validator\"] = 72] = \"Validator\";\n})(StateType || (StateType = {}));\nfunction toStateType(type) {\n if (typeof type === \"string\") {\n if (type in StateType) {\n return StateType[type];\n }\n throw new Error(`${type} not found in StateType!`);\n }\n return type;\n}\nexport class StateDescriptor {\n static deserialize(hex) {\n const ss = new StringStream(hex);\n return this.fromStream(ss);\n }\n static fromStream(ss) {\n const type = parseInt(ss.read(), 16);\n const key = ss.readVarBytes();\n const field = hexstring2str(ss.readVarBytes());\n const value = ss.readVarBytes();\n return new StateDescriptor({ type, key, field, value });\n }\n constructor(obj = {}) {\n this.type = obj.type ? toStateType(obj.type) : StateType.Account;\n this.key = obj.key || \"\";\n this.field = obj.field || \"\";\n this.value = obj.value || \"\";\n }\n get [Symbol.toStringTag]() {\n return \"StateDescriptor\";\n }\n serialize() {\n let out = num2hexstring(this.type);\n out += num2VarInt(this.key.length / 2);\n out += this.key;\n const hexField = str2hexstring(this.field);\n out += num2VarInt(hexField.length / 2);\n out += hexField;\n out += num2VarInt(this.value.length / 2);\n out += this.value;\n return out;\n }\n export() {\n return {\n type: this.type,\n key: this.key,\n field: this.field,\n value: this.value\n };\n }\n equals(other) {\n return (this.type === toStateType(other.type) &&\n this.key === other.key &&\n this.field === other.field &&\n this.value === other.value);\n }\n}\nexport default StateDescriptor;\n//# sourceMappingURL=StateDescriptor.js.map","export * from \"./TransactionAttribute\";\nexport * from \"./TransactionInput\";\nexport * from \"./TransactionOutput\";\nexport * from \"./Witness\";\nexport * from \"./StateDescriptor\";\n//# sourceMappingURL=index.js.map","import { ASSET_ID, TX_VERSION } from \"../../consts\";\nimport { Fixed8 } from \"../../u\";\nimport { getScriptHashFromAddress } from \"../../wallet\";\nimport { TransactionInput, TransactionOutput } from \"../components\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport { serializeArrayOf } from \"./main\";\nconst MAX_CLAIMS_LENGTH = 255;\n/**\n * Transaction used for claiming GAS. Do note that GAS Claims can only occur for spent coins.\n * Constructed with a list of claims and a TransactionOutput representing the GAS claimed.\n */\nexport class ClaimTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.CLAIM }, obj));\n this.type = 0x02;\n this.claims = Array.isArray(obj.claims)\n ? obj.claims.slice(0, MAX_CLAIMS_LENGTH).map(c => new TransactionInput(c))\n : [];\n }\n static deserializeExclusive(ss, tx) {\n const out = {\n claims: []\n };\n const claimLength = ss.readVarInt();\n for (let i = 0; i < claimLength; i++) {\n out.claims.push(TransactionInput.fromStream(ss));\n }\n return Object.assign(tx, out);\n }\n static fromClaims(claim) {\n const totalClaim = claim.claims.reduce((p, c) => {\n return p.add(c.claim);\n }, new Fixed8(0));\n const outputs = [\n new TransactionOutput({\n assetId: ASSET_ID.GAS,\n value: totalClaim,\n scriptHash: getScriptHashFromAddress(claim.address)\n })\n ];\n const claims = claim.claims.map(c => ({\n prevHash: c.txid,\n prevIndex: c.index\n }));\n return new ClaimTransaction({ outputs, claims });\n }\n get exclusiveData() {\n return { claims: this.claims };\n }\n get fees() {\n return 0;\n }\n addClaims(claim) {\n if (this.claims.length !== 0) {\n throw new Error(`This transaction already has claims!`);\n }\n const totalClaim = claim.claims.reduce((p, c) => {\n return p.add(c.claim);\n }, new Fixed8(0));\n this.outputs.push(new TransactionOutput({\n assetId: ASSET_ID.GAS,\n value: totalClaim,\n scriptHash: getScriptHashFromAddress(claim.address)\n }));\n this.claims = claim.claims.map(c => new TransactionInput({\n prevHash: c.txid,\n prevIndex: c.index\n }));\n return this;\n }\n serializeExclusive() {\n return serializeArrayOf(this.claims);\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof ClaimTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new ClaimTransaction(other).hash;\n }\n export() {\n return Object.assign(super.export(), {\n claims: this.claims.map(c => c.export())\n });\n }\n}\nexport default ClaimTransaction;\n//# sourceMappingURL=ClaimTransaction.js.map","import BaseTransaction from \"./BaseTransaction\";\n/**\n * Transaction used for transferring UTXO assets.\n */\nexport class ContractTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(obj);\n this.type = 0x80;\n }\n static deserializeExclusive(ss, tx) {\n return {};\n }\n get exclusiveData() {\n return {};\n }\n get fees() {\n return 0;\n }\n serializeExclusive() {\n return \"\";\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof ContractTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new ContractTransaction(other).hash;\n }\n}\nexport default ContractTransaction;\n//# sourceMappingURL=ContractTransaction.js.map","import { TX_VERSION } from \"../../consts\";\nimport { Fixed8, fixed82num, num2VarInt } from \"../../u\";\nimport { BaseTransaction } from \"./BaseTransaction\";\n/**\n * Transaction used for invoking smart contracts through a VM script.\n * Can also be used to transfer UTXO assets.\n */\nexport class InvocationTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.INVOCATION }, obj));\n this.type = 0xd1;\n this.script = obj.script || \"\";\n this.gas = new Fixed8(obj.gas);\n }\n static deserializeExclusive(ss, tx) {\n const script = ss.readVarBytes();\n const version = parseInt(ss.str.substr(2, 2), 16);\n const gas = version >= 1 ? fixed82num(ss.read(8)) : 0;\n return Object.assign(tx, { script, gas });\n }\n get exclusiveData() {\n return { gas: this.gas, script: this.script };\n }\n get fees() {\n return this.gas.toNumber();\n }\n serializeExclusive() {\n let out = num2VarInt(this.script.length / 2);\n out += this.script;\n if (this.version >= 1) {\n out += this.gas.toReverseHex();\n }\n return out;\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof InvocationTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new InvocationTransaction(other).hash;\n }\n export() {\n return Object.assign(super.export(), {\n script: this.script,\n gas: this.gas.toNumber()\n });\n }\n}\nexport default InvocationTransaction;\n//# sourceMappingURL=InvocationTransaction.js.map","export var TransactionType;\n(function (TransactionType) {\n TransactionType[TransactionType[\"MinerTransaction\"] = 0] = \"MinerTransaction\";\n TransactionType[TransactionType[\"IssueTransaction\"] = 1] = \"IssueTransaction\";\n TransactionType[TransactionType[\"ClaimTransaction\"] = 2] = \"ClaimTransaction\";\n TransactionType[TransactionType[\"EnrollmentTransaction\"] = 32] = \"EnrollmentTransaction\";\n TransactionType[TransactionType[\"RegisterTransaction\"] = 64] = \"RegisterTransaction\";\n TransactionType[TransactionType[\"ContractTransaction\"] = 128] = \"ContractTransaction\";\n TransactionType[TransactionType[\"StateTransaction\"] = 144] = \"StateTransaction\";\n TransactionType[TransactionType[\"PublishTransaction\"] = 208] = \"PublishTransaction\";\n TransactionType[TransactionType[\"InvocationTransaction\"] = 209] = \"InvocationTransaction\";\n})(TransactionType || (TransactionType = {}));\nexport default TransactionType;\n//# sourceMappingURL=TransactionType.js.map","import { TX_VERSION } from \"../../consts\";\nimport { num2VarInt } from \"../../u\";\nimport { StateDescriptor } from \"../components\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport TransactionType from \"./TransactionType\";\n/**\n * Transaction used for invoking smart contracts through a VM script.\n * Can also be used to transfer UTXO assets.\n */\nexport class StateTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.STATE }, obj));\n this.type = TransactionType.StateTransaction;\n this.descriptors = obj.descriptors\n ? obj.descriptors.map(d => new StateDescriptor(d))\n : [];\n }\n static deserializeExclusive(ss, tx) {\n const out = {\n descriptors: []\n };\n const descLength = ss.readVarInt();\n for (let i = 0; i < descLength; i++) {\n out.descriptors.push(StateDescriptor.fromStream(ss));\n }\n return Object.assign(tx, out);\n }\n get exclusiveData() {\n return { descriptors: this.descriptors };\n }\n get fees() {\n return 0;\n }\n serializeExclusive() {\n let out = num2VarInt(this.descriptors.length);\n out += this.descriptors.map(d => d.serialize()).join(\"\");\n return out;\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof StateTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new StateTransaction(other).hash;\n }\n export() {\n return Object.assign(super.export(), {\n descriptors: this.descriptors.map(d => d.export())\n });\n }\n}\nexport default StateTransaction;\n//# sourceMappingURL=StateTransaction.js.map","import { TX_VERSION } from \"../../consts\";\nimport { num2hexstring, reverseHex } from \"../../u\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nexport class MinerTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.MINER }, obj));\n this.type = 0x00;\n this.nonce = obj.nonce || 0;\n }\n static deserializeExclusive(ss, tx) {\n // read Uint32 from StringStream\n const nonce = parseInt(reverseHex(ss.read(4)), 16);\n return Object.assign(tx, { nonce });\n }\n get exclusiveData() {\n return { nonce: this.nonce };\n }\n get fees() {\n return 0;\n }\n serializeExclusive() {\n return num2hexstring(this.nonce, 4, true);\n }\n export() {\n return Object.assign(super.export(), {\n nonce: this.nonce\n });\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof MinerTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new MinerTransaction(other).hash;\n }\n}\nexport default MinerTransaction;\n//# sourceMappingURL=MinerTransaction.js.map","import { TX_VERSION } from \"../../consts\";\nimport { DEFAULT_SYSFEE } from \"../../consts\";\nimport { getPublicKeyEncoded, getPublicKeyUnencoded } from \"../../wallet/core\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport TransactionType from \"./TransactionType\";\nexport class EnrollmentTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.ENROLLMENT }, obj));\n this.type = TransactionType.EnrollmentTransaction;\n this.publicKey = obj.publicKey || \"\";\n }\n static deserializeExclusive(ss, tx) {\n const hexStrPrefix = ss.read(1);\n const prefix = parseInt(hexStrPrefix, 16);\n let pKey = \"\";\n // Compressed public keys.\n if (prefix === 0x02 || prefix === 0x03) {\n pKey = ss.read(32);\n }\n else if (prefix === 0x04) {\n pKey = ss.read(64);\n }\n else if (prefix === 0x00) {\n // infinity case.\n return Object.assign(tx, { publicKey: \"\" });\n }\n else {\n throw new Error(\"Prefix not recognised for public key\");\n }\n pKey = hexStrPrefix + pKey;\n const publicKey = getPublicKeyUnencoded(pKey);\n return Object.assign(tx, { publicKey });\n }\n get exclusiveData() {\n return { publicKey: this.publicKey };\n }\n get fees() {\n return DEFAULT_SYSFEE.enrollmentTransaction;\n }\n serializeExclusive() {\n if (this.publicKey === \"\") {\n return \"00\";\n }\n return getPublicKeyEncoded(this.publicKey);\n }\n export() {\n return Object.assign(super.export(), {\n publicKey: this.publicKey\n });\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof EnrollmentTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new EnrollmentTransaction(other).hash;\n }\n}\nexport default EnrollmentTransaction;\n//# sourceMappingURL=EnrollmentTransaction.js.map","import { TX_VERSION } from \"../../consts\";\nimport { ASSET_ID, DEFAULT_SYSFEE } from \"../../consts\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport TransactionType from \"./TransactionType\";\nexport class IssueTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.ISSUE }, obj));\n this.type = TransactionType.IssueTransaction;\n }\n static deserializeExclusive(ss, tx) {\n return {};\n }\n get exclusiveData() {\n return {};\n }\n get fees() {\n if (this.version >= 1) {\n return 0;\n }\n if (this.outputs.every(p => p.assetId === ASSET_ID.NEO || p.assetId === ASSET_ID.GAS)) {\n return 0;\n }\n return DEFAULT_SYSFEE.issueTransaction;\n }\n serializeExclusive() {\n return \"\";\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof IssueTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new IssueTransaction(other).hash;\n }\n}\nexport default IssueTransaction;\n//# sourceMappingURL=IssueTransaction.js.map","import { ASSET_TYPE, DEFAULT_SYSFEE, TX_VERSION } from \"../../consts\";\nimport { Fixed8, fixed82num, hexstring2str, num2hexstring, num2VarInt, reverseHex, str2hexstring } from \"../../u\";\nimport { getPublicKeyEncoded, getPublicKeyUnencoded } from \"../../wallet/core\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport TransactionType from \"./TransactionType\";\nexport class RegisterTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.REGISTER }, obj));\n this.type = TransactionType.RegisterTransaction;\n this.assetType = obj.assetType || 0;\n this.name = obj.name || \"\";\n this.amount = new Fixed8(obj.amount);\n this.precision = obj.precision || 0;\n this.owner = obj.owner || \"\";\n this.admin = obj.admin || \"\";\n }\n static deserializeExclusive(ss, tx) {\n const assetType = parseInt(reverseHex(ss.read(1)), 16);\n const name = hexstring2str(ss.readVarBytes());\n const amount = fixed82num(ss.read(8));\n const precision = parseInt(reverseHex(ss.read(1)), 16);\n // TODO: extract a method to get the publicKey. Refactor both\n // enrollment transaction and register transaction\n const hexStrPrefix = ss.read(1);\n const prefix = parseInt(hexStrPrefix, 16);\n let pKey = \"\";\n let owner = \"\";\n // Compressed public keys.\n if (prefix === 0x02 || prefix === 0x03) {\n pKey = ss.read(32);\n }\n else if (prefix === 0x04) {\n pKey = ss.read(64);\n }\n else if (prefix === 0x00) {\n // do nothing, For infinity, the p.Key == 0x00, included in the prefix\n }\n else {\n throw new Error(\"Prefix not recognised for public key\");\n }\n if (pKey !== \"\") {\n pKey = hexStrPrefix + pKey;\n owner = getPublicKeyUnencoded(pKey);\n }\n const admin = reverseHex(ss.read(20));\n return Object.assign(tx, {\n assetType,\n name,\n amount,\n precision,\n owner,\n admin\n });\n }\n get exclusiveData() {\n return {\n assetType: this.assetType,\n name: this.name,\n amount: this.amount,\n precision: this.precision,\n owner: this.owner,\n admin: this.admin\n };\n }\n get fees() {\n if (this.assetType === ASSET_TYPE.GoverningToken ||\n this.assetType === ASSET_TYPE.UtilityToken) {\n return 0;\n }\n return DEFAULT_SYSFEE.registerTransaction;\n }\n serializeExclusive() {\n let out = num2hexstring(this.assetType, 1, true);\n out += num2VarInt(this.name.length);\n out += str2hexstring(this.name);\n out += this.amount.toReverseHex();\n out += num2hexstring(this.precision, 1, true);\n out += getPublicKeyEncoded(this.owner);\n out += reverseHex(this.admin);\n return out;\n }\n export() {\n return Object.assign(super.export(), {\n assetType: this.assetType,\n name: this.name,\n amount: this.amount.toNumber(),\n precision: this.precision,\n owner: this.owner,\n admin: this.admin\n });\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof RegisterTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new RegisterTransaction(other).hash;\n }\n}\nexport default RegisterTransaction;\n//# sourceMappingURL=RegisterTransaction.js.map","import { TX_VERSION } from \"../../consts\";\nimport { ab2hexstring, hexstring2str, num2hexstring, num2VarInt, str2hexstring } from \"../../u\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport TransactionType from \"./TransactionType\";\nexport class PublishTransaction extends BaseTransaction {\n constructor(obj = {}) {\n super(Object.assign({ version: TX_VERSION.PUBLISH }, obj));\n this.type = TransactionType.PublishTransaction;\n this.script = obj.script || \"\";\n this.parameterList = obj.parameterList || [0];\n this.returnType = obj.returnType || 0;\n this.needStorage = obj.needStorage || false;\n this.name = obj.name || \"\";\n this.codeVersion = obj.codeVersion || \"\";\n this.author = obj.author || \"\";\n this.email = obj.email || \"\";\n this.description = obj.description || \"\";\n }\n static deserializeExclusive(ss, tx) {\n if (tx.version === undefined) {\n tx.version = 0;\n }\n if (tx.version > 1) {\n throw new Error(`version need to be less or equal than 1. Got ${tx.version}`);\n }\n const script = ss.readVarBytes();\n const paramList = ss.readVarBytes();\n const parameterList = [];\n for (let i = 0; i + 2 <= paramList.length; i = i + 2) {\n parameterList.push(parseInt(paramList.substring(i, i + 2), 16));\n }\n const returnType = parseInt(ss.read(1), 16);\n if (tx.version >= 1) {\n throw new Error(`version need to be less or equal than 1. Got ${tx.version}`);\n }\n let NeedStorage = false;\n if (tx.version >= 1) {\n NeedStorage = !!parseInt(ss.read(1), 16);\n }\n const name = hexstring2str(ss.readVarBytes());\n const codeVersion = hexstring2str(ss.readVarBytes());\n const author = hexstring2str(ss.readVarBytes());\n const email = hexstring2str(ss.readVarBytes());\n const description = hexstring2str(ss.readVarBytes());\n return Object.assign(tx, {\n script,\n parameterList,\n returnType,\n NeedStorage,\n name,\n codeVersion,\n author,\n email,\n description\n });\n }\n get exclusiveData() {\n return {\n script: this.script,\n parameterList: this.parameterList,\n returnType: this.returnType,\n needStorage: this.needStorage,\n name: this.name,\n codeVersion: this.codeVersion,\n author: this.author,\n email: this.email,\n description: this.description\n };\n }\n get fees() {\n return 0;\n }\n serializeExclusive() {\n let out = num2VarInt(this.script.length / 2);\n out += this.script;\n out += num2VarInt(this.parameterList.length);\n out += ab2hexstring(this.parameterList);\n if (this.version >= 1) {\n out += num2hexstring(this.needStorage, 1);\n }\n out += num2VarInt(this.returnType);\n out += num2VarInt(this.name.length);\n out += str2hexstring(this.name);\n out += num2VarInt(this.codeVersion.length);\n out += str2hexstring(this.codeVersion);\n out += num2VarInt(this.author.length);\n out += str2hexstring(this.author);\n out += num2VarInt(this.email.length);\n out += str2hexstring(this.email);\n out += num2VarInt(this.description.length);\n out += str2hexstring(this.description);\n return out;\n }\n equals(other) {\n if (this.type !== other.type) {\n return false;\n }\n if (other instanceof PublishTransaction) {\n return this.hash === other.hash;\n }\n return this.hash === new PublishTransaction(other).hash;\n }\n export() {\n return Object.assign(super.export(), {\n script: this.script,\n parameterList: this.parameterList,\n returnType: this.returnType,\n needStorage: this.needStorage,\n name: this.name,\n codeVersion: this.codeVersion,\n author: this.author,\n email: this.email,\n description: this.description\n });\n }\n}\nexport default PublishTransaction;\n//# sourceMappingURL=PublishTransaction.js.map","import { StringStream } from \"../../u\";\nimport { BaseTransaction } from \"./BaseTransaction\";\nimport { ClaimTransaction } from \"./ClaimTransaction\";\nimport { ContractTransaction } from \"./ContractTransaction\";\nimport { InvocationTransaction } from \"./InvocationTransaction\";\nimport { StateTransaction } from \"./StateTransaction\";\nimport { MinerTransaction } from \"./MinerTransaction\";\nimport { EnrollmentTransaction } from \"./EnrollmentTransaction\";\nimport { IssueTransaction } from \"./IssueTransaction\";\nimport { RegisterTransaction } from \"./RegisterTransaction\";\nimport { PublishTransaction } from \"./PublishTransaction\";\nimport { deserializeAttributes, deserializeInputs, deserializeOutputs, deserializeType, deserializeVersion, deserializeWitnesses } from \"./main\";\nfunction getType(type) {\n switch (type) {\n case 0x00:\n return MinerTransaction;\n case 0x01:\n return IssueTransaction;\n case 0x02:\n return ClaimTransaction;\n case 0x20:\n return EnrollmentTransaction;\n case 0x40:\n return RegisterTransaction;\n case 0x80:\n return ContractTransaction;\n case 0xd0:\n return PublishTransaction;\n case 0xd1:\n return InvocationTransaction;\n case 0x90:\n return StateTransaction;\n default:\n throw new Error(`Unknown TransactionType: ${type}`);\n }\n}\n/**\n * @class Transaction\n * @classdesc\n * Transactions are what you use to interact with the blockchain.\n * A transaction is made up of components found in the component file.\n * Besides those components which are found in every transaction, there are also special data that is unique to each transaction type. These 'exclusive' data can be found in the exclusive file.\n * This class is a wrapper around the various transaction building methods found in this folder.\n */\nexport class Transaction extends BaseTransaction {\n /**\n * Deserializes a hexstring into a Transaction object.\n * @param {string} hexstring - Hexstring of the transaction.\n */\n static deserialize(hex) {\n const ss = new StringStream(hex);\n let txObj = deserializeType(ss);\n const txClass = getType(txObj.type);\n txObj = deserializeVersion(ss, txObj);\n txObj = txClass.deserializeExclusive(ss, txObj);\n txObj = deserializeAttributes(ss, txObj);\n txObj = deserializeInputs(ss, txObj);\n txObj = deserializeOutputs(ss, txObj);\n if (!ss.isEmpty()) {\n txObj = deserializeWitnesses(ss, txObj);\n }\n return new txClass(txObj);\n }\n static deserializeExclusive(ss, tx) {\n throw new Error(\"Method not implemented.\");\n }\n constructor(tx = {}) {\n super(tx);\n }\n get [Symbol.toStringTag]() {\n return \"Transaction\";\n }\n /**\n * Exclusive Data\n */\n get exclusiveData() {\n throw new Error(\"Not Implemented!\");\n }\n get fees() {\n return 0;\n }\n serializeExclusive() {\n throw new Error(\"Method not implemented.\");\n }\n}\nexport default Transaction;\n//# sourceMappingURL=Transaction.js.map","export * from \"./BaseTransaction\";\nexport * from \"./Transaction\";\nexport * from \"./ClaimTransaction\";\nexport * from \"./ContractTransaction\";\nexport * from \"./InvocationTransaction\";\nexport * from \"./StateTransaction\";\nexport * from \"./MinerTransaction\";\nexport * from \"./IssueTransaction\";\nexport * from \"./RegisterTransaction\";\nexport * from \"./TransactionType\";\nexport * from \"./EnrollmentTransaction\";\nexport * from \"./PublishTransaction\";\n//# sourceMappingURL=index.js.map","export * from \"./components\";\nexport * from \"./transaction\";\nexport * from \"./strategy\";\nexport * from \"./txAttrUsage\";\nexport { defaultCalculationStrategy } from \"./calculate\";\n//# sourceMappingURL=index.js.map","import { defaultCalculationStrategy } from \"./tx\";\nexport const networks = {};\nexport { defaultCalculationStrategy };\nexport const timeout = {\n ping: 2000,\n rpc: 30000\n};\n//# sourceMappingURL=settings.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport axios from \"axios\";\nimport { DEFAULT_REQ } from \"../consts\";\nimport { compareArray } from \"../helper\";\nimport logger from \"../logging\";\nimport { timeout } from \"../settings\";\nimport { BaseTransaction } from \"../tx/transaction/BaseTransaction\";\nconst log = logger(\"rpc\");\n/**\n * Wrapper for querying node RPC\n * @param url Node URL.\n * @param req RPC Request object.\n * @param config Configuration to pass down to axios\n * @returns RPC Response\n */\nexport function queryRPC(url, req, config = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const body = Object.assign({}, DEFAULT_REQ, req);\n const conf = Object.assign({\n headers: { \"Content-Type\": \"application/json\" },\n timeout: timeout.rpc\n }, config);\n const response = yield axios.post(url, body, conf);\n return response.data;\n });\n}\n/**\n * A Query object helps us to construct and record requests\n */\nexport class Query {\n /**\n * @param addr address in Base58 encoding (starting with A)\n */\n static getAccountState(addr) {\n return new Query({\n method: \"getaccountstate\",\n params: [addr]\n });\n }\n /**\n * @param assetId\n */\n static getAssetState(assetId) {\n return new Query({\n method: \"getassetstate\",\n params: [assetId]\n });\n }\n /**\n * This Query returns the specified block either as a hexstring or human readable JSON.\n * @param indexOrHash height or hash of block.\n * @param verbose 0 for hexstring, 1 for JSON. Defaults to 1.\n */\n static getBlock(indexOrHash, verbose = 1) {\n return new Query({\n method: \"getblock\",\n params: [indexOrHash, verbose]\n });\n }\n /**\n * This Query returns the hash of a specific block.\n * @param {number} index height of block.\n */\n static getBlockHash(index) {\n return new Query({\n method: \"getblockhash\",\n params: [index]\n });\n }\n /**\n * This Query returns the hash of the highest block.\n */\n static getBestBlockHash() {\n return new Query({\n method: \"getbestblockhash\"\n });\n }\n /**\n * This Query returns the current block height.\n */\n static getBlockCount() {\n return new Query({\n method: \"getblockcount\"\n });\n }\n /**\n * This Query returns the amount of GAS burnt as fees within a specific block.\n * @param index height of block.\n */\n static getBlockSysFee(index) {\n return new Query({\n method: \"getblocksysfee\",\n params: [index]\n });\n }\n /**\n * This Query returns the number of other nodes that this node is connected to.\n */\n static getConnectionCount() {\n return new Query({\n method: \"getconnectioncount\"\n });\n }\n /**\n * This Query returns information about the smart contract registered at the specific hash.\n * @param scriptHash hash of contract\n */\n static getContractState(scriptHash) {\n return new Query({\n method: \"getcontractstate\",\n params: [scriptHash]\n });\n }\n /**\n * This Query returns the list of nodes that this node is connected to.\n */\n static getPeers() {\n return new Query({\n method: \"getpeers\"\n });\n }\n /**\n * This Query returns the transaction hashes of the transactions waiting to be processed at the node.\n */\n static getRawMemPool() {\n return new Query({\n method: \"getrawmempool\"\n });\n }\n /**\n * This Query returns information about a specific transaction in either hexstring or human readable JSON.\n * @param txid hash of the specific transaction.\n * @param verbose 0 for hexstring, 1 for JSON. Defaults to 1.\n */\n static getRawTransaction(txid, verbose = 1) {\n return new Query({\n method: \"getrawtransaction\",\n params: [txid, verbose]\n });\n }\n /**\n * This Query returns the raw value stored at the specific key under a specific contract.\n * @param scriptHash hash of contract.\n * @param key\n */\n static getStorage(scriptHash, key) {\n return new Query({\n method: \"getstorage\",\n params: [scriptHash, key]\n });\n }\n /**\n * This Query returns the status of a TransactionOutput. If the output has been spent, this will return null.\n * @param txid hash of transaction.\n * @param index position of output in the vout array.\n */\n static getTxOut(txid, index) {\n return new Query({\n method: \"gettxout\",\n params: [txid, index]\n });\n }\n /**\n * Gets the list of candidates available for voting.\n * @return List of validators\n */\n static getValidators() {\n return new Query({\n method: \"getvalidators\"\n });\n }\n /**\n * This Query returns the node version.\n */\n static getVersion() {\n return new Query({\n method: \"getversion\"\n });\n }\n /**\n * This Query invokes the VM to run the given contract with the given parameters.\n * @param scriptHash hash of contract to test.\n * @param params parameters to pass into the VM.\n */\n static invoke(scriptHash, ...params) {\n return new Query({\n method: \"invoke\",\n params: [scriptHash, params]\n });\n }\n /**\n * This Query invokes the VM to run the specific contract with the provided operation and params. Do note that this function only suits contracts with a Main(string, args[]) entry method.\n * @param scriptHash hash of contract to test.\n * @param operation name of operation to call (first argument)\n * @param params parameters to pass (second argument)\n */\n static invokeFunction(scriptHash, operation, ...params) {\n return new Query({\n method: \"invokefunction\",\n params: [scriptHash, operation, params]\n });\n }\n /**\n * This Query runs the specific script through the VM.\n * @param script\n */\n static invokeScript(script) {\n return new Query({\n method: \"invokescript\",\n params: [script]\n });\n }\n /**\n * This Query transmits the specific transaction to the node.\n * @param transaction Transaction as a Transaction object or hexstring.\n */\n static sendRawTransaction(transaction) {\n const serialized = transaction instanceof BaseTransaction\n ? transaction.serialize(true)\n : transaction;\n return new Query({\n method: \"sendrawtransaction\",\n params: [serialized]\n });\n }\n /**\n * This Query submits a block for processing.\n * @param block\n */\n static submitBlock(block) {\n return new Query({\n method: \"submitblock\",\n params: [block]\n });\n }\n /**\n * This Query submits an address for validation.\n * @param addr Address to validate.\n */\n static validateAddress(addr) {\n return new Query({\n method: \"validateaddress\",\n params: [addr]\n });\n }\n /**\n * This Query Returns information of the unspent UTXO assets at the specified address.\n * @param addr Address to get the UTXO\n */\n static getUnspents(addr) {\n return new Query({\n method: \"getunspents\",\n params: [addr]\n });\n }\n /**\n * This Query returns unclaimed GAS amount of the specified address.\n * @param addr Address to get the unclaimed gas\n */\n static getUnclaimed(addr) {\n return new Query({\n method: \"getunclaimed\",\n params: [addr]\n });\n }\n /**\n * This Query returns claimable GAS information of the specified address.\n * @param addr Address to get the claimable gas\n */\n static getClaimable(addr) {\n return new Query({\n method: \"getclaimable\",\n params: [addr]\n });\n }\n get id() {\n return this.req.id;\n }\n get method() {\n return this.req.method;\n }\n get params() {\n return this.req.params;\n }\n constructor(req) {\n this.req = Object.assign({}, DEFAULT_REQ, req);\n this.completed = false;\n }\n get [Symbol.toStringTag]() {\n return \"Query\";\n }\n /**\n * Attaches a parser method to the Query. This method will be used to parse the response.\n */\n parseWith(parser) {\n this.parse = parser;\n return this;\n }\n /**\n * Executes the Query by sending the RPC request to the provided net.\n * @param url The URL of the node.\n * @param config Request configuration\n */\n execute(url, config = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.completed) {\n throw new Error(\"This request has been sent\");\n }\n const response = yield queryRPC(url, this.req, config);\n this.res = response;\n this.completed = true;\n if (response.error) {\n throw new Error(`${url}: ${response.error.message}`);\n }\n if (this.parse) {\n log.info(`Query[${this.req.method}] successful`);\n return this.parse(response.result);\n }\n return response;\n });\n }\n export() {\n return Object.assign({}, this.req, {\n params: this.req.params.map(p => {\n if (typeof p === \"object\") {\n return JSON.parse(JSON.stringify(p));\n }\n return p;\n })\n });\n }\n equals(other) {\n return (this.req.id === other.id &&\n this.req.method === other.method &&\n compareArray(this.req.params, other.params || []));\n }\n}\nexport default Query;\n//# sourceMappingURL=Query.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { DEFAULT_RPC, NEO_NETWORK, RPC_VERSION } from \"../consts\";\nimport logger from \"../logging\";\nimport { timeout } from \"../settings\";\nimport { isAddress, Claims, Balance, Coin } from \"../wallet\";\nimport Query from \"./Query\";\nconst log = logger(\"rpc\");\nconst versionRegex = /NEO:(\\d+\\.\\d+\\.\\d+)/;\n/**\n * RPC Client model to query a NEO node. Contains built-in methods to query using RPC calls.\n */\nexport class RPCClient {\n /**\n * @param net 'MainNet' or 'TestNet' will query the default RPC address found in consts. You may provide a custom URL.\n * @param version Version of NEO node. Used to check if RPC methods have been implemented. it will default to DEFAULT_RPC found in CONST\n */\n constructor(net, version = RPC_VERSION) {\n if (net === NEO_NETWORK.MAIN) {\n this.net = DEFAULT_RPC.MAIN;\n }\n else if (net === NEO_NETWORK.TEST) {\n this.net = DEFAULT_RPC.TEST;\n }\n else {\n this.net = net;\n }\n this.history = [];\n this.lastSeenHeight = 0;\n this._latencies = [];\n this.version = version;\n }\n get [Symbol.toStringTag]() {\n return \"RPC Client\";\n }\n get latency() {\n if (this._latencies.length === 0) {\n return 99999;\n }\n return Math.floor(this._latencies.reduce((p, c) => p + c, 0) / this._latencies.length);\n }\n set latency(lat) {\n if (this._latencies.length > 4) {\n this._latencies.shift();\n }\n this._latencies.push(lat);\n }\n /**\n * Measures the latency using getBlockCount call. Returns the current latency. For average, call this.latency\n */\n ping() {\n return __awaiter(this, void 0, void 0, function* () {\n const timeStart = Date.now();\n const query = Query.getBlockCount();\n try {\n const response = yield this.execute(query, { timeout: timeout.ping });\n this.lastSeenHeight = response.result;\n const newPing = Date.now() - timeStart;\n this.latency = newPing;\n return newPing;\n }\n catch (err) {\n this.latency = timeout.ping;\n return timeout.ping;\n }\n });\n }\n /**\n * Takes an Query object and executes it. Adds the Query object to history.\n */\n execute(query, config) {\n this.history.push(query);\n log.info(`RPC: ${this.net} executing Query[${query.req.method}]`);\n return query.execute(this.net, config);\n }\n /**\n * Creates a query with the given req and immediately executes it.\n */\n query(req, config) {\n const query = new Query(req);\n return this.execute(query, config);\n }\n /**\n * Gets the state of an account given an address.\n */\n getAccountState(addr) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!isAddress(addr)) {\n throw new Error(`Invalid address given: ${addr}`);\n }\n const response = yield this.execute(Query.getAccountState(addr));\n return response.result;\n });\n }\n /**\n * Gets the state of an asset given an id.\n */\n getAssetState(assetId) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getAssetState(assetId));\n return response.result;\n });\n }\n /**\n * Gets the block at a given height or hash.\n */\n getBlock(indexOrHash, verbose = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getBlock(indexOrHash, verbose));\n return response.result;\n });\n }\n /**\n * Gets the block hash at a given height.\n */\n getBlockHash(index) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getBlockHash(index));\n return response.result;\n });\n }\n /**\n * Get the latest block hash.\n */\n getBestBlockHash() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getBestBlockHash());\n return response.result;\n });\n }\n /**\n * Get the current block height.\n */\n getBlockCount() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getBlockCount());\n return response.result;\n });\n }\n /**\n * Get the system fees of a block.\n * @param {number} index\n * @return {Promise<string>} - System fees as a string.\n */\n getBlockSysFee(index) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getBlockSysFee(index));\n return response.result;\n });\n }\n /**\n * Gets the number of peers this node is connected to.\n * @return {Promise<number>}\n */\n getConnectionCount() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getConnectionCount());\n return response.result;\n });\n }\n /**\n * Gets the state of the contract at the given scriptHash.\n */\n getContractState(scriptHash) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getContractState(scriptHash));\n return response.result;\n });\n }\n /**\n * Gets a list of all peers that this node has discovered.\n */\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getPeers());\n return response.result;\n });\n }\n /**\n * Gets a list of all transaction hashes waiting to be processed.\n */\n getRawMemPool() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getRawMemPool());\n return response.result;\n });\n }\n /**\n * Gets a transaction based on its hash.\n */\n getRawTransaction(txid, verbose = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getRawTransaction(txid, verbose));\n return response.result;\n });\n }\n /**\n * Gets the corresponding value of a key in the storage of a contract address.\n */\n getStorage(scriptHash, key) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getStorage(scriptHash, key));\n return response.result;\n });\n }\n /**\n * Gets the transaction output given a transaction id and index\n */\n getTxOut(txid, index) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getTxOut(txid, index));\n return response.result;\n });\n }\n /**\n * Gets the list of validators available for voting.\n */\n getValidators() {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getValidators());\n return response.result;\n });\n }\n /**\n * Gets the version of the NEO node. This method will never be blocked by version. This method will also update the current Client's version to the one received.\n */\n getVersion() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const response = yield this.execute(Query.getVersion());\n if (response && response.result && response.result.useragent) {\n const useragent = response.result.useragent;\n const responseLength = useragent.length;\n const strippedResponse = useragent.substring(1, responseLength - 1);\n const [header, newVersion] = strippedResponse.split(\":\");\n this.version = newVersion;\n }\n else {\n throw new Error(\"Empty or unexpected version pattern\");\n }\n return this.version;\n }\n catch (err) {\n if (err.message.includes(\"Method not found\")) {\n this.version = RPC_VERSION;\n return this.version;\n }\n else {\n throw err;\n }\n }\n });\n }\n /**\n * Calls a smart contract with the given parameters. This method is a local invoke, results are not reflected on the blockchain.\n */\n invoke(scriptHash, ...params) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.invoke(scriptHash, ...params));\n return response.result;\n });\n }\n /**\n * Submits a contract method call with parameters for the node to run. This method is a local invoke, results are not reflected on the blockchain.\n */\n invokeFunction(scriptHash, operation, ...params) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.invokeFunction(scriptHash, operation, ...params));\n return response.result;\n });\n }\n /**\n * Submits a script for the node to run. This method is a local invoke, results are not reflected on the blockchain.\n */\n invokeScript(script) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.invokeScript(script));\n return response.result;\n });\n }\n /**\n * Sends a serialized transaction to the network.\n */\n sendRawTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.sendRawTransaction(transaction));\n return response.result;\n });\n }\n /**\n * Submits a serialized block to the network.\n */\n submitBlock(block) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.submitBlock(block));\n return response.result;\n });\n }\n /**\n * Checks if the provided address is a valid NEO address.\n */\n validateAddress(addr) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.validateAddress(addr));\n return response.result.isvalid;\n });\n }\n /**\n * Get the unspent utxo for an address\n */\n getUnspents(addr) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getUnspents(addr));\n return this.parseUnspentsToBalance(response.result);\n });\n }\n /**\n * Get the unclaimed gas amount for an address\n */\n getUnclaimed(addr) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getUnclaimed(addr));\n return response.result;\n });\n }\n /**\n * Get the claimable for an address\n */\n getClaimable(addr) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.execute(Query.getClaimable(addr));\n return new Claims({\n net: this.net,\n address: response.result.address,\n claims: response.result.claimable.map((rawClaim) => new Object({\n claim: rawClaim.unclaimed,\n txid: rawClaim.txid,\n index: rawClaim.n,\n value: rawClaim.value,\n start: rawClaim.start_height,\n end: rawClaim.end_height\n }))\n });\n });\n }\n parseUnspentsToBalance(getUnspentsResult) {\n const bal = new Balance({\n address: getUnspentsResult.address\n });\n for (const assetBalance of getUnspentsResult.balance) {\n if (assetBalance.amount === 0) {\n continue;\n }\n if (assetBalance.unspent.length > 0) {\n bal.addAsset(assetBalance.asset_symbol, {\n unspent: assetBalance.unspent.map((utxo) => new Coin({\n index: utxo.n,\n txid: utxo.txid,\n value: utxo.value\n }))\n });\n }\n else {\n bal.addToken(assetBalance.asset_symbol, assetBalance.amount);\n }\n }\n return bal;\n }\n}\nexport default RPCClient;\n//# sourceMappingURL=RPCClient.js.map","import { Fixed8, hexstring2str } from \"../u\";\n/**\n * Builds a parser to parse the results of the stack.\n * @param args A list of functions to parse arguments. Each function is mapped to its corresponding StackItem in the result.\n * @returns parser function\n */\nexport function buildParser(...args) {\n return (result) => {\n if (result.stack.length !== args.length) {\n throw new Error(`Wrong number of items to parse! Expected ${args.length} but got ${result.stack.length}!`);\n }\n return result.stack.map((item, i) => args[i](item));\n };\n}\n/**\n * This just returns the value of the StackItem.\n */\nexport function NoOpParser(item) {\n return item.value;\n}\n/**\n * Parses the result to an integer.\n */\nexport function IntegerParser(item) {\n return parseInt(item.value || \"0\", 10);\n}\n/**\n * Parses the result to a ASCII string.\n */\nexport function StringParser(item) {\n return hexstring2str(item.value);\n}\n/**\n * Parses the result to a Fixed8.\n */\nexport function Fixed8Parser(item) {\n return Fixed8.fromReverseHex(item.value);\n}\n/**\n * Parses the VM Stack and returns human readable strings. The types are inferred based on the StackItem type.\n * @param res RPC Response\n * @return Array of results\n */\nexport function SimpleParser(res) {\n return res.stack.map(item => {\n switch (item.type) {\n case \"ByteArray\":\n return StringParser(item);\n case \"Integer\":\n return IntegerParser(item);\n default:\n throw Error(`Unknown type: ${item.type}`);\n }\n });\n}\n//# sourceMappingURL=parse.js.map","export * from \"./Network\";\nexport * from \"./Protocol\";\nexport * from \"./Query\";\nexport * from \"./RPCClient\";\nexport * from \"./parse\";\n//# sourceMappingURL=index.js.map","import * as CONST from \"./consts\";\nimport * as logging from \"./logging\";\nimport * as rpc from \"./rpc\";\nimport * as sc from \"./sc\";\nimport * as settings from \"./settings\";\nimport * as tx from \"./tx\";\nimport * as u from \"./u\";\nimport * as wallet from \"./wallet\";\nexport { rpc, sc, tx, wallet, u, CONST, settings, logging };\n//# sourceMappingURL=index.js.map","module.exports = require('./lib/axios');","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n Buffer = require('buffer').Buffer;\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n }\n\n if (base === 16) {\n this._parseHex(number, start);\n } else {\n this._parseBase(number, base, start);\n }\n\n if (number[0] === '-') {\n this.negative = 1;\n }\n\n this.strip();\n\n if (endian !== 'le') return;\n\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex (str, start, end) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r <<= 4;\n\n // 'a' - 'f'\n if (c >= 49 && c <= 54) {\n r |= c - 49 + 0xa;\n\n // 'A' - 'F'\n } else if (c >= 17 && c <= 22) {\n r |= c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r |= c & 0xf;\n }\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n // Scan 24-bit chunks and add them to the number\n var off = 0;\n for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n w = parseHex(number, i, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n if (i + 6 !== start) {\n w = parseHex(number, start, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n }\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n r.strip();\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\t /*\n\t * Local polyfil of Object.create\n\t */\n\t var create = Object.create || (function () {\n\t function F() {};\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }())\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var i = 0; i < thatSigBytes; i += 4) {\n\t thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t var r = (function (m_w) {\n\t var m_w = m_w;\n\t var m_z = 0x3ade68b1;\n\t var mask = 0xffffffff;\n\n\t return function () {\n\t m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t var result = ((m_z << 0x10) + m_w) & mask;\n\t result /= 0x100000000;\n\t result += 0.5;\n\t return result * (Math.random() > .5 ? 1 : -1);\n\t }\n\t });\n\n\t for (var i = 0, rcache; i < nBytes; i += 4) {\n\t var _r = r((rcache || Math.random()) * 0x100000000);\n\n\t rcache = _r() * 0x3ade67b7;\n\t words.push((_r() * 0x100000000) | 0);\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t var processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","module.exports = require(\"buffer\");",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = \"loglevel\";\n if (name) {\n storageKey += \":\" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== \"string\" || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n","module.exports = require(\"util\");","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS.enc.Hex;\n\n}));","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","try {\n var util = require('util');\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n module.exports = require('./inherits_browser.js');\n}\n","'use strict'\n\nvar createHash = require('create-hash')\nvar bs58checkBase = require('./base')\n\n// SHA256(SHA256(buffer))\nfunction sha256x2 (buffer) {\n var tmp = createHash('sha256').update(buffer).digest()\n return createHash('sha256').update(tmp).digest()\n}\n\nmodule.exports = bs58checkBase(sha256x2)\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","module.exports = require(\"crypto\");","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t var block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t var modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t var modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t var wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t var salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.prefix = factory(root);\n }\n}(this, function (root) {\n 'use strict';\n\n var merge = function (target) {\n var i = 1;\n var length = arguments.length;\n var key;\n for (; i < length; i++) {\n for (key in arguments[i]) {\n if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n target[key] = arguments[i][key];\n }\n }\n }\n return target;\n };\n\n var defaults = {\n template: '[%t] %l:',\n levelFormatter: function (level) {\n return level.toUpperCase();\n },\n nameFormatter: function (name) {\n return name || 'root';\n },\n timestampFormatter: function (date) {\n return date.toTimeString().replace(/.*(\\d{2}:\\d{2}:\\d{2}).*/, '$1');\n },\n format: undefined\n };\n\n var loglevel;\n var configs = {};\n\n var reg = function (rootLogger) {\n if (!rootLogger || !rootLogger.getLogger) {\n throw new TypeError('Argument is not a root logger');\n }\n loglevel = rootLogger;\n };\n\n var apply = function (logger, config) {\n if (!logger || !logger.setLevel) {\n throw new TypeError('Argument is not a logger');\n }\n\n /* eslint-disable vars-on-top */\n var originalFactory = logger.methodFactory;\n var name = logger.name || '';\n var parent = configs[name] || configs[''] || defaults;\n /* eslint-enable vars-on-top */\n\n function methodFactory(methodName, logLevel, loggerName) {\n var originalMethod = originalFactory(methodName, logLevel, loggerName);\n var options = configs[loggerName] || configs[''];\n\n var hasTimestamp = options.template.indexOf('%t') !== -1;\n var hasLevel = options.template.indexOf('%l') !== -1;\n var hasName = options.template.indexOf('%n') !== -1;\n\n return function () {\n var content = '';\n\n var length = arguments.length;\n var args = Array(length);\n var key = 0;\n for (; key < length; key++) {\n args[key] = arguments[key];\n }\n\n // skip the root method for child loggers to prevent duplicate logic\n if (name || !configs[loggerName]) {\n /* eslint-disable vars-on-top */\n var timestamp = options.timestampFormatter(new Date());\n var level = options.levelFormatter(methodName);\n var lname = options.nameFormatter(loggerName);\n /* eslint-enable vars-on-top */\n\n if (options.format) {\n content += options.format(level, lname, timestamp);\n } else {\n content += options.template;\n if (hasTimestamp) {\n content = content.replace(/%t/, timestamp);\n }\n if (hasLevel) content = content.replace(/%l/, level);\n if (hasName) content = content.replace(/%n/, lname);\n }\n\n if (args.length && typeof args[0] === 'string') {\n // concat prefix with first argument to support string substitutions\n args[0] = content + ' ' + args[0];\n } else {\n args.unshift(content);\n }\n }\n\n originalMethod.apply(undefined, args);\n };\n }\n\n if (!configs[name]) {\n logger.methodFactory = methodFactory;\n }\n\n // for remove inherited format option if template option preset\n config = config || {};\n if (config.template) config.format = undefined;\n\n configs[name] = merge({}, parent, config);\n\n logger.setLevel(logger.getLevel());\n\n if (!loglevel) {\n logger.warn(\n 'It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md'\n );\n }\n\n return logger;\n };\n\n var api = {\n reg: reg,\n apply: apply\n };\n\n var save;\n\n if (root) {\n save = root.prefix;\n api.noConflict = function () {\n if (root.prefix === api) {\n root.prefix = save;\n }\n return api;\n };\n }\n\n return api;\n}));\n","var bs58check = require('bs58check')\n\nfunction decodeRaw (buffer, version) {\n // check version only if defined\n if (version !== undefined && buffer[0] !== version) throw new Error('Invalid network version')\n\n // uncompressed\n if (buffer.length === 33) {\n return {\n version: buffer[0],\n privateKey: buffer.slice(1, 33),\n compressed: false\n }\n }\n\n // invalid length\n if (buffer.length !== 34) throw new Error('Invalid WIF length')\n\n // invalid compression flag\n if (buffer[33] !== 0x01) throw new Error('Invalid compression flag')\n\n return {\n version: buffer[0],\n privateKey: buffer.slice(1, 33),\n compressed: true\n }\n}\n\nfunction encodeRaw (version, privateKey, compressed) {\n var result = new Buffer(compressed ? 34 : 33)\n\n result.writeUInt8(version, 0)\n privateKey.copy(result, 1)\n\n if (compressed) {\n result[33] = 0x01\n }\n\n return result\n}\n\nfunction decode (string, version) {\n return decodeRaw(bs58check.decode(string), version)\n}\n\nfunction encode (version, privateKey, compressed) {\n if (typeof version === 'number') return bs58check.encode(encodeRaw(version, privateKey, compressed))\n\n return bs58check.encode(\n encodeRaw(\n version.version,\n version.privateKey,\n version.compressed\n )\n )\n}\n\nmodule.exports = {\n decode: decode,\n decodeRaw: decodeRaw,\n encode: encode,\n encodeRaw: encodeRaw\n}\n",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));","\"use strict\";\n\n(function(root) {\n var MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n\n var h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n var h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n var w = new Array(64);\n\n function blocks(p) {\n var off = 0, len = p.length;\n while (len >= 64) {\n var a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n var i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi>>>24) & 0xff);\n p.push((bitLenHi>>>16) & 0xff);\n p.push((bitLenHi>>>8) & 0xff);\n p.push((bitLenHi>>>0) & 0xff);\n p.push((bitLenLo>>>24) & 0xff);\n p.push((bitLenLo>>>16) & 0xff);\n p.push((bitLenLo>>>8) & 0xff);\n p.push((bitLenLo>>>0) & 0xff);\n\n blocks(p);\n\n return [\n (h0>>>24) & 0xff, (h0>>>16) & 0xff, (h0>>>8) & 0xff, (h0>>>0) & 0xff,\n (h1>>>24) & 0xff, (h1>>>16) & 0xff, (h1>>>8) & 0xff, (h1>>>0) & 0xff,\n (h2>>>24) & 0xff, (h2>>>16) & 0xff, (h2>>>8) & 0xff, (h2>>>0) & 0xff,\n (h3>>>24) & 0xff, (h3>>>16) & 0xff, (h3>>>8) & 0xff, (h3>>>0) & 0xff,\n (h4>>>24) & 0xff, (h4>>>16) & 0xff, (h4>>>8) & 0xff, (h4>>>0) & 0xff,\n (h5>>>24) & 0xff, (h5>>>16) & 0xff, (h5>>>8) & 0xff, (h5>>>0) & 0xff,\n (h6>>>24) & 0xff, (h6>>>16) & 0xff, (h6>>>8) & 0xff, (h6>>>0) & 0xff,\n (h7>>>24) & 0xff, (h7>>>16) & 0xff, (h7>>>8) & 0xff, (h7>>>0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = password.length <= 64 ? password : SHA256(password);\n\n var i;\n var innerLen = 64 + salt.length + 4;\n var inner = new Array(innerLen);\n var outerKey = new Array(64);\n var dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) inner[i] = 0x36;\n for (i = 0; i < password.length; i++) inner[i] ^= password[i];\n for (i = 0; i < salt.length; i++) inner[64+i] = salt[i];\n for (i = innerLen - 4; i < innerLen; i++) inner[i] = 0;\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (var i = innerLen-1; i >= innerLen-4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n var i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (var i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (var i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') {\n return false;\n }\n for (var i = 0; i < o.length; i++) {\n if (typeof(o[i]) !== 'number') { return false; }\n\n var v = parseInt(o[i]);\n if (v != o[i] || v < 0 || v >= 256) {\n return false;\n }\n }\n return true;\n }\n\n function ensureInteger(value, name) {\n var intValue = parseInt(value);\n if (value != intValue) { throw new Error('invalid ' + name); }\n return intValue;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function scrypt(password, salt, N, r, p, dkLen, callback) {\n\n if (!callback) { throw new Error('missing callback'); }\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n var b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n var B = new Uint32Array(p * 32 * r)\n for (var i = 0; i < B.length; i++) {\n var j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n var XY = new Uint32Array(64 * r);\n var V = new Uint32Array(32 * r * N);\n\n var Yi = 32 * r;\n\n // scratch space\n var x = new Uint32Array(16); // salsa20_8\n var _X = new Uint32Array(16); // blockmix_salsa8\n\n var totalOps = p * N * 2;\n var currentOp = 0;\n var lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n var stop = false;\n\n // State information\n var state = 0;\n var i0 = 0, i1;\n var Bi;\n\n // How many blockmix_salsa8 can we do per step?\n var limit = parseInt(1000 / r);\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n var nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n var incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n var steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (var i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n var percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n\n if (i1 < N) {\n break;\n }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n var steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (var i = 0; i < steps; i++) { // ROMix - 6\n var offset = (2 * r - 1) * 16; // ROMix - 7\n var j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n var percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n\n if (i1 < N) {\n break;\n }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (var i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n var derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Done; don't break (which would reschedule)\n return callback(null, 1.0, derivedKey);\n }\n\n // Schedule the next steps\n nextTick(incrementalSMix);\n }\n\n // Bootstrap the incremental smix\n incrementalSMix();\n }\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = scrypt;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(scrypt);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = scrypt;\n }\n\n})(this);\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n // Only Node.JS has a process variable that is of [[Class]] process\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","module.exports = require(\"http\");","module.exports = require(\"https\");","var url = require(\"url\");\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar assert = require(\"assert\");\nvar Writable = require(\"stream\").Writable;\nvar debug = require(\"debug\")(\"follow-redirects\");\n\n// RFC7231§4.2.1: Of the request methods defined by this specification,\n// the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.\nvar SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true };\n\n// Create handlers that pass events from native requests\nvar eventHandlers = Object.create(null);\n[\"abort\", \"aborted\", \"error\", \"socket\", \"timeout\"].forEach(function (event) {\n eventHandlers[event] = function (arg) {\n this._redirectable.emit(event, arg);\n };\n});\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n options.headers = options.headers || {};\n this._options = options;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n self._processResponse(response);\n };\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Validate input and shift parameters if necessary\n if (!(typeof data === \"string\" || typeof data === \"object\" && (\"length\" in data))) {\n throw new Error(\"data should be a string, Buffer or Uint8Array\");\n }\n if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new Error(\"Request body larger than maxBodyLength limit\"));\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (typeof data === \"function\") {\n callback = data;\n data = encoding = null;\n }\n else if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Write data and end\n var currentRequest = this._currentRequest;\n this.write(data || \"\", encoding, function () {\n currentRequest.end(null, null, callback);\n });\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"abort\", \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\", \"setTimeout\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n this.emit(\"error\", new Error(\"Unsupported protocol \" + protocol));\n return;\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.substr(0, protocol.length - 1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n this._currentUrl = url.format(this._options);\n\n // Set up event handlers\n request._redirectable = this;\n for (var event in eventHandlers) {\n /* istanbul ignore else */\n if (event) {\n request.on(event, eventHandlers[event]);\n }\n }\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end.\n var i = 0;\n var buffers = this._requestBodyBuffers;\n (function writeNext() {\n if (i < buffers.length) {\n var buffer = buffers[i++];\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n else {\n request.end();\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: response.statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n var location = response.headers.location;\n if (location && this._options.followRedirects !== false &&\n response.statusCode >= 300 && response.statusCode < 400) {\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n this.emit(\"error\", new Error(\"Max redirects exceeded.\"));\n return;\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe […],\n // since the user might not wish to redirect an unsafe request.\n // RFC7231§6.4.7: The 307 (Temporary Redirect) status code indicates\n // that the target resource resides temporarily under a different URI\n // and the user agent MUST NOT change the request method\n // if it performs an automatic redirection to that URI.\n var header;\n var headers = this._options.headers;\n if (response.statusCode !== 307 && !(this._options.method in SAFE_METHODS)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n for (header in headers) {\n if (/^content-/i.test(header)) {\n delete headers[header];\n }\n }\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n if (!this._isRedirect) {\n for (header in headers) {\n if (/^host$/i.test(header)) {\n delete headers[header];\n }\n }\n }\n\n // Perform the redirected request\n var redirectUrl = url.resolve(this._currentUrl, location);\n debug(\"redirecting to\", redirectUrl);\n Object.assign(this._options, url.parse(redirectUrl));\n this._isRedirect = true;\n this._performRequest();\n\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n }\n else {\n // The response is not a redirect; return it as-is\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n }\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n wrappedProtocol.request = function (options, callback) {\n if (typeof options === \"string\") {\n options = url.parse(options);\n options.maxRedirects = exports.maxRedirects;\n }\n else {\n options = Object.assign({\n protocol: protocol,\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, options);\n }\n options.nativeProtocols = nativeProtocols;\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n };\n\n // Executes a GET request, following redirects\n wrappedProtocol.get = function (options, callback) {\n var request = wrappedProtocol.request(options, callback);\n request.end();\n return request;\n };\n });\n return exports;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","module.exports = require(\"url\");","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * Active `debug` instances.\n */\nexports.instances = [];\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n var prevTime;\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n debug.destroy = destroy;\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n exports.instances.push(debug);\n\n return debug;\n}\n\nfunction destroy () {\n var index = exports.instances.indexOf(this);\n if (index !== -1) {\n exports.instances.splice(index, 1);\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var i;\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n\n for (i = 0; i < exports.instances.length; i++) {\n var instance = exports.instances[i];\n instance.enabled = exports.enabled(instance.namespace);\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n\n utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n utils.forEach([\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',\n 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',\n 'socketPath'\n ], function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n return config;\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t var block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<<n) | (x>>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));","!function(globals){\n'use strict'\n\n//*** UMD BEGIN\nif (typeof define !== 'undefined' && define.amd) { //require.js / AMD\n define([], function() {\n return secureRandom\n })\n} else if (typeof module !== 'undefined' && module.exports) { //CommonJS\n module.exports = secureRandom\n} else { //script / browser\n globals.secureRandom = secureRandom\n}\n//*** UMD END\n\n//options.type is the only valid option\nfunction secureRandom(count, options) {\n options = options || {type: 'Array'}\n //we check for process.pid to prevent browserify from tricking us\n if (typeof process != 'undefined' && typeof process.pid == 'number') {\n return nodeRandom(count, options)\n } else {\n var crypto = window.crypto || window.msCrypto\n if (!crypto) throw new Error(\"Your browser does not support window.crypto.\")\n return browserRandom(count, options)\n }\n}\n\nfunction nodeRandom(count, options) {\n var crypto = require('crypto')\n var buf = crypto.randomBytes(count)\n\n switch (options.type) {\n case 'Array':\n return [].slice.call(buf)\n case 'Buffer':\n return buf\n case 'Uint8Array':\n var arr = new Uint8Array(count)\n for (var i = 0; i < count; ++i) { arr[i] = buf.readUInt8(i) }\n return arr\n default:\n throw new Error(options.type + \" is unsupported.\")\n }\n}\n\nfunction browserRandom(count, options) {\n var nativeArr = new Uint8Array(count)\n var crypto = window.crypto || window.msCrypto\n crypto.getRandomValues(nativeArr)\n\n switch (options.type) {\n case 'Array':\n return [].slice.call(nativeArr)\n case 'Buffer':\n try { var b = new Buffer(1) } catch(e) { throw new Error('Buffer not supported in this environment. Use Node.js or Browserify for browser support.')}\n return new Buffer(nativeArr)\n case 'Uint8Array':\n return nativeArr\n default:\n throw new Error(options.type + \" is unsupported.\")\n }\n}\n\nsecureRandom.randomArray = function(byteCount) {\n return secureRandom(byteCount, {type: 'Array'})\n}\n\nsecureRandom.randomUint8Array = function(byteCount) {\n return secureRandom(byteCount, {type: 'Uint8Array'})\n}\n\nsecureRandom.randomBuffer = function(byteCount) {\n return secureRandom(byteCount, {type: 'Buffer'})\n}\n\n\n}(this);\n",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS.enc.Latin1;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst neon_api_1 = __importDefault(require(\"@cityofzion/neon-api\"));\nconst neonCore = __importStar(require(\"@cityofzion/neon-core\"));\nconst neon_nep5_1 = __importDefault(require(\"@cityofzion/neon-nep5\"));\nconst neonWithApi = neon_api_1.default(neonCore);\nconst neonJs = neon_nep5_1.default(neonWithApi);\nexports.api = neonJs.api, exports.nep5 = neonJs.nep5, exports.settings = neonJs.settings, exports.sc = neonJs.sc, exports.rpc = neonJs.rpc, exports.wallet = neonJs.wallet, exports.CONST = neonJs.CONST, exports.u = neonJs.u, exports.tx = neonJs.tx, exports.logging = neonJs.logging;\nconst networks_1 = __importDefault(require(\"./networks\"));\nconst bootstrap = networks_1.default;\nObject.keys(bootstrap).map(key => {\n exports.settings.networks[key] = new exports.rpc.Network(bootstrap[key]);\n});\n/**\n * Semantic path for creation of a resource.\n */\nconst create = {\n account: (k) => new exports.wallet.Account(k),\n privateKey: exports.wallet.generatePrivateKey,\n signature: exports.wallet.generateSignature,\n wallet: (k) => new exports.wallet.Wallet(k),\n claimTx: () => new exports.tx.ClaimTransaction(),\n contractTx: () => new exports.tx.ContractTransaction(),\n invocationTx: () => new exports.tx.InvocationTransaction(),\n stateTx: () => new exports.tx.StateTransaction(),\n contractParam: (type, value) => new exports.sc.ContractParam(type, value),\n script: exports.sc.createScript,\n scriptBuilder: () => new exports.sc.ScriptBuilder(),\n deployScript: (args) => exports.sc.generateDeployScript(args),\n rpcClient: (net, version) => new exports.rpc.RPCClient(net, version),\n query: (req) => new exports.rpc.Query(req),\n network: (net) => new exports.rpc.Network(net),\n stringStream: (str) => new exports.u.StringStream(str),\n fixed8: (i) => new exports.u.Fixed8(i)\n};\n/**\n * Semantic path for verification of a type.\n */\nconst is = {\n address: exports.wallet.isAddress,\n publicKey: exports.wallet.isPublicKey,\n encryptedKey: exports.wallet.isNEP2,\n privateKey: exports.wallet.isPrivateKey,\n wif: exports.wallet.isWIF,\n scriptHash: exports.wallet.isScriptHash\n};\n/**\n * Semantic path for deserialization of object.\n */\nconst deserialize = {\n attribute: exports.tx.TransactionAttribute.deserialize,\n input: exports.tx.TransactionInput.deserialize,\n output: exports.tx.TransactionOutput.deserialize,\n script: exports.tx.Witness.deserialize,\n tx: exports.tx.Transaction.deserialize\n};\n/**\n * Semantic path for signing using private key.\n */\nconst sign = {\n hex: exports.wallet.sign,\n message: (msg, privateKey) => {\n const hex = exports.u.str2hexstring(msg);\n return exports.wallet.sign(hex, privateKey);\n }\n};\n/**\n * Semantic path for verifying signatures using public key.\n */\nconst verify = {\n hex: exports.wallet.verify,\n message: (msg, sig, publicKey) => {\n const hex = exports.u.str2hexstring(msg);\n return exports.wallet.verify(hex, sig, publicKey);\n }\n};\nexports.default = {\n sendAsset: exports.api.sendAsset,\n claimGas: exports.api.claimGas,\n doInvoke: exports.api.doInvoke,\n setupVote: exports.api.setupVote,\n create,\n deserialize,\n is,\n sign,\n verify,\n encrypt: {\n privateKey: exports.wallet.encrypt\n },\n decrypt: {\n privateKey: exports.wallet.decrypt\n },\n add: {\n network: (network, override = false) => {\n if (override && exports.settings.networks[network.name]) {\n return false;\n }\n exports.settings.networks[network.name] = network;\n return true;\n }\n },\n remove: {\n network: (name) => {\n if (exports.settings.networks[name]) {\n delete exports.settings.networks[name];\n return true;\n }\n return false;\n }\n },\n u: exports.u,\n CONST: exports.CONST\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n config.method = config.method ? config.method.toLowerCase() : 'get';\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar http = require('http');\nvar https = require('https');\nvar httpFollow = require('follow-redirects').http;\nvar httpsFollow = require('follow-redirects').https;\nvar url = require('url');\nvar zlib = require('zlib');\nvar pkg = require('./../../package.json');\nvar createError = require('../core/createError');\nvar enhanceError = require('../core/enhanceError');\n\nvar isHttps = /https:?/;\n\n/*eslint consistent-return:0*/\nmodule.exports = function httpAdapter(config) {\n return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {\n var timer;\n var resolve = function resolve(value) {\n clearTimeout(timer);\n resolvePromise(value);\n };\n var reject = function reject(value) {\n clearTimeout(timer);\n rejectPromise(value);\n };\n var data = config.data;\n var headers = config.headers;\n\n // Set User-Agent (required by some servers)\n // Only set header if it hasn't been set in config\n // See https://github.com/axios/axios/issues/69\n if (!headers['User-Agent'] && !headers['user-agent']) {\n headers['User-Agent'] = 'axios/' + pkg.version;\n }\n\n if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(createError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers['Content-Length'] = data.length;\n }\n\n // HTTP basic authentication\n var auth = undefined;\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n // Parse url\n var parsed = url.parse(config.url);\n var protocol = parsed.protocol || 'http:';\n\n if (!auth && parsed.auth) {\n var urlAuth = parsed.auth.split(':');\n var urlUsername = urlAuth[0] || '';\n var urlPassword = urlAuth[1] || '';\n auth = urlUsername + ':' + urlPassword;\n }\n\n if (auth) {\n delete headers.Authorization;\n }\n\n var isHttpsRequest = isHttps.test(protocol);\n var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n\n var options = {\n path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\n method: config.method.toUpperCase(),\n headers: headers,\n agent: agent,\n auth: auth\n };\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n }\n\n var proxy = config.proxy;\n if (!proxy && proxy !== false) {\n var proxyEnv = protocol.slice(0, -1) + '_proxy';\n var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];\n if (proxyUrl) {\n var parsedProxyUrl = url.parse(proxyUrl);\n var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;\n var shouldProxy = true;\n\n if (noProxyEnv) {\n var noProxy = noProxyEnv.split(',').map(function trim(s) {\n return s.trim();\n });\n\n shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {\n if (!proxyElement) {\n return false;\n }\n if (proxyElement === '*') {\n return true;\n }\n if (proxyElement[0] === '.' &&\n parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement &&\n proxyElement.match(/\\./g).length === parsed.hostname.match(/\\./g).length) {\n return true;\n }\n\n return parsed.hostname === proxyElement;\n });\n }\n\n\n if (shouldProxy) {\n proxy = {\n host: parsedProxyUrl.hostname,\n port: parsedProxyUrl.port\n };\n\n if (parsedProxyUrl.auth) {\n var proxyUrlAuth = parsedProxyUrl.auth.split(':');\n proxy.auth = {\n username: proxyUrlAuth[0],\n password: proxyUrlAuth[1]\n };\n }\n }\n }\n }\n\n if (proxy) {\n options.hostname = proxy.host;\n options.host = proxy.host;\n options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');\n options.port = proxy.port;\n options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;\n\n // Basic proxy authorization\n if (proxy.auth) {\n var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n }\n\n var transport;\n var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsProxy ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n transport = isHttpsProxy ? httpsFollow : httpFollow;\n }\n\n if (config.maxContentLength && config.maxContentLength > -1) {\n options.maxBodyLength = config.maxContentLength;\n }\n\n // Create the request\n var req = transport.request(options, function handleResponse(res) {\n if (req.aborted) return;\n\n // uncompress the response body transparently if required\n var stream = res;\n switch (res.headers['content-encoding']) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'compress':\n case 'deflate':\n // add the unzipper to the body stream processing pipeline\n stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip());\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n }\n\n // return the last request in case of redirects\n var lastRequest = res.req || req;\n\n var response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: res.headers,\n config: config,\n request: lastRequest\n };\n\n if (config.responseType === 'stream') {\n response.data = stream;\n settle(resolve, reject, response);\n } else {\n var responseBuffer = [];\n stream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {\n stream.destroy();\n reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n config, null, lastRequest));\n }\n });\n\n stream.on('error', function handleStreamError(err) {\n if (req.aborted) return;\n reject(enhanceError(err, config, null, lastRequest));\n });\n\n stream.on('end', function handleStreamEnd() {\n var responseData = Buffer.concat(responseBuffer);\n if (config.responseType !== 'arraybuffer') {\n responseData = responseData.toString(config.responseEncoding);\n }\n\n response.data = responseData;\n settle(resolve, reject, response);\n });\n }\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n if (req.aborted) return;\n reject(enhanceError(err, config, null, req));\n });\n\n // Handle request timeout\n if (config.timeout) {\n timer = setTimeout(function handleRequestTimeout() {\n req.abort();\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req));\n }, config.timeout);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (req.aborted) return;\n\n req.abort();\n reject(cancel);\n });\n }\n\n // Send the request\n if (utils.isStream(data)) {\n data.on('error', function handleStreamError(err) {\n reject(enhanceError(err, config, null, req));\n }).pipe(req);\n } else {\n req.end(data);\n }\n });\n};\n","module.exports = require(\"assert\");","module.exports = require(\"stream\");","/**\n * Detect Electron renderer process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer') {\n module.exports = require('./browser.js');\n} else {\n module.exports = require('./node.js');\n}\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',\n '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',\n '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',\n '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',\n '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',\n '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',\n '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',\n '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',\n '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',\n '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',\n '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","/**\n * Module dependencies.\n */\n\nvar tty = require('tty');\nvar util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\n\n/**\n * Colors.\n */\n\nexports.colors = [ 6, 2, 3, 4, 5, 1 ];\n\ntry {\n var supportsColor = require('supports-color');\n if (supportsColor && supportsColor.level >= 2) {\n exports.colors = [\n 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,\n 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,\n 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,\n 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,\n 205, 206, 207, 208, 209, 214, 215, 220, 221\n ];\n }\n} catch (err) {\n // swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(function (key) {\n return /^debug_/i.test(key);\n}).reduce(function (obj, key) {\n // camel-case\n var prop = key\n .substring(6)\n .toLowerCase()\n .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });\n\n // coerce string value into JS value\n var val = process.env[key];\n if (/^(yes|on|true|enabled)$/i.test(val)) val = true;\n else if (/^(no|off|false|disabled)$/i.test(val)) val = false;\n else if (val === 'null') val = null;\n else val = Number(val);\n\n obj[prop] = val;\n return obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n return 'colors' in exports.inspectOpts\n ? Boolean(exports.inspectOpts.colors)\n : tty.isatty(process.stderr.fd);\n}\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nexports.formatters.o = function(v) {\n this.inspectOpts.colors = this.useColors;\n return util.inspect(v, this.inspectOpts)\n .split('\\n').map(function(str) {\n return str.trim()\n }).join(' ');\n};\n\n/**\n * Map %o to `util.inspect()`, allowing multiple lines if needed.\n */\n\nexports.formatters.O = function(v) {\n this.inspectOpts.colors = this.useColors;\n return util.inspect(v, this.inspectOpts);\n};\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var name = this.namespace;\n var useColors = this.useColors;\n\n if (useColors) {\n var c = this.color;\n var colorCode = '\\u001b[3' + (c < 8 ? c : '8;5;' + c);\n var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\\u001b[0m';\n\n args[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\\u001b[0m');\n } else {\n args[0] = getDate() + name + ' ' + args[0];\n }\n}\n\nfunction getDate() {\n if (exports.inspectOpts.hideDate) {\n return '';\n } else {\n return new Date().toISOString() + ' ';\n }\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log() {\n return process.stderr.write(util.format.apply(util, arguments) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n if (null == namespaces) {\n // If you set a process.env field to null or undefined, it gets cast to the\n // string 'null' or 'undefined'. Just delete instead.\n delete process.env.DEBUG;\n } else {\n process.env.DEBUG = namespaces;\n }\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n return process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init (debug) {\n debug.inspectOpts = {};\n\n var keys = Object.keys(exports.inspectOpts);\n for (var i = 0; i < keys.length; i++) {\n debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n }\n}\n\n/**\n * Enable namespaces listed in `process.env.DEBUG` initially.\n */\n\nexports.enable(load());\n","module.exports = require(\"tty\");","'use strict';\nconst os = require('os');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(stream) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (stream && !stream.isTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Node.js 7.5.0 is the first version of Node.js to include a patch to\n\t\t// libuv that enables 256 color output on Windows. Anything earlier and it\n\t\t// won't work. However, here we target Node.js 8 at minimum as it is an LTS\n\t\t// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows\n\t\t// release that supports 256 colors. Windows 10 build 14931 is the first release\n\t\t// that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(process.versions.node.split('.')[0]) >= 8 &&\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel(process.stdout),\n\tstderr: getSupportLevel(process.stderr)\n};\n","module.exports = require(\"os\");","'use strict';\nmodule.exports = (flag, argv) => {\n\targv = argv || process.argv;\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst pos = argv.indexOf(prefix + flag);\n\tconst terminatorPos = argv.indexOf('--');\n\treturn pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n","module.exports = require(\"zlib\");","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n\nconst Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function base (ALPHABET) {\n if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')\n\n const BASE_MAP = new Uint8Array(256)\n BASE_MAP.fill(255)\n\n for (let i = 0; i < ALPHABET.length; i++) {\n const x = ALPHABET.charAt(i)\n const xc = x.charCodeAt(0)\n\n if (BASE_MAP[xc] !== 255) throw new TypeError(x + ' is ambiguous')\n BASE_MAP[xc] = i\n }\n\n const BASE = ALPHABET.length\n const LEADER = ALPHABET.charAt(0)\n const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n\n function encode (source) {\n if (!Buffer.isBuffer(source)) throw new TypeError('Expected Buffer')\n if (source.length === 0) return ''\n\n // Skip & count leading zeroes.\n let zeroes = 0\n let length = 0\n let pbegin = 0\n const pend = source.length\n\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n\n // Allocate enough space in big-endian base58 representation.\n const size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n const b58 = new Uint8Array(size)\n\n // Process the bytes.\n while (pbegin !== pend) {\n let carry = source[pbegin]\n\n // Apply \"b58 = b58 * 256 + ch\".\n let i = 0\n for (let it = size - 1; (carry !== 0 || i < length) && (it !== -1); it--, i++) {\n carry += (256 * b58[it]) >>> 0\n b58[it] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n\n if (carry !== 0) throw new Error('Non-zero carry')\n length = i\n pbegin++\n }\n\n // Skip leading zeroes in base58 result.\n let it = size - length\n while (it !== size && b58[it] === 0) {\n it++\n }\n\n // Translate the result into a string.\n let str = LEADER.repeat(zeroes)\n for (; it < size; ++it) str += ALPHABET.charAt(b58[it])\n\n return str\n }\n\n function decodeUnsafe (source) {\n if (typeof source !== 'string') throw new TypeError('Expected String')\n if (source.length === 0) return Buffer.alloc(0)\n\n let psz = 0\n\n // Skip leading spaces.\n if (source[psz] === ' ') return\n\n // Skip and count leading '1's.\n let zeroes = 0\n let length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n\n // Allocate enough space in big-endian base256 representation.\n const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n const b256 = new Uint8Array(size)\n\n // Process the characters.\n while (source[psz]) {\n // Decode character\n let carry = BASE_MAP[source.charCodeAt(psz)]\n\n // Invalid character\n if (carry === 255) return\n\n let i = 0\n for (let it = size - 1; (carry !== 0 || i < length) && (it !== -1); it--, i++) {\n carry += (BASE * b256[it]) >>> 0\n b256[it] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n\n if (carry !== 0) throw new Error('Non-zero carry')\n length = i\n psz++\n }\n\n // Skip trailing spaces.\n if (source[psz] === ' ') return\n\n // Skip leading zeroes in b256.\n let it = size - length\n while (it !== size && b256[it] === 0) {\n it++\n }\n\n const vch = Buffer.allocUnsafe(zeroes + (size - it))\n vch.fill(0x00, 0, zeroes)\n\n let j = zeroes\n while (it !== size) {\n vch[j++] = b256[it++]\n }\n\n return vch\n }\n\n function decode (string) {\n const buffer = decodeUnsafe(string)\n if (buffer) return buffer\n\n throw new Error('Non-base' + BASE + ' character')\n }\n\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\n","module.exports = require('crypto').createHash\n","'use strict'\n\nvar base58 = require('bs58')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (checksumFn) {\n // Encode a buffer as a base58-check encoded string\n function encode (payload) {\n var checksum = checksumFn(payload)\n\n return base58.encode(Buffer.concat([\n payload,\n checksum\n ], payload.length + 4))\n }\n\n function decodeRaw (buffer) {\n var payload = buffer.slice(0, -4)\n var checksum = buffer.slice(-4)\n var newChecksum = checksumFn(payload)\n\n if (checksum[0] ^ newChecksum[0] |\n checksum[1] ^ newChecksum[1] |\n checksum[2] ^ newChecksum[2] |\n checksum[3] ^ newChecksum[3]) return\n\n return payload\n }\n\n // Decode a base58-check encoded string to a buffer, no result if checksum is wrong\n function decodeUnsafe (string) {\n var buffer = base58.decodeUnsafe(string)\n if (!buffer) return\n\n return decodeRaw(buffer)\n }\n\n function decode (string) {\n var buffer = base58.decode(string)\n var payload = decodeRaw(buffer, checksumFn)\n if (!payload) throw new Error('Invalid checksum')\n return payload\n }\n\n return {\n encode: encode,\n decode: decode,\n decodeUnsafe: decodeUnsafe\n }\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w) {\n var naf = [];\n var ws = 1 << (w + 1);\n var k = num.clone();\n while (k.cmpn(1) >= 0) {\n var z;\n if (k.isOdd()) {\n var mod = k.andln(ws - 1);\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n naf.push(z);\n\n // Optimization, shift by word if possible\n var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;\n for (var i = 1; i < shift; i++)\n naf.push(0);\n k.iushrn(shift);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n []\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n var m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n var m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","'use strict';\n\nvar BN = require('bn.js');\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n for (var j = 0; j < naf.length; j += doubles.step) {\n var nafW = 0;\n for (var k = j + doubles.step - 1; k >= j; k--)\n nafW = (nafW << 1) + naf[k];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (var j = 0; j < repr.length; j++) {\n var nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var k = 0; i >= 0 && naf[i] === 0; i--)\n k++;\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n for (var i = 0; i < len; i++) {\n var p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (var i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a]);\n naf[b] = getNAF(coeffs[b], wndWidth[b]);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b] /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3 /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (var j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (var i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (var j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (var j = 0; j < len; j++) {\n var z = tmp[j];\n var p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (var i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar curve = require('../curve');\nvar elliptic = require('../../elliptic');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = curve.base;\n\nvar assert = elliptic.utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16)\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 }\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n};\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul)\n }\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1)\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1)\n }\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point))\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point))\n }\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '<EC Point Infinity>';\n return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +\n ' y: ' + this.y.fromRed().toString(16, 2) + '>';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate)\n }\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (var i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (var i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '<EC JPoint Infinity>';\n return '<EC JPoint x: ' + this.x.toString(16, 2) +\n ' y: ' + this.y.toString(16, 2) +\n ' z: ' + this.z.toString(16, 2) + '>';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","'use strict';\n\nvar curve = require('../curve');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = curve.base;\n\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '<EC Point Infinity>';\n return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +\n ' z: ' + this.z.fromRed().toString(16, 2) + '>';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n","'use strict';\n\nvar curve = require('../curve');\nvar elliptic = require('../../elliptic');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = curve.base;\n\nvar assert = elliptic.utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '<EC Point Infinity>';\n return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +\n ' y: ' + this.y.fromRed().toString(16, 2) +\n ' z: ' + this.z.fromRed().toString(16, 2) + '>';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n if (this.curve.twisted) {\n // E = a * C\n var e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n var h = this.z.redSqr();\n // J = F - 2 * H\n var j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n var e = c.redAdd(d);\n // H = (c * Z1)^2\n var h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n var j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar elliptic = require('../elliptic');\n\nvar assert = elliptic.utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new elliptic.curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new elliptic.curve.edwards(options);\n else\n this.curve = new elliptic.curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve\n });\n return curve;\n }\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'\n ]\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'\n ]\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'\n ]\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'\n ]\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650'\n ]\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9'\n ]\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658'\n ]\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3'\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15'\n }\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre\n ]\n});\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82'\n ]\n ]\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9'\n ]\n ]\n }\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options);\n\n options = elliptic.curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof elliptic.curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || elliptic.rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray()\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n do {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n } while (true);\n};\n\nEC.prototype._truncateToN = function truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8'\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; true; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n\n if (!this.curve._maxwellTrick) {\n var p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n var p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +\n ' pub: ' + (this.pub && this.pub.inspect()) + ' >';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n }\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0 && (r[1] & 0x80)) {\n r = r.slice(1);\n }\n if (s[0] === 0 && (s[1] & 0x80)) {\n s = s.slice(1);\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar hash = require('hash.js');\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n var curve = elliptic.curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n","'use strict';\n\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array<Byte>} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array<Byte>} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n","'use strict';\n\nvar BN = require('bn.js');\nvar elliptic = require('../../elliptic');\nvar utils = elliptic.utils;\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array<Bytes>|Object} sig -\n* @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes\n* @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array<Bytes>} [sig.Rencoded] - R point encoded\n* @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength)\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working varialbes\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n MainNet: {\n Name: \"MainNet\",\n ProtocolConfiguration: {\n Magic: 7630401,\n AddressVersion: 23,\n StandbyValidators: [\n \"03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c\",\n \"02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093\",\n \"03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a\",\n \"02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554\",\n \"024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d\",\n \"02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e\",\n \"02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70\"\n ],\n SeedList: [\n \"seed1.neo.org:10333\",\n \"seed2.neo.org:10333\",\n \"seed3.neo.org:10333\",\n \"seed4.neo.org:10333\",\n \"seed5.neo.org:10333\"\n ],\n SystemFee: {\n EnrollmentTransaction: 1000,\n IssueTransaction: 500,\n PublishTransaction: 500,\n RegisterTransaction: 10000\n }\n },\n ExtraConfiguration: {\n neonDB: \"http://api.wallet.cityofzion.io\",\n neoscan: \"https://api.neoscan.io/api/main_net\"\n }\n },\n TestNet: {\n Name: \"TestNet\",\n ProtocolConfiguration: {\n Magic: 1953787457,\n AddressVersion: 23,\n StandbyValidators: [\n \"0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8\",\n \"026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22\",\n \"0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9\",\n \"039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9\",\n \"038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579\",\n \"02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22\",\n \"034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b\"\n ],\n SeedList: [\n \"seed1.neo.org:20333\",\n \"seed2.neo.org:20333\",\n \"seed3.neo.org:20333\",\n \"seed4.neo.org:20333\",\n \"seed5.neo.org:20333\"\n ],\n SystemFee: {\n EnrollmentTransaction: 10,\n IssueTransaction: 5,\n PublishTransaction: 5,\n RegisterTransaction: 100\n }\n },\n ExtraConfiguration: {\n neonDB: \"http://testnet-api.wallet.cityofzion.io\",\n neoscan: \"https://neoscan-testnet.io/api/test_net\"\n }\n },\n CozNet: {\n Name: \"CozNet\",\n ProtocolConfiguration: {\n Magic: 1010102,\n AddressVersion: 23,\n StandbyValidators: [\n \"032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee\",\n \"022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df\",\n \"03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea\",\n \"0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244\"\n ],\n SeedList: [\n \"188.68.34.29:10330\",\n \"188.68.34.29:10332\",\n \"188.68.34.29:10334\",\n \"188.68.34.29:10336\"\n ],\n SystemFee: {\n EnrollmentTransaction: 1000,\n IssueTransaction: 500,\n PublishTransaction: 500,\n RegisterTransaction: 10000\n }\n },\n ExtraConfiguration: {\n neoscan: \"https://coz.neoscan-testnet.io/api/main_net\"\n }\n }\n};\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { CONST, logging, u, wallet } from \"@cityofzion/neon-core\";\nimport axios from \"axios\";\nconst log = logging.default(\"api\");\nconst BASE_REQ = CONST.DEFAULT_REQ;\nfunction throwRpcError(err) {\n throw new Error(`Encounter error code ${err.code}: ${err.message}`);\n}\nexport function getRPCEndpoint(url) {\n return url;\n}\nfunction convertNeoCliTx(tx) {\n return { index: tx.n, txid: tx.txid, value: tx.value };\n}\nfunction convertNeoCliClaimable(c) {\n return {\n claim: c.unclaimed,\n txid: c.txid,\n index: c.n,\n value: c.value,\n start: c.start_height,\n end: c.end_height\n };\n}\n/**\n * Get balances of NEO and GAS for an address\n * @param url - URL of a neonDB service.\n * @param address - Address to check.\n * @return Balance of address\n */\nexport function getBalance(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.post(url, Object.assign({}, BASE_REQ, { method: \"getunspents\", params: [address] }));\n const data = response.data;\n if (data.error) {\n throwRpcError(data.error);\n }\n const bal = new wallet.Balance({\n net: url,\n address: data.result.address\n });\n for (const assetBalance of data.result.balance) {\n if (assetBalance.amount === 0) {\n continue;\n }\n if (assetBalance.unspent.length > 0) {\n bal.addAsset(assetBalance.asset_symbol, {\n unspent: assetBalance.unspent.map(convertNeoCliTx)\n });\n }\n else {\n bal.addToken(assetBalance.asset_symbol, assetBalance.amount);\n }\n }\n log.info(`Retrieved Balance for ${address} from neonDB ${url}`);\n return bal;\n });\n}\nexport function getClaims(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.post(url, Object.assign({}, BASE_REQ, { method: \"getclaimable\", params: [address] }));\n const data = response.data;\n if (data.error) {\n throwRpcError(data.error);\n }\n return new wallet.Claims({\n net: url,\n address: data.result.address,\n claims: data.result.claimable.map(convertNeoCliClaimable)\n });\n });\n}\nexport function getMaxClaimAmount(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.post(url, Object.assign({}, BASE_REQ, { method: \"getunclaimed\", params: [address] }));\n const data = response.data;\n if (data.error) {\n throwRpcError(data.error);\n }\n return new u.Fixed8(data.result.unclaimed).div(100000000);\n });\n}\n//# sourceMappingURL=core.js.map","import { logging, rpc } from \"@cityofzion/neon-core\";\nimport { getBalance, getClaims, getMaxClaimAmount } from \"./core\";\nconst log = logging.default(\"api\");\nexport class NeoCli {\n get name() {\n return `NeoCli[${this.url}]`;\n }\n constructor(url) {\n this.url = url;\n this.rpc = new rpc.RPCClient(url);\n log.info(`Created NeoCli Provider: ${this.url}`);\n }\n getRPCEndpoint(noCache) {\n return Promise.resolve(this.url);\n }\n getBalance(address) {\n return getBalance(this.url, address);\n }\n getClaims(address) {\n return getClaims(this.url, address);\n }\n getMaxClaimAmount(address) {\n return getMaxClaimAmount(this.url, address);\n }\n getHeight() {\n return this.rpc.getBlockCount();\n }\n getTransactionHistory(address) {\n throw new Error(\"Method not implemented.\");\n }\n}\nexport default NeoCli;\n//# sourceMappingURL=class.js.map","export { default as instance } from \"./class\";\nexport * from \"./core\";\n//# sourceMappingURL=index.js.map","export const settings = {\n httpsOnly: false\n};\nexport function set(newSettings) {\n Object.keys(settings).forEach(key => {\n if (newSettings.hasOwnProperty(key)) {\n settings[key] = !!newSettings[key];\n }\n });\n}\nexport default settings;\n//# sourceMappingURL=settings.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { rpc } from \"@cityofzion/neon-core\";\nexport function filterHttpsOnly(nodes) {\n return nodes.filter(n => n.url.includes(\"https://\"));\n}\nexport function raceToSuccess(promises) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const errors = yield Promise.all(promises.map(p => p.then(val => Promise.reject(val), err => err)));\n return yield Promise.reject(errors);\n }\n catch (success) {\n return success;\n }\n });\n}\nexport function getBestUrl(rpcs) {\n return __awaiter(this, void 0, void 0, function* () {\n const clients = rpcs.map(r => new rpc.RPCClient(r.url));\n return yield raceToSuccess(clients.map(c => c.ping().then(_ => c.net)));\n });\n}\nexport function findGoodNodesFromHeight(nodes, tolerance = 1) {\n if (nodes.length === 0) {\n throw new Error(\"No eligible nodes found!\");\n }\n const sortedNodes = nodes.slice().sort((n1, n2) => n2.height - n1.height);\n const bestHeight = sortedNodes[0].height;\n const threshold = bestHeight - tolerance;\n return sortedNodes.filter(n => n.height >= threshold);\n}\n//# sourceMappingURL=common.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { logging, u, wallet } from \"@cityofzion/neon-core\";\nimport axios from \"axios\";\nimport { settings as internalSettings } from \"../../settings\";\nimport { filterHttpsOnly, findGoodNodesFromHeight, getBestUrl } from \"../common\";\nconst log = logging.default(\"api\");\n/**\n * Returns an appropriate RPC endpoint retrieved from a neonDB endpoint.\n * @param url - URL of a neonDB service.\n * @returns URL of a good RPC endpoint.\n */\nexport function getRPCEndpoint(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/network/nodes\");\n const data = response.data.nodes;\n let nodes = data\n .filter(d => d.status)\n .map(d => ({ height: d.block_height, url: d.url }));\n if (internalSettings.httpsOnly) {\n nodes = filterHttpsOnly(nodes);\n }\n const goodNodes = findGoodNodesFromHeight(nodes);\n const bestRPC = yield getBestUrl(goodNodes);\n return bestRPC;\n });\n}\n/**\n * Get balances of NEO and GAS for an address\n * @param url - URL of a neonDB service.\n * @param address - Address to check.\n * @return Balance of address\n */\nexport function getBalance(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/address/balance/\" + address);\n const data = response.data;\n const bal = new wallet.Balance({ net: url, address });\n if (data.NEO.balance > 0) {\n bal.addAsset(\"NEO\", data.NEO);\n }\n if (data.GAS.balance > 0) {\n bal.addAsset(\"GAS\", data.GAS);\n }\n log.info(`Retrieved Balance for ${address} from neonDB ${url}`);\n return bal;\n });\n}\n/**\n * Get amounts of available (spent) and unavailable claims.\n * @param url - URL of a neonDB service.\n * @param address - Address to check.\n * @return An object with available and unavailable GAS amounts.\n */\nexport function getClaims(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/address/claims/\" + address);\n const data = response.data;\n const claims = data.claims.map(c => {\n return {\n claim: new u.Fixed8(c.claim || 0).div(100000000),\n index: c.index,\n txid: c.txid,\n start: c.start || 0,\n end: c.end || 0,\n value: c.value\n };\n });\n log.info(`Retrieved Claims for ${address} from neonDB ${url}`);\n return new wallet.Claims({\n net: url,\n address,\n claims\n });\n });\n}\n/**\n * Gets the maximum amount of gas claimable after spending all NEO.\n * @param url - URL of a neonDB service.\n * @param address - Address to check.\n * @return An object with available and unavailable GAS amounts.\n */\nexport function getMaxClaimAmount(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/address/claims/\" + address);\n const data = response.data;\n log.info(`Retrieved maximum amount of gas claimable after spending all NEO for ${address} from neonDB ${url}`);\n return new u.Fixed8(data.total_claim + data.total_unspent_claim).div(100000000);\n });\n}\n/**\n * Get transaction history for an account\n * @param url - URL of a neonDB service.\n * @param address - Address to check.\n * @return a list of PastTransaction\n */\nexport function getTransactionHistory(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/address/history/\" + address);\n const data = response.data;\n log.info(`Retrieved History for ${address} from neonDB ${url}`);\n return data.history.map(rawTx => {\n return {\n change: {\n NEO: new u.Fixed8(rawTx.NEO || 0),\n GAS: new u.Fixed8(rawTx.GAS || 0)\n },\n blockHeight: rawTx.block_index,\n txid: rawTx.txid\n };\n });\n });\n}\n/**\n * Get the current height of the light wallet DB\n * @param url - URL of a neonDB service.\n * @return Current height.\n */\nexport function getHeight(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v2/block/height\");\n return parseInt(response.data.block_height, 10);\n });\n}\n//# sourceMappingURL=core.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { logging, rpc, settings } from \"@cityofzion/neon-core\";\nimport { getBalance, getClaims, getHeight, getMaxClaimAmount, getRPCEndpoint, getTransactionHistory } from \"./core\";\nconst log = logging.default(\"api\");\nexport class NeonDB {\n constructor(url) {\n this.rpc = null;\n this.cacheExpiry = null;\n if (settings.networks[url] && settings.networks[url].extra.neonDB) {\n this.url = settings.networks[url].extra.neonDB;\n }\n else {\n this.url = url;\n }\n log.info(`Created NeonDB Provider: ${this.url}`);\n }\n get name() {\n return `NeonDB[${this.url}]`;\n }\n getRPCEndpoint(noCache = false) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!noCache &&\n this.rpc &&\n this.cacheExpiry &&\n this.cacheExpiry < new Date()) {\n const ping = yield this.rpc.ping();\n if (ping <= 1000) {\n return this.rpc.net;\n }\n }\n const rpcAddress = yield getRPCEndpoint(this.url);\n this.rpc = new rpc.RPCClient(rpcAddress);\n this.cacheExpiry = new Date(new Date().getTime() + 5 * 60000);\n return this.rpc.net;\n });\n }\n getBalance(address) {\n return getBalance(this.url, address);\n }\n getClaims(address) {\n return getClaims(this.url, address);\n }\n getMaxClaimAmount(address) {\n return getMaxClaimAmount(this.url, address);\n }\n getHeight() {\n return getHeight(this.url);\n }\n getTransactionHistory(address) {\n return getTransactionHistory(this.url, address);\n }\n}\nexport default NeonDB;\n//# sourceMappingURL=class.js.map","export { default as instance } from \"./class\";\nexport * from \"./core\";\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { CONST, logging, u, wallet } from \"@cityofzion/neon-core\";\nimport * as internal from \"../../settings\";\nimport axios from \"axios\";\nimport { filterHttpsOnly, findGoodNodesFromHeight, getBestUrl } from \"../common\";\nconst log = logging.default(\"api\");\nfunction parseUnspent(unspentArr) {\n return unspentArr.map(coin => {\n return {\n index: coin.n,\n txid: coin.txid,\n value: coin.value\n };\n });\n}\nfunction parseClaims(claimArr) {\n return claimArr.map(c => {\n return {\n start: c.start_height,\n end: c.end_height,\n index: c.n,\n claim: c.unclaimed,\n txid: c.txid,\n value: c.value\n };\n });\n}\nfunction getChange(vin, vout, assetId) {\n const totalOut = vin\n .filter(i => i.asset === assetId)\n .reduce((p, c) => p.add(c.value), new u.Fixed8(0));\n const totalIn = vout\n .filter(i => i.asset === assetId)\n .reduce((p, c) => p.add(c.value), new u.Fixed8(0));\n return totalIn.minus(totalOut);\n}\nfunction parseTxHistory(rawTxs, address) {\n return rawTxs.map(tx => {\n const vin = tx.vin\n .filter(i => i.address_hash === address)\n .map(i => ({ asset: i.asset, value: i.value }));\n const vout = tx.vouts\n .filter(o => o.address_hash === address)\n .map(i => ({ asset: i.asset, value: i.value }));\n const change = {\n NEO: getChange(vin, vout, CONST.ASSET_ID.NEO),\n GAS: getChange(vin, vout, CONST.ASSET_ID.GAS)\n };\n return {\n txid: tx.txid,\n blockHeight: tx.block_height,\n change\n };\n });\n}\n/**\n * Returns an appropriate RPC endpoint retrieved from a NeoScan endpoint.\n * @param url - URL of a neoscan service.\n * @returns URL of a good RPC endpoint.\n */\nexport function getRPCEndpoint(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_all_nodes\");\n let nodes = response.data;\n if (internal.settings.httpsOnly) {\n nodes = filterHttpsOnly(nodes);\n }\n const goodNodes = findGoodNodesFromHeight(nodes);\n const bestRPC = yield getBestUrl(goodNodes);\n return bestRPC;\n });\n}\n/**\n * Gets balance for an address. Returns an empty Balance if endpoint returns not found.\n * @param url - URL of a neoscan service.\n * @param address Address to check.\n * @return Balance of address retrieved from endpoint.\n */\nexport function getBalance(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_balance/\" + address);\n const data = response.data;\n if (data.address === \"not found\" && data.balance === null) {\n return new wallet.Balance({ net: url, address });\n }\n const bal = new wallet.Balance({\n net: url,\n address: data.address\n });\n const neoscanBalances = data.balance;\n for (const b of neoscanBalances) {\n if (b.amount > 0 && b.unspent.length > 0) {\n bal.addAsset(b.asset, {\n unspent: parseUnspent(b.unspent)\n });\n }\n else {\n bal.addToken(b.asset, b.amount);\n }\n }\n log.info(`Retrieved Balance for ${address} from neoscan ${url}`);\n return bal;\n });\n}\n/**\n * Get claimable amounts for an address. Returns an empty Claims if endpoint returns not found.\n * @param url - URL of a neoscan service.\n * @param address - Address to check.\n * @return Claims retrieved from endpoint.\n */\nexport function getClaims(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_claimable/\" + address);\n const data = response.data;\n if (data.address === \"not found\" && data.claimable === null) {\n return new wallet.Claims({ address: data.address });\n }\n const claims = parseClaims(data.claimable);\n log.info(`Retrieved Claims for ${address} from neoscan ${url}`);\n return new wallet.Claims({\n net: url,\n address: data.address,\n claims\n });\n });\n}\n/**\n * Gets the maximum amount of gas claimable after spending all NEO.\n * @param url - URL of a neoscan service.\n * @param address Address to check.\n * @return\n */\nexport function getMaxClaimAmount(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_unclaimed/\" + address);\n const data = response.data;\n log.info(`Retrieved maximum amount of gas claimable after spending all NEO for ${address} from neoscan ${url}`);\n return new u.Fixed8(data.unclaimed || 0);\n });\n}\n/**\n * Get the current height of the light wallet DB\n * @param url - URL of a neoscan service.\n * @return Current height as reported by provider\n */\nexport function getHeight(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_height\");\n const data = response.data;\n return data.height;\n });\n}\n/**\n * Get transaction history for an account\n * @param {string} net - 'MainNet' or 'TestNet'.\n * @param {string} address - Address to check.\n * @return {Promise<PastTransaction[]>} A listof PastTransactionPastTransaction[]\n */\nexport function getTransactionHistory(url, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield axios.get(url + \"/v1/get_last_transactions_by_address/\" + address);\n const data = response.data;\n log.info(`Retrieved History for ${address} from neoscan ${url}`);\n return parseTxHistory(response.data, address);\n });\n}\n//# sourceMappingURL=core.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { logging, rpc, settings } from \"@cityofzion/neon-core\";\nimport { getBalance, getClaims, getHeight, getMaxClaimAmount, getRPCEndpoint, getTransactionHistory } from \"./core\";\nconst log = logging.default(\"api\");\nexport class Neoscan {\n constructor(url) {\n this.rpc = null;\n this.cacheExpiry = null;\n if (settings.networks[url] && settings.networks[url].extra.neoscan) {\n this.url = settings.networks[url].extra.neoscan;\n }\n else {\n this.url = url;\n }\n log.info(`Created Neoscan Provider: ${this.url}`);\n }\n get name() {\n return `Neoscan[${this.url}]`;\n }\n getRPCEndpoint() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.rpc && this.cacheExpiry && this.cacheExpiry < new Date()) {\n const ping = yield this.rpc.ping();\n if (ping <= 1000) {\n return this.rpc.net;\n }\n }\n const rpcAddress = yield getRPCEndpoint(this.url);\n this.rpc = new rpc.RPCClient(rpcAddress);\n this.cacheExpiry = new Date(new Date().getTime() + 5 * 60000);\n return this.rpc.net;\n });\n }\n getBalance(address) {\n return getBalance(this.url, address);\n }\n getClaims(address) {\n return getClaims(this.url, address);\n }\n getMaxClaimAmount(address) {\n return getMaxClaimAmount(this.url, address);\n }\n getHeight() {\n return getHeight(this.url);\n }\n getTransactionHistory(address) {\n return getTransactionHistory(this.url, address);\n }\n}\nexport default Neoscan;\n//# sourceMappingURL=class.js.map","export { default as instance } from \"./class\";\nexport * from \"./core\";\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { rpc, tx, u, wallet } from \"@cityofzion/neon-core\";\n/**\n * Check that properties are defined in obj.\n * @param obj - Object to check.\n * @param props - List of properties to check.\n */\nexport function checkProperty(obj, ...props) {\n for (const prop of props) {\n if (!obj.hasOwnProperty(prop) ||\n obj[prop] === null ||\n obj[prop] === undefined) {\n throw new ReferenceError(`Property not found: ${prop}`);\n }\n }\n}\n/**\n * Adds the necessary attributes for validating an empty transaction.\n * @param config\n * @return\n */\nexport function modifyTransactionForEmptyTransaction(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (config.tx.inputs.length === 0 && config.tx.outputs.length === 0) {\n config.tx.addAttribute(tx.TxAttrUsage.Script, u.reverseHex(wallet.getScriptHashFromAddress(config.account.address)));\n // This adds some random bits to the transaction to prevent any hash collision.\n config.tx.addRemark(Date.now().toString() + u.ab2hexstring(u.generateRandomArray(4)));\n }\n return config;\n });\n}\nconst sensitiveFields = [\"privateKey\"];\n/**\n * Extracts fields for logging purposes. Removes any sensitive fields.\n * @param config Configuration object\n * @return object safe for logging\n */\nexport function extractDump(config) {\n const dump = Object.assign({}, config);\n for (const key of Object.keys(config)) {\n if (sensitiveFields.indexOf(key) >= 0) {\n delete dump[key];\n }\n }\n return dump;\n}\n/**\n * Returns a signature that can trigger verification for smart contract.\n * Must be combined with a Script attribute for full effect.\n * This signature requires some ordering within the array.\n * @param url RPC url\n * @param smartContractScriptHash The scripthash of the smart contract that you want to trigger verification for.\n * @return A signature object that can be attached to a Transaction.\n */\nexport function getVerificationSignatureForSmartContract(url, smartContractScriptHash) {\n return __awaiter(this, void 0, void 0, function* () {\n const contractState = yield rpc.Query.getContractState(smartContractScriptHash).execute(url);\n const { parameters } = contractState.result;\n const witness = new tx.Witness({\n invocationScript: \"00\".repeat(parameters.length),\n verificationScript: \"\"\n });\n witness.scriptHash = smartContractScriptHash;\n return witness;\n });\n}\n//# sourceMappingURL=common.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { sc, tx, u, wallet } from \"@cityofzion/neon-core\";\nimport { checkProperty } from \"./common\";\nexport function createClaimTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n checkProperty(config, \"claims\");\n config.tx = new tx.ClaimTransaction(config.override);\n config.tx.addClaims(config.claims);\n return config;\n });\n}\nexport function createContractTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n checkProperty(config, \"balance\", \"intents\");\n config.tx = new tx.ContractTransaction(Object.assign({ outputs: config.intents }, config.override));\n config.tx.calculate(config.balance, undefined, config.fees);\n return config;\n });\n}\nexport function createInvocationTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n checkProperty(config, \"script\");\n const processedScript = typeof config.script === \"object\"\n ? sc.createScript(config.script)\n : config.script;\n config.tx = new tx.InvocationTransaction(Object.assign({\n outputs: config.intents || [],\n script: processedScript,\n gas: config.gas || 0\n }, config.override));\n config.tx.calculate(config.balance || new wallet.Balance(), undefined, config.fees);\n return config;\n });\n}\nexport function createStateTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n const descriptors = [\n new tx.StateDescriptor({\n type: tx.StateType.Account,\n key: u.reverseHex(config.account.scriptHash),\n field: \"Votes\",\n value: u.int2hex(config.candidateKeys.length) + config.candidateKeys.join(\"\")\n })\n ];\n config.tx = new tx.StateTransaction({ descriptors });\n return config;\n });\n}\n//# sourceMappingURL=create.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { tx, wallet } from \"@cityofzion/neon-core\";\nimport { checkProperty } from \"./common\";\nfunction addSignature(transaction, signature) {\n transaction.scripts.push(tx.Witness.deserialize(signature));\n}\n/**\n * Signs a transaction within the config object.\n * @param config - Configuration object.\n * @return Configuration object.\n */\nexport function signTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n checkProperty(config, \"signingFunction\", \"tx\");\n const signatures = yield config.signingFunction(config.tx.serialize(false), config.account.publicKey);\n if (signatures instanceof Array) {\n signatures.forEach(sig => {\n addSignature(config.tx, sig);\n });\n }\n else {\n addSignature(config.tx, signatures);\n }\n return config;\n });\n}\nexport function signWithPrivateKey(privateKey) {\n const pubKey = new wallet.Account(privateKey).publicKey;\n return (txString, publicKey) => __awaiter(this, void 0, void 0, function* () {\n const sig = wallet.sign(txString, privateKey);\n const witness = tx.Witness.fromSignature(sig, publicKey || pubKey);\n return witness.serialize();\n });\n}\n//# sourceMappingURL=sign.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { wallet } from \"@cityofzion/neon-core\";\nimport { signWithPrivateKey } from \"./sign\";\n/**\n * Retrieves RPC endpoint URL of best available node\n * @param config\n * @return Configuration object with url field.\n */\nexport function fillUrl(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (config.url) {\n return config;\n }\n config.url = yield config.api.getRPCEndpoint();\n return config;\n });\n}\n/**\n * Retrieves Balance if no balance has been attached\n * @param config\n * @return Configuration object.\n */\nexport function fillBalance(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!(config.balance instanceof wallet.Balance)) {\n config.balance = yield config.api.getBalance(config.account.address);\n }\n return config;\n });\n}\n/**\n * Fills the signingFunction if no signingFunction provided.\n * The signingFunction filled is a privateKey signing function using the private key from the account field.\n * Throws an error if unable to find signingFunction and account.\n * @param config\n * @return Configuration object.\n */\nexport function fillSigningFunction(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!config.signingFunction) {\n if (config.account) {\n config.signingFunction = signWithPrivateKey(config.account.privateKey);\n }\n else {\n throw new Error(\"No account found!\");\n }\n }\n return config;\n });\n}\n/**\n * Retrieves Claims if no claims has been attached.\n * @param config\n * @return Configuration object.\n */\nexport function fillClaims(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!(config.claims instanceof wallet.Claims)) {\n config.claims = yield config.api.getClaims(config.account.address);\n }\n if (!config.claims.claims || config.claims.claims.length === 0) {\n throw new Error(`No Claims found`);\n }\n return config;\n });\n}\n//# sourceMappingURL=fill.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { tx, u } from \"@cityofzion/neon-core\";\nimport { getVerificationSignatureForSmartContract } from \"./common\";\n/**\n * Adds attributes to the override object for mintTokens invocations.\n * @param {object} config - Configuration object.\n * @return {Promise<object>} Configuration object.\n */\nexport function addAttributeForMintToken(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof config.script === \"object\" &&\n config.script.operation === \"mintTokens\" &&\n config.script.scriptHash) {\n config.tx.addAttribute(tx.TxAttrUsage.Script, u.reverseHex(config.script.scriptHash));\n }\n return config;\n });\n}\n/**\n * Adds the contractState to mintTokens invocations.\n * @param {object} config - Configuration object.\n * @return {Promise<object>} Configuration object.\n */\nexport function addSignatureForMintToken(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof config.script === \"object\" &&\n config.script.operation === \"mintTokens\" &&\n config.script.scriptHash) {\n const witness = yield getVerificationSignatureForSmartContract(config.url, config.script.scriptHash);\n config.tx.addWitness(witness);\n }\n return config;\n });\n}\n//# sourceMappingURL=mint.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { logging, rpc } from \"@cityofzion/neon-core\";\nimport { checkProperty } from \"./common\";\nconst log = logging.default(\"api\");\n/**\n * Sends a transaction off within the config object.\n * @param {object} config - Configuration object.\n * @return {Promise<object>} Configuration object + response\n */\nexport function sendTx(config) {\n return __awaiter(this, void 0, void 0, function* () {\n checkProperty(config, \"tx\", \"url\");\n const response = yield rpc.Query.sendRawTransaction(config.tx).execute(config.url);\n if (response.result === true) {\n response.txid = config.tx.hash;\n }\n else {\n log.error(`Transaction failed for ${config.account.address}: ${config.tx.serialize()}`);\n }\n return Object.assign(config, { response });\n });\n}\nexport function applyTxToBalance(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (config.response && config.response.result && config.balance) {\n config.balance.applyTx(config.tx, false);\n }\n return config;\n });\n}\n//# sourceMappingURL=send.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { tx, u } from \"@cityofzion/neon-core\";\nimport { getVerificationSignatureForSmartContract } from \"./common\";\n/**\n * Adds attributes to the override object for mintTokens invocations.\n * @param config - Configuration object.\n * @return Configuration object.\n */\nexport function addAttributeIfExecutingAsSmartContract(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!config.sendingFromSmartContract) {\n return config;\n }\n config.tx.addAttribute(tx.TxAttrUsage.Script, u.reverseHex(config.sendingFromSmartContract));\n return config;\n });\n}\n/**\n * Adds the contractState to invocations sending from the contract's balance.\n * @param config - Configuration object.\n * @return Configuration object.\n */\nexport function addSignatureIfExecutingAsSmartContract(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!config.sendingFromSmartContract) {\n return config;\n }\n const witness = yield getVerificationSignatureForSmartContract(config.url, config.sendingFromSmartContract);\n config.tx.addWitness(witness);\n return config;\n });\n}\n//# sourceMappingURL=smartcontract.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { CONST, logging, tx, wallet } from \"@cityofzion/neon-core\";\nimport { extractDump, modifyTransactionForEmptyTransaction } from \"./common\";\nimport { createClaimTx, createContractTx, createInvocationTx, createStateTx } from \"./create\";\nimport { fillBalance, fillClaims, fillSigningFunction, fillUrl } from \"./fill\";\nimport { addAttributeForMintToken, addSignatureForMintToken } from \"./mint\";\nimport { applyTxToBalance, sendTx } from \"./send\";\nimport { signTx } from \"./sign\";\nimport { addAttributeIfExecutingAsSmartContract, addSignatureIfExecutingAsSmartContract } from \"./smartcontract\";\nconst log = logging.default(\"api\");\n/**\n * The core API methods are series of methods defined to aid conducting core functionality while making it easy to modify any parts of it.\n * The core functionality are sendAsset, claimGas and doInvoke.\n * These methods are designed to be modular in nature and intended for developers to create their own custom methods.\n * The methods revolve around a configuration object in which everything is placed. Each method will take in the configuration object, check for its required fields and perform its operations, adding its results to the configuration object and returning it.\n * For example, the getBalanceFrom function requires net and address fields and appends the url and balance fields to the object.\n */\n/**\n * Function to construct and execute a ContractTransaction.\n * @param config Configuration object.\n * @return Configuration object.\n */\nexport function sendAsset(config) {\n return __awaiter(this, void 0, void 0, function* () {\n return fillSigningFunction(config)\n .then(fillUrl)\n .then(fillBalance)\n .then(createContractTx)\n .then(addAttributeIfExecutingAsSmartContract)\n .then(signTx)\n .then(addSignatureIfExecutingAsSmartContract)\n .then(sendTx)\n .then(applyTxToBalance)\n .catch((err) => {\n const dump = extractDump(config);\n log.error(`sendAsset failed with: ${err.message}. Dumping config`, dump);\n throw err;\n });\n });\n}\n/**\n * Perform a ClaimTransaction for all available GAS based on API\n * @param config Configuration object.\n * @return Configuration object.\n */\nexport function claimGas(config) {\n return __awaiter(this, void 0, void 0, function* () {\n return fillSigningFunction(config)\n .then(fillUrl)\n .then(fillClaims)\n .then(createClaimTx)\n .then(addAttributeIfExecutingAsSmartContract)\n .then(signTx)\n .then(addSignatureIfExecutingAsSmartContract)\n .then(sendTx)\n .catch((err) => {\n const dump = extractDump(config);\n log.error(`claimGas failed with: ${err.message}. Dumping config`, dump);\n throw err;\n });\n });\n}\n/**\n * Perform a InvocationTransaction based on config given.\n * @param config Configuration object.\n * @return Configuration object.\n */\nexport function doInvoke(config) {\n return __awaiter(this, void 0, void 0, function* () {\n return fillSigningFunction(config)\n .then(fillUrl)\n .then(fillBalance)\n .then(createInvocationTx)\n .then(addAttributeIfExecutingAsSmartContract)\n .then(addAttributeForMintToken)\n .then(modifyTransactionForEmptyTransaction)\n .then(signTx)\n .then(addSignatureIfExecutingAsSmartContract)\n .then(addSignatureForMintToken)\n .then(sendTx)\n .then(applyTxToBalance)\n .catch((err) => {\n const dump = extractDump(config);\n log.error(`doinvoke failed with: ${err.message}. Dumping config`, dump);\n throw err;\n });\n });\n}\n/**\n * Perform a StateTransaction based on config given.\n * @param config Configuration object.\n * @return modified configuration object.\n */\nexport function setupVote(config) {\n return __awaiter(this, void 0, void 0, function* () {\n return fillSigningFunction(config)\n .then(fillUrl)\n .then(fillBalance)\n .then(createStateTx)\n .then(addAttributeIfExecutingAsSmartContract)\n .then(modifyTransactionForEmptyTransaction)\n .then(signTx)\n .then(addSignatureIfExecutingAsSmartContract)\n .then(sendTx)\n .then(applyTxToBalance)\n .catch((err) => {\n const dump = extractDump(config);\n log.error(`setupVote failed with: ${err.message}. Dumping config`, dump);\n throw err;\n });\n });\n}\nexport function makeIntent(assetAmts, address) {\n const acct = new wallet.Account(address);\n return Object.keys(assetAmts).map(key => {\n return new tx.TransactionOutput({\n assetId: CONST.ASSET_ID[key],\n value: assetAmts[key],\n scriptHash: acct.scriptHash\n });\n });\n}\n//# sourceMappingURL=main.js.map","export * from \"./common\";\nexport * from \"./create\";\nexport * from \"./fill\";\nexport * from \"./mint\";\nexport * from \"./send\";\nexport * from \"./sign\";\nexport * from \"./smartcontract\";\nexport * from \"./main\";\n//# sourceMappingURL=index.js.map","import * as neoCli from \"./provider/neoCli\";\nimport * as neonDB from \"./provider/neonDB\";\nimport * as neoscan from \"./provider/neoscan\";\nexport { neoCli, neoscan, neonDB };\nexport * from \"./funcs\";\n//# sourceMappingURL=plugin.js.map","import * as plugin from \"./plugin\";\nimport { default as apiSettings } from \"./settings\";\nfunction assignSettings(baseSettings, newSettings) {\n for (const key in newSettings) {\n if (!(key in baseSettings)) {\n Object.defineProperty(baseSettings, key, {\n get() {\n return newSettings[key];\n },\n set(val) {\n newSettings[key] = val;\n }\n });\n }\n }\n}\nfunction bundle(neonCore) {\n assignSettings(neonCore.settings, apiSettings);\n return Object.assign({}, neonCore, { api: plugin });\n}\nexport default bundle;\nexport * from \"./plugin\";\n//# sourceMappingURL=index.js.map","import { sc, u, wallet } from \"@cityofzion/neon-core\";\nfunction addressToScriptHash(address) {\n return u.reverseHex(wallet.getScriptHashFromAddress(address));\n}\n/**\n * Returns a function that applies a APPCALL for name to a ScriptBuilder.\n * @example\n * var generator = name(contractScriptHash);\n * var script = generator().str;\n */\nexport function name(scriptHash) {\n return (sb = new sc.ScriptBuilder()) => {\n return sb.emitAppCall(scriptHash, \"name\");\n };\n}\n/**\n * Returns a function that applies a APPCALL for symbol to a ScriptBuilder.\n * @example\n * var generator = symbol(contractScriptHash);\n * var script = generator().str;\n */\nexport function symbol(scriptHash) {\n return (sb = new sc.ScriptBuilder()) => {\n return sb.emitAppCall(scriptHash, \"symbol\");\n };\n}\n/**\n * Returns a function that applies a APPCALL for decimals to a ScriptBuilder.\n * @example\n * var generator = decimals(contractScriptHash);\n * var script = generator().str;\n */\nexport function decimals(scriptHash) {\n return (sb = new sc.ScriptBuilder()) => {\n return sb.emitAppCall(scriptHash, \"decimals\");\n };\n}\n/**\n * Returns a function that applies a APPCALL for totalSupply to a ScriptBuilder.\n * @example\n * var generator = totalSupply(contractScriptHash);\n * var script = generator().str;\n */\nexport function totalSupply(scriptHash) {\n return (sb = new sc.ScriptBuilder()) => {\n return sb.emitAppCall(scriptHash, \"totalSupply\");\n };\n}\n/**\n * Returns a function that applies a APPCALL for balanceOf to a ScriptBuilder.\n * @example\n * var generator = balanceOf(contractScriptHash, address);\n * var script = generator().str;\n */\nexport function balanceOf(scriptHash, addr) {\n return (sb = new sc.ScriptBuilder()) => {\n const addressHash = addressToScriptHash(addr);\n return sb.emitAppCall(scriptHash, \"balanceOf\", [addressHash]);\n };\n}\n/**\n * Returns a function that applies a APPCALL for balanceOf to a ScriptBuilder.\n * amt is multipled by 100,000,000. The minimum number that can be provided is thus 0.00000001.\n * @example\n * var generator = transfer(contractScriptHash, sendingAddress, receivingAddress, amt);\n * var script = generator().str;\n */\nexport function transfer(scriptHash, fromAddr, toAddr, amt) {\n return (sb = new sc.ScriptBuilder()) => {\n const fromHash = addressToScriptHash(fromAddr);\n const toHash = addressToScriptHash(toAddr);\n const adjustedAmt = new u.Fixed8(amt).toRawNumber();\n return sb.emitAppCall(scriptHash, \"transfer\", [\n fromHash,\n toHash,\n sc.ContractParam.integer(adjustedAmt.toString())\n ]);\n };\n}\n//# sourceMappingURL=abi.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { logging, rpc, sc, u, wallet } from \"@cityofzion/neon-core\";\nimport * as abi from \"./abi\";\nconst log = logging.default(\"nep5\");\nconst parseTokenInfo = rpc.buildParser(rpc.StringParser, rpc.StringParser, rpc.IntegerParser, rpc.Fixed8Parser);\nconst parseTokenInfoAndBalance = rpc.buildParser(rpc.StringParser, rpc.StringParser, rpc.IntegerParser, rpc.Fixed8Parser, rpc.Fixed8Parser);\n/**\n * Get the balance of a single token for a single address.\n * @param url Url of the NEO node to query.\n * @param scriptHash ScriptHash of the NEP5 contract.\n * @param address the Address to query for the balance.\n */\nexport function getTokenBalance(url, scriptHash, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const sb = new sc.ScriptBuilder();\n abi.decimals(scriptHash)(sb);\n abi.balanceOf(scriptHash, address)(sb);\n const script = sb.str;\n try {\n const res = yield rpc.Query.invokeScript(script).execute(url);\n const decimals = rpc.IntegerParser(res.result.stack[0]);\n return rpc\n .Fixed8Parser(res.result.stack[1])\n .mul(Math.pow(10, 8 - decimals));\n }\n catch (err) {\n log.error(`getTokenBalance failed with : ${err.message}`);\n throw err;\n }\n });\n}\n/**\n * Get token balances for an address.\n * @param url URL of the NEO node to query.\n * @param scriptHashArray Array of contract scriptHashes.\n * @param address Address to query for balance of tokens.\n */\nexport function getTokenBalances(url, scriptHashArray, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const addrScriptHash = u.reverseHex(wallet.getScriptHashFromAddress(address));\n const sb = new sc.ScriptBuilder();\n scriptHashArray.forEach(scriptHash => {\n sb.emitAppCall(scriptHash, \"symbol\")\n .emitAppCall(scriptHash, \"decimals\")\n .emitAppCall(scriptHash, \"balanceOf\", [addrScriptHash]);\n });\n const res = yield rpc.Query.invokeScript(sb.str).execute(url);\n const tokenList = {};\n if (!res ||\n !res.result ||\n !res.result.stack ||\n res.result.stack.length !== 3 * scriptHashArray.length) {\n throw new Error(\"Stack returned was invalid\");\n }\n try {\n for (let i = 0; i < res.result.stack.length; i += 3) {\n try {\n const symbol = rpc.StringParser(res.result.stack[i]);\n const decimals = rpc.IntegerParser(res.result.stack[i + 1]);\n tokenList[symbol] = rpc\n .Fixed8Parser(res.result.stack[i + 2])\n .mul(Math.pow(10, 8 - decimals));\n }\n catch (e) {\n log.error(`single call in getTokenBalances failed with : ${e.message}`);\n throw e;\n }\n }\n return tokenList;\n }\n catch (err) {\n log.error(`getTokenBalances failed with : ${err.message}`);\n throw err;\n }\n });\n}\n/**\n * Retrieves the complete information about a token.\n * @param url RPC Node url to query.\n * @param scriptHash ScriptHash of the NEP5 contract.\n * @param address Optional address to query the balance for. If provided, the returned object will include the balance property.\n */\nexport function getToken(url, scriptHash, address) {\n return __awaiter(this, void 0, void 0, function* () {\n const parser = address ? parseTokenInfoAndBalance : parseTokenInfo;\n const sb = new sc.ScriptBuilder();\n abi.name(scriptHash)(sb);\n abi.symbol(scriptHash)(sb);\n abi.decimals(scriptHash)(sb);\n abi.totalSupply(scriptHash)(sb);\n if (address) {\n abi.balanceOf(scriptHash, address)(sb);\n }\n const script = sb.str;\n try {\n const res = yield rpc.Query.invokeScript(script)\n .parseWith(parser)\n .execute(url);\n const result = {\n name: res[0],\n symbol: res[1],\n decimals: res[2],\n totalSupply: res[3].div(Math.pow(10, 8 - res[2])).toNumber()\n };\n if (address) {\n result.balance = res[4].div(Math.pow(10, 8 - res[2]));\n }\n return result;\n }\n catch (err) {\n log.error(`getToken failed with : ${err.message}`);\n throw err;\n }\n });\n}\n/**\n * Retrieves the complete information about a list of tokens.\n * @param url RPC Node url to query.\n * @param scriptHashArray Array of NEP5 contract scriptHashes.\n * @param address Optional address to query the balance for. If provided, the returned object will include the balance property.\n */\nexport function getTokens(url, scriptHashArray, address) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const sb = new sc.ScriptBuilder();\n scriptHashArray.forEach(scriptHash => {\n if (address) {\n const addrScriptHash = u.reverseHex(wallet.getScriptHashFromAddress(address));\n sb.emitAppCall(scriptHash, \"name\")\n .emitAppCall(scriptHash, \"symbol\")\n .emitAppCall(scriptHash, \"decimals\")\n .emitAppCall(scriptHash, \"totalSupply\")\n .emitAppCall(scriptHash, \"balanceOf\", [addrScriptHash]);\n }\n else {\n sb.emitAppCall(scriptHash, \"name\")\n .emitAppCall(scriptHash, \"symbol\")\n .emitAppCall(scriptHash, \"decimals\")\n .emitAppCall(scriptHash, \"totalSupply\");\n }\n });\n const res = yield rpc.Query.invokeScript(sb.str).execute(url);\n const result = [];\n const step = address ? 5 : 4;\n for (let i = 0; i < res.result.stack.length; i += step) {\n const name = rpc.StringParser(res.result.stack[i]);\n const symbol = rpc.StringParser(res.result.stack[i + 1]);\n const decimals = rpc.IntegerParser(res.result.stack[i + 2]);\n const totalSupply = rpc\n .Fixed8Parser(res.result.stack[i + 3])\n .dividedBy(Math.pow(10, decimals - rpc.IntegerParser(res.result.stack[i + 2])))\n .toNumber();\n const balance = address\n ? rpc\n .Fixed8Parser(res.result.stack[i + 4])\n .dividedBy(Math.pow(10, decimals - rpc.IntegerParser(res.result.stack[i + 2])))\n : undefined;\n const obj = {\n name,\n symbol,\n decimals,\n totalSupply,\n balance\n };\n if (!obj.balance) {\n delete obj.balance;\n }\n result.push(obj);\n }\n return result;\n }\n catch (err) {\n log.error(`getTokens failed with : ${err.message}`);\n throw err;\n }\n });\n}\n//# sourceMappingURL=main.js.map","import * as abi from \"./abi\";\nimport { getToken, getTokenBalance, getTokenBalances, getTokens } from \"./main\";\nexport { abi, getToken, getTokens, getTokenBalance, getTokenBalances };\n//# sourceMappingURL=plugin.js.map","import * as nep5 from \"./plugin\";\nfunction bundle(neonCore) {\n return Object.assign({}, neonCore, { nep5 });\n}\nexport default bundle;\nexport * from \"./plugin\";\n//# sourceMappingURL=index.js.map"],"sourceRoot":""}
\No newline at end of file